Skip to content
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

Improve documentation for what is subject to templating #597

Closed
joberly opened this issue May 7, 2024 · 2 comments
Closed

Improve documentation for what is subject to templating #597

joberly opened this issue May 7, 2024 · 2 comments

Comments

@joberly
Copy link

joberly commented May 7, 2024

Describe the Feature

After doing some debug for a cryptic template error (see #596), I discovered that Terraform variable descriptions get imported into an internal template that gets parsed and executed. If a variable description string inadvertently has a Go template action in it which does not work, the templating fails. After looking through the docs here, it didn't seem obvious that Terraform variable metadata is part of the templating process. It would be nice to see some extra documentation that would make this more obvious. It's not obvious this is intentional behavior from Atmos, either.

Expected Behavior

The documentation should call out everything subject to templating so it's more obvious where Go template actions might be problematic.

Use Case

The problem is that if a Go template action is inadvertently added to something outside a stack manifest, this might cause templating to fail and the resulting error is also vague (see #596).

Describe Ideal Solution

Documentation clearly points out what parts of code are subject to templating.

Alternatives Considered

Excluding some parts of the internally generated template from executing might be workable as it doesn't seem obvious this behavior was intended, but it might be too complicated to prevent.

Additional Context

No response

@GabisCampana
Copy link

@aknysh
Copy link
Member

aknysh commented May 23, 2024

@joberly We've improved the templating doc, please review https://atmos.tools/core-concepts/stacks/templating/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants