Skip to content

Directory structure advice #549

Answered by katcipis
ottramst asked this question in Q&A
Aug 23, 2022 · 4 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @ottramst,

It seems that on terramate/environments you have two files:

  • dev.tm.hcl
  • staging.tm.hcl

That define the same global attribute "environment". Terramate implements a similar semantic as Terraform where all files are "merged" and then handled as a single configuration (more details here). Just as would happen with Terraform local block, if you redefine a global you get an error since there is no clear semantic to how to handle this, there is no explicit ordering on HCL/Terramate files, so there is no way for one name to shadow/override the other.

I realize this is somewhat confusing/non-intuitive because you imported a single file, not a directory, but Terramate by default pars…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@ottramst
Comment options

@katcipis
Comment options

@katcipis
Comment options

Answer selected by ottramst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants