| page_title | cozystack_vpc Resource - cozystack |
|---|---|
| subcategory | |
| description | A Cozystack virtual private cloud (VPC), deployed inside a tenant namespace. |
A Cozystack virtual private cloud (VPC), deployed inside a tenant namespace.
resource "cozystack_vpc" "net" {
name = "net"
namespace = "tenant-root"
subnets = [
{ name = "web", cidr = "10.0.0.0/24" },
{ name = "db", cidr = "10.0.1.0/24" },
]
routes = [
{ cidr = "0.0.0.0/0", next_hop_ip = "10.0.0.1" },
]
}name(String) VirtualPrivateCloud instance name (metadata.name). Immutable.namespace(String) Tenant namespace the application is created in. Immutable.
peers(Attributes List) VPC peering connections (bidirectional declaration required). (see below for nested schema)routes(Attributes List) Static routes for the VPC. (see below for nested schema)subnets(Attributes List) Subnets of the VPC. (see below for nested schema)wait_for_ready(Boolean) Block on create/update until theReadycondition is true and any server-generated outputs the resource exposes are readable.wait_timeout(String) Maximum time to wait whenwait_for_readyis set (Go duration, e.g.10m). Readiness and outputs share this budget; outputs that never appear leave a warning and their attributes stay null until the next refresh.
chart_version(String) Deployed chart version (status.version).id(String) Synthetic identifier in the formnamespace/name.ready(Boolean) Whether the application'sReadycondition is true.uid(String) Server-assigned object UID (metadata.uid). Stable across updates; changes on recreate.
Required:
tenant_namespace(String) Namespace of the remote tenant.vpc_name(String) Logical name of the remote VPC.
Required:
cidr(String) Destination CIDR.next_hop_ip(String) Next hop IP address.
Required:
name(String) Subnet name.
Optional:
cidr(String) IP address range (CIDR).
Import is supported using the following syntax:
The terraform import command can be used, for example:
# VPC instances are imported as "<namespace>/<name>".
terraform import cozystack_vpc.net tenant-root/net