Hi,
I am using terraform v0.13.4 with helm provider v1.3.2 and helm_release provided by it. I see that helm version 3 is being used by terraform.
Every time I do a deployment with terraform/helm, a new release version is deployed or an upgrade may happen depending upon the use of argument like reuse_values.
But, sometimes I would like to rollback to a previous version, but I don’t see how to do that with above resource, it seems, there is no argument/option for rollbacks configurations.
I am following the doc at - https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release
Even the new helm provider v2.02 docs are same on this topic as it was for v1.3.2.
I am not able to find any specific documentation. Please help me to understand, it may be I miss reading a part of docs or there could be more to this which I don’t know.
Terraform is designed to change the state of resources to what is defined in the code. As a result it triggers an update any time one of the supplied parameters (values, chart details, etc.) change. Terraform has no concept of a “version” of a particular resource or the idea of “rollback”.
If you are wanting to change the state of the helm resource back to how it was at a previous time just change the resource parameters to the same values and run terraform apply
Thanks for the reply. I got the idea behind this ie the approach to state management in terraform.
I used to think, since helm manages kubernetes resources behind the scenes, and even terraform does not know much about the kubernetes objects configurations managed by helm using helm_release resource, ‘helm rollback’ command might be supported with some terraform configuration for the state of revisions of release.