-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Use new region filter for s3.ListBuckets
in sweeper
#39919
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% SWEEPERS=aws_s3_bucket,aws_s3_object,aws_s3_object_directory_bucket,aws_s3_object_gp_bucket SWEEP=us-gov-east-1,us-gov-west-1 make sweep
# make sweep SWEEPARGS=-sweep-run=aws_example_thing
# set SWEEPARGS=-sweep-allow-failures to continue after first failure
WARNING: This will destroy infrastructure. Use only in development accounts.
go1.23.2 test ./internal/sweep -v -sweep=us-gov-east-1,us-gov-west-1 -sweep-run='aws_s3_bucket,aws_s3_object,aws_s3_object_directory_bucket,aws_s3_object_gp_bucket' -timeout 360m
2024/10/28 16:51:39 [DEBUG] Running Sweepers for region (us-gov-east-1):
2024/10/28 16:51:39 [DEBUG] Running Sweeper (aws_s3_object_directory_bucket) in region (us-gov-east-1)
2024/10/28 16:51:39 [DEBUG] sweeper: Configuring Terraform AWS Provider: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-east-1
2024-10-28T16:51:39.044-0400 [DEBUG] sweeper.aws-base: Resolving credentials provider: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-east-1
2024-10-28T16:51:39.044-0400 [DEBUG] sweeper.aws-base: Loading configuration: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-east-1
2024-10-28T16:51:39.044-0400 [DEBUG] sweeper.aws-base: Retrieving credentials: sweeper_region=us-gov-east-1 tf_resource_type=aws_s3_object_directory_bucket
2024-10-28T16:51:39.044-0400 [INFO] sweeper.aws-base: Retrieved credentials: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-east-1 tf_aws.credentials_source=EnvConfigCredentials
2024-10-28T16:51:39.044-0400 [DEBUG] sweeper.aws-base: Loading configuration: sweeper_region=us-gov-east-1 tf_resource_type=aws_s3_object_directory_bucket
2024/10/28 16:51:39 [DEBUG] sweeper: Creating AWS SDK v1 session: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-east-1
2024/10/28 16:51:39 [DEBUG] sweeper: Retrieving AWS account details: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-east-1
2024-10-28T16:51:39.045-0400 [DEBUG] sweeper.aws-base: Retrieving caller identity from STS: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-east-1
2024-10-28T16:51:39.313-0400 [INFO] sweeper.aws-base: Retrieved caller identity from STS: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-east-1
2024/10/28 16:51:39 [INFO] sweeper: listing resources: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-east-1
2024/10/28 16:51:39 [WARN] sweeper: Skipping sweeper: sweeper_region=us-gov-east-1 tf_resource_type=aws_s3_object_directory_bucket error="operation error S3: ListDirectoryBuckets, https response error StatusCode: 0, RequestID: , HostID: , request send failed, Get \"https://s3express-control.us-gov-east-1.amazonaws.com/?x-id=ListDirectoryBuckets\": dial tcp: lookup s3express-control.us-gov-east-1.amazonaws.com: no such host"
2024/10/28 16:51:39 [DEBUG] Completed Sweeper (aws_s3_object_directory_bucket) in region (us-gov-east-1) in 307.522541ms
2024/10/28 16:51:39 [DEBUG] Sweeper (aws_s3_object_gp_bucket) has dependency (aws_m2_application), running..
2024/10/28 16:51:39 [DEBUG] Running Sweeper (aws_m2_application) in region (us-gov-east-1)
2024/10/28 16:51:39 [INFO] sweeper: listing resources: tf_resource_type=aws_m2_application sweeper_region=us-gov-east-1
2024/10/28 16:51:39 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-east-1 tf_resource_type=aws_m2_application
2024/10/28 16:51:39 [DEBUG] Completed Sweeper (aws_m2_application) in region (us-gov-east-1) in 355.338208ms
2024/10/28 16:51:39 [DEBUG] Running Sweeper (aws_s3_object_gp_bucket) in region (us-gov-east-1)
2024/10/28 16:51:39 [INFO] sweeper: listing resources: sweeper_region=us-gov-east-1 tf_resource_type=aws_s3_object_gp_bucket
2024/10/28 16:51:39 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-east-1 tf_resource_type=aws_s3_object_gp_bucket
2024/10/28 16:51:39 [DEBUG] Completed Sweeper (aws_s3_object_gp_bucket) in region (us-gov-east-1) in 165.495584ms
2024/10/28 16:51:39 [DEBUG] Sweeper (aws_m2_application) already ran in region (us-gov-east-1)
2024/10/28 16:51:39 [DEBUG] Running Sweeper (aws_s3control_access_grant) in region (us-gov-east-1)
2024/10/28 16:51:40 [WARN] Skipping S3 Access Grant sweep for us-gov-east-1: operation error S3 Control: ListAccessGrants, https response error StatusCode: 404, RequestID: 85GGFSPWGX0E5AKS, HostID: VnMNJC5gKd4ztAMycIsOvK3vXTjZaovJL0xnyRghkEwPdUJ4pi0M7pAkPfN0A6tkSyiSlHVmDrQ=, api error AccessGrantsInstanceNotExistsError: Access Grants Instance does not exist
2024/10/28 16:51:40 [DEBUG] Completed Sweeper (aws_s3control_access_grant) in region (us-gov-east-1) in 199.006167ms
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grants_instance) has dependency (aws_s3control_access_grants_location), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grants_location) has dependency (aws_s3control_access_grant), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grant) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Running Sweeper (aws_s3control_access_grants_location) in region (us-gov-east-1)
2024/10/28 16:51:40 [WARN] Skipping S3 Access Grants Location sweep for us-gov-east-1: operation error S3 Control: ListAccessGrantsLocations, https response error StatusCode: 404, RequestID: 85GHRMSWG28MBKN9, HostID: o+JyyXdyhx9tR0LRD6UAniHS5BYeQwxmJAl1X/sYcH6ipzXFatA9cxT/88nASjBWLWRaO3johtQ=, api error AccessGrantsInstanceNotExistsError: Access Grants Instance does not exist
2024/10/28 16:51:40 [DEBUG] Completed Sweeper (aws_s3control_access_grants_location) in region (us-gov-east-1) in 54.428291ms
2024/10/28 16:51:40 [DEBUG] Running Sweeper (aws_s3control_access_grants_instance) in region (us-gov-east-1)
2024/10/28 16:51:40 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-east-1
2024/10/28 16:51:40 [DEBUG] Completed Sweeper (aws_s3control_access_grants_instance) in region (us-gov-east-1) in 83.657792ms
2024/10/28 16:51:40 [DEBUG] Running Sweeper (aws_s3control_multi_region_access_point) in region (us-gov-east-1)
2024/10/28 16:51:40 [WARN] Skipping S3 Multi-Region Access Point sweep for region: us-gov-east-1
2024/10/28 16:51:40 [DEBUG] Completed Sweeper (aws_s3control_multi_region_access_point) in region (us-gov-east-1) in 19.209µs
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3_access_point) has dependency (aws_s3control_object_lambda_access_point), running..
2024/10/28 16:51:40 [DEBUG] Running Sweeper (aws_s3control_object_lambda_access_point) in region (us-gov-east-1)
2024/10/28 16:51:40 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-east-1
2024/10/28 16:51:40 [DEBUG] Completed Sweeper (aws_s3control_object_lambda_access_point) in region (us-gov-east-1) in 91.683875ms
2024/10/28 16:51:40 [DEBUG] Running Sweeper (aws_s3_access_point) in region (us-gov-east-1)
2024/10/28 16:51:40 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-east-1
2024/10/28 16:51:40 [DEBUG] Completed Sweeper (aws_s3_access_point) in region (us-gov-east-1) in 48.963ms
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3_bucket) has dependency (aws_s3_access_point), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3_access_point) has dependency (aws_s3control_object_lambda_access_point), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_object_lambda_access_point) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3_access_point) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3_bucket) has dependency (aws_s3_object_gp_bucket), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3_object_gp_bucket) has dependency (aws_m2_application), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_m2_application) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3_object_gp_bucket) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3_bucket) has dependency (aws_s3control_access_grants_instance), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grants_instance) has dependency (aws_s3control_access_grants_location), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grants_location) has dependency (aws_s3control_access_grant), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grant) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grants_location) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grants_instance) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3_bucket) has dependency (aws_s3control_multi_region_access_point), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_multi_region_access_point) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Running Sweeper (aws_s3_bucket) in region (us-gov-east-1)
2024/10/28 16:51:40 [INFO] sweeper: listing resources: sweeper_region=us-gov-east-1 tf_resource_type=aws_s3_bucket
2024/10/28 16:51:40 [INFO] sweeper: No resources to sweep: tf_resource_type=aws_s3_bucket sweeper_region=us-gov-east-1
2024/10/28 16:51:40 [DEBUG] Completed Sweeper (aws_s3_bucket) in region (us-gov-east-1) in 42.153875ms
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_object_lambda_access_point) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grants_location) has dependency (aws_s3control_access_grant), running..
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grant) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Sweeper (aws_s3control_access_grants_location) already ran in region (us-gov-east-1)
2024/10/28 16:51:40 [DEBUG] Running Sweeper (aws_s3_object) in region (us-gov-east-1)
2024/10/28 16:51:40 [INFO] sweeper: listing resources: sweeper_region=us-gov-east-1 tf_resource_type=aws_s3_object
2024/10/28 16:51:40 [INFO] sweeper: Noop sweeper: sweeper_region=us-gov-east-1 tf_resource_type=aws_s3_object
2024/10/28 16:51:40 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-east-1 tf_resource_type=aws_s3_object
2024/10/28 16:51:40 [DEBUG] Completed Sweeper (aws_s3_object) in region (us-gov-east-1) in 172.083µs
2024/10/28 16:51:40 Completed Sweepers for region (us-gov-east-1) in 1.348884333s
2024/10/28 16:51:40 Sweeper Tests for region (us-gov-east-1) ran successfully:
2024/10/28 16:51:40 - aws_m2_application
2024/10/28 16:51:40 - aws_s3_object_gp_bucket
2024/10/28 16:51:40 - aws_s3control_access_grant
2024/10/28 16:51:40 - aws_s3control_access_grants_instance
2024/10/28 16:51:40 - aws_s3control_multi_region_access_point
2024/10/28 16:51:40 - aws_s3_access_point
2024/10/28 16:51:40 - aws_s3_object
2024/10/28 16:51:40 - aws_s3_object_directory_bucket
2024/10/28 16:51:40 - aws_s3control_access_grants_location
2024/10/28 16:51:40 - aws_s3control_object_lambda_access_point
2024/10/28 16:51:40 - aws_s3_bucket
2024/10/28 16:51:40 [DEBUG] Running Sweepers for region (us-gov-west-1):
2024/10/28 16:51:40 [DEBUG] Running Sweeper (aws_m2_application) in region (us-gov-west-1)
2024/10/28 16:51:40 [DEBUG] sweeper: Configuring Terraform AWS Provider: sweeper_region=us-gov-west-1 tf_resource_type=aws_m2_application
2024-10-28T16:51:40.392-0400 [DEBUG] sweeper.aws-base: Resolving credentials provider: sweeper_region=us-gov-west-1 tf_resource_type=aws_m2_application
2024-10-28T16:51:40.392-0400 [DEBUG] sweeper.aws-base: Loading configuration: sweeper_region=us-gov-west-1 tf_resource_type=aws_m2_application
2024-10-28T16:51:40.393-0400 [DEBUG] sweeper.aws-base: Retrieving credentials: sweeper_region=us-gov-west-1 tf_resource_type=aws_m2_application
2024-10-28T16:51:40.393-0400 [INFO] sweeper.aws-base: Retrieved credentials: tf_resource_type=aws_m2_application sweeper_region=us-gov-west-1 tf_aws.credentials_source=EnvConfigCredentials
2024-10-28T16:51:40.393-0400 [DEBUG] sweeper.aws-base: Loading configuration: sweeper_region=us-gov-west-1 tf_resource_type=aws_m2_application
2024/10/28 16:51:40 [DEBUG] sweeper: Creating AWS SDK v1 session: tf_resource_type=aws_m2_application sweeper_region=us-gov-west-1
2024/10/28 16:51:40 [DEBUG] sweeper: Retrieving AWS account details: sweeper_region=us-gov-west-1 tf_resource_type=aws_m2_application
2024-10-28T16:51:40.393-0400 [DEBUG] sweeper.aws-base: Retrieving caller identity from STS: tf_resource_type=aws_m2_application sweeper_region=us-gov-west-1
2024-10-28T16:51:40.780-0400 [INFO] sweeper.aws-base: Retrieved caller identity from STS: tf_resource_type=aws_m2_application sweeper_region=us-gov-west-1
2024/10/28 16:51:40 [INFO] sweeper: listing resources: sweeper_region=us-gov-west-1 tf_resource_type=aws_m2_application
2024/10/28 16:51:41 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-west-1 tf_resource_type=aws_m2_application
2024/10/28 16:51:41 [DEBUG] Completed Sweeper (aws_m2_application) in region (us-gov-west-1) in 855.228834ms
2024/10/28 16:51:41 [DEBUG] Running Sweeper (aws_s3control_access_grant) in region (us-gov-west-1)
2024/10/28 16:51:41 [WARN] Skipping S3 Access Grant sweep for us-gov-west-1: operation error S3 Control: ListAccessGrants, https response error StatusCode: 404, RequestID: WSANZA9GF7KHGS7V, HostID: w8QLb8ai2ZVxAEbK3lD21BPYKcnr5vuwtNH8VEtfYzNSen+XQpG69hs9t+IAYbntEX6uKOCQqbtykBCUTR2zcGvdARbM7YId, api error AccessGrantsInstanceNotExistsError: Access Grants Instance does not exist
2024/10/28 16:51:41 [DEBUG] Completed Sweeper (aws_s3control_access_grant) in region (us-gov-west-1) in 432.504958ms
2024/10/28 16:51:41 [DEBUG] Sweeper (aws_s3control_access_grants_instance) has dependency (aws_s3control_access_grants_location), running..
2024/10/28 16:51:41 [DEBUG] Sweeper (aws_s3control_access_grants_location) has dependency (aws_s3control_access_grant), running..
2024/10/28 16:51:41 [DEBUG] Sweeper (aws_s3control_access_grant) already ran in region (us-gov-west-1)
2024/10/28 16:51:41 [DEBUG] Running Sweeper (aws_s3control_access_grants_location) in region (us-gov-west-1)
2024/10/28 16:51:41 [WARN] Skipping S3 Access Grants Location sweep for us-gov-west-1: operation error S3 Control: ListAccessGrantsLocations, https response error StatusCode: 404, RequestID: WSAHAPNR7AWMJ0MR, HostID: 1Km2IInsCqQhw4XiQlHaSb6yMBtrl/1yQanVEnYDTRokUKfkuR4jfulzkKmXdCLu9P5qBgdnjQuTKanCGf6ahhgRgWea5MvY, api error AccessGrantsInstanceNotExistsError: Access Grants Instance does not exist
2024/10/28 16:51:41 [DEBUG] Completed Sweeper (aws_s3control_access_grants_location) in region (us-gov-west-1) in 155.383959ms
2024/10/28 16:51:41 [DEBUG] Running Sweeper (aws_s3control_access_grants_instance) in region (us-gov-west-1)
2024/10/28 16:51:42 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-west-1
2024/10/28 16:51:42 [DEBUG] Completed Sweeper (aws_s3control_access_grants_instance) in region (us-gov-west-1) in 194.187708ms
2024/10/28 16:51:42 [DEBUG] Running Sweeper (aws_s3control_multi_region_access_point) in region (us-gov-west-1)
2024/10/28 16:51:42 [WARN] Skipping S3 Multi-Region Access Point sweep for region: us-gov-west-1
2024/10/28 16:51:42 [DEBUG] Completed Sweeper (aws_s3control_multi_region_access_point) in region (us-gov-west-1) in 61.833µs
2024/10/28 16:51:42 [DEBUG] Running Sweeper (aws_s3_object_directory_bucket) in region (us-gov-west-1)
2024/10/28 16:51:42 [INFO] sweeper: listing resources: tf_resource_type=aws_s3_object_directory_bucket sweeper_region=us-gov-west-1
2024/10/28 16:51:42 [WARN] sweeper: Skipping sweeper: tf_resource_type=aws_s3_object_directory_bucket error="operation error S3: ListDirectoryBuckets, https response error StatusCode: 0, RequestID: , HostID: , request send failed, Get \"https://s3express-control.us-gov-west-1.amazonaws.com/?x-id=ListDirectoryBuckets\": dial tcp: lookup s3express-control.us-gov-west-1.amazonaws.com: no such host" sweeper_region=us-gov-west-1
2024/10/28 16:51:42 [DEBUG] Completed Sweeper (aws_s3_object_directory_bucket) in region (us-gov-west-1) in 45.89125ms
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_object_gp_bucket) has dependency (aws_m2_application), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_m2_application) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Running Sweeper (aws_s3_object_gp_bucket) in region (us-gov-west-1)
2024/10/28 16:51:42 [INFO] sweeper: listing resources: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_object_gp_bucket
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: tf_resource_type=aws_s3_object_gp_bucket bucket_name=appstream-app-settings-us-gov-west-1-357342307427-frnrem9j sweeper_region=us-gov-west-1 skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: bucket_name=appstream2-36fb080bb8-us-gov-west-1-357342307427 sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_object_gp_bucket skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_object_gp_bucket bucket_name=aws-elasticencoder-pipeline-tf-test-bucket skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_object_gp_bucket bucket_name=aws-glue-temporary-357342307427-us-gov-west-1 skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_object_gp_bucket bucket_name=cf-templates-1sscj4vdspkj6-us-gov-west-1 skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: tf_resource_type=aws_s3_object_gp_bucket skip_reason="no match on prefix list" bucket_name=elasticbeanstalk-us-gov-west-1-357342307427 sweeper_region=us-gov-west-1
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: tf_resource_type=aws_s3_object_gp_bucket bucket_name=quicksight-357342307427 skip_reason="no match on prefix list" sweeper_region=us-gov-west-1
2024/10/28 16:51:42 [INFO] sweeper: No resources to sweep: tf_resource_type=aws_s3_object_gp_bucket sweeper_region=us-gov-west-1
2024/10/28 16:51:42 [DEBUG] Completed Sweeper (aws_s3_object_gp_bucket) in region (us-gov-west-1) in 292.5905ms
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_bucket) has dependency (aws_s3_access_point), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_access_point) has dependency (aws_s3control_object_lambda_access_point), running..
2024/10/28 16:51:42 [DEBUG] Running Sweeper (aws_s3control_object_lambda_access_point) in region (us-gov-west-1)
2024/10/28 16:51:42 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-west-1
2024/10/28 16:51:42 [DEBUG] Completed Sweeper (aws_s3control_object_lambda_access_point) in region (us-gov-west-1) in 155.282625ms
2024/10/28 16:51:42 [DEBUG] Running Sweeper (aws_s3_access_point) in region (us-gov-west-1)
2024/10/28 16:51:42 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-west-1
2024/10/28 16:51:42 [DEBUG] Completed Sweeper (aws_s3_access_point) in region (us-gov-west-1) in 96.519208ms
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_bucket) has dependency (aws_s3_object_gp_bucket), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_object_gp_bucket) has dependency (aws_m2_application), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_m2_application) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_object_gp_bucket) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_bucket) has dependency (aws_s3control_access_grants_instance), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_access_grants_instance) has dependency (aws_s3control_access_grants_location), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_access_grants_location) has dependency (aws_s3control_access_grant), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_access_grant) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_access_grants_location) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_access_grants_instance) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_bucket) has dependency (aws_s3control_multi_region_access_point), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_multi_region_access_point) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Running Sweeper (aws_s3_bucket) in region (us-gov-west-1)
2024/10/28 16:51:42 [INFO] sweeper: listing resources: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_bucket
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: bucket_name=appstream-app-settings-us-gov-west-1-357342307427-frnrem9j skip_reason="no match on prefix list" sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_bucket
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_bucket bucket_name=appstream2-36fb080bb8-us-gov-west-1-357342307427 skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: tf_resource_type=aws_s3_bucket bucket_name=aws-elasticencoder-pipeline-tf-test-bucket sweeper_region=us-gov-west-1 skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: tf_resource_type=aws_s3_bucket bucket_name=aws-glue-temporary-357342307427-us-gov-west-1 sweeper_region=us-gov-west-1 skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: sweeper_region=us-gov-west-1 skip_reason="no match on prefix list" tf_resource_type=aws_s3_bucket bucket_name=cf-templates-1sscj4vdspkj6-us-gov-west-1
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_bucket bucket_name=elasticbeanstalk-us-gov-west-1-357342307427 skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: Skipping resource: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_bucket bucket_name=quicksight-357342307427 skip_reason="no match on prefix list"
2024/10/28 16:51:42 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_bucket
2024/10/28 16:51:42 [DEBUG] Completed Sweeper (aws_s3_bucket) in region (us-gov-west-1) in 94.173084ms
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_object_lambda_access_point) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_access_grants_location) has dependency (aws_s3control_access_grant), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_access_grant) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_access_grants_location) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Running Sweeper (aws_s3_object) in region (us-gov-west-1)
2024/10/28 16:51:42 [INFO] sweeper: listing resources: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_object
2024/10/28 16:51:42 [INFO] sweeper: Noop sweeper: tf_resource_type=aws_s3_object sweeper_region=us-gov-west-1
2024/10/28 16:51:42 [INFO] sweeper: No resources to sweep: sweeper_region=us-gov-west-1 tf_resource_type=aws_s3_object
2024/10/28 16:51:42 [DEBUG] Completed Sweeper (aws_s3_object) in region (us-gov-west-1) in 97.875µs
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_access_point) has dependency (aws_s3control_object_lambda_access_point), running..
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3control_object_lambda_access_point) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 [DEBUG] Sweeper (aws_s3_access_point) already ran in region (us-gov-west-1)
2024/10/28 16:51:42 Completed Sweepers for region (us-gov-west-1) in 2.322448084s
2024/10/28 16:51:42 Sweeper Tests for region (us-gov-west-1) ran successfully:
2024/10/28 16:51:42 - aws_s3_access_point
2024/10/28 16:51:42 - aws_s3_bucket
2024/10/28 16:51:42 - aws_m2_application
2024/10/28 16:51:42 - aws_s3control_access_grants_location
2024/10/28 16:51:42 - aws_s3control_access_grants_instance
2024/10/28 16:51:42 - aws_s3control_multi_region_access_point
2024/10/28 16:51:42 - aws_s3_object_directory_bucket
2024/10/28 16:51:42 - aws_s3control_object_lambda_access_point
2024/10/28 16:51:42 - aws_s3_object
2024/10/28 16:51:42 - aws_s3control_access_grant
2024/10/28 16:51:42 - aws_s3_object_gp_bucket
ok github.com/hashicorp/terraform-provider-aws/internal/sweep 8.552s
b7a9747
to
0f20396
Compare
This functionality has been released in v5.74.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Description
Use new region filter for
s3.ListBuckets
in sweeper.Also uses
awsv2.Register
instead ofresource.AddTestSweepers
for S3 sweeper functions. Separates sweepers for General Purpose and Directory bucket objects.Includes fixes from #39938
References
https://aws.amazon.com/about-aws/whats-new/2024/10/amazon-s3-new-region-bucket-name-filtering-listbuckets-api/