-
-
Notifications
You must be signed in to change notification settings - Fork 374
feat: migrate 30 AWS resources to generic Resource[C] pattern #991
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR migrates 30 additional AWS resources from the legacy BaseAwsResource pattern to the generic Resource[C] pattern introduced in commit 88f04bd. Migrated resources: - ApiGateway, ApiGatewayV2 - ASGroups - CodeDeployApplications - DBInstances, DBSubnetGroups, DBClusters - EBSVolumes - EC2Instances, EC2DedicatedHosts, EC2Endpoints - ECSClusters, ECSServices - ElasticFileSystem - EKSClusters - Elasticaches - LoadBalancers, LoadBalancersV2 - KmsCustomerKeys - LambdaFunctions, LambdaLayers - MSKCluster - OpenSearchDomains - RdsParameterGroup - RedshiftClusters - SecurityHub - TransitGateways, TransitGatewaysVpcAttachment - VPCLatticeServiceNetwork, VPCLatticeTargetGroup Key changes per resource: - Consolidated *_types.go files into main resource files - Replaced struct-based pattern with factory function (NewXxx) - Used standalone lister/nuker functions with type parameters - Updated tests to use factory functions
2ac223d to
02b3fed
Compare
denis256
reviewed
Jan 1, 2026
denis256
reviewed
Jan 1, 2026
denis256
reviewed
Jan 1, 2026
- Add SequentialDeleteThenWaitAll and ConcurrentDeleteThenWaitAll helpers - Refactor 10 resources to use batch_deleter patterns (removes direct report.Record calls) - Simplify 5 over-engineered resources: - apigateway: remove unnecessary client cert post-cleanup - kms_customer_key: remove alias deletion (AWS auto-deletes) - transit_gateway: remove global state, inline permission verification - efs: replace 20s hardcoded sleep with proper waiter - lambda_layer: use composite identifier format (name:version) - Fix EKS test timeout by properly simulating deleted cluster
Use SDK paginator to handle cases with many RDS clusters.
- Use WrapAwsInitClient for cleaner initialization - Add pagination using DescribeAutoScalingGroupsPaginator - Improve tests with table-driven approach and tag filtering test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Migrates 30 AWS resources from legacy
BaseAwsResourcepattern to genericResource[C]pattern.Combines and replaces PRs #988, #989, #990.
Migrated Resources
ASGroups, ApiGateway, ApiGatewayV2, CodeDeployApplications, DBClusters, DBInstances, DBSubnetGroups, EBSVolumes, EC2DedicatedHosts, EC2Endpoints, EC2Instances, ECSClusters, ECSServices, EKSClusters, ElasticFileSystem, Elasticaches, KmsCustomerKeys, LambdaFunctions, LambdaLayers, LoadBalancers, LoadBalancersV2, MSKCluster, OpenSearchDomains, RdsParameterGroup, RedshiftClusters, SecurityHub, TransitGateways, TransitGatewaysVpcAttachment, VPCLatticeServiceNetwork, VPCLatticeTargetGroup
Changes
*_types.gointo main resource filesNewXxx())