Skip to content

Commit 273fabb

Browse files
committed
updating module to support more features
1 parent a70be8a commit 273fabb

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

main.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ resource "azurerm_public_ip" "pip" {
6767
sku = var.public_ip_sku
6868
sku_tier = var.public_ip_sku_tier
6969
domain_name_label = var.domain_name_label
70-
# availability_zone = var.public_ip_availability_zone
71-
tags = merge({ "resourcename" = lower("pip-vm-${var.vmscaleset_name}-${data.azurerm_resource_group.rg.location}-0${count.index + 1}") }, var.tags, )
70+
tags = merge({ "resourcename" = lower("pip-vm-${var.vmscaleset_name}-${data.azurerm_resource_group.rg.location}-0${count.index + 1}") }, var.tags, )
7271

7372
lifecycle {
7473
ignore_changes = [
@@ -91,8 +90,8 @@ resource "azurerm_lb" "vmsslb" {
9190
frontend_ip_configuration {
9291
name = var.load_balancer_type == "public" ? lower("lbext-frontend-${var.vmscaleset_name}") : lower("lbint-frontend-${var.vmscaleset_name}")
9392
public_ip_address_id = var.enable_load_balancer == true && var.load_balancer_type == "public" ? azurerm_public_ip.pip[count.index].id : null
94-
private_ip_address_allocation = var.load_balancer_type == "private" ? var.private_ip_address_allocation : null
95-
private_ip_address = var.load_balancer_type == "private" && var.private_ip_address_allocation == "Static" ? var.lb_private_ip_address : null
93+
private_ip_address_allocation = var.load_balancer_type == "private" ? var.private_ip_address_allocation_type : null
94+
private_ip_address = var.load_balancer_type == "private" && var.private_ip_address_allocation_type == "Static" ? var.lb_private_ip_address : null
9695
subnet_id = var.load_balancer_type == "private" ? data.azurerm_subnet.snet.id : null
9796
}
9897

variables.tf

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ variable "subnet_name" {
1313
default = ""
1414
}
1515

16-
variable "log_analytics_workspace_name" {
17-
description = "The name of log analytics workspace name"
18-
default = null
19-
}
20-
2116
variable "storage_account_name" {
2217
description = "The name of the hub storage account to store logs"
2318
default = null
@@ -43,11 +38,6 @@ variable "domain_name_label" {
4338
default = null
4439
}
4540

46-
variable "public_ip_availability_zone" {
47-
description = "The availability zone to allocate the Public IP in. Possible values are `Zone-Redundant`, `1`,`2`, `3`, and `No-Zone`"
48-
default = "Zone-Redundant"
49-
}
50-
5141
variable "public_ip_sku_tier" {
5242
description = "The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`"
5343
default = "Regional"
@@ -67,7 +57,7 @@ variable "load_balancer_sku" {
6757
description = "The SKU of the Azure Load Balancer. Accepted values are Basic and Standard."
6858
default = "Standard"
6959
}
70-
variable "private_ip_address_allocation" {
60+
variable "private_ip_address_allocation_type" {
7161
description = "The allocation method for the Private IP Address used by this Load Balancer. Possible values as Dynamic and Static."
7262
default = "Dynamic"
7363
}
@@ -88,7 +78,7 @@ variable "lb_probe_request_path" {
8878
}
8979

9080
variable "number_of_probes" {
91-
description = " The number of failed probe attempts after which the backend endpoint is removed from rotation. The default value is `2`. `NumberOfProbes` multiplied by `intervalInSeconds` value must be greater or equal to 10.Endpoints are returned to rotation when at least one probe is successful."
81+
description = "The number of failed probe attempts after which the backend endpoint is removed from rotation. The default value is `2`. `NumberOfProbes` multiplied by `intervalInSeconds` value must be greater or equal to 10.Endpoints are returned to rotation when at least one probe is successful."
9282
default = null
9383
}
9484

@@ -151,7 +141,7 @@ variable "virtual_machine_size" {
151141

152142
variable "instances_count" {
153143
description = "The number of Virtual Machines in the Scale Set."
154-
default = 1
144+
default = 2
155145
}
156146

157147
variable "admin_username" {

0 commit comments

Comments
 (0)