Sam
10/23/2025, 3:49 PM!terraform.output function in a circular manner. It caused a recursive loop. FWIW I'm using the most recent version of atmos binary
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0x14044e80b60 stack=[0x14044e80000, 0x14064e80000]
fatal error: stack overflow
So I was wondering what the recommended approach was for sharing state information. My situation is as follows:
I've got 2 stacks, core and staging and 1 component vpc
The vpc component in core uses an output from the vpc component in staging which contains transit gateway attachment IDs, VPC CIDR ranges
The vpc component in staging uses an output from the vpc component in core containing a transit gateway ID
So now when I plan the component in either stack it errors with the above (and a massive stack trace).
I would appreciate any guidance on how to do this in a better way as I am new to atmos.Andriy Knysh (Cloud Posse)
10/23/2025, 3:53 PMAndriy Knysh (Cloud Posse)
10/23/2025, 3:53 PMAndriy Knysh (Cloud Posse)
10/23/2025, 3:54 PM!terraform.state instead of !terraform.output, it's 10x faster and reads the state from the backend directly instead of executing terraform outputAndriy Knysh (Cloud Posse)
10/23/2025, 3:54 PM!terraform.state fixes the issueAndriy Knysh (Cloud Posse)
10/23/2025, 3:55 PMAndriy Knysh (Cloud Posse)
10/23/2025, 3:56 PMSam
10/23/2025, 4:01 PMPePe Amengual
10/23/2025, 4:07 PMPePe Amengual
10/23/2025, 4:10 PMdepends_on in atmos to always plan/apply resources base on the dependency tree BUT, BUT, BUT do not expect a plan to be successful right the first time you added a VPC and then you are asking for the vpc_id and the freaking thing has not been applied yet, avoid catch-22 and create a process around that instead of automation( what I means is that you document what are the hard required components for all other components to work and you go an apply those first)Sam
10/23/2025, 4:16 PMErik Osterman (Cloud Posse)
10/23/2025, 4:28 PMErik Osterman (Cloud Posse)
10/23/2025, 4:28 PMSam
10/23/2025, 4:48 PM!terraform.stateAndriy Knysh (Cloud Posse)
10/23/2025, 4:55 PMterraform.state or terraform.output will not process the other YAML functions.
something like that, but we need to think about all edge casesErik Osterman (Cloud Posse)
10/23/2025, 7:21 PM