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

Fix AWS RDS cross-region read replica always being placed in default VPC #4207

Closed
wants to merge 1 commit into from

Conversation

nTraum
Copy link
Contributor

@nTraum nTraum commented Dec 8, 2015

Fixes #4192 by honouring the db_subnet_group_name parameter when creating a cross-region read replica.

❗ These are my very first (baby-)steps in Go so I might missed something obvious. 😁 Maybe @catsby can take a look, thanks for pointing me into the right direction!

I tested this locally with my patched version, is that "good enough"? Looking forward to some feedback.

Btw your documentation & provided dev environment via Vagrant is outstanding, appreciate the effort. Working on terraform, even as go newbie, is a breeze!

Fixes hashicorp#4192 by honouring the `db_subnet_group_name` parameter when creating a cross-region read replica.
@nTraum nTraum force-pushed the db_subnet_aws_read_replica branch from 9724ee4 to 1cd2fea Compare December 8, 2015 14:07
@nTraum nTraum changed the title Fix AWS RDS read replica always being placed in default VPC Fix AWS RDS cross-region read replica always being placed in default VPC Dec 8, 2015
@catsby
Copy link
Contributor

catsby commented Dec 8, 2015

Hey @nTraum – thanks for the patch πŸ˜„

This looks great! I'll take it for a spin and see if we need anything else, like exporting the ARN if we aren't already, but at first glance it looks good πŸ‘

@catsby
Copy link
Contributor

catsby commented Dec 8, 2015

Thanks again @nTraum – I'm going to close this in favor of #4215 , which just adds a tiny piece to what you've done here (adds the ARN). Thanks!

@catsby catsby closed this Dec 8, 2015
@@ -271,6 +271,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)),
DBInstanceClass: aws.String(d.Get("instance_class").(string)),
DBInstanceIdentifier: aws.String(d.Get("identifier").(string)),
DBSubnetGroupName: aws.String(d.Get("db_subnet_group_name").(string)),
Copy link
Contributor

Choose a reason for hiding this comment

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

For what it's worth, I removed this line in e52af33 . It should only be conditionally set, as you've done below in 292-295

@nTraum
Copy link
Contributor Author

nTraum commented Dec 9, 2015

Sure, thanks for taking care of it!

@nTraum nTraum deleted the db_subnet_aws_read_replica branch December 9, 2015 12:52
@ghost
Copy link

ghost commented Apr 29, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RDS cross-region read replica placed in wrong VPC (MySQL 5.6)
2 participants