-
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
Perma-diff due to new location_policy being repeatedly unset #1478
Comments
Hi @jawnsy , I have the same problem, just that mine changes away from ~ resource "google_container_node_pool" "pools" {
name = "default-node-pool"
# (10 unchanged attributes hidden)
~ autoscaling {
- location_policy = "BALANCED" -> null
# (4 unchanged attributes hidden)
}
# (5 unchanged blocks hidden)
} Do you know where exactly to set this |
Nevermind, I just tried to set it in the module definition via: cluster_autoscaling = {
enabled = false
autoscaling_profile = null
min_cpu_cores = 0
max_cpu_cores = 0
min_memory_gb = 0
max_memory_gb = 0
gpu_resources = []
} But this line prevents the module from picking up the change. That workaround doesn't work. I also tried setting it to something like ╷
│ Error: expected cluster_autoscaling.0.autoscaling_profile to be one of [BALANCED OPTIMIZE_UTILIZATION], got
│
│ with module.clickhouse.module.gke.module.gke.google_container_cluster.primary,
│ on .terraform/modules/clickhouse.gke.gke/modules/beta-private-cluster/cluster.tf line 107, in resource "google_container_cluster" "primary":
│ 107: autoscaling_profile = var.cluster_autoscaling.autoscaling_profile != null ? var.cluster_autoscaling.autoscaling_profile : "BALANCED"
│
╵ So this needs to be changed in the source code first if I am not completely mistaken. |
@marcleibold Here's what I'm using for my node pool setting:
You just have to add |
Thanks for the report @jawnsy |
This was fixed in GoogleCloudPlatform/magic-modules#6982 |
This issue 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 |
TL;DR
The new autoscaling
location_policy
setting is set tonull
to avoid issues with pre-1.24 clusters, however, this results in a permadiff due to the provider repeatedly changing ANY to nullExpected behavior
I expected upgrading module versions without modifying my infrastructure not to require any changes to infrastructure, or if it required changes, then I expected it to apply the change as a one-time upgrade migration.
It would be nice if the module could supply the appropriate location policy according to the control plane version (for post-1.24 clusters, supply ANY, otherwise, supply null), but this logic may belong in the provider instead.
Observed behavior
This may be an issue with the provider, but the symptom of this is that applying changes results in the location_policy being repeatedly reset to the default, which is ANY:
This is a perma-diff that #1452 was trying to fix.
Terraform Configuration
n/a
Terraform Version
Additional information
The workaround/solution is for users to explicitly set a
location_policy
toANY
if they are using a post-1.24 cluster, ornull
otherwise.The text was updated successfully, but these errors were encountered: