پرش به مطلب اصلی

arvancloud_iaas_networks (Data Source)

Lists IaaS private networks, optionally filtered by region or availability zone.

Example Usage

# List all networks across all availability zones
data "arvancloud_iaas_networks" "all" {}

# Filter networks by region
data "arvancloud_iaas_networks" "by_region" {
region = "ir-central1"
}

# Filter networks by availability zone
data "arvancloud_iaas_networks" "by_az" {
availability_zone = "ir-central1-a"
}

output "all_networks" {
value = data.arvancloud_iaas_networks.all.networks
}

output "network_count" {
value = length(data.arvancloud_iaas_networks.all.networks)
}

Schema

Optional

  • availability_zone (String) Filter networks by availability zone code name (e.g. ir-central1-a). Cannot be combined with region.
  • region (String) Filter networks by region code name (e.g. ir-central1). Cannot be combined with availability_zone.

Read-Only

  • id (String) Unique identifier for this data source.
  • networks (Attributes List) List of networks matching the specified filters. (see below for nested schema)

Nested Schema for networks

Read-Only:

  • admin_state_up (Boolean) Administrative state of the network.
  • availability_zone (String) Availability zone where the network is located (e.g. ir-central1-a).
  • created_at (String) Timestamp when the network was created.
  • description (String) Description of the network.
  • id (String) Unique identifier of the network.
  • name (String) Name of the network.
  • port_security_enabled (Boolean) Whether port security is enabled on the network.
  • region (String) Region where the network is located (e.g. ir-central1).
  • router_external (Boolean) Whether this network is an external router network.
  • shared (Boolean) Whether the network is shared across projects.
  • status (String) Current status of the network.
  • subnets (Attributes List) Subnets associated with this network. (see below for nested schema)
  • updated_at (String) Timestamp when the network was last updated.

Nested Schema for networks.subnets

Read-Only:

  • allocation_pools (Attributes List) IP allocation pools for dynamic address assignment. (see below for nested schema)
  • cidr (String) CIDR block of the subnet.
  • description (String) Description of the subnet.
  • dhcp_ip (String) DHCP server IP address.
  • dns_nameservers (List of String) DNS nameservers configured for the subnet.
  • enable_dhcp (Boolean) Whether DHCP is enabled.
  • gateway_ip (String) Gateway IP address.
  • host_routes (Attributes List) Static host routes configured for the subnet. (see below for nested schema)
  • id (String) Unique identifier of the subnet.
  • ip_version (String) IP version (e.g. 4 or 6).
  • name (String) Name of the subnet.
  • network_id (String) ID of the parent network.

Nested Schema for networks.subnets.allocation_pools

Read-Only:

  • end (String) End IP of the allocation range.
  • start (String) Start IP of the allocation range.

Nested Schema for networks.subnets.host_routes

Read-Only:

  • destination (String) Destination CIDR for the route.
  • nexthop (String) Next hop IP address.