terraform-provider-helm icon indicating copy to clipboard operation
terraform-provider-helm copied to clipboard

Add support for set literal

Open xolott opened this issue 1 year ago • 3 comments

Description

When I deploy a helm chart using a JSON as a value, helm tries to parse the JSON as a template string and fails with something like key "\n \"enable\": true" has no value (cannot end with ,)

Helm 3.12.0 added --set-literal

Can we add this option to the set block?

Potential Terraform Configuration

resource "helm_release" "my_app" {
  name       = "app"
  repository = "https://my.app.io/helm-charts/"
  chart      = "my-app-chart"

  set {
    name = "my.json.setting"
    type  =  "literal"
    value =  file("${path.module}/my-file.json")
  }
}

Or with a set_literal block

resource "helm_release" "my_app" {
  name       = "app"
  repository = "https://my.app.io/helm-charts/"
  chart      = "my-app-chart"

  set_literal {
    name = "my.json.setting"
    value =  file("${path.module}/my-file.json")
  }
}

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

xolott avatar Jun 07 '23 23:06 xolott

I agree, Helm already released a fix for this issue: https://github.com/helm/helm/pull/9182

fabrice-toussaint avatar Jun 15 '23 15:06 fabrice-toussaint

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!

github-actions[bot] avatar Jun 15 '24 00:06 github-actions[bot]

We got reactions and no comments. Let's keep this issue alive

xolott avatar Jun 15 '24 02:06 xolott