-
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
resource/aws_rds_cluster: Add allow_major_version_upgrade argument #14709
Conversation
aws/resource_aws_rds_cluster_test.go
Outdated
{ | ||
Config: testAccAWSClusterConfig_AllowMajorVersionUpgrade(rName, false, engine, engineVersion2), | ||
ExpectError: regexp.MustCompile(`InvalidParameterCombination: The AllowMajorVersionUpgrade flag must be present when upgrading to a new major version`), | ||
}, |
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.
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 :/
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.
unless maybe adding some negative 😅lifecycle
handling like create_before_destroy
on the instance
resource was a workaround to this step's config?
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.
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) ```
be7f4fb
to
8d7bc98
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.
Nice addition of the lifecycle
block 👍 Just one small doc nit pick otherwise LGTM
Co-authored-by: angie pinilla <angelinepinilla@gmail.com>
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! |
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! |
Community Note
Reference: #13874
Release note for CHANGELOG:
Output from acceptance testing in AWS Commercial:
Output from acceptance testing in AWS GovCloud (US):