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

[WIP] db_instance: allow_major_version_upgrade conflicts replicate_source_db #7013

Closed
wants to merge 1 commit into from
Closed

[WIP] db_instance: allow_major_version_upgrade conflicts replicate_source_db #7013

wants to merge 1 commit into from

Conversation

mikemorris
Copy link

@mikemorris mikemorris commented Jan 2, 2019

Changes proposed in this pull request:

  • Mark allow_major_version_upgrade as conflicting with replicate_source_db

This is at least true for PostgeSQL RDS read replicas. The following error is reported when allow_major_version_upgrade=true on a PostgreSQL read replica when attempting to modify engine_version.

Error: Error applying plan:

1 error(s) occurred:

* aws_db_instance.backend-upgrade-test-readreplica: 1 error(s) occurred:

* aws_db_instance.test-readreplica: Error modifying DB Instance test-readreplica: InvalidParameterValue: Major Version Upgrade not supported for Postgres Read Replica DB Instances

I'm unsure of behavior with MySQL, MariaDB, MSSQL or Oracle engines, or how to limit the ConflictsWith scope to a conditional on engine.

Alternatively, setting allow_major_version_upgrade could set the ForceNew flag for the PostgreSQL engine and replicate_source_db, but I'm unsure how to express that logic.

TODO: Check and update acceptance tests.

Output from acceptance testing:

$ make testacc TESTARGS='-run=testAccCheckAWSDBInstanceReplicaAttributes'

...

Enhancement/Bugfix to a Resource

@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/rds Issues and PRs that pertain to the rds service. labels Jan 2, 2019
@aeschright aeschright requested a review from a team June 25, 2019 21:45
@bflad
Copy link
Contributor

bflad commented Mar 17, 2020

Hi @mikemorris 👋 Thank you for submitting this. Since this doesn't appear to have any recent activity, we are going to close this for now. If you wish to continue working on this, please feel free to open a new pull request.

As you found, the ConflictsWith field for schema attributes does not have ability to be dependent on the value of another attribute. We are looking at improvements within the Terraform Plugin SDK for multi-attribute validation, however until then we would prefer to avoid complex CustomizeDiff logic to handle situations like these anyways since those behaviors are not 100% guaranteed depending on the Terraform configuration.

@bflad bflad closed this Mar 17, 2020
@ghost
Copy link

ghost commented Apr 17, 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 and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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