terraform-provider-external icon indicating copy to clipboard operation
terraform-provider-external copied to clipboard

Feature Request: Allow Pre-formatted Strings in Query Argument

Open bgshacklett opened this issue 7 years ago • 0 comments

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:

  • #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.

bgshacklett avatar May 09 '18 15:05 bgshacklett