Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Add CloudHSMv2 support #121

Merged
merged 1 commit into from
Mar 11, 2018
Merged

Conversation

tomvachon
Copy link
Contributor

No description provided.


for _, cluster := range resp.Clusters {
var hsmIds []*string
for _, hsm := range cluster.Hsms {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opposed to other resources, here you delete all HSMs of a given cluster. Although by itself not an issue, the problem arises when wanting to protect resources from deletion. For this we use the String() function, used here: https://github.com/rebuy-de/aws-nuke/blob/5002410cbea40bf9bc007521d0c1a72b3f107eb4/cmd/nuke.go#L176:L180

Instead of a struct of CloudHSMV2ClusterHSM with a slice of hsmIDs a single hsmID for each CloudHSMV2ClusterHSM would probably make sense. This would simplify the Remove() method and if the String() would return the hsmID we can protect a single HSM resource from deletion.

I might be overlooking something though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I was starting to think that way this morning anyways.

@tomvachon tomvachon force-pushed the feature/cloudhsmv2 branch from c517629 to 95fac1f Compare March 9, 2018 13:10
@tomvachon
Copy link
Contributor Author

This has been updated to work on the HSM's one at a time, which is working better actually

@svenwltr svenwltr merged commit 5107735 into rebuy-de:master Mar 11, 2018
@tomvachon tomvachon deleted the feature/cloudhsmv2 branch March 16, 2018 17:02
@svenwltr svenwltr added the kind/resource Adding or changing AWS resources. label Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/resource Adding or changing AWS resources.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants