github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/azurerm/r/loadbalancer.html.markdown (about) 1 --- 2 layout: "azurerm" 3 page_title: "Azure Resource Manager: azurerm_lb" 4 sidebar_current: "docs-azurerm-resource-loadbalancer" 5 description: |- 6 Create a LoadBalancer Resource. 7 --- 8 9 # azurerm\_lb 10 11 Create a LoadBalancer Resource. 12 13 ## Example Usage 14 15 ``` 16 resource "azurerm_resource_group" "test" { 17 name = "LoadBalancerRG" 18 location = "West US" 19 } 20 21 resource "azurerm_public_ip" "test" { 22 name = "PublicIPForLB" 23 location = "West US" 24 resource_group_name = "${azurerm_resource_group.test.name}" 25 public_ip_address_allocation = "static" 26 } 27 28 resource "azurerm_lb" "test" { 29 name = "TestLoadBalancer" 30 location = "West US" 31 resource_group_name = "${azurerm_resource_group.test.name}" 32 33 frontend_ip_configuration { 34 name = "PublicIPAddress" 35 public_ip_address_id = "${azurerm_public_ip.test.id}" 36 } 37 } 38 ``` 39 40 ## Argument Reference 41 42 The following arguments are supported: 43 44 * `name` - (Required) Specifies the name of the LoadBalancer. 45 * `resource_group_name` - (Required) The name of the resource group in which to create the LoadBalancer. 46 * `location` - (Required) Specifies the supported Azure location where the resource exists. 47 * `frontend_ip_configuration` - (Optional) A frontend ip configuration block as documented below. 48 * `tags` - (Optional) A mapping of tags to assign to the resource. 49 50 `frontend_ip_configuration` supports the following: 51 52 * `name` - (Required) Specifies the name of the frontend ip configuration. 53 * `subnet_id` - (Optional) Reference to subnet associated with the IP Configuration. 54 * `private_ip_address` - (Optional) Private IP Address to assign to the Load Balancer. The last one and first four IPs in any range are reserved and cannot be manually assigned. 55 * `private_ip_address_allocation` - (Optional) Defines how a private IP address is assigned. Options are Static or Dynamic. 56 * `public_ip_address_id` - (Optional) Reference to Public IP address to be associated with the Load Balancer. 57 58 ## Attributes Reference 59 60 The following attributes are exported: 61 62 * `id` - The LoadBalancer ID. 63 64 ## Import 65 66 Load Balancers can be imported using the `resource id`, e.g. 67 68 ``` 69 terraform import azurerm_lb.test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1 70 ``` 71