> 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/guidance-for-enterprise/cloudeka-api-list/command-reference/cldkctl-flexi/security/create.md).

# create

Create a new flexi security in your project. This command allows you to define and create a new flexi security.

## Usage

```
cldkctl flexi security create [flags]
```

## Aliases

```
create, add, new
```

## 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 security create -i 
```

2. Enter the **security name** and **description**.

<figure><img src="/files/X4R3kPgAuyqoxk52UdFH" alt=""><figcaption></figcaption></figure>

3. Select the instances to which the security group will be applied.

<figure><img src="/files/0tTYAVYhUe5ndlPeroFn" alt=""><figcaption></figcaption></figure>

4. Choose whether to **add an inbound rule**.

<figure><img src="/files/R6kcMYs1tXROnVVZVfHF" alt=""><figcaption></figcaption></figure>

5. Choose whether to **add an outbound rule**.

<figure><img src="/files/z4Tb5gMqp1KAWvIiFL2c" alt=""><figcaption></figcaption></figure>

6. Confirm the security group creation.

<figure><img src="/files/TgWStYPrSwOSCy3HomGD" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/hpBP3BEeBQeHWXJUFpeN" alt=""><figcaption></figcaption></figure>

#### Non-Interactive Mode

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

<figure><img src="/files/T5b2vl8xKDY0keGGleFS" alt=""><figcaption></figcaption></figure>

## Flags

{% hint style="info" %}
This command supports [global flags](/guidance-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                             |
| --description string      |           |           | Security group description                                                   |
| --help                    | -h        |           | Help for the create command.                                                 |
| --interactive             | -i        | false     | Force interactive TUI mode                                                   |
| --name string             | -n        |           | Security group name (required in non-interactive mode)                       |
| --port-ids string         |           |           | Comma-separated instance port IDs to apply                                   |
| --rule-description string |           |           | Rule description                                                             |
| --rule-direction string   |           |           | Rule direction: ingress or egress                                            |
| --rule-ethertype string   |           | IPv4      | Rule ethertype: IPv4 or IPv6                                                 |
| --rule-port-max string    |           |           | Rule port range max                                                          |
| --rule-port-min string    |           |           | Rule port range min                                                          |
| --rule-sources string     |           | 0.0.0.0/0 | Rule sources (CIDR)                                                          |
| --rule-type string        |           | SSH       | Rule type: SSH, HTTP, HTTPS, Custom TCP Rule, Custom UDP Rule, All ICMP Rule |
