Loading...
Loading...
### Terraform Version ```shell Terraform v1.8.2 on linux_amd64 ``` ### Terraform Configuration Files ```hcl terraform { cloud { organization = "..." workspaces { name = "..." } } } // ... ``` ### Debug Output Not relevant ### Expected Behavior `terraform -output json` should output only JSON. ### Actual Behavior The output is not pure json. It contains some error messages from intermittent (retriable) errors. ``` > terraform -output json There was an error connecting to HCP Terraform. Please do not exit Terraform to prevent data loss! Trying to restore the connection... Still trying to restore the connection... (3s elapsed) {} ``` These are the culprit messages: https://github.com/hashicorp/terraform/blob/dc3a040a4164ffba863cef7bd216c4f49e30e40b/internal/command/views/cloud.go#L51-L56 This makes it nontrivial for downstream applications to parse the output. ### Steps to Reproduce 1. `terraform -output json` 2. When the connection to the backend is suboptimal, additional messages show up. ### Additional Context _No response_ ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.