Does Atmos make any assumptions on directory struc...
# atmos
p
Does Atmos make any assumptions on directory structure under components/terraform? I’ve been placing components to sub-directories according to service they mostly interact with, eg “gcp”, “aws”, “github”. At least
terraform.output
yaml function seems to make assumptions:
Copy code
failed to generate backend file: open /Users/paveq/modernpath/live-infrastructure/components/terraform/gke/backend.tf.json: no such file or directory
terraform.state
function works, but I wonder if I should fix my structure.
And it could be, if I would have two components
aws/cluster
and
gcp/cluster
this could cause an issue?
e
I would avoid the .output function as it is 10x slower than .state. The former does a full terraform init, downloading providers before fetching state and retrieving outputs. The latter talks to the backend directly.
🙌 1
Yes, prefixing components by cloud provider makes sense
j
I switched from
!terraform.output
to
!terraform.state
for performance reasons as noted by @Erik Osterman (Cloud Posse). I saw a huge performance boost when I switched (e.g. unit tests came back 8x-10x faster)