From e3e0e85e4c882bc0984f68a053c72ed630c7454b Mon Sep 17 00:00:00 2001 From: Jiawei Tao Date: Mon, 30 Jan 2023 16:38:28 +0800 Subject: [PATCH] Add support for lb_sku_tier --- README.md | 1 + main.tf | 1 + variables.tf | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 370fbd7..bf8247b 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,7 @@ No modules. | [lb\_probe\_interval](#input\_lb\_probe\_interval) | Interval in seconds the load balancer health probe rule does a check | `number` | `5` | no | | [lb\_probe\_unhealthy\_threshold](#input\_lb\_probe\_unhealthy\_threshold) | Number of times the load balancer health probe has an unsuccessful attempt before considering the endpoint unhealthy. | `number` | `2` | no | | [lb\_sku](#input\_lb\_sku) | (Optional) The SKU of the Azure Load Balancer. Accepted values are Basic and Standard. | `string` | `"Basic"` | no | +| [lb\_sku\_tier](#input\_lb\_sku\_tier) | (Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created. | `string` | `"Regional"` | no | | [location](#input\_location) | (Optional) The location/region where the core network will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions | `string` | `""` | no | | [name](#input\_name) | (Optional) Name of the load balancer. If it is set, the 'prefix' variable will be ignored. | `string` | `""` | no | | [pip\_ddos\_protection\_mode](#input\_pip\_ddos\_protection\_mode) | (Optional) The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. | `string` | `"VirtualNetworkInherited"` | no | diff --git a/main.tf b/main.tf index 2a50c4f..4cf8524 100644 --- a/main.tf +++ b/main.tf @@ -31,6 +31,7 @@ resource "azurerm_lb" "azlb" { resource_group_name = data.azurerm_resource_group.azlb.name edge_zone = var.edge_zone sku = var.lb_sku + sku_tier = var.lb_sku_tier tags = var.tags frontend_ip_configuration { diff --git a/variables.tf b/variables.tf index d3ca270..e4235b3 100644 --- a/variables.tf +++ b/variables.tf @@ -69,6 +69,12 @@ variable "lb_sku" { default = "Basic" } +variable "lb_sku_tier" { + description = "(Optional) The SKU tier of this Load Balancer. Possible values are `Global` and `Regional`. Defaults to `Regional`. Changing this forces a new resource to be created." + type = string + default = "Regional" +} + variable "location" { description = "(Optional) The location/region where the core network will be created. The full list of Azure regions can be found at https://azure.microsoft.com/regions" type = string