> For the complete documentation index, see [llms.txt](https://docs.cloudeka.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudeka.ai/guideline-for-enterprise/cloudeka-api-list/command-reference/cldkctl-flexi/network/subnet/create.md).

# create

Create a new subnet network in your project. This command allows you to add a new subnet with the specified details.

## Usage

```
cldkctl flexi network subnet create [flags]
```

## Aliases

```
create, crt, add
```

## Steps

Follow the steps below to run and view the result of this command:

#### Interactive Mode

1. Run the following command in your terminal:

```
cldkctl flexi network subnet create -i true
```

2. The terminal displays a list of available **VPCs**. Select the VPC where the subnet will be created.
3. Enter the **Subnet Name**.
4. Enter the **IP address** for the subnet.
5. Select the **Network Size** for the subnet.

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2FUk8BUR8U7VvFHoXLIdKy%2F1.png?alt=media&amp;token=80b3a6f6-7b62-4ae7-95c5-313f4f4871a9" alt=""><figcaption></figcaption></figure>

6. When prompted, confirm the action by selecting **y**, or cancel the process by selecting **n**.

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2F9GA1JkKKeIEXoyDXzU6h%2F2.png?alt=media&amp;token=cd91d6ea-1b3d-40c0-88f5-b9aeebfdf2db" alt=""><figcaption></figcaption></figure>

7. Once completed successfully, the terminal displays the success message.

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2Ft1c3dFfkon392TDHTkNw%2F3%20lainnya.png?alt=media&amp;token=0d14e610-7c8e-4f2d-86c8-ed9809a90a29" alt=""><figcaption></figcaption></figure>

#### Non-Interactive Mode

1. Provide all required values using command flags.
2. Add `--auto-confirm true` or `-y` to skip the confirmation prompt in non-interactive mode.
3. Run the command in your terminal.
4. Once completed successfully, the terminal displays the success message.

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2F7P4kkiL1IiP75tQrhHA7%2F4.png?alt=media&amp;token=019267bf-61d0-4725-82e9-4e3461fd0235" alt=""><figcaption></figcaption></figure>

## Flags

{% hint style="info" %}
This command supports [global flags](/guideline-for-enterprise/cloudeka-api-list/global-flags.md). Refer to the Global Flags section for details
{% endhint %}

| Flag                  | Shorthand | Default | Description                                       |
| --------------------- | --------- | ------- | ------------------------------------------------- |
| --auto-confirm        | -y        | false   | Skip confirmation prompt in non-interactive mode  |
| --help                | -h        |         | Help for the create command.                      |
| --interactive         | -i        | false   | Force interactive TUI mode                        |
| --ip string           |           |         | IP address                                        |
| --name string         | -n        |         | Subnet name (required in non-interactive mode)    |
| --network-size string |           |         | Network size: 6, 18, 24, or 29                    |
| --vpc-id string       |           |         | VPC ID or name (required in non-interactive mode) |
