Skip to content

Commit acf6406

Browse files
committed
Lists all aws_acm_certificate key types
1 parent c2b9d08 commit acf6406

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

internal/service/acm/sweep.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import (
99

1010
"github.com/aws/aws-sdk-go-v2/aws"
1111
"github.com/aws/aws-sdk-go-v2/service/acm"
12+
awstypes "github.com/aws/aws-sdk-go-v2/service/acm/types"
1213
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
14+
"github.com/hashicorp/terraform-provider-aws/internal/enum"
1315
"github.com/hashicorp/terraform-provider-aws/internal/sweep"
1416
"github.com/hashicorp/terraform-provider-aws/internal/sweep/awsv2"
1517
)
@@ -48,7 +50,12 @@ func sweepCertificates(region string) error {
4850
conn := client.ACMClient(ctx)
4951
var sweepResources []sweep.Sweepable
5052

51-
input := acm.ListCertificatesInput{}
53+
input := acm.ListCertificatesInput{
54+
Includes: &awstypes.Filters{
55+
// By default, ListCertificates only returns RSA_1024 and RSA_2048 certificates
56+
KeyTypes: enum.EnumValues[awstypes.KeyAlgorithm](),
57+
},
58+
}
5259
pages := acm.NewListCertificatesPaginator(conn, &input)
5360
for pages.HasMorePages() {
5461
page, err := pages.NextPage(ctx)

0 commit comments

Comments
 (0)