-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Inconsistent resource_manager_tags behavior on google_container_cluster #18793
Inconsistent resource_manager_tags behavior on google_container_cluster #18793
Comments
Hi @Register-0! I'm trying to replicate this issue, but I just obtained a result of
|
# module.cluster.google_container_cluster.kubernetes_cluster will be updated in-place
~ resource "google_container_cluster" "kubernetes_cluster" {
id = "projects/mycompany-nastaging-kubernetes/locations/us-east4/clusters/nastaging-us-east4-cluster"
name = "nastaging-us-east4-cluster"
# (31 unchanged attributes hidden)
+ fleet {
+ project = "mycompany-nastaging-kubernetes"
}
~ node_pool_auto_config {
+ resource_manager_tags = {}
}
# (25 unchanged blocks hidden)
}
but after allowing the "update in-place", the nodes are destroyed and recreated. I think this is considered "in place" because the node-pool itself is not recreated, but the nodes are. |
It looks like even if terraform says that it is an update-in-place it is destroying and recreating the resource internally |
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. |
Community Note
Terraform Version & Provider Version(s)
Terraform v1.6.6
on Rocky Linux 8
Affected Resource(s)
google_container_cluster
Terraform Configuration
Shows
resource_manager_tags
=null
Shows
resource_manager_tags
={}
(must be pre-existing resource)Debug Output
Since the cluster must exist ahead before adding the fleet and I do not have the authority to create original clusters due to IP pressure, these are the truncated tails of runs on one of our staging environments (gists will not hold the whole log). Gist is located here
Expected Behavior
The
resource_manager_tags
map can be overwritten to null, and we have used this to prevent node pools from being recreated until we are ready. We would like the behavior to be consistent between having a fleet block and not having a fleet block (ideally allowing the null value).Actual Behavior
When the
resource_manager_tags
is overwritten tonull
, the value is accepted and persisted as part of the terraform state until the fleet block is added. Once the fleet block is added to a pre-existing cluster, the state changes fromnull
to{}
, and triggers a rebuild of the node pool, which is not desirable.Steps to reproduce
terraform apply
the first version of the configurationresource_manager_tags
Important Factoids
N/A
References
Support for
resource_manager_tags
was added as part of: #16614b/356651267
The text was updated successfully, but these errors were encountered: