-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: set CLOUD_DNS as provider for gke autopilot cluster #1700
fix: set CLOUD_DNS as provider for gke autopilot cluster #1700
Conversation
86325d6
to
8e2d9fe
Compare
This is hitting us in production since yesterday, Terraform always wants to replace the autopilot cluster:
|
have been experiencing the same issue, perhaps exposing this ( |
I agree, especially after realising that existing clusters will be migrated over time. So, it might make sense to overwrite the variable while I will update the PR accordingly. |
> Starting in August 2023, the default DNS provider for your new GKE Autopilot > clusters using version 1.25.9-gke.400 or later and 1.26.4-gke.500 or later > becomes Cloud DNS, at no extra charge. This change will be gradual and > expected to be completed by Aug 12th. Without this change, the default setting `PROVIDER_UNSPECIFIED` for `dns_config.cluster_dns` is used with the `google_container_cluster` ressource. Thus running terraform apply to update parts of an deployment will always recreate the cluster: ``` - dns_config { # forces replacement - cluster_dns = "CLOUD_DNS" -> null - cluster_dns_domain = "cluster.local" -> null - cluster_dns_scope = "CLUSTER_SCOPE" -> null } ```
8e2d9fe
to
f88afab
Compare
/gcbrun |
1 similar comment
/gcbrun |
Just to confirm: I've used this on multiple clusters to fix the recreation issue. |
Hi, may I suggest a better fix for this PR if that sg and if it's possible to do in the codebase? The GKE Autopilot API does not allow to modify these fields (dns_config/...), there's no point to parameterise those as any unexpected value for dns_config/... will be rejected by the API. It's better to ignore the field values in this module. So that the module would just ignore the changes and won't recreate the resource.
|
/gcbrun |
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Without this change, the default setting
PROVIDER_UNSPECIFIED
fordns_config.cluster_dns
is used with thegoogle_container_cluster
ressource.
Thus running terraform apply to update parts of an deployment will
always recreate the cluster: