-
-
Notifications
You must be signed in to change notification settings - Fork 590
This change allows the module to create an Aurora Global database acc… #237
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
This change allows the module to create an Aurora Global database acc… #237
Conversation
…ross two regions. When creating a global database credentials must not be specified for the secondary database. The current version of the module does not provide a way to not assign credentials to a secondary database. This change allows it to.
@@ -61,8 +61,8 @@ resource "aws_rds_cluster" "this" { | |||
enable_http_endpoint = var.enable_http_endpoint | |||
kms_key_id = var.kms_key_id | |||
database_name = var.database_name | |||
master_username = var.username | |||
master_password = local.master_password | |||
master_username = var.is_primary_cluster == false ? null : var.username |
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.
master_username = var.is_primary_cluster == false ? null : var.username | |
master_username = var.is_primary_cluster ? var.username : null |
master_username = var.username | ||
master_password = local.master_password | ||
master_username = var.is_primary_cluster == false ? null : var.username | ||
master_password = var.is_primary_cluster == false ? null : local.master_password |
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.
master_password = var.is_primary_cluster == false ? null : local.master_password | |
master_password = var.is_primary_cluster ? local.master_password : null |
@pedrojflores Can you add the above fixes? |
we'll also need to create an example for this to ensure it functionally works |
@bryantbiggs I can work on it. Can I open-up a different PR for that? Maybe include these changes as well. Because I am not sure if the owner of this PR is willing to implement an example for it. |
@safakozdek yes of course, anyone is welcome to submit PRs |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
…ross two regions. When creating a global database credentials must not be specified for the secondary database. The current version of the module does not provide a way to not assign credentials to a secondary database. This change allows it to.
Description
This change will allow this module to create an Aurora Global database across two regions. Currently this is not possible with the latest version of this module because the module tries to assign a username and password to the secondary cluster even when specifying 'is_primary_cluster = false' which is not allowed by AWS. Credentials can only be applied to the primary cluster.
Motivation and Context
This change is required to allow the module to be used to create both the primary and the secondary cluster that make up an Aurora Global cluster
Breaking Changes
None.
How Has This Been Tested?
We've been using a modified version of this module that includes the proposed changes for months without issue. We have a suite of tests that leverage python testinfra that guarantees that the global cluster deployed by leveraging this module with the proposed changes is fully functional.