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

resource/aws_rds_cluster: Add allow_major_version_upgrade argument #14709

Merged
merged 3 commits into from
Sep 22, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Aug 17, 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

Reference: #13874

Release note for CHANGELOG:

* resource/aws_rds_cluster: Add `allow_major_version_upgrade` argument

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgrade (1248.28s)

Output from acceptance testing in AWS GovCloud (US):

--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgrade (1457.47s)

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service. labels Aug 17, 2020
@ghost ghost added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Aug 17, 2020
Comment on lines 186 to 189
{
Config: testAccAWSClusterConfig_AllowMajorVersionUpgrade(rName, false, engine, engineVersion2),
ExpectError: regexp.MustCompile(`InvalidParameterCombination: The AllowMajorVersionUpgrade flag must be present when upgrading to a new major version`),
},
Copy link
Contributor

@anGie44 anGie44 Aug 21, 2020

Choose a reason for hiding this comment

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

looking at this more, could we still consider this test valid if we omit this step? because at apply time, the rds_instance gets destroyed (as we'd expect) while the rds_cluster attempts to update, which ultimately errors out with this ExpectError value, but then this leaves us without a recreated rds_instance. so in the subsequent step, at plan time, we expect to create an instance and modify the cluster, but these 2 steps happen sequentially as the instance references the cluster, leaving the cluster to first be modified which then ultimately fails b/c of the missing primary instance :/

Copy link
Contributor

@anGie44 anGie44 Aug 21, 2020

Choose a reason for hiding this comment

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

unless maybe adding some lifecycle handling like create_before_destroy on the instance resource was a workaround to this step's config? negative 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your first comment was right here. 👍 We actually do not want to have the aws_rds_cluster_instance to respond to engine_version changes at all (e.g. ignore_changes), preventing the recreation problem you mentioned on both errant and real engine version updates. Updating the documentation and test configuration should help.

Reference: #13874

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgrade (1248.28s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgrade (1457.47s)
```
@bflad bflad force-pushed the f-aws_rds_cluster-allow_major_version_upgrade branch from be7f4fb to 8d7bc98 Compare September 18, 2020 19:47
@bflad bflad marked this pull request as ready for review September 18, 2020 19:47
@bflad bflad requested a review from a team September 18, 2020 19:47
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

Nice addition of the lifecycle block 👍 Just one small doc nit pick otherwise LGTM

website/docs/r/rds_cluster_instance.html.markdown Outdated Show resolved Hide resolved
Co-authored-by: angie pinilla <angelinepinilla@gmail.com>
@bflad bflad added this to the v3.8.0 milestone Sep 22, 2020
@bflad bflad merged commit e4f0130 into master Sep 22, 2020
@bflad bflad deleted the f-aws_rds_cluster-allow_major_version_upgrade branch September 22, 2020 15:30
bflad added a commit that referenced this pull request Sep 22, 2020
@ghost
Copy link

ghost commented Sep 24, 2020

This has been released in version 3.8.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 Oct 22, 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 Oct 22, 2020
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. enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service. 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