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

Enable db_subnet_group_name variable #38

Merged

Conversation

mhdali
Copy link
Contributor

@mhdali mhdali commented Feb 8, 2018

If the variable not specify then use the db_subnet_group module

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}"
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

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.

@antonbabenko antonbabenko merged commit f681318 into terraform-aws-modules:master Feb 9, 2018
@antonbabenko
Copy link
Member

Looks flexible enough. Good work.

@antonbabenko
Copy link
Member

v1.11.0 has been released.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants