Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

aws-sns: KMS key is not deleted in integ.sns.ts #29663

Closed
jun1-t opened this issue Mar 31, 2024 · 3 comments · Fixed by #29664
Closed

aws-sns: KMS key is not deleted in integ.sns.ts #29663

jun1-t opened this issue Mar 31, 2024 · 3 comments · Fixed by #29664
Labels
@aws-cdk/aws-sns Related to Amazon Simple Notification Service bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@jun1-t
Copy link
Contributor

jun1-t commented Mar 31, 2024

Describe the bug

KMS key is created in integ test(integ.sns.ts), but KMS key remains after integ test.
Because RemovalPolicy.DESTROY is not set.

const key = new Key(this, 'CustomKey');

Expected Behavior

KMS key created within integ test should be deleted.

Current Behavior

KMS key created within integ test remains after integ test.

Reproduction Steps

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.134.0

Framework Version

No response

Node.js Version

v18.17.1

OS

Linux/UNIX

Language

TypeScript

Language Version

No response

Other information

No response

@jun1-t jun1-t added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 31, 2024
@github-actions github-actions bot added the @aws-cdk/aws-sns Related to Amazon Simple Notification Service label Mar 31, 2024
@tim-finnigan tim-finnigan self-assigned this Apr 1, 2024
@tim-finnigan tim-finnigan added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Apr 1, 2024
@tim-finnigan
Copy link

Thanks for report this issue and creating the PR.

@tim-finnigan tim-finnigan added p2 effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Apr 1, 2024
@tim-finnigan tim-finnigan removed their assignment Apr 1, 2024
@mergify mergify bot closed this as completed in #29664 Apr 1, 2024
mergify bot pushed a commit that referenced this issue Apr 1, 2024
### Issue # (if applicable)

Closes #29663

### Reason for this change

kms key created within integ test remains after integ test.

### Description of changes

Added "pendingWindow" and "removalPolicy" to kms resource.



```ts
    const key = new Key(this, 'CustomKey', {
      pendingWindow: Duration.days(7),
      removalPolicy: RemovalPolicy.DESTROY,
    });
```

### Description of how you validated changes

I confirmed with integ test that it works as expected.

### Checklist
- [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

github-actions bot commented Apr 1, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
@aws-cdk/aws-sns Related to Amazon Simple Notification Service bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants