-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/aws: New data provider to decrypt KMS secrets #11460
Conversation
* Rename aws_kms_secrets to aws_kms_secret * Add more examples to the documentation
ok @borgstrom so @jen20 and I have discussed this - we are going to merge this. We will, however, follow up with a note to the top of the documentation to suggest that when using this, decrypted secrets may be stored in state Does this sound ok to you? Thanks Paul |
|
* Add a new data provider to decrypt AWS KMS secrets * Address feedback * Rename aws_kms_secrets to aws_kms_secret * Add more examples to the documentation
Thanks, @stack72. Glad to see this merged! Please feel free to add admonition to the docs however you feel makes the most sense. |
* Add a new data provider to decrypt AWS KMS secrets * Address feedback * Rename aws_kms_secrets to aws_kms_secret * Add more examples to the documentation
nice feature, but if that data is sensitive and we need a key to encrypt it how we can leave it decrypted in state files which are accessible in S3 buckets?!!! in my case I can not use it since it should be consumed as environment variable and I do not want it be shown to everyone who has read access. |
@mrafieee see the discussion in #7886, and the note in the docs https://www.terraform.io/docs/providers/aws/d/kms_secret.html Encrypted state is something that many people want. #9556 Like others in #7886 our solution was to use KMS in our workflow to encrypt and decrypt the state ourselves before/after we run terraform and then only store the encrypted state publicly. While it added a little bit of overhead to our workflow, it's been an easy adoption. |
Not to dredge this back up... but since we're using the KMS backends, why does the plaintext need to be in the state file? Can't terraform on-boot go lookup in KMS what the plaintext is and only use it in-memory? Can't it keep the plaintext of a KMS-related secret out of state? :\ |
The AWS provider is no longer developed in this repository, so any further discussion about it should happen in the AWS provider repository where the AWS provider maintainers can see it. Thanks! |
This is a continuation of #7886
It adds a new data source for AWS that allows you to use the KMS service to encrypt "secrets" and then use them in your resource definitions.
This includes docs and acceptance tests.
I've already confirmed with AWS that these tests will only result in a fraction of $0.01 during each run (See: #7886 (comment))