# 

# exoscale_vpc (Data Source)

Fetch Exoscale [VPC](https://community.exoscale.com/product/networking/vpc/) data.

Corresponding resource: [exoscale_vpc]({{< ref "../resources/vpc.md" >}}).

## Example Usage

```terraform
data "exoscale_vpc" "my_vpc" {
  zone = "ch-gva-2"
  name = "my-vpc"
}

output "my_vpc_id" {
  value = data.exoscale_vpc.my_vpc.id
}
```

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

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

### Optional

- `id` (String) The VPC ID to match (conflicts with `name`).
- `name` (String) The VPC name to match (conflicts with `id`).
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `default` (Boolean) Whether this is the organization's default VPC for the zone.
- `description` (String) The VPC description.
- `dns_servers` (List of String) DHCP option 6: a list of DNS server IPv4 addresses.
- `domain_search` (List of String) DHCP option 119: a list of domain search strings.
- `labels` (Map of String) A map of key/value labels.
- `ntp_servers` (List of String) DHCP option 42: a list of NTP server IPv4 addresses.

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

Optional:

- `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.

