# attach-interface

Attach an interface to a flexi instance in your project. This command allows you to attach an interface to a flexi instance.

## Usage

```
cldkctl flexi instance attach-interface [name] [flags]
```

## 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 instance attach-interface [instance-name] -i 
```

2. Replace **\[instance-name]** with the name of the instance.
3. Select the **interface type**: **By VPC** or **By Port**.

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

4. If you select **By VPC**, select the **VPC**.
5. Enter the **IP address** for the interface.

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

6. If you select **By Port**, select the **port**.

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

7. Confirm the interface attachment by selecting **Confirm**.

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

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

<figure><img src="/files/WRMO4yaqo8vY945IQkE8" 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/ZP6It1IShoY1DHS6uBk5" 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               |
| --help         | -h        |         | help for attach-interface                                      |
| --interactive  | -i        | false   | Force interactive TUI mode                                     |
| --ip-address   |           |         | IP Address (required when --type is vpc)                       |
| --port-id      |           |         | Port ID (required when --type is port)                         |
| --project      | -p        |         | Specify project ID                                             |
| --type         |           |         | Interface type: vpc or port (required in non-interactive mode) |
| --vpc-id       |           |         | VPC ID (required when --type is vpc)                           |


---

# 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/instance/attach-interface.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.
