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

sweeper/AppStream: Delete the correct resource types #22442

Merged
merged 2 commits into from
Jan 6, 2022

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Jan 6, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

AppStream Fleets and Stacks were both using ResourceImageBuilder to delete. Correct that and log what is going on during resource deletion.

Relates #21125.

% make sweep SWEEPARGS=-sweep-run=aws_appstream_directory_config,aws_appstream_fleet,aws_appstream_image_builder,aws_appstream_stack SWEEP=us-west-2
# make sweep SWEEPARGS=-sweep-run=aws_example_thing
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./internal/sweep -v -tags=sweep -sweep=us-west-2 -sweep-run=aws_appstream_directory_config,aws_appstream_fleet,aws_appstream_image_builder,aws_appstream_stack -timeout 60m
2022/01/06 12:10:57 [DEBUG] Running Sweepers for region (us-west-2):
2022/01/06 12:10:57 [DEBUG] Running Sweeper (aws_appstream_fleet) in region (us-west-2)
2022/01/06 12:10:57 [INFO] AWS Auth provider used: "EnvProvider"
2022/01/06 12:10:57 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/01/06 12:10:58 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [success]
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [success]
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [success]
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [success]
2022/01/06 12:11:00 [DEBUG] Stopping AppStream Fleet: (tf-acc-test-4502632032782554176)
2022/01/06 12:11:00 [DEBUG] Stopping AppStream Fleet: (tf-acc-test-7697429245118952747)
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [success]
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [success]
2022/01/06 12:11:00 [DEBUG] Stopping AppStream Fleet: (tf-acc-test-6465490967645726813)
2022/01/06 12:11:00 [DEBUG] Stopping AppStream Fleet: (tf-acc-test-905340137326791184)
2022/01/06 12:11:00 [DEBUG] Stopping AppStream Fleet: (tf-acc-test-1152914607797544686)
2022/01/06 12:11:00 [DEBUG] Stopping AppStream Fleet: (tf-acc-test-5728594923363144962)
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [STOPPED]
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [STOPPED]
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [STOPPED]
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [STOPPED]
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [STOPPED]
2022/01/06 12:11:00 [DEBUG] Waiting for state to become: [STOPPED]
2022/01/06 12:11:01 [TRACE] Waiting 200ms before next try
2022/01/06 12:11:01 [TRACE] Waiting 200ms before next try
2022/01/06 12:11:01 [TRACE] Waiting 200ms before next try
2022/01/06 12:11:01 [TRACE] Waiting 200ms before next try
2022/01/06 12:11:01 [TRACE] Waiting 200ms before next try
2022/01/06 12:11:01 [DEBUG] Deleting AppStream Fleet: (tf-acc-test-6465490967645726813)
2022/01/06 12:11:01 [TRACE] Waiting 400ms before next try
2022/01/06 12:11:01 [TRACE] Waiting 400ms before next try
2022/01/06 12:11:01 [TRACE] Waiting 400ms before next try
2022/01/06 12:11:01 [TRACE] Waiting 400ms before next try
2022/01/06 12:11:01 [TRACE] Waiting 400ms before next try
2022/01/06 12:11:02 [TRACE] Waiting 800ms before next try
2022/01/06 12:11:02 [TRACE] Waiting 800ms before next try
2022/01/06 12:11:02 [TRACE] Waiting 800ms before next try
2022/01/06 12:11:02 [TRACE] Waiting 800ms before next try
2022/01/06 12:11:02 [TRACE] Waiting 800ms before next try
2022/01/06 12:11:03 [TRACE] Waiting 1.6s before next try
2022/01/06 12:11:03 [TRACE] Waiting 1.6s before next try
2022/01/06 12:11:03 [TRACE] Waiting 1.6s before next try
2022/01/06 12:11:03 [TRACE] Waiting 1.6s before next try
2022/01/06 12:11:05 [TRACE] Waiting 3.2s before next try
2022/01/06 12:11:05 [TRACE] Waiting 3.2s before next try
2022/01/06 12:11:05 [TRACE] Waiting 3.2s before next try
2022/01/06 12:11:06 [TRACE] Waiting 3.2s before next try
2022/01/06 12:11:09 [TRACE] Waiting 6.4s before next try
2022/01/06 12:11:09 [TRACE] Waiting 6.4s before next try
2022/01/06 12:11:09 [TRACE] Waiting 6.4s before next try
2022/01/06 12:11:09 [TRACE] Waiting 1.6s before next try
2022/01/06 12:11:10 [TRACE] Waiting 6.4s before next try
2022/01/06 12:11:11 [TRACE] Waiting 3.2s before next try
2022/01/06 12:11:14 [TRACE] Waiting 6.4s before next try
2022/01/06 12:11:15 [TRACE] Waiting 10s before next try
2022/01/06 12:11:16 [TRACE] Waiting 10s before next try
2022/01/06 12:11:16 [TRACE] Waiting 10s before next try
2022/01/06 12:11:16 [TRACE] Waiting 10s before next try
2022/01/06 12:11:21 [TRACE] Waiting 10s before next try
2022/01/06 12:11:26 [TRACE] Waiting 10s before next try
2022/01/06 12:11:26 [TRACE] Waiting 10s before next try
2022/01/06 12:11:26 [TRACE] Waiting 10s before next try
2022/01/06 12:11:27 [TRACE] Waiting 10s before next try
2022/01/06 12:11:32 [TRACE] Waiting 10s before next try
2022/01/06 12:11:36 [TRACE] Waiting 10s before next try
2022/01/06 12:11:36 [TRACE] Waiting 10s before next try
2022/01/06 12:11:36 [TRACE] Waiting 10s before next try
2022/01/06 12:11:37 [TRACE] Waiting 10s before next try
2022/01/06 12:11:42 [TRACE] Waiting 10s before next try
2022/01/06 12:11:47 [TRACE] Waiting 10s before next try
2022/01/06 12:11:47 [TRACE] Waiting 10s before next try
2022/01/06 12:11:47 [TRACE] Waiting 10s before next try
2022/01/06 12:11:48 [TRACE] Waiting 10s before next try
2022/01/06 12:11:52 [TRACE] Waiting 10s before next try
2022/01/06 12:11:57 [TRACE] Waiting 10s before next try
2022/01/06 12:11:57 [TRACE] Waiting 10s before next try
2022/01/06 12:11:57 [TRACE] Waiting 10s before next try
2022/01/06 12:11:58 [TRACE] Waiting 10s before next try
2022/01/06 12:12:03 [TRACE] Waiting 10s before next try
2022/01/06 12:12:07 [TRACE] Waiting 10s before next try
2022/01/06 12:12:07 [TRACE] Waiting 10s before next try
2022/01/06 12:12:07 [TRACE] Waiting 10s before next try
2022/01/06 12:12:08 [TRACE] Waiting 10s before next try
2022/01/06 12:12:13 [TRACE] Waiting 10s before next try
2022/01/06 12:12:21 [TRACE] Waiting 10s before next try
2022/01/06 12:12:21 [TRACE] Waiting 10s before next try
2022/01/06 12:12:21 [TRACE] Waiting 10s before next try
2022/01/06 12:12:21 [TRACE] Waiting 10s before next try
2022/01/06 12:12:24 [TRACE] Waiting 10s before next try
2022/01/06 12:12:31 [TRACE] Waiting 10s before next try
2022/01/06 12:12:31 [TRACE] Waiting 10s before next try
2022/01/06 12:12:31 [TRACE] Waiting 10s before next try
2022/01/06 12:12:31 [TRACE] Waiting 10s before next try
2022/01/06 12:12:34 [TRACE] Waiting 10s before next try
2022/01/06 12:12:41 [TRACE] Waiting 10s before next try
2022/01/06 12:12:41 [TRACE] Waiting 10s before next try
2022/01/06 12:12:41 [TRACE] Waiting 10s before next try
2022/01/06 12:12:42 [DEBUG] Deleting AppStream Fleet: (tf-acc-test-1152914607797544686)
2022/01/06 12:12:45 [TRACE] Waiting 10s before next try
2022/01/06 12:12:52 [TRACE] Waiting 10s before next try
2022/01/06 12:12:52 [TRACE] Waiting 10s before next try
2022/01/06 12:12:52 [TRACE] Waiting 10s before next try
2022/01/06 12:12:55 [TRACE] Waiting 10s before next try
2022/01/06 12:13:02 [TRACE] Waiting 10s before next try
2022/01/06 12:13:02 [TRACE] Waiting 10s before next try
2022/01/06 12:13:02 [TRACE] Waiting 10s before next try
2022/01/06 12:13:05 [TRACE] Waiting 10s before next try
2022/01/06 12:13:13 [TRACE] Waiting 10s before next try
2022/01/06 12:13:13 [TRACE] Waiting 10s before next try
2022/01/06 12:13:13 [TRACE] Waiting 10s before next try
2022/01/06 12:13:16 [TRACE] Waiting 10s before next try
2022/01/06 12:13:23 [TRACE] Waiting 10s before next try
2022/01/06 12:13:23 [TRACE] Waiting 10s before next try
2022/01/06 12:13:23 [DEBUG] Deleting AppStream Fleet: (tf-acc-test-4502632032782554176)
2022/01/06 12:13:26 [TRACE] Waiting 10s before next try
2022/01/06 12:13:34 [TRACE] Waiting 10s before next try
2022/01/06 12:13:34 [TRACE] Waiting 10s before next try
2022/01/06 12:13:37 [TRACE] Waiting 10s before next try
2022/01/06 12:13:44 [TRACE] Waiting 10s before next try
2022/01/06 12:13:44 [TRACE] Waiting 10s before next try
2022/01/06 12:13:47 [TRACE] Waiting 10s before next try
2022/01/06 12:13:54 [TRACE] Waiting 10s before next try
2022/01/06 12:13:54 [TRACE] Waiting 10s before next try
2022/01/06 12:13:57 [TRACE] Waiting 10s before next try
2022/01/06 12:14:05 [TRACE] Waiting 10s before next try
2022/01/06 12:14:05 [TRACE] Waiting 10s before next try
2022/01/06 12:14:08 [DEBUG] Deleting AppStream Fleet: (tf-acc-test-905340137326791184)
2022/01/06 12:14:15 [TRACE] Waiting 10s before next try
2022/01/06 12:14:15 [TRACE] Waiting 10s before next try
2022/01/06 12:14:25 [DEBUG] Deleting AppStream Fleet: (tf-acc-test-7697429245118952747)
2022/01/06 12:14:25 [DEBUG] Deleting AppStream Fleet: (tf-acc-test-5728594923363144962)
2022/01/06 12:14:26 [DEBUG] Completed Sweeper (aws_appstream_fleet) in region (us-west-2) in 3m28.477567439s
2022/01/06 12:14:26 [DEBUG] Running Sweeper (aws_appstream_image_builder) in region (us-west-2)
2022/01/06 12:14:26 [DEBUG] Completed Sweeper (aws_appstream_image_builder) in region (us-west-2) in 342.830258ms
2022/01/06 12:14:26 [DEBUG] Running Sweeper (aws_appstream_directory_config) in region (us-west-2)
2022/01/06 12:14:27 [DEBUG] Completed Sweeper (aws_appstream_directory_config) in region (us-west-2) in 374.147102ms
2022/01/06 12:14:27 [DEBUG] Running Sweeper (aws_appstream_stack) in region (us-west-2)
2022/01/06 12:14:27 [DEBUG] Waiting for state to become: [success]
2022/01/06 12:14:27 [DEBUG] Deleting AppStream Stack: (tf-acc-test-553435265065033323)
2022/01/06 12:14:28 [DEBUG] Waiting for state to become: [NotFound Unknown]
2022/01/06 12:14:28 [TRACE] Waiting 200ms before next try
2022/01/06 12:14:29 [TRACE] Waiting 400ms before next try
2022/01/06 12:14:29 [DEBUG] Completed Sweeper (aws_appstream_stack) in region (us-west-2) in 2.77370358s
2022/01/06 12:14:29 Completed Sweepers for region (us-west-2) in 3m31.968528927s
2022/01/06 12:14:29 Sweeper Tests for region (us-west-2) ran successfully:
	- aws_appstream_stack
	- aws_appstream_fleet
	- aws_appstream_image_builder
	- aws_appstream_directory_config
ok  	github.com/hashicorp/terraform-provider-aws/internal/sweep	217.442s

@github-actions github-actions bot added service/appstream Issues and PRs that pertain to the appstream service. sweeper Pertains to changes to or issues with the sweeper. size/L Managed by automation to categorize the size of a PR. labels Jan 6, 2022
@ewbankkit ewbankkit changed the title sweep/AppStream: Delete the correct resource types sweeper/AppStream: Delete the correct resource types Jan 6, 2022
@ewbankkit ewbankkit merged commit bf31895 into main Jan 6, 2022
@ewbankkit ewbankkit deleted the s-appstream-delete-correct-resources branch January 6, 2022 19:31
@github-actions github-actions bot added this to the v3.71.0 milestone Jan 6, 2022
github-actions bot pushed a commit that referenced this pull request Jan 6, 2022
@github-actions
Copy link

github-actions bot commented Jan 6, 2022

This functionality has been released in v3.71.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!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/appstream Issues and PRs that pertain to the appstream service. size/L Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant