-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Suddenly sensitive resource attributes are exposed by "terraform show" in latest Terraform version 1.4.x #33055
Comments
Tested all version starting from 1.4.0. All versions starting with 1.4.0 show this behaviour. The breaking change happened between version 1.3.9 and 1.4.0. Will check if I can find other providers besides The documentation reads, that:
But this contradicts the above described behaviour... I see sensitive values even in non-json terraform show output. Could be, that this is not "a bug", but some serious breaking change, which I am not aware of. Sorry for opening this, if this is the case. |
yes, attributes flagged as sensitive are shown in clear text - this is very dangerous. |
Hi @Nantero1, thanks for filing this. This is indeed a bug, and we'll have a fix in place for v1.4.6 which should be released next week. |
I'll just add a little explainer here for why this happened. The The new renderer we launched in 1.4 processes the structured JSON data produced by the A workaround for this issue until we release 1.4.6 would be to mark a value as sensitive in the config, either by using the sensitive function or by wrapping the value in a variable marked as sensitive. The state JSON output is correctly including sensitive metadata provided by the configuration, and correctly eliding the required attributes this way. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Version
Terraform Configuration Files
Please note the
required_providers
, I experience the issue with THIS provider, but it could be a more general issue and other providers might also be affected.Debug Output
I am sorry, I think it is not needed at the moment. Please let me know if you think debug output is important.
Expected Behavior
Like in previous terraform versions (tested with 1.3.9), resource attributes marked as
sensitive
by a provider shall be not exposed in theterraform show
statement, but masked behind a(sensitive value)
placeholder.Actual Behavior
There was a change in behaviour, in Terraform 1.3.9 resource attributes marked as "sensitive" by a provider were masked by the text
(sensitive value)
. Now - in Terraform 1.4.5 - these values are exposed and can be seen in clear text. No change of provider version happened, the only thing changed was the used Terraform version.Please see the attached screenshot. On the left hand side the output of Terraform 1.4.5 (values exposed), on the right hand side the output of Terraform 1.3.9 (sensitive values masked). Same code, same provider versions, only the Terraform version changed.
Steps to Reproduce
terraform show
, sensitive values are exposed in latest terraform version.Additional Context
No response
References
Reported this issue also to the affected provider, in case it is not terraform specific.
The text was updated successfully, but these errors were encountered: