Terraform-provider-helm: using set for array of maps

Created on 10 Sep 2020  路  2Comments  路  Source: hashicorp/terraform-provider-helm

Extend set to support more complex values

[This might be doable now, if so please help me understand how and I'll even document it as I spent a lot of time trying to figure this out]

I tried using set to set an array of maps.
The result I want eventually is:
image: pullSecrets: - name: SOME_SECRET
I tried using set:
set { name = "image.pulSecrets" value = VALUE }
where I tried with:
VALUE = "-name: SOME_SECRET" VALUE = "{name: SOME_SECRET}"
and some more.
Finally I switched to use the values field and using a multiline string there to set this.

How can this be done using set?

enhancement

Most helpful comment

set {
    name = "image.pullSecrets[0].name"
    value = "SOME SECRET"
}

All 2 comments

set {
    name = "image.pullSecrets[0].name"
    value = "SOME SECRET"
}

This issue seems related to this doc: https://helm.sh/docs/intro/using_helm/#the-format-and-limitations-of---set

Was this page helpful?
0 / 5 - 0 ratings