-
Notifications
You must be signed in to change notification settings - Fork 373
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
Larger diff than expected generated when changing helm_release 'set' 'value' #915
Comments
Fix issue hashicorp#915 where when re-deploying a helm_release after changing a 'set' 'value' the plan generated indicates that values not changing will be deleted and re-applied even though they have not been changed. The issue is caused by the resource diff process removing the 'set' 'type' value from the state as it was not set in the original terraform code. When initially applying the plan the default value "" was used for the 'set' 'type' and stored in the state, when redeploying the original value of 'set' 'type' is requested but as no default has been set in the schema it is marked as removed, which then results in null being stored in the state for the value of 'set' 'type'. This cause an internal warning to be generated in the logs: "Provider "registry.terraform.io/hashicorp/helm" produced an unexpected new value for helm_release.test during refresh."
I am also hitting this. I would argue that the expected behaviour should be ~ set {
name = "resources.requests.memory"
~ value = "xxxMi" -> "yyyMi"
} instead of still having a deletion and an addition for that changed value (i.e., when a single value is updated, I believe it should show as "update in-place") |
Closing this issue as resolved with https://github.com/hashicorp/terraform-provider-helm/releases/tag/v2.8.0 - in PR #916 |
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. |
Terraform, Provider, Kubernetes and Helm Versions
Affected Resource(s)
Terraform Configuration Files
Debug Output
NOTE: In addition to Terraform debugging, please set HELM_DEBUG=1 to enable debugging info from helm.
Terraform log and state file: https://gist.github.com/adcharre/120482e9f4d4bcb5641c49f6fb35f0f1
Panic Output
Steps to Reproduce
terraform apply -auto-approve -var memory=100Mi
terraform apply -auto-approve -var memory=120Mi
terraform apply -auto-approve -var memory=100Mi
Expected Behavior
On second and third apply, xxx and yyy would be a number.
Actual Behavior
On second and third apply:
On the third apply the follow warning is also seen in the log:
This looks like it might therefore be related to #711
Examining the state file it is clear that the "type" value for the "replicaCount" is now set to null.
Important Factoids
References
Community Note
The text was updated successfully, but these errors were encountered: