-
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
Force Delete Service Discovery Service #3538
Force Delete Service Discovery Service #3538
Conversation
Please check this PR. |
It looks like this closes #4853. |
I know I'm just bumping this up, but is there anything that stops this from being merged? |
(This is the 15th oldest unmerged MR) Guessing some acceptance tests might speed this up getting it merged? |
94aa788
to
143da73
Compare
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 🚀.
Commercial
% TEST=./aws SWEEP=us-west-2 SWEEPARGS=-sweep-run=aws_service_discovery_service make sweep
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./aws -v -sweep=us-west-2 -sweep-run=aws_service_discovery_service -timeout 60m
2021/09/01 09:18:25 [DEBUG] Running Sweepers for region (us-west-2):
2021/09/01 09:18:25 [DEBUG] Running Sweeper (aws_service_discovery_service) in region (us-west-2)
2021/09/01 09:18:25 [INFO] AWS Auth provider used: "EnvProvider"
2021/09/01 09:18:25 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/09/01 09:18:25 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/09/01 09:18:26 [DEBUG] Waiting for state to become: [success]
2021/09/01 09:18:27 [INFO] Deregistering Service Discovery Service (srv-jtm4m2mpyzy53nwe) Instance: ewbankkit-instance-1
2021/09/01 09:18:27 [DEBUG] Waiting for state to become: [SUCCESS]
2021/09/01 09:18:28 [TRACE] Waiting 200ms before next try
2021/09/01 09:18:28 [INFO] Deregistering Service Discovery Service (srv-jtm4m2mpyzy53nwe) Instance: ewbankkit-instance-2
2021/09/01 09:18:29 [DEBUG] Waiting for state to become: [SUCCESS]
2021/09/01 09:18:29 [TRACE] Waiting 200ms before next try
2021/09/01 09:18:29 [TRACE] Waiting 400ms before next try
2021/09/01 09:18:30 [DEBUG] Deleting Service Discovery Service: (srv-jtm4m2mpyzy53nwe)
2021/09/01 09:18:31 [DEBUG] Completed Sweeper (aws_service_discovery_service) in region (us-west-2) in 5.370342067s
2021/09/01 09:18:31 Completed Sweepers for region (us-west-2) in 5.370593443s
2021/09/01 09:18:31 Sweeper Tests for region (us-west-2) ran successfully:
- aws_service_discovery_service
ok github.com/terraform-providers/terraform-provider-aws/aws 8.560s
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSServiceDiscoveryService_\|TestAccAWSServiceDiscoveryHttpNamespace_\|TestAccAWSServiceDiscoveryPrivateDnsNamespace_\|TestAccAWSServiceDiscoveryPublicDnsNamespace_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSServiceDiscoveryService_\|TestAccAWSServiceDiscoveryHttpNamespace_\|TestAccAWSServiceDiscoveryPrivateDnsNamespace_\|TestAccAWSServiceDiscoveryPublicDnsNamespace_ -timeout 180m
=== RUN TestAccAWSServiceDiscoveryHttpNamespace_basic
=== PAUSE TestAccAWSServiceDiscoveryHttpNamespace_basic
=== RUN TestAccAWSServiceDiscoveryHttpNamespace_disappears
=== PAUSE TestAccAWSServiceDiscoveryHttpNamespace_disappears
=== RUN TestAccAWSServiceDiscoveryHttpNamespace_Description
=== PAUSE TestAccAWSServiceDiscoveryHttpNamespace_Description
=== RUN TestAccAWSServiceDiscoveryHttpNamespace_Tags
=== PAUSE TestAccAWSServiceDiscoveryHttpNamespace_Tags
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags
=== RUN TestAccAWSServiceDiscoveryPublicDnsNamespace_basic
=== PAUSE TestAccAWSServiceDiscoveryPublicDnsNamespace_basic
=== RUN TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears
=== PAUSE TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears
=== RUN TestAccAWSServiceDiscoveryPublicDnsNamespace_Description
=== PAUSE TestAccAWSServiceDiscoveryPublicDnsNamespace_Description
=== RUN TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags
=== PAUSE TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags
=== RUN TestAccAWSServiceDiscoveryService_private
=== PAUSE TestAccAWSServiceDiscoveryService_private
=== RUN TestAccAWSServiceDiscoveryService_public
=== PAUSE TestAccAWSServiceDiscoveryService_public
=== RUN TestAccAWSServiceDiscoveryService_http
=== PAUSE TestAccAWSServiceDiscoveryService_http
=== RUN TestAccAWSServiceDiscoveryService_disappears
=== PAUSE TestAccAWSServiceDiscoveryService_disappears
=== RUN TestAccAWSServiceDiscoveryService_Tags
=== PAUSE TestAccAWSServiceDiscoveryService_Tags
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_basic
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_basic
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_Description
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags
=== CONT TestAccAWSServiceDiscoveryService_http
=== CONT TestAccAWSServiceDiscoveryService_public
=== CONT TestAccAWSServiceDiscoveryService_private
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_Description
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_Tags
=== CONT TestAccAWSServiceDiscoveryService_Tags
=== CONT TestAccAWSServiceDiscoveryService_disappears
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_disappears
--- PASS: TestAccAWSServiceDiscoveryHttpNamespace_disappears (93.52s)
--- PASS: TestAccAWSServiceDiscoveryHttpNamespace_basic (99.28s)
--- PASS: TestAccAWSServiceDiscoveryHttpNamespace_Description (99.29s)
--- PASS: TestAccAWSServiceDiscoveryService_http (100.99s)
--- PASS: TestAccAWSServiceDiscoveryService_disappears (109.18s)
--- PASS: TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears (113.93s)
--- PASS: TestAccAWSServiceDiscoveryPublicDnsNamespace_Description (118.59s)
--- PASS: TestAccAWSServiceDiscoveryPublicDnsNamespace_basic (120.48s)
--- PASS: TestAccAWSServiceDiscoveryHttpNamespace_Tags (123.49s)
--- PASS: TestAccAWSServiceDiscoveryService_Tags (126.52s)
--- PASS: TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic (129.26s)
--- PASS: TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears (133.71s)
--- PASS: TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description (135.99s)
--- PASS: TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags (142.66s)
--- PASS: TestAccAWSServiceDiscoveryService_public (149.10s)
--- PASS: TestAccAWSServiceDiscoveryService_private (161.45s)
--- PASS: TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags (164.62s)
--- PASS: TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap (193.97s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 197.309s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSServiceDiscoveryService_\|TestAccAWSServiceDiscoveryHttpNamespace_\|TestAccAWSServiceDiscoveryPrivateDnsNamespace_\|TestAccAWSServiceDiscoveryPublicDnsNamespace_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSServiceDiscoveryService_\|TestAccAWSServiceDiscoveryHttpNamespace_\|TestAccAWSServiceDiscoveryPrivateDnsNamespace_\|TestAccAWSServiceDiscoveryPublicDnsNamespace_ -timeout 180m
=== RUN TestAccAWSServiceDiscoveryHttpNamespace_basic
=== PAUSE TestAccAWSServiceDiscoveryHttpNamespace_basic
=== RUN TestAccAWSServiceDiscoveryHttpNamespace_disappears
=== PAUSE TestAccAWSServiceDiscoveryHttpNamespace_disappears
=== RUN TestAccAWSServiceDiscoveryHttpNamespace_Description
=== PAUSE TestAccAWSServiceDiscoveryHttpNamespace_Description
=== RUN TestAccAWSServiceDiscoveryHttpNamespace_Tags
=== PAUSE TestAccAWSServiceDiscoveryHttpNamespace_Tags
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap
=== RUN TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags
=== PAUSE TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags
=== RUN TestAccAWSServiceDiscoveryPublicDnsNamespace_basic
=== PAUSE TestAccAWSServiceDiscoveryPublicDnsNamespace_basic
=== RUN TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears
=== PAUSE TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears
=== RUN TestAccAWSServiceDiscoveryPublicDnsNamespace_Description
=== PAUSE TestAccAWSServiceDiscoveryPublicDnsNamespace_Description
=== RUN TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags
=== PAUSE TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags
=== RUN TestAccAWSServiceDiscoveryService_private
=== PAUSE TestAccAWSServiceDiscoveryService_private
=== RUN TestAccAWSServiceDiscoveryService_public
=== PAUSE TestAccAWSServiceDiscoveryService_public
=== RUN TestAccAWSServiceDiscoveryService_http
=== PAUSE TestAccAWSServiceDiscoveryService_http
=== RUN TestAccAWSServiceDiscoveryService_disappears
=== PAUSE TestAccAWSServiceDiscoveryService_disappears
=== RUN TestAccAWSServiceDiscoveryService_Tags
=== PAUSE TestAccAWSServiceDiscoveryService_Tags
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_basic
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description
=== CONT TestAccAWSServiceDiscoveryService_http
=== CONT TestAccAWSServiceDiscoveryService_Tags
=== CONT TestAccAWSServiceDiscoveryService_private
=== CONT TestAccAWSServiceDiscoveryService_disappears
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_basic
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_Description
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_Tags
=== CONT TestAccAWSServiceDiscoveryService_public
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_Description
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_disappears
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_basic
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
--- SKIP: TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryHttpNamespace_basic (1.45s)
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
--- SKIP: TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears (1.45s)
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_basic
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryService_http
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
--- SKIP: TestAccAWSServiceDiscoveryPublicDnsNamespace_basic (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryService_http (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description (1.45s)
=== CONT TestAccAWSServiceDiscoveryService_private
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryService_disappears
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
--- SKIP: TestAccAWSServiceDiscoveryService_private (1.45s)
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_Tags
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryPublicDnsNamespace_Description
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
--- SKIP: TestAccAWSServiceDiscoveryService_disappears (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryHttpNamespace_Tags (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryPublicDnsNamespace_Description (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap (1.45s)
=== CONT TestAccAWSServiceDiscoveryService_public
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryService_Tags
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
--- SKIP: TestAccAWSServiceDiscoveryService_public (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryService_Tags (1.45s)
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_Description
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
=== CONT TestAccAWSServiceDiscoveryHttpNamespace_disappears
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
--- SKIP: TestAccAWSServiceDiscoveryHttpNamespace_Description (1.45s)
--- SKIP: TestAccAWSServiceDiscoveryHttpNamespace_disappears (1.45s)
=== CONT TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags
provider_test.go:735: skipping tests; partition aws-us-gov does not support servicediscovery service
--- SKIP: TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags (1.45s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 4.701s
@Tremualin Thanks for the contribution 🎉 👏. |
This functionality has been released in v3.57.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! |
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. |
Added an option to force delete the services by removing all the registered instances before deleting the services. Based the PR on the s3 removal code.
Tested only locally (and make test).
This is my first PR for a terraform provider, please let me know if there's anything missing.
Closes #4853.