hashicorp / terraform-exec

Terraform CLI commands via Go.
https://pkg.go.dev/github.com/hashicorp/terraform-exec
Mozilla Public License 2.0
684 stars 114 forks source link

Fix output parsing when CSM is enabled #473

Open Lucasjuv opened 2 months ago

Lucasjuv commented 2 months ago

When I try to get the output using tfexec with CSM enable with these variables:

export AWS_CSM_ENABLED=true
export AWS_CSM_PORT=31000
export AWS_CSM_HOST=127.0.0.1

I see this error message "json: cannot unmarshal number into Go value of type map[string]tfexec.OutputMeta" and this in the beginning of the output:

2024/09/06 13:26:27 Enabling CSM
2024/09/06 13:26:27 Enabling CSM
***
  "deployer_iam_role": ***
    "sensitive": false,
    "type": [...

I think this can be fixed by ignoring the aws sdk logs... Testing now I think this only happens with s3 backend...