terraform.output YAML function doesn't not handle newlines correctly
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 175
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 134
Description
### 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_
Contributor guide
Assessment
This issue has not been assessed yet.