> ## 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 subnet create

## Name

`nebius vpc subnet create`

Creates a new subnet with the specified configuration.

## Synopsis

```
nebius vpc subnet create
  --ipv4-private-pools-pools
  --ipv4-private-pools-use-network-pools
  --ipv4-public-pools-pools
  --ipv4-public-pools-use-network-pools
  --labels
  --name
  --network-id [required]
  --parent-id [required]
  --resource-version
  --route-table-id
  --async
  -i, --interactive
```

## Examples

**Create a subnet**

```
nebius vpc subnet create --name gateway-subnet --network-id <network_ID>
```

**Create a private subnet**

```
export PRIVATE_SUBNET_ID=$(nebius vpc subnet create \
  --name <private_subnet> \
  --network-id <network_ID> \
  --ipv4-public-pools-use-network-pools=False \
  --format json | jq -r ".metadata.id")
```

**Create a subnet with defined public IP addresses**

```
nebius vpc subnet create \
  --name <subnet_name> \
  --network-id <network_ID> \
  --ipv4-public-pools-use-network-pools=false \
  --ipv4-public-pools-pools='[
  {
    "cidrs": [
      {"cidr": "/32"},
      {"cidr": "/32"},
      {"cidr": "/32"}
    ]
  }]'
```

## Options

`--ipv4-private-pools-pools` (json)

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.

(structure)

**cidrs** -> (structure)

**cidr** -> (string)*\[required]*

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** -> (int64)*\[non\_empty\_default]*

Maximum mask length for an allocation from this block. Defaults to /32 for IPv4.

**state** -> (string)*\[non\_empty\_default]*

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

A value must be one of:

<ul>
  <li>
    `"state_unspecified"`
  </li>

  <li>
    `"available"`
  </li>

  <li>
    `"disabled"`
  </li>
</ul>

JSON Schema:

```json theme={null}
[{           
  "cidrs": [{                                          
    "cidr": "",                                        
    "max_mask_length": 0,                              
    "state": "state_unspecified"|"available"|"disabled"
  }]
}]
```

`--ipv4-private-pools-use-network-pools` (bool)

If true, inherit private IPv4 pools from the network. Defaults to true.\

Must be false if `pools` is specified.

`--ipv4-public-pools-pools` (json)

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.

(structure)

**cidrs** -> (structure)

**cidr** -> (string)*\[required]*

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** -> (int64)*\[non\_empty\_default]*

Maximum mask length for an allocation from this block. Defaults to /32 for IPv4.

**state** -> (string)*\[non\_empty\_default]*

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

A value must be one of:

<ul>
  <li>
    `"state_unspecified"`
  </li>

  <li>
    `"available"`
  </li>

  <li>
    `"disabled"`
  </li>
</ul>

JSON Schema:

```json theme={null}
[{           
  "cidrs": [{                                          
    "cidr": "",                                        
    "max_mask_length": 0,                              
    "state": "state_unspecified"|"available"|"disabled"
  }]
}]
```

`--ipv4-public-pools-use-network-pools` (bool)

If true, inherit public IPv4 pools from the network.\

Must be false if `pools` is specified.

`--labels` (string->string)

Labels associated with the resource.

`--name` (string)

Human-readable name for the resource.

`--network-id` (string)* \[required]*

ID of the network this subnet belongs to.

`--parent-id` (string)* \[required]*

Identifier of the parent resource to which the resource belongs.

`--resource-version` (int64)

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.

`--async` (bool)

If set, returns operation id. Otherwise, waits for the operation to complete and returns its resource.

`-i, --interactive` (bool)

If set, suggests to insert field values in interactive mode.

## Global Options

`-h, --help` (bool)

Show this message.

`-p, --profile` (string)

Set a profile for interacting with the cloud.

`--format` (string)

Output format. Supported values: yaml|json|jsonpath|table|text.

`-f, --file` (string)

Input file. For 'update' commands automatically set --full=true.

`-c, --config` (string)

Provide path to config file.

`--debug` (bool)

Write debug logs to stderr. Commands save debug logs in the config directory under logs/, except help and shell completion.

`-I, --impersonate-service-account-id` (string)

Impersonate into the service account and use its token for a command.

`--color` (bool)

Enable colored output.

`--no-browser` (bool)

Do not open browser automatically on auth.

`--insecure` (bool)

Disable transport security.

`--auth-timeout` (duration: 2h30m10s)

Set the timeout for the request including authentication process, default is 15m0s.

`--per-retry-timeout` (duration: 2h30m10s)

Set the timeout for each retry attempt, default is 20s.

`--retries` (uint)

Set the number of retry attempts, 1 is disable retries, default is 3.

`--timeout` (duration: 2h30m10s)

Set the timeout for the main request, default is 1m0s.

`--no-check-update` (bool)

Suppress check for updates.

`--no-progress` (bool)

Suppress progress indicators and spinners.

**Input argument JSON Schema**

> [tab] Full
>
> ```json theme={null}
> {              
>   "metadata": {                // [required]
>                                // Metadata of the subnet.
>     "labels": {                // [map]
>                                // Labels associated with the resource.
>       string: string                  
>     },
>     "name": string,            // Human-readable name for the resource.
>     "parent_id": string,       // [required]
>                                // Identifier of the parent resource to which the resource belongs.
>     "resource_version": int64  // 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.
>   },
>   "spec": {                   // [required]
>                               // Specification of the subnet.
>     "ipv4_private_pools": {      // [non_empty_default]
>                                  // Private IPv4 address pools for this subnet.
>                                  // If unspecified, pools from the associated network are used.
>       "pools": [{   // 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.
>         "cidrs": [{                
>           "cidr": string,           // [required]
>                                     // 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": int64, // [non_empty_default]
>                                     // Maximum mask length for an allocation from this block. Defaults to /32 for IPv4.
>           "state": enum(         // [non_empty_default]
>                                  // Controls provisioning of IP addresses from the CIDR block. Defaults to AVAILABLE.
>             "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.
>           )
>         }]
>       }],
>       "use_network_pools": bool  // If true, inherit private IPv4 pools from the network. Defaults to true.
>                                  // Must be false if `pools` is specified.
>     },
>     "ipv4_public_pools": {       // [non_empty_default]
>                                  // Public IPv4 address pools for this subnet.
>                                  // If unspecified, pools from the associated network are used.
>       "pools": [{   // 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.
>         "cidrs": [{                
>           "cidr": string,           // [required]
>                                     // 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": int64, // [non_empty_default]
>                                     // Maximum mask length for an allocation from this block. Defaults to /32 for IPv4.
>           "state": enum(         // [non_empty_default]
>                                  // Controls provisioning of IP addresses from the CIDR block. Defaults to AVAILABLE.
>             "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.
>           )
>         }]
>       }],
>       "use_network_pools": bool  // If true, inherit public IPv4 pools from the network.
>                                  // Must be false if `pools` is specified.
>     },
>     "network_id": string,     // [required]
>                               // ID of the network this subnet belongs to.
>     "route_table_id": string  // ID of the route table to associate with the subnet.
>                               // If unspecified, the network's default route table is used.
>   }
> }
> ```

> [tab] CopyPaste Friendly
>
> ```json theme={null}
> nebius vpc subnet create '
> {              
>   "metadata": {           
>     "labels": {           
>       "": ""                  
>     },
>     "name": "",           
>     "parent_id": "",      
>     "resource_version": 0 
>   },
>   "spec": {                
>     "ipv4_private_pools": {      
>       "pools": [{  
>         "cidrs": [{                                          
>           "cidr": "",                                        
>           "max_mask_length": 0,                              
>           "state": "state_unspecified"|"available"|"disabled"
>         }]
>       }],
>       "use_network_pools": false 
>     },
>     "ipv4_public_pools": {       
>       "pools": [{  
>         "cidrs": [{                                          
>           "cidr": "",                                        
>           "max_mask_length": 0,                              
>           "state": "state_unspecified"|"available"|"disabled"
>         }]
>       }],
>       "use_network_pools": false 
>     },
>     "network_id": "",      
>     "route_table_id": ""   
>   }
> }
> '
> ```

*Auto generated on 23-Nov-2026*
