diff --git a/providers/aws/ec2/autoscaling_groups.go b/providers/aws/ec2/autoscaling_groups.go index f66e6c7c9..d2b312e28 100644 --- a/providers/aws/ec2/autoscaling_groups.go +++ b/providers/aws/ec2/autoscaling_groups.go @@ -15,6 +15,14 @@ import ( const AWS_SERVICE_NAME_ASG = "AutoScalingGroup" +type AutoScalingGroupClient interface { + DescribeAutoScalingGroups( + ctx context.Context, + params *autoscaling.DescribeAutoScalingGroupsInput, + optFns ...func(*autoscaling.Options), + ) (*autoscaling.DescribeAutoScalingGroupsOutput, error) +} + func AutoScalingGroups(ctx context.Context, clientProvider ProviderClient) ([]Resource, error) { client := autoscaling.NewFromConfig(*clientProvider.AWSClient) @@ -36,7 +44,6 @@ type ASGDiscoverer struct { } func (d ASGDiscoverer) Discover() ([]Resource, error) { - resources := make([]Resource, 0) var queryInput autoscaling.DescribeAutoScalingGroupsInput diff --git a/providers/aws/ec2/autoscaling_groups_client.go b/providers/aws/ec2/autoscaling_groups_client.go deleted file mode 100644 index d27cde24b..000000000 --- a/providers/aws/ec2/autoscaling_groups_client.go +++ /dev/null @@ -1,15 +0,0 @@ -package ec2 - -import ( - "context" - - "github.com/aws/aws-sdk-go-v2/service/autoscaling" -) - -type AutoScalingGroupClient interface { - DescribeAutoScalingGroups( - ctx context.Context, - params *autoscaling.DescribeAutoScalingGroupsInput, - optFns ...func(*autoscaling.Options), - ) (*autoscaling.DescribeAutoScalingGroupsOutput, error) -}