Skip to content

data-platform-hq/terraform-azurerm-load-balancer

Repository files navigation

Azure Load Balancer Terraform module

Terraform module for creation Azure Load Balancer

Usage

This module is creating Azure Load Balancer.

Requirements

Name Version
terraform >= 1.0.0
azurerm >= 4.0.1

Providers

Name Version
azurerm >= 4.0.1

Modules

No modules.

Resources

Name Type
azurerm_lb.this resource
azurerm_lb_backend_address_pool.this resource
azurerm_lb_rule.this resource
azurerm_monitor_diagnostic_setting.this resource
azurerm_monitor_diagnostic_categories.this data source

Inputs

Name Description Type Default Required
analytics_destination_type Possible values are AzureDiagnostics and Dedicated. string "Dedicated" no
analytics_workspace_id Resource ID of Log Analytics Workspace string null no
backend_pool_name Specifies the name of the Backend Address Pool. Changing this forces a new resource to be created. string "BackEndAddressPool" no
backend_pool_vnet_id The ID of the Virtual Network within which the Backend Address Pool should exist. string null no
diagnostic_settings_name Specifies the name of the Diagnostic Setting string null no
enable_diagnostic_setting Enable diagnostic setting. var.analytics_workspace_id must be provided bool false no
lb_frontend_ip_configurations List of object with configuration parameters to create Load Balancer frontend ip configurations and rules
list(object({
name = string
subnet_id = optional(string)
public_ip_address_id = optional(string)
public_ip_prefix_id = optional(string)
rules = optional(list(object({
name = string
protocol = string
frontend_port = number
backend_port = number
load_distribution = optional(string, "Default")
enable_floating_ip = optional(bool, false)
})), [])
}))
[] no
load_balancer_name Specifies the name of the Load Balancer. Changing this forces a new resource to be created. string n/a yes
location The Azure Region in which all resources in this example should be created. string n/a yes
resource_group The name of the resource group. string n/a yes
sku The SKU of the Azure Load Balancer. Accepted values are Basic, Standard and Gateway. Defaults to Basic. Changing this forces a new resource to be created. string "Standard" no
sku_tier 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
tags Resource tags map(any) {} no

Outputs

Name Description
lb_backend_address_pool_id The ID of the Backend Address Pool.
lb_frontend_ip_configuration List of objects with frontend ip configuration of Load Balancer
lb_id Load Balancer id
lb_private_ip_address The first private IP address assigned to the load balancer in frontend_ip_configuration blocks, if any.
lb_public_ip_addresses The list of private IP address assigned to the load balancer in frontend_ip_configuration blocks, if any.

License

Apache 2 Licensed. For more information please see LICENSE