Skip to content

Commit 76f6d48

Browse files
Ignore dns_config changes for Autopilot clusters (#8654) (#15549)
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. Signed-off-by: Modular Magician <[email protected]>
1 parent 622fd4f commit 76f6d48

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.changelog/8654.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
container: updated `resource_container_cluster` to ignore `dns_config` diff when `enable_autopilot = true`
3+
```

google/services/container/resource_container_cluster.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -1717,11 +1717,12 @@ func ResourceContainerCluster() *schema.Resource {
17171717
},
17181718
},
17191719
"dns_config": {
1720-
Type: schema.TypeList,
1721-
Optional: true,
1722-
MaxItems: 1,
1723-
ForceNew: true,
1724-
Description: `Configuration for Cloud DNS for Kubernetes Engine.`,
1720+
Type: schema.TypeList,
1721+
Optional: true,
1722+
MaxItems: 1,
1723+
ForceNew: true,
1724+
DiffSuppressFunc: suppressDiffForAutopilot,
1725+
Description: `Configuration for Cloud DNS for Kubernetes Engine.`,
17251726
Elem: &schema.Resource{
17261727
Schema: map[string]*schema.Schema{
17271728
"cluster_dns": {

0 commit comments

Comments
 (0)