Skip to content
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

Add support for CloudFront public keys and CloudFront key groups (#873) #1065

Merged

Conversation

npellegrin
Copy link
Contributor

This closes #873

Output with feature activated

global - CloudFrontKeyGroup - [ID: "666e78f3-yyyy-aaa-bbb-xxxxxxxx"] - would remove
global - CloudFrontPublicKey - [ID: "K3yyyyyy"] - would remove
Scan complete: 2 total, 2 nukeable, 0 filtered.

Do you really want to nuke these resources on the account with the ID 12346789012 and the alias 'test'?
Do you want to continue? Enter account alias to continue.
> test

global - CloudFrontKeyGroup - [ID: "666e78f3-yyyy-aaa-bbb-xxxxxxxx"] - triggered remove
global - CloudFrontPublicKey - [ID: "K3yyyyyy"] - triggered remove

Removal requested: 2 waiting, 0 failed, 0 skipped, 0 finished

global - CloudFrontKeyGroup - [ID: "666e78f3-yyyy-aaa-bbb-xxxxxxxx"] - waiting
global - CloudFrontPublicKey - [ID: "K3yyyyyy"] - waiting

Removal requested: 2 waiting, 0 failed, 0 skipped, 0 finished

global - CloudFrontKeyGroup - [ID: "666e78f3-yyyy-aaa-bbb-xxxxxxxx"] - removed
global - CloudFrontPublicKey - [ID: "K3yyyyyy"] - removed

Removal requested: 0 waiting, 0 failed, 0 skipped, 2 finished

Nuke complete: 0 failed, 0 skipped, 2 finished.

@npellegrin npellegrin requested a review from a team as a code owner August 7, 2023 20:50
@der-eismann
Copy link
Member

Thanks for your contribution! Would be great if you could also add Name & CreatedTime to the properties of the public key. See this example for correct time formatting.

@npellegrin npellegrin force-pushed the feature/cloudfront-public-keys branch from f197cc3 to 3298e49 Compare August 23, 2023 19:47
@npellegrin npellegrin force-pushed the feature/cloudfront-public-keys branch from 3298e49 to 69b766d Compare August 23, 2023 19:51
@npellegrin
Copy link
Contributor Author

Hi @der-eismann

Thanks for your review! I updated the PR adding:

  • Name and CreatedTime as properties of CloudFrontPublicKey
  • Name and LastModifiedTime as properties of CloudFrontKeyGroup

Preview :

aws-nuke version f197cc3.dirty - Wed Aug 23 21:39:47 CEST 2023 - f197cc307fbd65c20271a3d4bfa76235f3d35ba8

Do you really want to nuke the account with the ID 00000 and the alias 'aaaa'?
Do you want to continue? Enter account alias to continue.
> aaaa

global - CloudFrontKeyGroup - [ID: "ebab4035-03a8-4dc0-9a44-ef9bfe7757dd", LastModifiedTime: "2023-08-23T19:44:24Z", Name: "test-group"] - would remove
global - CloudFrontPublicKey - [CreatedTime: "2023-08-23T19:43:56Z", ID: "KB4WTS67X6UKF", Name: "test"] - would remove
Scan complete: 2 total, 2 nukeable, 0 filtered.

Do you really want to nuke these resources on the account with the ID 00000 and the alias 'aaaa'?
Do you want to continue? Enter account alias to continue.
> aaaa

global - CloudFrontKeyGroup - [ID: "ebab4035-03a8-4dc0-9a44-ef9bfe7757dd", LastModifiedTime: "2023-08-23T19:44:24Z", Name: "test-group"] - triggered remove
global - CloudFrontPublicKey - [CreatedTime: "2023-08-23T19:43:56Z", ID: "KB4WTS67X6UKF", Name: "test"] - triggered remove

Removal requested: 2 waiting, 0 failed, 0 skipped, 0 finished

global - CloudFrontKeyGroup - [ID: "ebab4035-03a8-4dc0-9a44-ef9bfe7757dd", LastModifiedTime: "2023-08-23T19:44:24Z", Name: "test-group"] - waiting
global - CloudFrontPublicKey - [CreatedTime: "2023-08-23T19:43:56Z", ID: "KB4WTS67X6UKF", Name: "test"] - waiting

Removal requested: 2 waiting, 0 failed, 0 skipped, 0 finished

global - CloudFrontKeyGroup - [ID: "ebab4035-03a8-4dc0-9a44-ef9bfe7757dd", LastModifiedTime: "2023-08-23T19:44:24Z", Name: "test-group"] - removed
global - CloudFrontPublicKey - [CreatedTime: "2023-08-23T19:43:56Z", ID: "KB4WTS67X6UKF", Name: "test"] - removed

Removal requested: 0 waiting, 0 failed, 0 skipped, 2 finished

Nuke complete: 0 failed, 0 skipped, 2 finished.

@der-eismann
Copy link
Member

Lovely, thank you very much!

@der-eismann der-eismann merged commit f8fc2e5 into rebuy-de:main Aug 24, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support CloudFront public keys and key groups
3 participants