Skip to content

Commit

Permalink
updated name format
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgadgi committed Jan 26, 2023
1 parent 6822c9a commit 5dc0194
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "azurerm_public_ip" "default" {
#Description : Terraform resource to create a Load balancer.
resource "azurerm_lb" "load-balancer" {
location = var.location
name = "load-balancer${module.labels.id}"
name = format("%s-load-balancer", module.labels.id)
resource_group_name = var.resource_group_name
edge_zone = var.edge_zone
sku = var.lb_sku
Expand Down Expand Up @@ -76,7 +76,7 @@ resource "azurerm_lb_nat_rule" "load-balancer" {
backend_port = element(var.remote_port[element(keys(var.remote_port), count.index)], 1)
frontend_ip_configuration_name = var.frontend_name
loadbalancer_id = azurerm_lb.load-balancer.id
name = "VM-${count.index}"
name = "VM-lb-nat-rule${count.index}"
protocol = var.nat_protocol
resource_group_name = var.resource_group_name
frontend_port = "5000${count.index + 1}"
Expand Down

0 comments on commit 5dc0194

Please sign in to comment.