> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# nebius_vpc_v1_subnet data source

#### Retrieving the Data Source

This data source can be retrieved by one of ID or name.

##### Retrieve by ID

To retrieve by ID, fill in only the `id` field:

```hcl theme={null}
data ... {
    id = "your-ID"
}
```

##### Retrieve by Name

To retrieve by name, fill in only the `name` and `parent_id` fields:

```hcl theme={null}
data ... {
    name      = "your name"
    parent_id = "data-source-parent-id"
}
```

Defines a Subnet, a segment of a network used for more granular control and management.
Subnet uses pools to organize address space.

## Schema

### Optional

* `id` (String) Identifier for the resource, unique for its resource type.
* `name` (String) Human readable name for the resource.
* `parent_id` (String) Identifier of the parent resource to which the resource belongs.

### Read-Only

* `created_at` (String) :

  Timestamp indicating when the resource was created.

  A string representing a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ` or `YYYY-MM-DDTHH:MM:SS.SSS±HH:MM`
* `ipv4_private_pools` (Attributes) :

  Private IPv4 address pools for this subnet.
  If unspecified, pools from the associated network are used. (see [below for nested schema](#nestedatt--ipv4_private_pools))
* `ipv4_public_pools` (Attributes) :

  Public IPv4 address pools for this subnet.
  If unspecified, pools from the associated network are used. (see [below for nested schema](#nestedatt--ipv4_public_pools))
* `labels` (Map of String) Labels associated with the resource.
* `metadata` (Attributes) :

  Metadata for the subnet resource.
  `metadata.parent_id` represents IAM container

  #### Inner value description

  Common resource metadata. (see [below for nested schema](#nestedatt--metadata))
* `network_id` (String) ID of the network this subnet belongs to.
* `resource_version` (Number) :

  Version of the resource for safe concurrent modifications and consistent reads.
  Positive and monotonically increases on each resource spec change (but *not* on each change of the
  resource's container(s) or status).
  Service allows zero value or current.
* `route_table_id` (String) :

  ID of the route table to associate with the subnet.
  If unspecified, the network's default route table is used.
* `status` (Attributes) Status of the subnet. (see [below for nested schema](#nestedatt--status))
* `updated_at` (String) :

  Timestamp indicating when the resource was last updated.

  A string representing a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ` or `YYYY-MM-DDTHH:MM:SS.SSS±HH:MM`

<a id="nestedatt--ipv4_private_pools" />

### Nested Schema for `ipv4_private_pools`

Read-Only:

* `pools` (Attributes List) :

  List of private IPv4 CIDR blocks for this subnet.
  Must not overlap with other resources in the network
  Must be empty if `use_network_pools` is true. (see [below for nested schema](#nestedatt--ipv4_private_pools--pools))
* `use_network_pools` (Boolean) :

  If true, inherit private IPv4 pools from the network. Defaults to true.
  Must be false if `pools` is specified.

<a id="nestedatt--ipv4_private_pools--pools" />

### Nested Schema for `ipv4_private_pools.pools`

Read-Only:

* `cidrs` (Attributes List) (see [below for nested schema](#nestedatt--ipv4_private_pools--pools--cidrs))

<a id="nestedatt--ipv4_private_pools--pools--cidrs" />

### Nested Schema for `ipv4_private_pools.pools.cidrs`

Read-Only:

* `cidr` (String) :

  A CIDR block (e.g., "10.1.2.0/24") or a prefix length (e.g., "/24").
  If prefix length is specified, the CIDR block will be auto-allocated
  from the network's available space.
* `max_mask_length` (Number) Maximum mask length for an allocation from this block. Defaults to /32 for IPv4.
* `state` (String) :

  Controls provisioning of IP addresses from the CIDR block. Defaults to AVAILABLE.

  #### Supported values

  Controls provisioning of IP addresses from this pool to other pools
  or allocations. Defaults to AVAILABLE.
  Possible values:

  * `STATE_UNSPECIFIED` - Not used, mandated by the protocol.
  * `AVAILABLE` - Default state. Provision of the IP addresses from this CIDR block is allowed.
  * `DISABLED` - Provision of the IP addresses from this CIDR block is denied.

<a id="nestedatt--ipv4_public_pools" />

### Nested Schema for `ipv4_public_pools`

Read-Only:

* `pools` (Attributes List) :

  List of public IPv4 CIDR blocks for this subnet.
  Must not overlap with other resources in the network.
  Must be empty if `use_network_pools` is true. (see [below for nested schema](#nestedatt--ipv4_public_pools--pools))
* `use_network_pools` (Boolean) :

  If true, inherit public IPv4 pools from the network.
  Must be false if `pools` is specified.

<a id="nestedatt--ipv4_public_pools--pools" />

### Nested Schema for `ipv4_public_pools.pools`

Read-Only:

* `cidrs` (Attributes List) (see [below for nested schema](#nestedatt--ipv4_public_pools--pools--cidrs))

<a id="nestedatt--ipv4_public_pools--pools--cidrs" />

### Nested Schema for `ipv4_public_pools.pools.cidrs`

Read-Only:

* `cidr` (String) :

  A CIDR block (e.g., "10.1.2.0/24") or a prefix length (e.g., "/24").
  If prefix length is specified, the CIDR block will be auto-allocated
  from the network's available space.
* `max_mask_length` (Number) Maximum mask length for an allocation from this block. Defaults to /32 for IPv4.
* `state` (String) :

  Controls provisioning of IP addresses from the CIDR block. Defaults to AVAILABLE.

  #### Supported values

  Controls provisioning of IP addresses from this pool to other pools
  or allocations. Defaults to AVAILABLE.
  Possible values:

  * `STATE_UNSPECIFIED` - Not used, mandated by the protocol.
  * `AVAILABLE` - Default state. Provision of the IP addresses from this CIDR block is allowed.
  * `DISABLED` - Provision of the IP addresses from this CIDR block is denied.

<a id="nestedatt--metadata" />

### Nested Schema for `metadata`

<a id="nestedatt--status" />

### Nested Schema for `status`

Read-Only:

* `ipv4_private_cidrs` (List of String, Deprecated) :

  CIDR blocks.
  Deprecated: Use `ipv4_private_pools.cidrs` instead.
* `ipv4_private_pools` (Attributes List) Private IPv4 pools available for allocations in this subnet. (see [below for nested schema](#nestedatt--status--ipv4_private_pools))
* `ipv4_public_cidrs` (List of String, Deprecated) :

  CIDR blocks.
  Deprecated: Use `ipv4_public_pools.cidrs` instead.
* `ipv4_public_pools` (Attributes List) Public IPv4 pools available for allocations in this subnet. (see [below for nested schema](#nestedatt--status--ipv4_public_pools))
* `route_table` (Attributes) :

  Information about the route table associated with this subnet.
  Can be either a custom route table or the network's default route table. (see [below for nested schema](#nestedatt--status--route_table))
* `state` (String) :

  Current state of the subnet.

  #### Supported values

  Enumeration of possible states of the subnet.
  Possible values:

  * `STATE_UNSPECIFIED` - Default state, unspecified.
  * `CREATING` - Subnet is being created.
  * `READY` - Subnet is ready for use.
  * `DELETING` - Subnet is being deleted.

<a id="nestedatt--status--ipv4_private_pools" />

### Nested Schema for `status.ipv4_private_pools`

Read-Only:

* `cidrs` (List of String) CIDR blocks sourced from this pool.
* `pool_id` (String) ID of the pool available for allocations in this subnet.

<a id="nestedatt--status--ipv4_public_pools" />

### Nested Schema for `status.ipv4_public_pools`

Read-Only:

* `cidrs` (List of String) CIDR blocks sourced from this pool.
* `pool_id` (String) ID of the pool available for allocations in this subnet.

<a id="nestedatt--status--route_table" />

### Nested Schema for `status.route_table`

Read-Only:

* `default` (Boolean) :

  Indicates whether this is the network's default route table.
  If true, this is the default route table inherited from the network.
  If false, this is a custom route table explicitly associated with the subnet via spec.
* `id` (String) ID of the route table.
