hashicorp / terraform-provider-helm

Terraform Helm provider
https://www.terraform.io/docs/providers/helm/
Mozilla Public License 2.0
1.01k stars 371 forks source link

Using "set_sensitive" inside of "helm_release" causes the metadata to always be updated in-place #1528

Open keith-miller opened 2 weeks ago

keith-miller commented 2 weeks ago

Terraform, Provider, Kubernetes and Helm Versions

> terraform version
Terraform v1.9.5
on windows_amd64
+ provider registry.terraform.io/hashicorp/aws v5.74.0
+ provider registry.terraform.io/hashicorp/awscc v1.19.0
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.5
+ provider registry.terraform.io/hashicorp/helm v2.16.1
+ provider registry.terraform.io/hashicorp/kubernetes v2.33.0
+ provider registry.terraform.io/hashicorp/local v2.5.2
+ provider registry.terraform.io/hashicorp/null v3.2.3
+ provider registry.terraform.io/hashicorp/time v0.12.1
+ provider registry.terraform.io/hashicorp/tls v4.0.6

Affected Resource(s)

Terraform Configuration Files

data "aws_secretsmanager_secret_version" "argocd_secrets" {
  secret_id = awscc_secretsmanager_secret.argocd_admin_password.secret_id
}

resource "helm_release" "argocd" {
  name             = "argocd"
  repository       = "https://argoproj.github.io/argo-helm"
  chart            = "argo-cd"
  version          = "7.6.3"
  namespace        = "argocd"
  create_namespace = true

  values = [
    local.yaml_file
  ]

  set_sensitive {
    name  = "configs.secret.argocdServerAdminPassword"
    value = bcrypt(data.aws_secretsmanager_secret_version.argocd_secrets.secret_string)
  }

  depends_on = [
    module.eks
  ]
}

Debug Output

NOTE: In addition to Terraform debugging, please set HELM_DEBUG=1 to enable debugging info from helm.

Panic Output

Steps to Reproduce

  1. terraform apply
  2. terraform plan

Expected Behavior

No changes should be found.

Actual Behavior

Changes were found.

Important Factoids

If I remove the set_sensitive block everything works as expected.

References

Community Note