-
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: Add support for KMS #3928
Conversation
|
||
# aws\_kms\_alias | ||
|
||
Provides a KMS customer master key. AWS Console enforces 1-to-1 mapping between aliases & keys, |
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.
Should the start of this paragraph be "Provides an alias for a KMS customer master key"?
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.
fixed & squashed into the original commit with docs, so I'm not cluttering the git log even more.
Looks great to me. Really appreciate the help |
c494526
to
c965dd7
Compare
So is KMS supported within Terraform now ? Or some elements? |
I wanted to merge this yesterday, so I reran the acceptance tests before doing so. There are still issues with the eventual consistency - I'm not sure what the best solution is - read my first post above. Even though we wait 1 minute until checking the status, it does not guarantee consistency. Better solution may include waiting for x number of subsequent success statuses. I will probably try to implement the mentioned solution. cc @Felivel |
Interesting, I am currently playing around with your dev build. Would be particularly handy if IAM Administrators could be specified. Makes it a little difficult to use this without it. |
Hey @radeksimko sorry for the delay – how do you feel about this PR right now? |
@catsby Feature-wise this is ready, but it would make me feel more confident if we first get thru #4447 and implement it here afterwards to prevent the intermittent test failures. The other linked issue would help making the initial creation a lot faster, but that's not really something I'd consider to be a blocker for KMS generally. |
Just vendor-ed KMS to make godep happy and make the tests green again. |
Do we have any updates with this getting merged back in? Waiting for this functionality! |
853a95e
to
3bcb97b
Compare
033b18d
to
34c6775
Compare
This is now ready for final review as I managed to implement the enhanced retry logic from #4447 that made enabling/disabling keys a lot more stable which made me much more confident that this resource will actually work well.
|
This LGTM! |
provider/aws: Add support for KMS
…cleanup docs/resource/kinesis_firehose: fix example formatting in kinesis_firehose splunk destination documentation
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. |
This is a polished version of #3209
@psytale would you mind giving a look at this? Just wanted to know whether you're happy with the modifications I made and whether all make sense to you.
Test plan
Eventual consistency
There's just one concern I have - KMS has apparently similar problem as IAM policies - that is eventual consistency. Creation/deletion doesn't seem to be a problem, but disabling/enabling and key rotation are fields that may take time to propagate.
The way we usually deal with such problem is that we call
Describe
/Get
operations repeatedly until we have a confirmation that status has been changed. The problem with such approach is that KMS is literally inconsistent which means that a single confirmation often doesn't mean propagation:^ that is why I set the
MinTimeout
fairly high - 60 secs, but it's naive solution anyway. I'm thinking of creating a special version or modifying theWaitForState
helper so that it's counting occurrences of target state in a given time frame and maybe wait for defined percentage (majority) of target status.Are we silently ignoring this edge case for IAM policies too?
Reported to AWS
I have submitted two feature requests to AWS while I was working on this:
ListAliases
to support listing by KeyId, so we don't have to waste so much effort on listing through all