Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(azurerm): upgrade to 3.3.0 #157

Merged
merged 5 commits into from
Jun 16, 2022

Conversation

eyenx
Copy link
Contributor

@eyenx eyenx commented Apr 22, 2022

Fixes #145
Fixes #156

Changes proposed in the pull request:

Upgrade azurerm to 3.3.0 following the upgrade guide https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/3.0-upgrade-guide#resource-azurerm_kubernetes_cluster

Tests succesful:

TestTerraformBasicExample 2022-04-22T11:25:27Z command.go:96: Destroy complete! Resources: 18 destroyed.
--- PASS: TestTerraformBasicExample (1473.05s)
PASS
ok      terraform-azurerm-aks/test      1473.061s

Signed-off-by: Toni Tauro [email protected]

@ghost
Copy link

ghost commented Apr 22, 2022

CLA assistant check
All CLA requirements met.

@eyenx
Copy link
Contributor Author

eyenx commented May 20, 2022

Hi Reviewers

It has been a month. Can we get some review on this?

@lonegunmanb

@lonegunmanb
Copy link
Member

Hello @eyenx , thanks for opening this pr. Upgrading to 3.x may introduce some breaking changes, while we're planning on adding a new CI pipeline to this module so the further pr can be tested in GitHub action. We're working on this so the next release won't change module's code dramatically. I'm sorry to say that we might need more time to merge this pr.

Copy link
Member

@lonegunmanb lonegunmanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When apply test/fixture folder, the following errors occured:

╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 37:
│   37: output "test_client_key" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵
╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 41:
│   41: output "test_client_certificate" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵
╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 45:
│   45: output "test_cluster_ca_certificate" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵
╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 49:
│   49: output "test_host" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵
╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 53:
│   53: output "test_username" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵

variables.tf Outdated Show resolved Hide resolved
outputs.tf Outdated Show resolved Hide resolved
subnet_id = var.ingress_application_gateway_subnet_id
}
dynamic "ingress_application_gateway" {
for_each = var.enable_ingress_application_gateway == null ? [] : ["ingress_application_gateway"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if var.enable_ingress_application_gateway is false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did the same as on line 80 with identity. As far as I can see we do not check there either if it's null or false

oms_agent {
enabled = var.enable_log_analytics_workspace
dynamic "oms_agent" {
for_each = var.enable_log_analytics_workspace ? ["oms_agent"] : []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if var.enable_log_analytics_workspace is null? Should we add nullable = false to the variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did the same as on line 80 with identity. As far as I can see we do not check there either if it's null or false

@lonegunmanb
Copy link
Member

Hi @eyenx , after discussed with my team, we decided to accept this pr before we introduce pipeline to this module. There're some suggestions remain, would you please take a look? Thanks.

eyenx and others added 2 commits June 15, 2022 11:10
Co-authored-by: lonegunmanb <[email protected]>
Co-authored-by: lonegunmanb <[email protected]>
@eyenx
Copy link
Contributor Author

eyenx commented Jun 15, 2022

Hi @lonegunmanb thanks for the review.

I answered some comments of yours and applied some changes.

@lonegunmanb
Copy link
Member

@eyenx thanks for updating, after run the test I've got the following error:

╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 37:
│   37: output "test_client_key" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵
╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 41:
│   41: output "test_client_certificate" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵
╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 45:
│   45: output "test_cluster_ca_certificate" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵
╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 49:
│   49: output "test_host" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵
╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 53:
│   53: output "test_username" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵
╷
│ Error: Output refers to sensitive values
│
│   on outputs.tf line 57:
│   57: output "test_password" {
│
│ To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output     
│ containing sensitive data be explicitly marked as sensitive, to confirm your intent.
│
│ If you do intend to export this data, annotate the output value as sensitive by adding the following argument:
│     sensitive = true
╵

I think it's ok to leave the variables' validation blank for now since the existing variables are lacking of proper validation, I'll deal with them in the later pr. Would you please update the outputs.tf in the test/fixture folder to make the test green light? Thanks.

@eyenx
Copy link
Contributor Author

eyenx commented Jun 15, 2022

Done! @lonegunmanb

@lonegunmanb
Copy link
Member

@eyenx apology for the confusion, but these errors are complaining that the outputs in test/fixture folder are lacking of sensitive argument. Would you please correct these issues? Thanks.

@eyenx
Copy link
Contributor Author

eyenx commented Jun 16, 2022

I see should I revert my changes then?

@eyenx
Copy link
Contributor Author

eyenx commented Jun 16, 2022

@lonegunmanb can you retry? my tests worked now.

@eyenx eyenx requested a review from lonegunmanb June 16, 2022 08:34
@lonegunmanb lonegunmanb merged commit 0b56a45 into Azure:master Jun 16, 2022
@lonegunmanb
Copy link
Member

Thanks @eyenx, LGTM!

@eyenx eyenx deleted the chore/ugrade-azurerm-to-3.3.0 branch June 16, 2022 10:06
@davidkarlsen
Copy link
Contributor

@lonegunmanb Awesome! Will there be a release soon?

@lonegunmanb
Copy link
Member

lonegunmanb commented Jun 16, 2022

@lonegunmanb Awesome! Will there be a release soon?

Hi @davidkarlsen , since this release will introduce breaking changes, I'd like to submit several more pull requests which contain breaking changes to improve the current code so the users will experience one time breaking change then everything will be stable.

And I still need more time to test the impact caused by this major version upgrade, we may warn our users on what will happen if they choose to upgrade this major version.

@hairmare
Copy link
Contributor

hairmare commented Jul 26, 2022

Hi @lonegunmanb Thanks for merging this. Is there any chance that it could get released soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to AzureRM 3.3.0 addon_profile has been deprecated
4 participants