aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

[AWS::KMS::Key] - [Enhancement] - Support --import-existing-resources

Open
#2,376 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::KMS::Key

### Resource name

_No response_

### Description

A KMS::Key is an obvious resource to set as:
```json
"UpdateReplacePolicy" : "Retain",
"DeletionPolicy" : "RetainExceptOnCreate"
```

so that on destruction of the stack you can still e.g. retrieve encrypted DB backups.

However, because its `primariyIdentifier` is `KeyId` and `KeyId` is a read only property it cannot be imported using `--import-existing-resources`. So if you created the key via CloudFormation (or the CDK) and want to recreate the stack using the same key it does not work trivially.

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

The issue names AWS::KMS::Key and --import-existing-resources but no repository files, tests, or entry points. First locate the implementation of this import behavior and its existing tests; done means a retained existing KMS key can be used when recreating a stack through the flag, with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.