terraform-provider-helm
terraform-provider-helm copied to clipboard
Helm Manifest Experiment Cannot be Enabled with Environment Variable
Terraform, Provider, Kubernetes and Helm Versions
Terraform version: v1.0.0
Provider version: attempted on both v2.1.0 and v2.3.0
Kubernetes version: v1.20.4
Affected Resource(s)
None
Terraform Configuration Files
...
provider "helm" {
kubernetes {
cluster_ca_certificate = base64decode(data.aws_eks_cluster.this.certificate_authority[0].data)
host = data.aws_eks_cluster.this.endpoint
exec {
api_version = "client.authentication.k8s.io/v1alpha1"
args = ["eks", "get-token", "--cluster-name", data.aws_eks_cluster.this.name]
command = "aws"
}
}
}
resource "helm_release" "this" {
name = "keda-operator"
namespace = kubernetes_namespace.this.metadata[0].name
repository = "https://kedacore.github.io/charts/"
chart = "keda"
version = var.helm_release_version
}
...
Debug Output
Only looked at the "experiments enabled" line in the debug to verify, manifest
was only included when it was set in the Helm provider experiments
block; the environment variable seemed to make no difference.
With no experiments
block in the Helm provider configuration and TF_X_HELM_MANIFEST
set to true
:
2021-09-05T12:13:26.927Z [INFO] provider.terraform-provider-helm_v2.3.0_x5: 2021/09/05 12:13:26 [DEBUG] Experiments enabled: []: timestamp=2021-09-05T12:13:26.927Z
With manifest = true
in the experiments
block in the Helm provider configuration:
2021-09-05T13:25:26.523Z [INFO] provider.terraform-provider-helm_v2.3.0_x5: 2021/09/05 13:25:26 [DEBUG] Experiments enabled: [manifest]: timestamp=2021-09-05T13:25:26.523Z
Steps to Reproduce
-
export TF_X_HELM_MANIFEST="true"
-
terraform plan
Expected Behavior
Expected the value of the TF_X_HELM_MANIFEST
environment variable to have an effect on the enablement of the manifest
experiment in the Helm provider.
Actual Behavior
No change in the behavior from the provider regardless of the value of TF_X_HELM_MANIFEST
environment variable. Only setting manifest = true
in the experiments
block in the Helm provider configuration enables the manifest
experiment.
Additional Information
Having looked at the code myself for setting the manifest
experiment from the TF_X_HELM_MANIFEST
environment variable I see no obvious mistake with it, and I've tripled checked my setup for typos. At this point I'd just like to see if anyone else is able to reproduce the issue.
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
I do have the same issue with provider v2.4.1
have you tried switching it on in the provider block like this?
provider helm {
// ...
experiments {
manifest = true
}
}
Looking at the source code (https://github.com/hashicorp/terraform-provider-helm/blob/main/helm/provider.go#L127-L136), apparently the env var needs to be set to enabled
. But I tried that and it still does not enable the manifest.
Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!