-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Create Read Replicas for RDS Instances #1856
Conversation
this is still a work in progress I just like to see diffs through the web ui |
Hey @feelobot thanks for diving in! Before you get too far with a new resource, have you considered making this an attribute / flag on the current DB resource, with conditional logic to toggle any specific replica or non-replica bits (like I haven't read on read replicas in-depth, but I'm curious if you've thought about it, and what the tradeoffs would be if we had 2 resources that needed to be kept largely in-sync outside just a handful of attributes, vs a code conditional for specific difference. Thanks again! |
Hey @catsby thanks for the feedback! I think that would be perfect, after looking at the code for a while now I think I can see how that would work out. Ill push another commit shortly and have you take a look to make sure I'm on the right track. |
I could see how replicas would want to be managed separately though, most of the time we spin up a master separately and add resources to it later or scale up/down the amount of replicas we need for high traffic events, we wouldn't want to rely on cloud formation to leave the master alone and we could have a delta between the template and the master. I think I originally made it a separate resource because the other db api calls are separate too. It makes sense for each api call to be treated separately in my head but I could be wrong, what do you think @catsby |
opts.StorageType = aws.String(attr.(string)) | ||
} | ||
|
||
log.Printf("[DEBUG] DB Replica create configuration: %#v", opts) |
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.
this is where im at right now just working my way down.
My concern is only in managing any drift between the two distinct resources, where any changes to one need to also occur in the other. You're closer to the ground on this one so go ahead as you see fit. |
Closing this: I opened #1946 as an alternative to this approach last week, and just merged it. Let me know if you have questions, and thanks for contributing 😄 |
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. |
#1548