# 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-intance attach-interface [name] [flags]
```

## Steps

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

1. Run the following command in your terminal:

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

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

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2FG7xppofaQL7CG5II68U5%2Fimage.png?alt=media&#x26;token=8783aeed-851b-471c-b0f2-6d8184b27ae6" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2FLPeW9rtq7Dx7mtnsKzc4%2Fimage.png?alt=media&#x26;token=4ea0e5fd-a0df-428e-af43-75526d346a2f" alt=""><figcaption></figcaption></figure>

6. If you select **By Port**, select the **port**.
7. Confirm the interface attachment by selecting **Confirm**.

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2F9PLgwzMLhe9md5bAZFpO%2Fimage.png?alt=media&#x26;token=4eb1c20a-6a5d-420f-acfa-725db9b4398e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2882153758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi9YWb69HFXLHYlXffReU%2Fuploads%2FLF6atWIUxc84IX22uScT%2Fimage.png?alt=media&#x26;token=ad5b8179-b8ea-48b5-8356-acca43cae3a5" alt=""><figcaption></figcaption></figure>

8. 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%2FEGAposvpgV8630GUgede%2Fimage.png?alt=media&#x26;token=a715157e-5a27-4efd-beeb-00a77afca67d" alt=""><figcaption></figcaption></figure>

## Flags

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

| Flag                 | Description                             |
| -------------------- | --------------------------------------- |
| -h, --help           | Help for the  attach-interface command. |
| -p, --project string | Specify project ID.                     |
