Skip to content

Commit 5dc0194

Browse files
author
nilesh.gadgi
committed
updated name format
1 parent 6822c9a commit 5dc0194

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ resource "azurerm_public_ip" "default" {
4545
#Description : Terraform resource to create a Load balancer.
4646
resource "azurerm_lb" "load-balancer" {
4747
location = var.location
48-
name = "load-balancer${module.labels.id}"
48+
name = format("%s-load-balancer", module.labels.id)
4949
resource_group_name = var.resource_group_name
5050
edge_zone = var.edge_zone
5151
sku = var.lb_sku
@@ -76,7 +76,7 @@ resource "azurerm_lb_nat_rule" "load-balancer" {
7676
backend_port = element(var.remote_port[element(keys(var.remote_port), count.index)], 1)
7777
frontend_ip_configuration_name = var.frontend_name
7878
loadbalancer_id = azurerm_lb.load-balancer.id
79-
name = "VM-${count.index}"
79+
name = "VM-lb-nat-rule${count.index}"
8080
protocol = var.nat_protocol
8181
resource_group_name = var.resource_group_name
8282
frontend_port = "5000${count.index + 1}"

0 commit comments

Comments
 (0)