Skip to content

Latest commit

 

History

History
92 lines (62 loc) · 2.71 KB

vpc.md

File metadata and controls

92 lines (62 loc) · 2.71 KB
page_title cozystack_vpc Resource - cozystack
subcategory
description A Cozystack virtual private cloud (VPC), deployed inside a tenant namespace.

cozystack_vpc (Resource)

A Cozystack virtual private cloud (VPC), deployed inside a tenant namespace.

Example Usage

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" },
  ]
}

Schema

Required

  • name (String) VirtualPrivateCloud instance name (metadata.name). Immutable.
  • namespace (String) Tenant namespace the application is created in. Immutable.

Optional

  • 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 the Ready condition is true and any server-generated outputs the resource exposes are readable.
  • wait_timeout (String) Maximum time to wait when wait_for_ready is 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.

Read-Only

  • chart_version (String) Deployed chart version (status.version).
  • id (String) Synthetic identifier in the form namespace/name.
  • ready (Boolean) Whether the application's Ready condition is true.
  • uid (String) Server-assigned object UID (metadata.uid). Stable across updates; changes on recreate.

Nested Schema for peers

Required:

  • tenant_namespace (String) Namespace of the remote tenant.
  • vpc_name (String) Logical name of the remote VPC.

Nested Schema for routes

Required:

  • cidr (String) Destination CIDR.
  • next_hop_ip (String) Next hop IP address.

Nested Schema for subnets

Required:

  • name (String) Subnet name.

Optional:

  • cidr (String) IP address range (CIDR).

Import

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