Sean Nguyen
03/04/2026, 12:41 AM!terraform.state vs atmos.Component ? I’m struggling to understand the differences based on the documentation.
This week, we uncovered that atmos.Component was breaking one of our stacks (it was causing terraform workspace to flap during plans which ultimately caused the apply step in Spacelift to fail).
When we changed the offending catalog files to use !terraform.state syntax instead, things began working again.
Given component_A and component_B, the spacelift stacks for component_B were failing when:
• catalog/component_A/defaults.yaml -> had atmos.Component templating to fetch outputs from component_B
• component_B -> uses remote-state module to query outputs from component_A
This seems to be not an issue after we switched to !terraform.state syntax..Erik Osterman (Cloud Posse)
03/04/2026, 12:45 AMAndriy Knysh (Cloud Posse)
03/04/2026, 12:45 AMErik Osterman (Cloud Posse)
03/04/2026, 12:46 AM{{ … }} is not a YAML thing, we preprocess it and do interpolation. The result must be valid YAML.Andriy Knysh (Cloud Posse)
03/04/2026, 12:46 AMterraform output) and is much slower than the YAML functionSean Nguyen
03/04/2026, 12:48 AM!terraform.state is the latest and greatest, but wanted to understand more about why atmos.Component broke our setup.
I guess atmos.Component is not mentioned anywhere in the Sharing State docs y’all linked, but maybe y’all are just trying to steer eyes away from it.Erik Osterman (Cloud Posse)
03/04/2026, 12:49 AM!something is native YAML explicit tags that are evaluated during YAML processing and results are injected directly into the object. This is more reliable that string manipulation.
If the result of atmos.Component is not valid yaml it could break.Sean Nguyen
03/04/2026, 12:49 AMErik Osterman (Cloud Posse)
03/04/2026, 12:50 AMatmos.Component because it is error prone)Erik Osterman (Cloud Posse)
03/04/2026, 12:50 AMErik Osterman (Cloud Posse)
03/04/2026, 12:51 AMErik Osterman (Cloud Posse)
03/04/2026, 12:51 AMSean Nguyen
03/04/2026, 12:51 AMAndriy Knysh (Cloud Posse)
03/04/2026, 12:54 AMatmos.Component is a template function. Not that it's bad in itself, it has two main issues:
• You have to use Go templates, which can produce invalid YAML (which is very difficult to guarantee to not to)
• It calls terraform output which in itself is very slow (not an Atmos issue per se, it's how terraform works)
• B/c of the above, atmos.Component is not actively maintained (use the YAML functions instead). And b/c it's not actively maintained, something probably broke. Is it only in Spacelift? Local execution is OK?Andriy Knysh (Cloud Posse)
03/04/2026, 12:56 AMatmos.Component + Spacelift
https://sweetops.slack.com/archives/CB6GHNLG0/p1772557680440029Andriy Knysh (Cloud Posse)
03/04/2026, 12:56 AMSean Nguyen
03/04/2026, 12:57 AMSean Nguyen
03/04/2026, 12:58 AMatmos.Component was flapping the terraform workspace in our plans. Because the apply step in spacelift relies on the previously generated plan file, the apply failed due to a broken lineage..Andriy Knysh (Cloud Posse)
03/04/2026, 12:58 AMSean Nguyen
03/04/2026, 12:59 AM!terraform.state change.
Anyways, thanks for the help @Andriy Knysh (Cloud Posse) (and @Erik Osterman (Cloud Posse))! Long time no talk --hope y’all have been well.Andriy Knysh (Cloud Posse)
03/04/2026, 12:59 AMSean Nguyen
03/04/2026, 1:00 AMatmos terraform apply and atmos terraform deploy don’t rely on a saved plan file.
It’s all one atomic terraform apply [-auto-approve] under the hood as I understand it.Sean Nguyen
03/04/2026, 1:01 AMErik Osterman (Cloud Posse)
03/04/2026, 1:16 AMBecause the apply step in spacelift relies on the previously generated plan file, the apply failed due to a broken lineage..Yes,
atmos.Component and !terraform.output would likely have problems, also anything that relies on backend generation. Moving to !terraform.state definitely the right move, since it talks to S3 directly.Sean Nguyen
03/04/2026, 1:17 AM!terraform.state and other YAML functions to play nice with our YAML linter?
check yaml.........................................Failed
- hook id: check-yaml
- exit code: 1
could not determine a constructor for the tag '!terraform.state'
in "stacks/catalog/iam-delegated-roles/defaults.yaml", line 118, column 32Sean Nguyen
03/04/2026, 1:22 AM--unsafe with this pre-commit hook!