Skip to content

exoscale_vpc (Resource)

Manage Exoscale Virtual Private Clouds (VPC).

Corresponding data source: exoscale_vpc.

Example Usage

locals {
  zone = "ch-gva-2"
}

resource "exoscale_vpc" "my_vpc" {
  zone        = local.zone
  name        = "my-vpc"
  description = "My Virtual Private Cloud"

  labels = {
    environment = "production"
  }
}

Please refer to the examples directory for complete configuration examples.

Schema

Required

  • name (String) The VPC name.
  • zone (String) ❗ The Exoscale Zone name.

Optional

  • description (String) A text describing the VPC.
  • 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.
  • timeouts (Block, Optional) (see below for nested schema)

Read-Only

  • default (Boolean) Whether this is the organization’s default VPC for the zone.
  • id (String) The ID of this resource.

Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration 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 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 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 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 VPC may be imported by `<ID>@<zone>`:

terraform import \
  exoscale_vpc.my_vpc \
  f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2
Last updated on