-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Unable to enforce (single) quote around yml string value #22847
Comments
Hi @t638403! We've asked the bot to consider this a Helm provider bug because the Helm provider seems to be trying to present an abstraction over the YAML but that abstraction is leaking here due to the lack of quoting. Having the Helm provider handle this quoting automatically would then provide the abstraction as intended, avoiding the need for the user to worry about how this value will ultimately be encoded in YAML. Our bot will close this issue and open a new issue with the same content on your behalf in the Helm provider repository. |
(With that said, Terraform already has a function |
This issue has been automatically migrated to hashicorp/terraform-provider-helm#341 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-helm#341. |
try https://www.terraform.io/docs/configuration/functions/format.html e.g. in terraform console:
|
@teamterraform and @davidq2q thanks for the response! Finally I was able to use
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Download Terraform
Current Terraform Version
Use-cases
I have this terraform resource for elasticsearch on kubernetes.
The values.yaml for helm renders this as
Unfortunately helm is unable to render this into the
statefulset.yaml
template.I have tested directly with helm and when I wrap the
true
value in single quotes (master: 'true'
) helm becomes able to render it into thestatefulset.yaml
template. However I can not find a way to enforce this using terraformset
.Attempted Solutions
I have tried:
1:
which results in
master: true
.2:
which results in
master: true
3:
which results in
master: '''true'''
4:
which results in
5:
which results in
master: \'true\'
Proposal
Some function
quote(string)
which will enforce a single quote around the string.References
The helm template:
https://github.com/elastic/helm-charts/blob/master/elasticsearch/templates/statefulset.yaml
The text was updated successfully, but these errors were encountered: