Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform.output YAML function doesn't not handle newlines correctly #978

Open
kyledecot opened this issue Jan 28, 2025 · 1 comment
Open
Assignees
Labels
bug 🐛 An issue with the system

Comments

@kyledecot
Copy link

kyledecot commented Jan 28, 2025

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

@kyledecot kyledecot added the bug 🐛 An issue with the system label Jan 28, 2025
@osterman
Copy link
Member

Wow, that should definitely not happen! Thanks for reporting. We’ll fix this and add a test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

3 participants