<@U07R6DNLS0N> please take a look at this:
# atmos-dev
a
@Vinny please take a look at this:
now if we have a template file
stacks/catalog/aws-config/packs.yaml.tmpl
with the following content
Copy code
components:
  terraform:
    aws-config:
      metadata:
        component: compliance/aws-config
      vars:
        conformance_packs:
          {{- range $pack := .conformance_packs -}}
          {{ $path := index $pack "path" | default $.defaults.path }}
          - conformance_pack: {{$path}}/{{$pack.filename}}
            name: {{replace ".yaml" "" (toString $pack.filename)}}
            {{- $params := index $pack "parameter_overrides" | default dict -}}
            {{ if gt (len $params) 0 }}
            parameter_overrides:
              {{- range $key, $value := $params }}
              {{ $key }}: {{ $value }}
              {{- end -}}
            {{ else }}
            parameter_overrides: {}
            {{ end -}}
          {{ end -}}
this is not a valid YAML
when executing
atmos validate stacks
, it now throws an error
Copy code
yaml: line 9: did not find expected node content
(which is expected since the file is not a valid YAML)
before the change in the
v1.117.0
release, we did not treat the template files as YAML files and
atmos validate stacks
returned a success (we only selected the files with extensions
.yaml
and
.yaml
for validation)
now we treat all of the files as Atmos stack manifests and fail if a file is not a valid YAML as the above
v
Ok this raises an important edge case: Should .yaml.tmpl files with errors be ignored during validation, allowing the process to continue? If we choose to ignore these files, we need to carefully consider the implications of this decision
e
They are 💯 invalid yaml files so it doesn’t make sense to validate
We have a separate task to render then validate
But since we broke existing behavior, and this is widely adopted, we don’t have time to do anything else than re-ignore them like before implementing it a better way
a
we broke it for one of the clients, and i asked them to change the file extension from .tmpl to .templ. - this extension is not validated automatically
@Vinny please confirm that it’s working
v
@Andriy Knysh (Cloud Posse) PR to address this issue https://github.com/cloudposse/atmos/pull/830
👀 1
a
@Vinny a few comments, please review
v
thank you Andriy all resolved please check again
👀 1
e
@Andriy Knysh (Cloud Posse)
a
@Vinny please review a few more comments