Skip to content

Does generate_hcl produce the files in all leaf directories? #810

Answered by i4ki
az-z asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @az-z

The generate_hcl generates HCL files but in your example, it shows an S3.json file. Is this the one that got generated? Wasn't it a generate_file block?

The generate_hcl supports only stack code generation (we call this the generate context), then it generates files only inside stack directories but you can control which stacks should have it generated. It's never generated inside non-stack directories, if it does, then it's a bug.

The generate_file block, by default, also only generates inside stacks but the generation context can be set to root and then in this case you can say explicitly where the file must be generated (not only stacks, any directory).

When you execute terram…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mariux
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants