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

tests/resource/aws_dms_replication_instance: Add sweeper #10338

Merged
merged 1 commit into from
Oct 11, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Oct 2, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

NONE

Some of these expensive resources were being left behind from AWS GovCloud (US) acceptance testing, making our monthly bill much higher than it should be.

Output from sweeper in AWS Commercial:

$ go test ./aws -v -sweep=us-east-1,us-west-2 -sweep-run=aws_dms_replication_instance -timeout 10h
2019/10/01 21:36:57 [DEBUG] Running Sweepers for region (us-east-1):
...
2019/10/01 21:36:59 Sweeper Tests ran:
	- aws_dms_replication_instance
2019/10/01 21:36:59 [DEBUG] Running Sweepers for region (us-west-2):
...
2019/10/01 21:37:01 Sweeper Tests ran:
	- aws_dms_replication_instance
ok  	github.com/terraform-providers/terraform-provider-aws/aws	4.834s

Output from sweeper in AWS GovCloud (US):

$ go test ./aws -v -sweep=us-gov-west-1 -sweep-run=aws_dms_replication_instance -timeout 10h
2019/10/01 21:35:24 [DEBUG] Running Sweepers for region (us-gov-west-1):
...
2019/10/01 21:35:26 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:DVR3X3PURO6GMO2YO7VHU4XSLQ
2019/10/01 21:37:42 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:GABWNTBQEDQYJTV3AOJIRLJVTM
2019/10/01 21:40:06 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:HSISACH376XFDTHOD3QK467JO4
2019/10/01 21:41:40 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:PXOZXXYRFGYODHALM7LLIVW64M
2019/10/01 21:43:34 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:36TNUO2WY3OLXS76Q6UU5QDRVU
2019/10/01 21:48:45 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:UPWXIGKB2U7DQGOXMF7JT6HUSA
2019/10/01 21:52:02 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:NOQXOEQHBOD663OLAL7V7LJZ3Y
2019/10/01 21:53:24 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:O2P4ZP3F4AYNBXJCJGQZD7QUMQ
2019/10/01 21:54:57 Sweeper Tests ran:
  - aws_dms_replication_instance
ok    github.com/terraform-providers/terraform-provider-aws/aws 1176.002s

Some of these expensive resources were being left behind from AWS GovCloud (US) acceptance testing, making our monthly bill much higher than it should be.

Output from sweeper in AWS Commercial:

```console
$ go test ./aws -v -sweep=us-east-1,us-west-2 -sweep-run=aws_dms_replication_instance -timeout 10h
2019/10/01 21:36:57 [DEBUG] Running Sweepers for region (us-east-1):
...
2019/10/01 21:36:59 Sweeper Tests ran:
	- aws_dms_replication_instance
2019/10/01 21:36:59 [DEBUG] Running Sweepers for region (us-west-2):
...
2019/10/01 21:37:01 Sweeper Tests ran:
	- aws_dms_replication_instance
ok  	github.com/terraform-providers/terraform-provider-aws/aws	4.834s
```

Output from sweeper in AWS GovCloud (US):

```console
$ go test ./aws -v -sweep=us-gov-west-1 -sweep-run=aws_dms_replication_instance -timeout 10h
2019/10/01 21:35:24 [DEBUG] Running Sweepers for region (us-gov-west-1):
...
2019/10/01 21:35:26 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:DVR3X3PURO6GMO2YO7VHU4XSLQ
2019/10/01 21:37:42 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:GABWNTBQEDQYJTV3AOJIRLJVTM
2019/10/01 21:40:06 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:HSISACH376XFDTHOD3QK467JO4
2019/10/01 21:41:40 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:PXOZXXYRFGYODHALM7LLIVW64M
2019/10/01 21:43:34 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:36TNUO2WY3OLXS76Q6UU5QDRVU
2019/10/01 21:48:45 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:UPWXIGKB2U7DQGOXMF7JT6HUSA
2019/10/01 21:52:02 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:NOQXOEQHBOD663OLAL7V7LJZ3Y
2019/10/01 21:53:24 [INFO] Deleting DMS Replication Instance: arn:aws-us-gov:dms:us-gov-west-1:--OMITTED--:rep:O2P4ZP3F4AYNBXJCJGQZD7QUMQ
2019/10/01 21:54:57 Sweeper Tests ran:
  - aws_dms_replication_instance
ok    github.com/terraform-providers/terraform-provider-aws/aws 1176.002s
```
@bflad bflad requested a review from a team October 2, 2019 02:18
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/databasemigrationservice tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 2, 2019
@nywilken
Copy link
Contributor

LGTM 👍 👍

@bflad bflad added this to the v2.33.0 milestone Oct 11, 2019
@bflad bflad merged commit f49ce34 into master Oct 11, 2019
@bflad bflad deleted the t-aws_dms_replication_instance-sweeper branch October 11, 2019 14:03
@ghost
Copy link

ghost commented Nov 10, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants