Network
Network
Network resources allow you to create isolated networks for your resources. There is no limit to the number of Network resources you can create, the only limitation is that they must not have overlapping subnets.
resource "network" "name" {
...
}
Attributes
Subnet subnet
required
type: string
Subnet to use for the network, must not overlap any other existing networks.
subnet = "10.100.100.0/24"
EnableIPv6 enable_ipv6
type: bool
Enable IPv6 on the network
enable_ipv6 = true
Computed Attributes
These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.
Meta ID meta.id
string
The full ID of the resource e.g. resource.type.name
.
This is computed from the full resource path:
// given the following resource
resource "container" "ubuntu" {
...
}
// the resulting id will be
resource.container.ubuntu
Meta Type meta.type
string
The type of the resource. This taken from the type label of the resource definition.
// given the following resource
resource "container" "ubuntu" {
...
}
// the resulting type will be
container
Meta Name meta.name
string
The name of the resource. This taken from the name label of the resource definition.
// given the following resource
resource "container" "ubuntu" {
...
}
// the resulting name will be
ubuntu
Examples
resource "network" "local" {
subnet = "10.10.0.0/16"
}
Last updated