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

Store aws_db_instance.password in tfstate, change to AttrTypeCreate #309

Merged
merged 1 commit into from
Oct 11, 2014

Conversation

alekstorm
Copy link
Contributor

Not storing the password in tfstate makes it impossible to tell when it's changed in the resource file, so terraform plan would incorrectly report that everything was up-to-date (the RDS API won't tell us what the current password is). IMO, this was a misfeature; the password should be interpolated from a variable, and I imagine the most common user scenario to be an organization-readable resource file, and a locked-down set of variable and state files (state files likely contain other sensitive information anyway, like private IP addresses).

That said, perhaps Terraform could use some mechanism of storing sensitive data in state files - in this case, since we only need to check for changes, we could get away with just hashing the password (or encrypting it). Alternatively, password wouldn't be an attribute at all, but an input prompted for whenever the DB instance is (re-)created. This would depend on a way to force recreation of a resource, though.

@mitchellh
Copy link
Contributor

LGTM. I agree with everything you said.

mitchellh added a commit that referenced this pull request Oct 11, 2014
Store aws_db_instance.password in tfstate, change to AttrTypeCreate
@mitchellh mitchellh merged commit 6ddcc2e into hashicorp:master Oct 11, 2014
@ghost ghost locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants