Skip to content

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

@bgshacklett

Description

@bgshacklett

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions