-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for std.trace() #13
Comments
Hello. Try version 2.4.0. For example: terraform {
required_providers {
jsonnet = {
source = "alxrem/jsonnet"
version = "~> 2.4"
}
}
}
data "jsonnet_file" "default" {
content = <<EOF
{
a: std.trace("str", "rest"),
}
EOF
}
output "json" {
value = data.jsonnet_file.default.rendered
}
output "trace" {
value = data.jsonnet_file.default.trace
}
|
Thanks Alexey! Is it possible to surface trace() function output under error condition, when the message "Failed to render test from jsonnet template" occurs? |
Yes. Try 2.4.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It can be very difficult to debug errors in jsonnet code when called from a terraform module and the std.trace() function in jsonnet does not appear to be surfaced to the terraform space. Could this be added?
The text was updated successfully, but these errors were encountered: