hashicorp / hashicorp/terraform-exec
Fix output parsing when CSM is enabled
- Dominant language
- Go
- Stars
- 786
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
When I try to get the output using tfexec with CSM enable with these variables:
```bash
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:
```plain
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...
Contributor guide
Research direction
Start by reproducing the tfexec output-parsing failure with AWS_CSM_ENABLED=true, the supplied CSM host and port, and an S3 backend. Compare the command output with and without CSM, then verify that Terraform output remains parseable when CSM messages are present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, terraform
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100