---
title: "exoscale_private_network (Resource)"
description: "Manage Exoscale Private Networks https://community.exoscale.com/product/networking/private-network.\nCorresponding data source: exoscaleprivatenetwork ../data-sources/private_network.md."
url: https://community.exoscale.com/reference/terraform/provider/resources/private_network/
section: reference
last_updated: 2026-09-29
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# exoscale_private_network (Resource)

Manage Exoscale [Private Networks](https://community.exoscale.com/product/networking/private-network/index.md).

Corresponding data source: [exoscale_private_network](https://community.exoscale.com/reference/terraform/provider/data-sources/private_network/index.md).

## Example Usage

*Unmanaged* private network:

```terraform
resource "exoscale_private_network" "my_private_network" {
  zone = "ch-gva-2"
  name = "my-private-network"
}
```

*Managed* private network:

```terraform
resource "exoscale_private_network" "my_managed_private_network" {
  zone = "ch-gva-2"
  name = "my-managed-private-network"

  netmask  = "255.255.255.0"
  start_ip = "10.0.0.20"
  end_ip   = "10.0.0.253"
}
```

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


## Schema

### Required

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

### Optional

- `description` (String) A free-form text describing the network.
- `end_ip` (String) (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
- `labels` (Map of String) A map of key/value labels.
- `netmask` (String) (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
- `start_ip` (String) (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `id` (String) The ID of this resource.

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

Optional:

- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

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

## Import

An existing private network may be imported by `<ID>@<zone>`:

```shell
terraform import \
  exoscale_private_network.my_private_network \
  f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2
```

