exoscale_vpc_subnet (Resource)
Manage Exoscale VPC Subnets.
Corresponding data source: exoscale_vpc_subnet.
Example Usage
locals {
zone = "ch-gva-2"
}
resource "exoscale_vpc_subnet" "my_vpc_subnet" {
zone = local.zone
vpc_id = "9ecc6b8b-73d4-4211-8ced-f7f29bb79524"
name = "my-vpc-subnet"
description = "My VPC Subnet"
ipv4_block = "10.0.0.0/24"
labels = {
environment = "production"
}
}Please refer to the examples directory for complete configuration examples.
Schema
Required
ipv4_block(String) ❗ The Subnet IPv4 CIDR (e.g.10.0.0.0/24).name(String) The Subnet name.vpc_id(String) ❗ The parent exoscale_vpc ID.zone(String) ❗ The Exoscale Zone name.
Optional
address_family(String) ❗ The Subnet address family. Currently onlyinet4is supported.address_space(String) ❗ The Subnet address space. Currently onlyprivateis supported.description(String) A free-form text describing the Subnet.labels(Map of String) A map of key/value labels.timeouts(Block, Optional) (see below for nested schema)
Read-Only
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 Subnet may be imported by `<vpc-ID>@<subnet-ID>@<zone>`:
terraform import \
exoscale_vpc_subnet.my_vpc_subnet \
f81d4fae-7dec-11d0-a765-00a0c91e6bf6@9ecc6b8b-73d4-4211-8ced-f7f29bb79524@ch-gva-2Last updated on