github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/website/source/docs/providers/azurerm/r/loadbalancer_nat_pool.html.markdown (about) 1 --- 2 layout: "azurerm" 3 page_title: "Azure Resource Manager: azurerm_lb_nat_pool" 4 sidebar_current: "docs-azurerm-resource-loadbalancer-nat-pool" 5 description: |- 6 Create a LoadBalancer NAT Pool. 7 --- 8 9 # azurerm\_lb\_nat\_pool 10 11 Create a LoadBalancer NAT pool. 12 13 ~> **NOTE When using this resource, the LoadBalancer needs to have a FrontEnd IP Configuration Attached 14 15 ## Example Usage 16 17 ``` 18 resource "azurerm_resource_group" "test" { 19 name = "LoadBalancerRG" 20 location = "West US" 21 } 22 23 resource "azurerm_public_ip" "test" { 24 name = "PublicIPForLB" 25 location = "West US" 26 resource_group_name = "${azurerm_resource_group.test.name}" 27 public_ip_address_allocation = "static" 28 } 29 30 resource "azurerm_lb" "test" { 31 name = "TestLoadBalancer" 32 location = "West US" 33 resource_group_name = "${azurerm_resource_group.test.name}" 34 35 frontend_ip_configuration { 36 name = "PublicIPAddress" 37 public_ip_address_id = "${azurerm_public_ip.test.id}" 38 } 39 } 40 41 resource "azurerm_lb_nat_pool" "test" { 42 location = "West US" 43 resource_group_name = "${azurerm_resource_group.test.name}" 44 loadbalancer_id = "${azurerm_lb.test.id}" 45 name = "SampleApplication Pool" 46 protocol = "Tcp" 47 frontend_port_start = 80 48 frontend_port_end = 81 49 backend_port = 8080 50 frontend_ip_configuration_name = "PublicIPAddress" 51 } 52 ``` 53 54 ## Argument Reference 55 56 The following arguments are supported: 57 58 * `name` - (Required) Specifies the name of the NAT pool. 59 * `resource_group_name` - (Required) The name of the resource group in which to create the resource. 60 * `location` - (Required) Specifies the supported Azure location where the resource exists. 61 * `loadbalancer_id` - (Required) The ID of the LoadBalancer in which to create the NAT pool. 62 * `frontend_ip_configuration_name` - (Required) The name of the frontend IP configuration exposing this rule. 63 * `protocol` - (Required) The transport protocol for the external endpoint. Possible values are `Udp` or `Tcp`. 64 * `frontend_port_start` - (Required) The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. 65 * `frontend_port_end` - (Required) The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive. 66 * `backend_port` - (Required) The port used for the internal endpoint. Possible values range between 1 and 65535, inclusive. 67 68 ## Attributes Reference 69 70 The following attributes are exported: 71 72 * `id` - The ID of the LoadBalancer to which the resource is attached.