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

Improvement: azurerm_kubernetes_cluster - Add support for load_balancer_profile #5394

Merged
merged 8 commits into from
Jan 24, 2020

Conversation

evenh
Copy link
Contributor

@evenh evenh commented Jan 14, 2020

Re-basing #4472

Fixes #4322

@evenh
Copy link
Contributor Author

evenh commented Jan 16, 2020

This PR has been open in various forms since September 20th 2019 - any chance of this getting merged into 1.42.0 @katbyte? 🤞

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks for rebasing and reopening this @evenh,

I've got a few questions and comments i've left inline but otherwise this is looking good.

@evenh
Copy link
Contributor Author

evenh commented Jan 20, 2020

I’ve fixed your comments @katbyte :)

@ghost ghost removed the waiting-response label Jan 20, 2020
@evenh evenh requested a review from katbyte January 21, 2020 11:44
@tombuildsstuff tombuildsstuff added this to the v1.42.0 milestone Jan 22, 2020
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Hey @evenh. I've got a couple of issues that need to be addressed, one is a potential panic and another is potentially not setting a nil value. I'm still running through the tests on our end but 🤞 we don't have any more snags. Thanks for your patience here

@evenh
Copy link
Contributor Author

evenh commented Jan 23, 2020

Thanks for the review @mbfrahry. I've pushed a commit with the requested changes.

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Apologies on the delay, the tests for this resource take ages and despite this looking like a straightforward addition, it raised some tests failures. It looks like Azure puts default values based on the load_balancer_sku. You can see that by running the TestAccAzureRMKubernetesCluster_standardLoadBalancer tests. These tests failed with the error:

After applying this step, the plan was not empty:

          network_profile.0.load_balancer_profile.#:                                     "1" => "0" (forces new resource)
          network_profile.0.load_balancer_profile.0.effective_outbound_ips.#:            "1" => "" (forces new resource)
          network_profile.0.load_balancer_profile.0.managed_outbound_ip_count:           "1" => "" (forces new resource)
          network_profile.0.load_balancer_profile.0.outbound_ip_address_ids.#:           "0" => "" (forces new resource)
          network_profile.0.load_balancer_profile.0.outbound_ip_prefix_ids.#:            "0" => "" (forces new resource)

I looked at the payload being returned from the api and can confirm that the api is defaulting these values. It looks like we may want to add Computed: true to each of the fields you're adding. As well as ConfigMode: schema.SchemaConfigModeAttr, to each of the Sets so they can be modified/removed if need be.

You'll want to run TestAccAzureRMKubernetesCluster_standardLoadBalancer after those changes are in to confirm we're all good.

There were a couple other misses from tests not being run in the suite. They do pass when run manually though it'd be good to get them into our nightly test run as well

@tombuildsstuff tombuildsstuff modified the milestones: v1.42.0, v1.43.0 Jan 24, 2020
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

Tests pass and this LGTM. Thanks for the effort here @evenh

@mbfrahry mbfrahry modified the milestones: v1.43.0, v1.42.0 Jan 24, 2020
@mbfrahry mbfrahry changed the title AKS: Support outbound IPs when using standard loadbalancer Improvement: azurerm_kubernetes_cluster - Add support for load_balancer_profile Jan 24, 2020
@evenh
Copy link
Contributor Author

evenh commented Jan 24, 2020

Hooray 🎉 Thanks for the thorough reviews!

@mbfrahry mbfrahry merged commit 8038e49 into hashicorp:master Jan 24, 2020
mbfrahry added a commit that referenced this pull request Jan 24, 2020
@ghost
Copy link

ghost commented Jan 27, 2020

This has been released in version 1.42.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.42.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AKS: support setting cluster outbound IPs when using standard loadbalancer
4 participants