Closed sandal-maker closed 1 year ago
In addition to the above, I've tested the kubernetes_horizontal_pod_autoscaler_v2
and found that the issue above can be found in kubernetes_horizontal_pod_autoscaler_v2
resource as well.
Hi @sandal-maker,
Thank you for reporting this issue. This is a duplicate of https://github.com/hashicorp/terraform-provider-kubernetes/issues/1188.
For now the workaround is to change the order in your Terraform code -- make it the same as in the API reply from Kubernetes.
Thank you.
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Steps to Reproduce
kubernetes_horizontal_pod_autoscaler_v2beta2
resource with more than 1 metric sub stanzaExpected Behavior
The expectation was that there'd be no planned changes to be performed on the
kubernetes_horizontal_pod_autoscaler_v2beta2
resource.Actual Behavior
After the initial
terraform apply
all subsequent terraform runs permanently plans a difference attempting re-order the metrics.In my case I have two metrics
The initial Terraform run applies them successfully. But all subsequent Terraform runs tries to change the order these two metrics are created.
It would appear the plan rearranges the metrics array every time.
Important Factoids
The cluster in on GCP and using GKE. The GKE version is mentioned above.
References
I could not find any at the moment. Apologies if I have missed an existing ticket related to this. Please link the existing one here and we can close this. Thanks.
Community Note