terraform-provider-helm
terraform-provider-helm copied to clipboard
Unable to set "list" value in set block
Terraform, Provider, Kubernetes and Helm Versions
Terraform version: 1.0.11
Provider version: 2.4.1
Kubernetes version: v1.19.10
Affected Resource(s)
- helm_release
Terraform Configuration Files
resource "helm_release" "akeyless" {
...
set {
name = "akeylessUserAuth.allowedAccessIDs"
value = "[\"p-789 subClimekey1=subClimeVaasdasdf sdfdsfcxvl1\" ,\"p-666 subClimekey2=subClimeVal2\"]"
}
}
Steps to Reproduce
-
terraform apply
Expected Behavior
The full value to be set in the secret.
Actual Behavior
The value is truncated. Only the following is passed into the secret,
[\"p-789 subClimekey1=subClimeVaasdasdf sdfdsfcxvl1\"
Important Factoids
Unable to pass the full value
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
in additional, this also affect the json in string format,
set {
name = "customerFragments"
value = "{\"customer_fragments\": [{\"id\": \"cf-et8u.....b3iw7\",\"value\": \"qrm0YoYSHb0j...JKb/zZmU8..yj4Ja/h/pa..Fvu4Esw==\",\"description\": \"MyFirstCF\"}]}"
}
# show error,
Error: failed parsing key "customerFragments" with value {"customer_fragments": [{"id": "cf-et8u.....b3iw7","value": "qrm0YoYSHb0j...JKb/zZmU8..yj4Ja/h/pa..Fvu4Esw==","description": "MyFirstCF"}]}, key "]}" has no value
Try escaping your commas (passing the literal \,
to the underlying helm provider via \\,
:
resource "helm_release" "akeyless" {
...
set {
name = "akeylessUserAuth.allowedAccessIDs"
value = "[\"p-789 subClimekey1=subClimeVaasdasdf sdfdsfcxvl1\"\\,\"p-666 subClimekey2=subClimeVal2\"]"
}
set {
name = "customerFragments"
value = "{\"customer_fragments\": [{\"id\": \"cf-et8u.....b3iw7\"\\,\"value\": \"qrm0YoYSHb0j...JKb/zZmU8..yj4Ja/h/pa..Fvu4Esw==\"\\,\"description\": \"MyFirstCF\"}]}"
}
}
Hi, this is to let you know that I'm facing the same problem with the provider version 2.5.1.
I did manage to get the provider to work by substituting the single command (,
) with \\,
.
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!