Skip to main content

okustera_network (Resource)

The okustera_network resource provisions and manages isolated Layer 2/3 VPC networks and default subnets powered by OpenStack Neutron and OVS/OVN in Okustera.

Example Usage​

Private VPC with Custom CIDR and DHCP​

resource "okustera_network" "app_vpc" {
name = "app-vpc-network"
cidr = "198.51.100.0/24"
enable_dhcp = true
gateway_ip = "198.51.100.1"
}

output "primary_subnet_id" {
value = okustera_network.app_vpc.subnet_ids[0]
}

Schema​

Required​

  • name (String) Unique human-readable network name.

Optional​

  • cidr (String) IPv4 CIDR block for the default subnet. Defaults to 198.51.100.0/24.
  • enable_dhcp (Boolean) Enables DHCP service for IP address auto-assignment. Defaults to true.
  • gateway_ip (String) Explicit gateway IP within the CIDR block.

Read-Only Attributes​

  • id (String) Network identifier UUID.
  • status (String) Current network status (e.g. ACTIVE).
  • is_external (Boolean) Whether this is an external routing provider network.
  • is_shared (Boolean) Whether this network is accessible across tenants.
  • subnet_ids (List of String) List of allocated subnet UUIDs belonging to this network.
  • created_at (String) Creation timestamp.

Import​

Existing networks can be imported using their UUID:

terraform import okustera_network.app_vpc <network_uuid>