atmos
atmos copied to clipboard
terraform.output YAML function doesn't not handle newlines correctly
trafficstars
Describe the Bug
If you output a value that has multiple newlines and then attempt to use that value in another stack via terraform.output the newlines will be striped.
Expected Behavior
output value should retain newline characters
Steps to Reproduce
In stack #1 (a) output a value that contains newlines such as:
output "foo" {
value = "bar\nbaz\nbongo\n"
}
Then in stack #2 (b) use that value as an var to a component:
components:
terraform:
hello:
vars:
foo: !terraform.output a .foo
Screenshots
No response
Environment
Terraform v1.10.4 on darwin_arm64
Atmos 1.153.1 on darwin/arm64
Additional Context
No response
Wow, that should definitely not happen! Thanks for reporting. We’ll fix this and add a test case.