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

Feature Request: Allow Pre-formatted Strings in Query Argument #17

Open
bgshacklett opened this issue May 9, 2018 · 0 comments
Open

Comments

@bgshacklett
Copy link

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

  1. terraform init
  2. terraform 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:

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.

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

No branches or pull requests

2 participants