hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io
Other
42.76k stars 9.56k forks source link

Consider adding option to include resource private state in JSON output #35941

Open gdavison opened 1 week ago

gdavison commented 1 week ago

Terraform Version

Terraform v1.9.8
on darwin_arm64

Use Cases

This is requested primarily to support provider plugin testing: https://github.com/hashicorp/terraform-plugin-testing/issues/321. There isn't currently a way to validate what private state values are set, and terraform-plugin-testing relies on the JSON output

Attempted Solutions

None

Proposal

Add an option to include private values in Terraform JSON output. Since it's not something that generally should be used, use a command line flag to enable it.

References

No response

crw commented 17 hours ago

Thanks for this feature request! If you are viewing this issue and would like to indicate your interest, please use the 👍 reaction on the issue description to upvote this issue. We also welcome additional use case descriptions. Thanks again!