Any tips on why this: ```components: terraform: ...
# atmos
t
Any tips on why this:
Copy code
components:
  terraform:
    postgres-database-base:
      metadata:
        type: abstract
      vars:
        resource_names:
          application_schema_name: "{{ .vars.application | replace "-" "_" }}"
Produces:
Copy code
invalid stack manifest 'catalog/postgres-database-base.yaml'
yaml: line X: did not find expected key
.vars.application
is properly defined, removing the
| replace "-" "_"
avoids the error but then produces the
.vars.application
value as expected, containing dashes instead of underscores. Atmos 1.182.0
We have both sprig and gomplate enabled, and I can't seem to get gomplate's
strings.ReplaceAll
to work either. Same output with
application_schema_name: "{{ .vars.application | strings.ReplaceAll "-" "_" }}"
a
try
Copy code
application_schema_name: '{{ .vars.application | replace "-" "_" }}'
Let me know if that works. (you have double quotes inside double quotes)
t
Yes, that looks like it works. I'd thought it would work with double quotes around the template since helm has no issue with that but will make a note.
a
thanks for testing and reporting. We'll review all these issues with templates and try to improve it. can I ask you to create an issue in the Atmos repo and describe the problem?
t
Sure thing
👍 1