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

Add AZ to nat gateway name #13

Merged
merged 1 commit into from
Oct 24, 2017

Conversation

felixb
Copy link
Contributor

@felixb felixb commented Oct 24, 2017

No description provided.

main.tf Outdated
@@ -139,7 +139,7 @@ resource "aws_nat_gateway" "this" {
allocation_id = "${element(aws_eip.nat.*.id, (var.single_nat_gateway ? 0 : count.index))}"
subnet_id = "${element(aws_subnet.public.*.id, (var.single_nat_gateway ? 0 : count.index))}"

tags = "${merge(var.tags, map("Name", format("%s", var.name)))}"
tags = "${merge(var.tags, map("Name", format("%s-%s", var.name, element(var.azs, count.index))))}"
Copy link
Member

Choose a reason for hiding this comment

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

This will probably give the wrong result when AZs are listed not alphabetically and single_nat_gateway = true. Correct me if I am wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm pretty sure it would run fine. But the new change is more explicit and similar to the lines above.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this looks better. Thanks.

@antonbabenko antonbabenko merged commit f906e73 into terraform-aws-modules:master Oct 24, 2017
@github-actions
Copy link

github-actions bot commented Nov 6, 2022

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 6, 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