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

[WIP] Support "hiding" ignored parameters from state. #7237

Closed
wants to merge 1 commit into from

Conversation

modax
Copy link
Contributor

@modax modax commented Jun 20, 2016

Add a lifecycle flag "hide_ignored" to remove "ignored" resource
parameters from the final state. While definitely not perfect, this
kind of simple solution should make it possible to prevent sensitive
from being written to tfstate.

"hide_ignored" uses "ignore_changes" list since it does not make sense
to omit non-ignored prameters from state file as it would break terraform
flow.

Fixes #516

The work is not complete yet as it has no tests and documentation. What is more, probably parameter name could be better as well, I'm open to suggestions.

I would just like to hear from development team if you would accept this kind of solution and I should pursue to improve it (won't take long) or just drop the idea. While definitely not perfect, this patch is kind of simple, the flag is opt-in and I think it would be useful for many users out there (me included) as passwords in the state file pose a huge security problem. For example, I can encrypt terraform.tfvars myself to store it securely but I basically have no control of how terraform.tfstate gets stored remotely.

Add a lifecycle flag "hide_ignored" to remove "ignored" resource
parameters from the final state. While definitely not perfect, this
kind of simple solution should make it possible to prevent sensitive
from being written to tfstate.

"hide_ignored" uses "ignore_changes" list since it does not make sense
to omit non-ignored prameters from state file as it would break
terraform flow.

Fixes hashicorp#516
@stack72
Copy link
Contributor

stack72 commented Jul 25, 2016

Hi @modax

What is the current status of this PR? IS this something you want to proceed with?

Paul

@stack72 stack72 added the waiting-response An issue/pull request is waiting for a response from the community label Jul 25, 2016
@modax
Copy link
Contributor Author

modax commented Jul 25, 2016

Hi @stack72,

I still think this approach is not a bad idea (because currently there are no other options) and I'm willing to work on finishing it (if you approve it makes sense). However there is one limitation I noticed that when the "hide_ignored" flag gets removed, the parameter is treated as new and hence might trigger recreation of some resources.

@stack72 stack72 removed their assignment Aug 8, 2016
@cblecker cblecker mentioned this pull request Oct 24, 2016
@stack72
Copy link
Contributor

stack72 commented Mar 8, 2017

Hi

We see your WIP hasn't had any activity for over 28 days, so we're going to close it. We're still interested in taking a look so if it is ready for review/merge, please reopen it.

Thank you!

Paul

@stack72 stack72 closed this Mar 8, 2017
@ghost
Copy link

ghost commented Apr 15, 2020

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.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core enhancement thinking waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storing sensitive values in state files
3 participants