Skip to content

nycrecords/terraform-azurerm-lb

 
 

Repository files navigation

Azure Load Balancer (L4)

Changelog Notice Apache V2 License TF Registry

This Terraform module creates an Azure Load Balancer with possible Public IP address and basic NAT.

Version compatibility

Module version Terraform version AzureRM version
>= 4.x.x 0.13.x >= 2.0
>= 3.x.x 0.12.x >= 2.0
>= 2.x.x 0.12.x < 2.0
< 2.x.x 0.11.x < 2.0

Usage

This module is optimized to work with the Claranet terraform-wrapper tool which set some terraform variables in the environment needed by this module. More details about variables set by the terraform-wrapper available in the documentation.

You can use this module by including it this way:

module "azure-region" {
  source  = "claranet/regions/azurerm"
  version = "x.x.x"

  azure_region = var.azure_region
}

module "rg" {
  source  = "claranet/rg/azurerm"
  version = "x.x.x"

  location    = module.azure-region.location
  client_name = var.client_name
  environment = var.environment
  stack       = var.stack
}

module "lb" {
  source  = "claranet/lb/azurerm"
  version = "x.x.x"

  client_name         = var.client_name
  environment         = var.environment
  location            = module.azure-region.location
  location_short      = module.azure-region.location_short
  resource_group_name = module.rg.resource_group_name
  stack               = var.stack

  allocate_public_ip = true
  enable_nat         = true
}

Inputs

Name Description Type Default Required
backend_pool_addresses Map of IP Address Names and IP Addresses to be added to the default backend pool map(any) {} no
environment Project environment string n/a yes
extra_tags Extra tags to add on all resources. map(string) {} no
frontend_subnet_name Name for the subnet where the load balancer frontend ip is deployed string n/a yes
lb_custom_name Name of the Load Balancer, generated if not set. string "" no
lb_extra_tags Extra tags to add to the Load Balancer. map(string) {} no
lb_frontend_ip_configurations frontend_ip_configuration blocks as documented here: https://www.terraform.io/docs/providers/azurerm/r/lb.html#frontend_ip_configuration map(any) {} no
lb_probes lb_probes blocks as documented here: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_probe map(any) {} no
lb_rules lb_rules blocks as documented here: https://www.terraform.io/docs/providers/azurerm/r/lb_rule map(any) {} no
name_prefix Optional prefix for the generated name string "" no
region Region where load balancer is deployed. string n/a yes
resource_group_name Resource group name string n/a yes
sku_name The Name of the SKU used for this Load Balancer. Possible values are "Basic" and "Standard". string "Standard" no
vnet_name Virtual network name string n/a yes
vnet_resource_group_name Virtual Network Resource group name string n/a yes

Outputs

Name Description
backend_address_pool_id Id of the associated default backend address pool
backend_address_pool_ip_configurations IP configurations of the associated default backend address pool
backend_address_pool_load_balancing_rules Load balancing rules of the associated default backend address pool
backend_address_pool_name Name of the associated default backend address pool
lb_id Id of the Load Balancer
lb_name Name of the Load Balancer
lb_private_ip_address Private IP address of the Load Balancer
lb_private_ip_addresses Private IP addresses of the Load Balancer
lb_probe_ids Ids of the load balancer probe if any
lb_rule_id Id of the load balancer rules if any

Related documentation

Terraform resource documentation: terraform.io/docs/providers/azurerm/r/lb.html

Microsoft Azure documentation: docs.microsoft.com/en-us/azure/load-balancer/

About

Terraform module for Azure Load Balancer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 100.0%