-
Notifications
You must be signed in to change notification settings - Fork 2
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
encrypt terraform state #24
Conversation
This is incorrect. We do need local backups of Terraform state. This is a disaster recovery measure. This about a scenario in which Consul cluster is broken or unavailable, but you need to manage the state of our cloud resources using Terraform, for example scale up. Without Consul that would not be doable, but with the backup available you could decrypt it and migrate to a local state to handle necessary changes even without Consul. |
Hmm In that case, I can encrypt the state backed up by terraform with consul's http token. |
6068723
to
aa3ccbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it locally, works nicely. Two notes tho:
- I would move the decryption script to
infra-utils/ansible
and just reference it since it should be rarely needed. - The
ansible/README.md
should updated in theInventory
section to explain the encrypted backup and how to decrypt.
@jakubgs : One thing i worry about is if |
I think this is fine, since the Consul token history would still exist in And overwriting existing ones with new ones encrypted with new token is also the correct behavior, so it's fine. |
4fe6c74
to
5753765
Compare
5753765
to
ba27d4f
Compare
I guess now this commit needs to be replicated over all |
fixes: #2
Summary
CONSUL_HTTP_TOKEN