diff --git a/.changelog/4674.txt b/.changelog/4674.txt new file mode 100644 index 00000000000..c4f4ba1cf2e --- /dev/null +++ b/.changelog/4674.txt @@ -0,0 +1,3 @@ +```release-note:bug +container: fixed a bug that allowed specifying `node_config` on `google_container_cluster` when autopilot is used +``` diff --git a/google/resource_container_cluster.go b/google/resource_container_cluster.go index a81798d6d08..8a68cf701e3 100644 --- a/google/resource_container_cluster.go +++ b/google/resource_container_cluster.go @@ -75,6 +75,8 @@ func clusterSchemaNodeConfig() *schema.Schema { changeFieldSchemaToForceNew(sch) } } + // Autopilot is only applicable for container cluster + nodeConfigSch.ConflictsWith = []string{"enable_autopilot"} return nodeConfigSch }