# 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-individual/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 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudeka.ai/guidance-for-individual/cloudeka-api-list/command-reference/cldkctl-flexi/security/create.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
