Skip to content

Terraform apply fails due to jsondecode #23

Description

@sandipnahak

Describe the bug
Unable to apply terraform
Error:


  on main.tf line 270, in locals:
 270:   api_creds = fileexists(lookup(data.external.api.result, "file_path")) ? jsondecode(file(lookup(data.external.api.result, "file_path"))) : jsondecode("None")

Call to function "jsondecode" failed: invalid character 'N' looking for
beginning of value.

To Reproduce

cd QuickFabric/terraform
python3 terraform_wrapper.py apply  -var-file=input.tfvars -var-file=secrets.tfvars 

Expected behavior
Terraform apply should complete without any error.

Desktop (please complete the following information):

  • OS: Macos
  • Version
    Terraform v0.12.17
  • provider.archive v1.3.0
  • provider.aws v2.55.0
  • provider.external v1.2.0
  • provider.local v1.4.0
  • provider.null v2.1.2
  • provider.template v2.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions