Terraform and provider versions
Terraform required version: ~> 1.14.7
Helm provider: hashicorp/helm 3.1.1 (constraint: ~> 3.1.1)
Kubernetes provider: hashicorp/kubernetes 3.0.1
AWS provider: hashicorp/aws 6.37.0
Affected resource
helm_release.aws-lb-controller
- Chart:
aws-load-balancer-controller (configuration default: 3.1.0)
- Repository:
https://aws.github.io/eks-charts
Problem
Terraform cannot decode the prior state for an existing helm_release resource and then fails while upgrading the resource state.
Error output
Warning: Failed to decode resource from state
Error decoding "helm_release.aws-lb-controller" from prior state: missing expected {
Error: Unable to Upgrade Resource State
with helm_release.aws-lb-controller,
on controller.tf line 29, in resource "helm_release" "aws-lb-controller":
29: resource "helm_release" "aws-lb-controller" {
This resource was implemented with an UpgradeState() method, however Terraform was
expecting an implementation for version 0 upgrade.
This is always an issue with the Terraform Provider and should be reported to the provider
developer.
Steps to reproduce (observed)
This is the observed workflow, not yet a standalone minimal reproduction:
- Use a Terraform state that already contains a
helm_release named aws-lb-controller.
- Configure the Helm provider as
hashicorp/helm ~> 3.1.1, resolving to 3.1.1.
- Configure the resource with the AWS EKS chart repository and chart shown above.
- Run
terraform init and then terraform plan against that existing state.
- Terraform emits the decode warning and terminates with
Unable to Upgrade Resource State, because it expects a version-0 state upgrader.
Expected behavior
The Helm provider should decode and migrate the prior helm_release state so Terraform can complete planning without requiring manual state removal or re-import.
Related reports
Those reports describe related Helm provider v3 state-migration failures, but this report captures the failure with Terraform ~> 1.14.7 and Helm provider 3.1.1.
Terraform and provider versions
Affected resource
helm_release.aws-lb-controlleraws-load-balancer-controller(configuration default:3.1.0)https://aws.github.io/eks-chartsProblem
Terraform cannot decode the prior state for an existing
helm_releaseresource and then fails while upgrading the resource state.Error output
Steps to reproduce (observed)
This is the observed workflow, not yet a standalone minimal reproduction:
helm_releasenamedaws-lb-controller.hashicorp/helm~> 3.1.1, resolving to3.1.1.terraform initand thenterraform planagainst that existing state.Unable to Upgrade Resource State, because it expects a version-0 state upgrader.Expected behavior
The Helm provider should decode and migrate the prior
helm_releasestate so Terraform can complete planning without requiring manual state removal or re-import.Related reports
Those reports describe related Helm provider v3 state-migration failures, but this report captures the failure with Terraform
~> 1.14.7and Helm provider3.1.1.