-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Ignore dns_config changes for Autopilot clusters #8654
Ignore dns_config changes for Autopilot clusters #8654
Conversation
Autopilot does not allow to modify dns_config. Recently, in Autopilot the default dns_config has changed to be: ``` dns_config { cluster_dns = "CLOUD_DNS" cluster_dns_domain = "cluster.local" cluster_dns_scope = "CLUSTER_SCOPE" } ``` This breaks Autopilot customers as the terraform tries to converge dns_config back to null.
Hello! I am a robot. It looks like you are a: @SarahFrench, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
To the reviewer: may I ask - does this change ensure that I'm 95% confident it will be, but I'm double checking (as I'm not that familiar with the code-base & terraform commands). |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 1 file changed, 6 insertions(+), 5 deletions(-)) |
Ran the testacc
|
I also think that it'll work; the The best way to confirm it would be with a test. I can see that our acceptance tests that run every night includes TestAccContainerCluster_autopilot_minimal, and this test is currently failing due to the issue you highlighted (see below). Hopefully the automated tests running on this PR will show the test pass.
|
Tests analyticsTotal tests: Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccCertificateManagerCertificate_certificateManagerSelfManagedCertificateExample|TestAccCertificateManagerCertificate_certificateManagerGoogleManagedCertificateIssuanceConfigExample |
Rerun these tests in REPLAYING mode to catch issues
|
👆 I think that because the tests are running off recorded API responses the problem isn't apparent above. I'll manually run a test using this PR's changes soon |
Cool, thanks! I also did already verify the change manually yesterday (with the override to the built provider) and it works as expected. ps: this RECORDING/REPLAYING mode looks interesting. It did handle the unrelated flaky test gracefully IIUC? |
@SarahFrench may I ask for review if possible? I have verified manually autopilot cluster create/update with Thanks! |
I'm fine with approving this, but I have concerns about the issue impacting earlier versions of the provider. I'd like to wait on merging until we have a discussion around other potential fixes for this issue |
This PR is needed anyway. It goes along with the fact that consumers of GKE Autopilot API cannot modify the By holding this PR it won't make anything better. It's definitely better to split and move the discussion about the breaking change of Autopilot API to the issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sort of a special case because of autopilot, but we need to seriously consider the cost of these sort of API changes and how they impact Terraform users going forward.
…#8654) Autopilot does not allow to modify dns_config. Recently, in Autopilot the default dns_config has changed to be: ``` dns_config { cluster_dns = "CLOUD_DNS" cluster_dns_domain = "cluster.local" cluster_dns_scope = "CLUSTER_SCOPE" } ``` This breaks Autopilot customers as the terraform tries to converge dns_config back to null.
Recently, GKE Autopilot has changed the default dns_config to be:
Customers are not allowed to modify dns_confg in GKE Autopilot. It's a pre-configured feature/config.
But this change still affects Autopilot customers as the terraform tries to converge back to dns_config=null (original default value).
To fix this and to be aligned with the fact that it's not allowed to modify dns_config in Autopilot, this PR makes
google_container_cluster
to ignoredns_config
changes.Issues:
Fixes hashicorp/terraform-provider-google#15484
Fixes hashicorp/terraform-provider-google#15454
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
in the generated providers to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)