Skip to content

Helm Provider Upgrade to 3.0.1 Introduces Unexpected Behavior with postrender, Namespace Resolution and Version Drift #1647

@sujith1594

Description

@sujith1594

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: 1.9.8
Provider version: 3.0.1
Kubernetes version: 1.31

Issue 1: Postrender Attribute Causes Revisions and Chart Failures

We have upgraded the Terraform Helm Provider from 2.17.0 to 3.0.1.Updated the helm_resource block with all the breaking changes. After the upgrade, all Helm charts show a planned update in terraform plan with below change even though there are no changes in chart configuration.

 - postrender                 = {
          - args        = [] -> null
          - binary_path = "" -> null
        } -> null

Applying this causes unnecessary new revisions and in some cases, pods restart.
To mitigate this, we added a lifecycle rule to ignore the postrender attribute. That suppresses the diff as expected.
However, on making a valid change and reapplying, we receive this error:

Error: Error creating post-renderer
Could not create post-renderer: unable to find binary at : exec: "":
executable file not found in $PATH

Issue 2: Helm Behavior Changed When Templates Lack Explicit Namespace

In our setup, Terraform Enterprise runs in an EKS cluster and the tfe runs happen in the "tfe-dev-agents" namespace. After the upgrade, charts that do not explicitly declare "metadata.namespace" in their template manifest are:

Being deployed into the namespace specified in the helm_release block as expected.

However, their internal resources (e.g., from hooks or templates) are trying to deploy in "tfe-dev-agents", resulting in errors like:

Upgrade failed: namespaces "tfe-dev-agents" not found

This namespace doesn't exist in the target cluster, and we do not want to create it there. This behavior did not exist in v2.17.0 and seems tied to how the provider now resolves default namespaces.

Issue 3: Version Attribute Shows Diff for few charts

 ~ version = "0.5.1" -> "v0.5.1"
 ~ version = "v1.15.3" -> "1.15.3"

This seems to be a formatting difference, but causing unnecessary drift in plan output.

Please let us know how these issues can be addressed.

Thanks,
Sujith

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions