Loading...
Loading...
### Terraform Version ```shell terraform version Terraform v1.15.1 on darwin_arm64 ``` ### Terraform Configuration Files ```terraform output "foobar" { value = "asdf" } ``` ### Debug Output ``` $ terragrunt run -- output -raw foobar > foo.raw 12:07:09.586 INFO Terragrunt Cache server is listening on 127.0.0.1:53023 12:07:09.586 INFO Start Terragrunt Cache server 12:07:11.676 INFO Shutting down Terragrunt Cache server... 12:07:11.676 INFO Terragrunt Cache server stopped $ cat foo.raw asdf$ terragrunt run -- output -raw foobar 12:07:25.482 INFO Terragrunt Cache server is listening on 127.0.0.1:53038 12:07:25.482 INFO Start Terragrunt Cache server asdf12:07:27.339 INFO Shutting down Terragrunt Cache server... 12:07:27.339 INFO Terragrunt Cache server stopped $ terragrunt run -- output -json foobar 12:07:36.031 INFO Terragrunt Cache server is listening on 127.0.0.1:53049 12:07:36.031 INFO Start Terragrunt Cache server "asdf" ╷ │ Warning: Deprecated Parameter │ │ The parameter "dynamodb_table" is deprecated. Use parameter "use_lockfile" │ instead. ╵ 12:07:37.630 INFO Shutting down Terragrunt Cache server... 12:07:37.630 INFO Terragrunt Cache server stopped $ terragrunt run -- output -json foobar > foo.json 12:07:44.190 INFO Terragrunt Cache server is listening on 127.0.0.1:53061 12:07:44.190 INFO Start Terragrunt Cache server 12:07:46.006 INFO Shutting down Terragrunt Cache server... 12:07:46.006 INFO Terragrunt Cache server stopped $ cat foo.json "asdf" ╷ │ Warning: Deprecated Parameter │ │ The parameter "dynamodb_table" is deprecated. Use parameter "use_lockfile" │ instead. ``` ### Expected Behavior User facing warnings in `terraform output -json ` should be directed towards STDERR or be suppressed to have the output be valid json. ### Actual Behavior Warnings like the one from the example about deprecated backend parameters are included, breaking parsing for other tools (warnings of full failures depending on the tool). ### Steps to Reproduce See example ### Additional Context This was fixed for `-raw` in https://github.com/hashicorp/terraform/issues/38484 / https://github.com/hashicorp/terraform/pull/38487 - I believe the same applies to `-json` and it should be addressed in the same way. ### References - #38479 ### Generative AI / LLM assisted development? _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.