Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm_release fails when setting fields to null (3.0.0-pre1) #1570

Open
wombat opened this issue Jan 24, 2025 · 0 comments · May be fixed by #1572
Open

helm_release fails when setting fields to null (3.0.0-pre1) #1570

wombat opened this issue Jan 24, 2025 · 0 comments · May be fixed by #1572
Assignees
Labels

Comments

@wombat
Copy link

wombat commented Jan 24, 2025

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: v1.10.4
Provider version: 3.0.0-pre1
Kubernetes version: v1.29.10+67d3387

Affected Resource(s)

  • helm_release

Terraform Configuration Files

resource "helm_release" "kong" {
  name      = "kong"
  namespace = var.namespace

  repository = "https://charts.konghq.com"
  chart      = "ingress"
  version    = local.kong-helm-version

  skip_crds = true

  values = [
    "${file("${path.module}/values.yaml")}"
  ]

  set = [
    {
      name  = "controller.containerSecurityContext.runAsUser"
      value = null
    },
    {
      name  = "gateway.containerSecurityContext.runAsUser"
      value = null
    }
  ]
}

Debug Output

│ Error: Missing Configuration for Required Attribute
│ 
│   with module.kong.helm_release.kong,
│   on ../../modules/terraform-module-kong-konnect/main.tf line 7, in resource "helm_release" "kong":
│    7: resource "helm_release" "kong" {
│ 
│ Must set a configuration value for the set[0].value attribute as the provider has marked it as required.
│ 
│ Refer to the provider documentation or contact the provider developers for additional information about configurable attributes that are required.
╵
╷
│ Error: Missing Configuration for Required Attribute
│ 
│   with module.kong.helm_release.kong,
│   on ../../modules/terraform-module-kong-konnect/main.tf line 7, in resource "helm_release" "kong":
│    7: resource "helm_release" "kong" {
│ 
│ Must set a configuration value for the set[1].value attribute as the provider has marked it as required.
│ 
│ Refer to the provider documentation or contact the provider developers for additional information about configurable attributes that are required.

Panic Output

Steps to Reproduce

  1. terraform apply

Expected Behavior

helm_release should have rendered the template without errors and both fields (controller.containerSecurityContext.runAsUser and gateway.containerSecurityContext.runAsUser should be null.

Actual Behavior

helm_release fails with the error from the debug output

Important Factoids

References

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
@wombat wombat added the bug label Jan 24, 2025
@BBBmau BBBmau linked a pull request Jan 25, 2025 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants