Skip to content

exoscale_vpc_subnet (Data Source)

Fetch Exoscale VPC Subnet data.

Corresponding resource: exoscale_vpc_subnet.

Example Usage

data "exoscale_vpc_subnet" "my_vpc_subnet" {
  zone   = "ch-gva-2"
  vpc_id = "9ecc6b8b-73d4-4211-8ced-f7f29bb79524"
  name   = "my-vpc-subnet"
}

output "my_vpc_subnet_id" {
  value = data.exoscale_vpc_subnet.my_vpc_subnet.id
}

Please refer to the examples directory for complete configuration examples.

Schema

Required

  • vpc_id (String) The parent exoscale_vpc ID.
  • zone (String) The Exoscale Zone name.

Optional

  • id (String) The Subnet ID to match (conflicts with name).
  • name (String) The Subnet name to match (conflicts with id).
  • timeouts (Block, Optional) (see below for nested schema)

Read-Only

  • address_family (String) The Subnet address family.
  • address_space (String) The Subnet address space.
  • description (String) The Subnet description.
  • ipv4_block (String) The Subnet IPv4 CIDR.
  • labels (Map of String) A map of key/value labels.

Nested Schema for timeouts

Optional:

  • 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.
Last updated on