feat(pipeline): allow enabling KMS key rotation for cross-region-stacks#14381
feat(pipeline): allow enabling KMS key rotation for cross-region-stacks#14381hross-frae wants to merge 18 commits intoaws:masterfrom
Conversation
packages/@aws-cdk/aws-codepipeline/lib/private/cross-region-support-stack.ts
Outdated
Show resolved
Hide resolved
skinny85
left a comment
There was a problem hiding this comment.
Thanks for the contribution @hross-frae!
A few minor comments, mainly about naming.
packages/@aws-cdk/aws-codepipeline/lib/private/cross-region-support-stack.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-codepipeline/lib/private/cross-region-support-stack.ts
Outdated
Show resolved
Hide resolved
|
Also - unit tests are missing 😉. |
… tests for the property
skinny85
left a comment
There was a problem hiding this comment.
Looks great @hross-frae! A few minor comments before I merge this in.
packages/@aws-cdk/aws-codepipeline/lib/private/cross-region-support-stack.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-codepipeline/lib/private/cross-region-support-stack.ts
Outdated
Show resolved
Hide resolved
|
@skinny85 it's only existing unit tests that are failing now. When I try update them there are some that are deleted snapshot files that are deleted. Is that expected? I've been running full builds and tests |
|
@hross-frae I'm not sure what you're asking, but because you implemented my comment from here: #14381 (comment) , the generated CloudFormation template will remain exactly the same as it is now. The build currently is failing on the If you revert the change you made to the |
|
please merge, so that i can satisfy my security hub. thank you. |
Can't really merge it if the build is failing, unfortunately. |
|
Would be awesome to merge this PR. Unfortunately, my known workarounds for enabling KeyRotation don't work anymore with the recent |
|
Hi @ppuritscher, the main issue I can up against in the end was getting all the tests working... |
|
Hi @hross-frae, thanks for the update and your work there! I assume that you already checked the suggestion of @skinny85 ("revert the change you made to the integ.pipeline-event-target.expected.json file")? Would it be possible for you to give |
|
@ppuritscher you should be able to take this PR over if you want to (it's just a matter of getting the code from https://github.com/hross-frae/aws-cdk, the |
|
I created a PR hross-frae#1 |
Fixed one test and merge master
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Ok, the other tests fail as well. |
|
Ah ok, I think I found the "problem": You build now a keyArn with all necessary information (as far as I understand). That means we cant search for enableKeyRotation in the resulting json. |
|
Hey @hross-frae, @renner-daniel and @skinny85! |
Thanks @ppuritscher for picking this up and following it through. I'll close this PR as it's no longer needed |
Enabling KMS Key rotation for cross-region-stacks as it is a recommended best practice.
https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
In #13466 it was considered not necessary due to extra costs, but I don't think that reason applies in this use case due to the following reasons:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license