Do not delete KMS keys by alias
It is possible to specify a filter like this:
KMSAlias:
- alias/cdk-hnb659fds-assets-key
But the underlying key that alias points to, still gets deleted.
ap-northeast-1 - KMSKey - c38c7e34-**** - [ID: "c38c7e34-****", Manager: "CUSTOMER", State: "Enabled"] - would remove
Unfortunately it is not at this time. AWS treats KMS Aliases as entirely separate resource. We might be able to modify the behavior to include the first found alias maybe, but only if that's deterministic. Technically a key can have multiple aliases.
#375 implements a fix, but you'll have to change a configuration ...
KMSKey:
- property: Alias
value: alias/cdk-hnb659fds-assets-key
Thank you 🙏
@moltar You can test it from the builds here - https://github.com/ekristen/aws-nuke/actions/runs/11294170251
:tada: This issue has been resolved in version 3.27.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket: