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

Raw Output instead of Output #88

Open
scottwinkler opened this issue Feb 5, 2021 · 1 comment
Open

Raw Output instead of Output #88

scottwinkler opened this issue Feb 5, 2021 · 1 comment

Comments

@scottwinkler
Copy link
Owner

Instead of forcing people to output JSON, it would be nice to have the option of outputting a string. e.g. echo "hello" would return just the string "hello". No need to wrap it in a JSON data structure. If someone is using this approach, only the last line of output will be considered.

JSON is still supported, but instead of flattening it on your behalf, just let people use decodejson() which is what people were doing anyways for deeply nested JSON outputs.

In the short term will support both, and mark output as deprecated. Output can be deprecated in a 2.0 release.

@LukeCarrier
Copy link

Also worth noting that since the output type is map(string) the current implementation silently fails for deeply nested structures, which wouldn't be an issue with Terraform's own jsondecode(). Given this limitation I don't think there's a compelling reason to handle the decode in the resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants