Skip to content

unexpected end of JSON input #23

@tekollt

Description

@tekollt

Terraform Version

Terraform v0.11.8

Affected Resource(s)

external

Terraform Configuration Files

data "external" "webhook" {
  program = ["az", "webapp", "deployment", "list-publishing-profiles", "--name", "fa-we-shared-pvs-prod", "--resource-group", "rg-we-shared-prod", "--query", "\"[].{PWD:userPWD}\"", "--output", "json"]  
}

Expected Behavior

being able to reference the password, for an azure webapp webhook and use that with GitLab provider to define integrations.

Actual Behavior

* module.function_nesk.data.external.hooks: data.external.hooks: command "az" produced invalid JSON: unexpected end of JSON input

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Additional Context

Running the command in Azure Cli, gives the following output, with Json encoding.

{
  "PWD": "mnvQcfGqw3F3fpj0wtw12345678901234567891023456987xxxxxxxxxxxxxxxxx"
}

or by changing the outputs in cli --output to tsv gives single string, but this also gives unexpected end of JSON input with terarform

mnvQcfGqw3F3fpj0wtw12345678901234567891023456987xxxxxxxxxxxxxxxxx

References

#13

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions