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

service/rds: Increase default proxy deletion timeout, ensure proxy target import includes all attributes #15537

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Oct 7, 2020

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

Release note for CHANGELOG:

* resource/aws_db_proxy: Increase default deletion timeout to 60 minutes
* resource/aws_db_proxy_target: Ensure `db_proxy_name` and `target_group_name` attributes are properly imported

The Terraform Plugin SDK version 2.0.4 upgrade fixed something with ImportStateVerify testing, which now catches these arguments were not properly being set during Read.

The timeout issue was occurring inconsistently across tests, but is a good signal that our initial default deletion timeout value might have been too low.

Previously:

=== CONT  TestAccAWSDBProxyTarget_Cluster
TestAccAWSDBProxyTarget_Cluster: resource_aws_db_proxy_target_test.go:51: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) {
}
(map[string]string) (len=2) {
(string) (len=13) "db_proxy_name": (string) (len=31) "tf-acc-test-7766132173812142965",
(string) (len=17) "target_group_name": (string) (len=7) "default"
}
--- FAIL: TestAccAWSDBProxyTarget_Cluster (600.94s)

=== CONT  TestAccAWSDBProxyTarget_Instance
TestAccAWSDBProxyTarget_Instance: resource_aws_db_proxy_target_test.go:20: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) {
}
(map[string]string) (len=2) {
(string) (len=13) "db_proxy_name": (string) (len=31) "tf-acc-test-4517387436607757033",
(string) (len=17) "target_group_name": (string) (len=7) "default"
}
TestAccAWSDBProxyTarget_Instance: testing_new.go:62: Error running post-test destroy, there may be dangling resources: 2020/10/07 06:29:56 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error waiting for DB Proxy deletion: timeout while waiting for state to become '' (last state: 'deleting', timeout: 30m0s)
--- FAIL: TestAccAWSDBProxyTarget_Instance (2044.98s)

=== CONT  TestAccAWSDBProxyTarget_disappears
TestAccAWSDBProxyTarget_disappears: testing_new.go:62: Error running post-test destroy, there may be dangling resources: 2020/10/07 06:31:38 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error waiting for DB Proxy deletion: timeout while waiting for state to become '' (last state: 'deleting', timeout: 30m0s)
--- FAIL: TestAccAWSDBProxyTarget_disappears (2010.78s)

Output from acceptance testing:

--- PASS: TestAccAWSDBProxy_AuthDescription (636.54s)
--- PASS: TestAccAWSDBProxy_AuthIamAuth (628.26s)
--- PASS: TestAccAWSDBProxy_AuthSecretArn (784.97s)
--- PASS: TestAccAWSDBProxy_basic (665.92s)
--- PASS: TestAccAWSDBProxy_DebugLogging (790.23s)
--- PASS: TestAccAWSDBProxy_disappears (631.87s)
--- PASS: TestAccAWSDBProxy_IdleClientTimeout (860.70s)
--- PASS: TestAccAWSDBProxy_Name (718.38s)
--- PASS: TestAccAWSDBProxy_RequireTls (721.11s)
--- PASS: TestAccAWSDBProxy_RoleArn (690.45s)
--- PASS: TestAccAWSDBProxy_Tags (695.16s)
--- PASS: TestAccAWSDBProxy_VpcSecurityGroupIds (652.93s)

--- PASS: TestAccAWSDBProxyTarget_Cluster (621.13s)
--- PASS: TestAccAWSDBProxyTarget_disappears (618.64s)
--- PASS: TestAccAWSDBProxyTarget_Instance (640.24s)

…rget import includes all attributes

The Terraform Plugin SDK version 2.0.4 upgrade fixed something with `ImportStateVerify` testing, which now catches these arguments were not properly being set during `Read`.

The timeout issue was occurring inconsistently across tests, but is a good signal that our initial default deletion timeout value might have been too low.

Previously:

```
=== CONT  TestAccAWSDBProxyTarget_Cluster
TestAccAWSDBProxyTarget_Cluster: resource_aws_db_proxy_target_test.go:51: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) {
}
(map[string]string) (len=2) {
(string) (len=13) "db_proxy_name": (string) (len=31) "tf-acc-test-7766132173812142965",
(string) (len=17) "target_group_name": (string) (len=7) "default"
}
--- FAIL: TestAccAWSDBProxyTarget_Cluster (600.94s)

=== CONT  TestAccAWSDBProxyTarget_Instance
TestAccAWSDBProxyTarget_Instance: resource_aws_db_proxy_target_test.go:20: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) {
}
(map[string]string) (len=2) {
(string) (len=13) "db_proxy_name": (string) (len=31) "tf-acc-test-4517387436607757033",
(string) (len=17) "target_group_name": (string) (len=7) "default"
}
TestAccAWSDBProxyTarget_Instance: testing_new.go:62: Error running post-test destroy, there may be dangling resources: 2020/10/07 06:29:56 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error waiting for DB Proxy deletion: timeout while waiting for state to become '' (last state: 'deleting', timeout: 30m0s)
--- FAIL: TestAccAWSDBProxyTarget_Instance (2044.98s)

=== CONT  TestAccAWSDBProxyTarget_disappears
TestAccAWSDBProxyTarget_disappears: testing_new.go:62: Error running post-test destroy, there may be dangling resources: 2020/10/07 06:31:38 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: Error waiting for DB Proxy deletion: timeout while waiting for state to become '' (last state: 'deleting', timeout: 30m0s)
--- FAIL: TestAccAWSDBProxyTarget_disappears (2010.78s)
```

Output from acceptance testing:

```
--- PASS: TestAccAWSDBProxy_AuthDescription (636.54s)
--- PASS: TestAccAWSDBProxy_AuthIamAuth (628.26s)
--- PASS: TestAccAWSDBProxy_AuthSecretArn (784.97s)
--- PASS: TestAccAWSDBProxy_basic (665.92s)
--- PASS: TestAccAWSDBProxy_DebugLogging (790.23s)
--- PASS: TestAccAWSDBProxy_disappears (631.87s)
--- PASS: TestAccAWSDBProxy_IdleClientTimeout (860.70s)
--- PASS: TestAccAWSDBProxy_Name (718.38s)
--- PASS: TestAccAWSDBProxy_RequireTls (721.11s)
--- PASS: TestAccAWSDBProxy_RoleArn (690.45s)
--- PASS: TestAccAWSDBProxy_Tags (695.16s)
--- PASS: TestAccAWSDBProxy_VpcSecurityGroupIds (652.93s)

--- PASS: TestAccAWSDBProxyTarget_Cluster (621.13s)
--- PASS: TestAccAWSDBProxyTarget_disappears (618.64s)
--- PASS: TestAccAWSDBProxyTarget_Instance (640.24s)
```
@bflad bflad added the bug Addresses a defect in current functionality. label Oct 7, 2020
@bflad bflad requested a review from a team October 7, 2020 15:22
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/rds Issues and PRs that pertain to the rds service. labels Oct 7, 2020
@gdavison gdavison self-assigned this Oct 7, 2020
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

--- PASS: TestAccAWSDBProxyDefaultTargetGroup_InitQuery (621.61s)
--- PASS: TestAccAWSDBProxy_AuthDescription (633.69s)
--- PASS: TestAccAWSDBProxyDefaultTargetGroup_MaxIdleConnectionsPercent (669.50s)
--- PASS: TestAccAWSDBProxyTarget_disappears (698.57s)
--- PASS: TestAccAWSDBProxy_basic (704.76s)
--- PASS: TestAccAWSDBProxyTarget_Cluster (706.02s)
--- FAIL: TestAccAWSDBProxy_AuthSecretArn (708.86s)
--- FAIL: TestAccAWSDBProxyDefaultTargetGroup_disappears (711.14s)
--- PASS: TestAccAWSDBProxy_IdleClientTimeout (716.01s)
--- PASS: TestAccAWSDBProxy_RequireTls (716.00s)
--- PASS: TestAccAWSDBProxy_AuthIamAuth (718.86s)
--- PASS: TestAccAWSDBProxy_RoleArn (723.20s)
--- PASS: TestAccAWSDBProxyTarget_Instance (723.53s)
--- PASS: TestAccAWSDBProxyDefaultTargetGroup_ConnectionBorrowTimeout (728.70s)
--- PASS: TestAccAWSDBProxyDefaultTargetGroup_MaxConnectionsPercent (740.13s)
--- PASS: TestAccAWSDBProxy_VpcSecurityGroupIds (741.36s)
--- PASS: TestAccAWSDBProxyDefaultTargetGroup_SessionPinningFilters (748.94s)
--- PASS: TestAccAWSDBProxy_DebugLogging (779.27s)
--- PASS: TestAccAWSDBProxyDefaultTargetGroup_Basic (780.56s)
--- PASS: TestAccAWSDBProxy_Name (835.58s)
--- PASS: TestAccAWSDBProxy_Tags (558.78s)
--- PASS: TestAccAWSDBProxy_disappears (576.54s)

The test failures currently have intermittent failures on the main branch

@gdavison gdavison merged commit 34fd4af into master Oct 8, 2020
@gdavison gdavison deleted the b-aws_db_proxy_target-fixes branch October 8, 2020 17:55
gdavison added a commit that referenced this pull request Oct 8, 2020
@gdavison gdavison added this to the v3.10.0 milestone Oct 8, 2020
@ghost
Copy link

ghost commented Oct 9, 2020

This has been released in version 3.10.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 for triage. Thanks!

@ghost
Copy link

ghost commented Nov 8, 2020

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 as resolved and limited conversation to collaborators Nov 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. service/rds Issues and PRs that pertain to the rds service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants