Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the ability for terraform state show to display sensitive values. #32439

Open
james-lawrence opened this issue Dec 27, 2022 · 4 comments
Open
Labels
enhancement new new issue not yet triaged

Comments

@james-lawrence
Copy link

james-lawrence commented Dec 27, 2022

Terraform Version

terraform version
Terraform v1.3.6
on linux_amd64

Use Cases

right now extracting a sensitive value is unnecessarily complicated.

  1. the sensitive values are easily viewable in the state file. a simple terraform state pull will let anyone see them.
  2. terraform state show doesn't provide an option to view them (note terraform show does)

instead of having a nice experience with terraform I'm forced to pull the state file and investigate it manually.

it should be as simple as terraform state show -json my.resource to see the values instead one has to go through a multi-step process to find the value.

Attempted Solutions

vim/jq/etc anything that can view / process the json state file.

Proposal

given that the data is already available; making it stupidly annoying to extract the values is just security through obscurity bullshit and doesn't actually provide any reasonable value to the tool beyond preventing accidental exposure in logs etc.

References

No response

@james-lawrence james-lawrence added enhancement new new issue not yet triaged labels Dec 27, 2022
@crw
Copy link
Collaborator

crw commented Jan 6, 2023

Thanks for this request!

@itspooya
Copy link
Contributor

itspooya commented Jan 21, 2023

@crw
Hi,
I suggest the addition of a --ignore-sensitive flag to the Terraform command line interface. This flag would allow users to display sensitive data in output and if --ignore-sensitive outputname is used, it would ignore sensitive information for the specified output. This feature would improve usability and make it easier for users to access sensitive information when necessary.
If you think this is a good solution I can work on it

@PaulRudin
Copy link

It's not just terraform state - it's very annoying to have to jump through all sorts of hoops in order to figure out what will change when doing terraform plan.

@itspooya
Copy link
Contributor

if it is acceptable on your side I would like to work on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

4 participants