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

introducting AWS SDK v2 + add support for managed prometheus #745

Closed
wakeful opened this issue Jul 15, 2024 · 0 comments
Closed

introducting AWS SDK v2 + add support for managed prometheus #745

wakeful opened this issue Jul 15, 2024 · 0 comments

Comments

@wakeful
Copy link
Contributor

wakeful commented Jul 15, 2024

the issue

cloud-nuke is currently using an outdated version of the Go SDK. AWS SDK v1 has been officially deprecated. More information here.

what's expected

We should consider and plan an upgrade path to SDK v2.

my approach

Recently, I aimed to add support for Managed Prometheus. However, this resource is only supported in SDK v2. To minimise the impact of the change set, I decided to extend the AwsResource interface with two new methods.

type AwsResource interface {
	InitV2(cfg awsgoV2.Config)
	IsUsingV2() bool
}

the BaseAwsResource was also extend to define a default behaviour

func (br *BaseAwsResource) IsUsingV2() bool {
	return false
}

with above in place I was able to extend the initRegisteredResources to configure SDK v2 client using the existing Session.

this allowed me to implement a new resource from SDK v2.

Question for Maintainers

What are your thoughts on adding support for SDK v2? I would appreciate your feedback on my proposed solution and welcome any comments! PR related to this change.

wakeful added a commit to wakeful/cloud-nuke that referenced this issue Jul 15, 2024
wakeful added a commit to wakeful/cloud-nuke that referenced this issue Aug 21, 2024
james03160927 pushed a commit that referenced this issue Aug 26, 2024
@wakeful wakeful closed this as completed Aug 27, 2024
@wakeful wakeful mentioned this issue Oct 15, 2024
5 tasks
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

No branches or pull requests

1 participant