terraform-provider-external
terraform-provider-external copied to clipboard
Feature Request: Allow Pre-formatted Strings in Query Argument
Terraform Version
0.11.3
Affected Resource(s)
Please list the resources as a list, for example:
- data.external
Terraform Configuration Files
data "external" "transform" {
program = [ "jq",
"--from-file",
"${path.module}/assets/query.jq" ]
query = "{ \"foo\":\"bar\" }"
}
Expected Behavior
The string should be passed directly to the program via stdin.
Actual Behavior
An error is received:
Error: module.iam_roles.data.external.ec2_roles: query: should be a map
Steps to Reproduce
terraform initterraform plan
Important Factoids
n/a
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
- #2
Notes
This could be a way to work around the request in #2 by using jsonencode() and passing the string directly to the external program.