-
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_db_instance: Allow ARN for the replicate_source_db when in the same region #3701
base: main
Are you sure you want to change the base?
Conversation
2b9234f
to
73f7ba8
Compare
@radeksimko Ping? Do you have any information on when this PR might be able to get a review? |
@bflad Thanks for checking in. Do you have any time to give this a review? I'd really like feedback on whether the tests I added are sufficient. I'd like to get this into master, as it fixes a blocker for using encrypted read replicas in the same region when using ARNs. |
I would prefer someone more familiar with this code/functionality to look at it before I commit myself to looking at it. There is quite a lot in my backlog already. |
OK, that makes sense. Thanks! |
73f7ba8
to
3204200
Compare
3204200
to
da125a1
Compare
da125a1
to
d15b255
Compare
d15b255
to
f0b063c
Compare
f0b063c
to
e266b48
Compare
@radeksimko ping? Wanted to see about getting a review on this, so I have a chance to rework anything I need to. |
@radeksimko Hello, this PR just passed its 6-month anniversary - Is there someone I can chat with about getting it reviewed further? @jen20 Gave some feedback on the first iteration of this PR, hoping for more so we can move it along. Thanks |
e266b48
to
61d0bb4
Compare
👍 |
@radeksimko Checking in again, do you have any suggestions as to someone who could review this PR? |
61d0bb4
to
8ee0906
Compare
Doing an incremental rebase to eliminate conflicts and ensure code still runs as expected - should be done by Thursday 6/27. |
8ee0906
to
19b92a5
Compare
19b92a5
to
8b4be35
Compare
8b4be35
to
29ef131
Compare
Use the AWS ARN object, instead of string manipulation Add acceptance test for source_region on replicas. Add test for same-region replicas, verify that source_region is not set. Get the replica's region from aws client instead. Possible fix for terraform-provider-aws/issues/2399 Don't overwrite the 'arn' object with a local string variable. TODO: Readd tests post-rebase. This is an old PR and the test structure has changed signficantly since original submission.
29ef131
to
617fc40
Compare
Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding. Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author. For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000. For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide. |
I believe this addresses a possible bug we ran into that was triggered by https://github.com/terraform-providers/terraform-provider-aws/pull/865/files and mentioned at https://groups.google.com/forum/#!topic/terraform-tool/zX-bWBZgViI
If you pass both an ARN and a kms_key_id to create a replica in the same region as the master, you get an error of the form "* aws_db_instance.read_replica: Error creating DB Instance: InvalidParameterCombination: Your request does not require the preSignedUrl parameter. Please remove the preSignedUrl parameter and try your request again."
I think this is because of AWS code - in aws/aws-sdk-go/service/rds/customizations.go, a preSignedUrl will get added to the CreateDBInstanceReadReplicaInput if the SourceRegion is set for the replica. If SourceRegion is nil, the presignedURL is skipped.
I've modified the test for creating a replica, and added two more, one for the replica created with a source ARN in the same region, and one for creating a replica from a source ARN in a different region.
This PR is a replacement for #2386 - due to a bad merge, that branch had a bunch of duplicate commits. This branch has been cleaned up to make a cleaner merge @jen20 @radeksimko