-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Enable db_subnet_group_name variable #38
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
Enable db_subnet_group_name variable #38
Conversation
If the variable not specify then use the db_subnet_group module
@@ -56,7 +60,7 @@ module "db_instance" { | |||
snapshot_identifier = "${var.snapshot_identifier}" | |||
|
|||
vpc_security_group_ids = ["${var.vpc_security_group_ids}"] | |||
db_subnet_group_name = "${module.db_subnet_group.this_db_subnet_group_id}" | |||
db_subnet_group_name = "${local.db_subnet_group_name}" |
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.
When var.db_subnet_group_name
is not empty it will still respect var.create_db_subnet_group
and probably create unused db_subnet_group.
Can you change argument count
in db_subnet_group
(line 11) to respect var.create_db_parameter_group
only if var.db_subnet_group_name
is not set?
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.
👍
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.
Initially I put the condition on count
value, but it felt a bit complicated to I moved it to locals.
Let me know if you want to move it back to count
.
Looks flexible enough. Good work. |
v1.11.0 has been released. |
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. |
If the variable not specify then use the db_subnet_group module