azurestack_lb_nat_rule

Manages a LoadBalancer NAT Rule.

Example Usage

resource "azurestack_resource_group" "test" {
  name     = "LoadBalancerRG"
  location = "West US"
}

resource "azurestack_public_ip" "test" {
  name                         = "PublicIPForLB"
  location                     = "West US"
  resource_group_name          = azurestack_resource_group.test.name
  public_ip_address_allocation = "static"
}

resource "azurestack_lb" "test" {
  name                = "TestLoadBalancer"
  location            = "West US"
  resource_group_name = azurestack_resource_group.test.name

  frontend_ip_configuration {
    name                 = "PublicIPAddress"
    public_ip_address_id = azurestack_public_ip.test.id
  }
}

resource "azurestack_lb_nat_rule" "test" {
  resource_group_name            = azurestack_resource_group.test.name
  loadbalancer_id                = azurestack_lb.test.id
  name                           = "RDPAccess"
  protocol                       = "Tcp"
  frontend_port                  = 3389
  backend_port                   = 3389
  frontend_ip_configuration_name = "PublicIPAddress"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Load Balancer NAT Rules can be imported using the resource id, e.g.

terraform import azurestack_lb_nat_rule.test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule1