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

Allow rds_global_cluster engine_version upgrade #18598

Merged
merged 2 commits into from
Apr 19, 2021

Conversation

bill-rich
Copy link
Contributor

@bill-rich bill-rich commented Apr 6, 2021

Allow rds_global_cluster engine_version upgrades. Two different paths are required because the methods for upgrading a major version is different than upgrading a minor version. Because major version upgrades are applied immediately, minor version upgrades are applied immediately also despite the possibility to wait until a maintenance window.

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

Closes #18214

Output from acceptance testing:

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSRdsGlobalCluster_ -timeout 180m
=== RUN   TestAccAWSRdsGlobalCluster_basic
=== PAUSE TestAccAWSRdsGlobalCluster_basic
=== RUN   TestAccAWSRdsGlobalCluster_disappears
=== PAUSE TestAccAWSRdsGlobalCluster_disappears
=== RUN   TestAccAWSRdsGlobalCluster_DatabaseName
=== PAUSE TestAccAWSRdsGlobalCluster_DatabaseName
=== RUN   TestAccAWSRdsGlobalCluster_DeletionProtection
=== PAUSE TestAccAWSRdsGlobalCluster_DeletionProtection
=== RUN   TestAccAWSRdsGlobalCluster_Engine_Aurora
=== PAUSE TestAccAWSRdsGlobalCluster_Engine_Aurora
=== RUN   TestAccAWSRdsGlobalCluster_EngineVersion_Aurora
=== PAUSE TestAccAWSRdsGlobalCluster_EngineVersion_Aurora
=== RUN   TestAccAWSRdsGlobalCluster_EngineVersionUpdateMinor
=== PAUSE TestAccAWSRdsGlobalCluster_EngineVersionUpdateMinor
=== RUN   TestAccAWSRdsGlobalCluster_EngineVersionUpdateMajor
=== PAUSE TestAccAWSRdsGlobalCluster_EngineVersionUpdateMajor
=== RUN   TestAccAWSRdsGlobalCluster_EngineVersion_AuroraMySQL
=== PAUSE TestAccAWSRdsGlobalCluster_EngineVersion_AuroraMySQL
=== RUN   TestAccAWSRdsGlobalCluster_EngineVersion_AuroraPostgresql
=== PAUSE TestAccAWSRdsGlobalCluster_EngineVersion_AuroraPostgresql
=== RUN   TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier
=== PAUSE TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier
=== RUN   TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier_StorageEncrypted
=== PAUSE TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier_StorageEncrypted
=== RUN   TestAccAWSRdsGlobalCluster_StorageEncrypted
=== PAUSE TestAccAWSRdsGlobalCluster_StorageEncrypted
=== CONT  TestAccAWSRdsGlobalCluster_basic
=== CONT  TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier
=== CONT  TestAccAWSRdsGlobalCluster_StorageEncrypted
=== CONT  TestAccAWSRdsGlobalCluster_EngineVersionUpdateMajor
=== CONT  TestAccAWSRdsGlobalCluster_EngineVersion_AuroraPostgresql
=== CONT  TestAccAWSRdsGlobalCluster_Engine_Aurora
=== CONT  TestAccAWSRdsGlobalCluster_EngineVersionUpdateMinor
=== CONT  TestAccAWSRdsGlobalCluster_EngineVersion_AuroraMySQL
=== CONT  TestAccAWSRdsGlobalCluster_EngineVersion_Aurora
=== CONT  TestAccAWSRdsGlobalCluster_DatabaseName
=== CONT  TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier_StorageEncrypted
=== CONT  TestAccAWSRdsGlobalCluster_DeletionProtection
=== CONT  TestAccAWSRdsGlobalCluster_disappears
--- PASS: TestAccAWSRdsGlobalCluster_disappears (13.72s)
--- PASS: TestAccAWSRdsGlobalCluster_basic (17.78s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraMySQL (18.05s)
--- PASS: TestAccAWSRdsGlobalCluster_Engine_Aurora (18.21s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_Aurora (18.26s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraPostgresql (18.30s)
--- PASS: TestAccAWSRdsGlobalCluster_StorageEncrypted (27.14s)
--- PASS: TestAccAWSRdsGlobalCluster_DatabaseName (28.18s)
--- PASS: TestAccAWSRdsGlobalCluster_DeletionProtection (57.28s)
--- PASS: TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier (131.91s)
--- PASS: TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier_StorageEncrypted (132.28s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersionUpdateMinor (1151.99s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersionUpdateMajor (1706.74s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1706.787s

@bill-rich bill-rich requested a review from a team as a code owner April 6, 2021 19:26
@ghost ghost added size/L 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. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 6, 2021
@bill-rich bill-rich force-pushed the f-allow_engine_version_upgrade branch from 1eee3ef to e5d4b10 Compare April 6, 2021 20:05
@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Apr 6, 2021
@bill-rich bill-rich force-pushed the f-allow_engine_version_upgrade branch from e5d4b10 to add0522 Compare April 6, 2021 22:34
@bill-rich bill-rich force-pushed the f-allow_engine_version_upgrade branch from add0522 to 8b3c2f8 Compare April 6, 2021 22:36
@YakDriver YakDriver self-assigned this Apr 15, 2021
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

A few nits, but looks good! 🎉

Acceptance on commercial:

--- PASS: TestAccAWSRdsGlobalCluster_disappears (19.42s)
--- PASS: TestAccAWSRdsGlobalCluster_Engine_Aurora (23.89s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_Aurora (23.94s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraPostgresql (23.99s)
--- PASS: TestAccAWSRdsGlobalCluster_basic (24.01s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersion_AuroraMySQL (24.17s)
--- PASS: TestAccAWSRdsGlobalCluster_DatabaseName (35.80s)
--- PASS: TestAccAWSRdsGlobalCluster_StorageEncrypted (35.85s)
--- PASS: TestAccAWSRdsGlobalCluster_DeletionProtection (63.78s)
--- PASS: TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier_StorageEncrypted (160.08s)
--- PASS: TestAccAWSRdsGlobalCluster_SourceDbClusterIdentifier (160.22s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersionUpdateMinor (1129.05s)
--- PASS: TestAccAWSRdsGlobalCluster_EngineVersionUpdateMajor (1694.55s)

GovCloud skips all tests.

}
input.AllowMajorVersionUpgrade = aws.Bool(true)
input.EngineVersion = aws.String(engineVersion)
err := resource.Retry(5*time.Minute, func() *resource.RetryError {
Copy link
Member

Choose a reason for hiding this comment

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

I think current best practice is to create a const in internal/service/rds/waiter/waiter.go for these timeout times.

DBClusterIdentifier: aws.String(clusterMemberArn.(string)),
EngineVersion: aws.String(engineVersion),
}
err := resource.Retry(5*time.Minute, func() *resource.RetryError {
Copy link
Member

Choose a reason for hiding this comment

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

Same

@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_rds_global_cluster: Allow `engine_version` to be upgraded.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
resource/aws_rds_global_cluster: Allow `engine_version` to be upgraded.
resource/aws_rds_global_cluster: Allow `engine_version` to be upgraded in place

@bill-rich bill-rich merged commit 52cb0e7 into main Apr 19, 2021
@bill-rich bill-rich deleted the f-allow_engine_version_upgrade branch April 19, 2021 16:55
@github-actions github-actions bot added this to the v3.38.0 milestone Apr 19, 2021
github-actions bot pushed a commit that referenced this pull request Apr 19, 2021
@ghost
Copy link

ghost commented Apr 30, 2021

This has been released in version 3.38.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 May 19, 2021

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 May 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. service/rds Issues and PRs that pertain to the rds service. size/L 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.

Add support for upgrading engine_version on aws_rds_global_cluster
2 participants