# 

# exoscale_nlb (Resource)

Manage Exoscale [Network Load Balancers (NLB)](https://community.exoscale.com/product/networking/nlb/).

Corresponding data source: [exoscale_nlb]({{< ref "../data-sources/nlb.md" >}}).

## Example Usage

```terraform
resource "exoscale_nlb" "my_nlb" {
  zone = "ch-gva-2"
  name = "my-nlb"
}
```

Next step is to attach [exoscale_nlb_service]({{< ref "./nlb_service.md" >}})(s) to the NLB.

Please refer to the [examples](https://github.com/exoscale/terraform-provider-exoscale/tree/master/examples/)
directory for complete configuration examples.

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) The network load balancer (NLB) name.
- `zone` (String) ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.

### Optional

- `description` (String) A free-form text describing the NLB.
- `labels` (Map of String) A map of key/value labels.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `created_at` (String) The NLB creation date.
- `id` (String) The ID of this resource.
- `ip_address` (String) The NLB IPv4 address.
- `services` (Set of String) The list of the [exoscale_nlb_service]({{< ref "./nlb_service.md" >}}) (names).
- `state` (String) The current NLB state.

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `delete` (String)
- `read` (String)
- `update` (String)

-> The symbol ❗ in an attribute indicates that modifying it, will force the creation of a new resource.

## Import

An existing network load balancer (NLB) may be imported by `<ID>@<zone>`:

```console
terraform import \
  exoscale_nlb.my_nlb \
  f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2
```

~> **NOTE:** Importing an `exoscale_nlb` resource does _not_ import related `exoscale_nlb_service` resources.

