Skip to content

Additional Front end ip address #9

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

Open
wcarty opened this issue Apr 7, 2025 · 0 comments
Open

Additional Front end ip address #9

wcarty opened this issue Apr 7, 2025 · 0 comments

Comments

@wcarty
Copy link

wcarty commented Apr 7, 2025

Please add support for additional frontend floating public IP addresses to the module. These additional frontend IP addresses are necessary in situations where one-to-one NAT is required to enable access to hosted services that are protected by the firewall.

example code

resource "azurerm_public_ip" "public-ip-lb" {
count = var.deployment_mode != "Internal" ? var.number_of_public_ips : 0
name = "${var.vmss_name}-app-${count.index + 1}"
location = module.common.resource_group_location
resource_group_name = module.common.resource_group_name
allocation_method = var.vnet_allocation_method
sku = var.sku
domain_name_label = "${lower(var.vmss_name)}-${random_id.random_id.hex}-${count.index + 1}"
}

resource "azurerm_lb" "frontend-lb" {
count = var.deployment_mode != "Internal" ? 1 : 0
depends_on = [azurerm_public_ip.public-ip-lb]
name = "frontend-lb"
location = module.common.resource_group_location
resource_group_name = module.common.resource_group_name
sku = var.sku

dynamic "frontend_ip_configuration" {
for_each = azurerm_public_ip.public-ip-lb
content {
name = "${var.vmss_name}-app-${frontend_ip_configuration.key + 1}"
public_ip_address_id = frontend_ip_configuration.value.id
}
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant