Associating Instance with Security Group

Last Updated At: 2025-11-26 15:01:15

Note:

Security groups support association with CVM, Elastic Network Interface, CloudDB for MySQL, and Cloud Load Balancer. This document takes association with CVM as an example.

Overview

Security groups are used to set the network access control for single or multiple Cloud Virtual Machine instances, which is an important means of network security isolation. You can associate Cloud Virtual Machine instances with one or more security groups based on business needs. Here's how to associate a Cloud Virtual Machine instance with a security group in the console.

Prerequisites

A Cloud Virtual Machine instance has been created.

Directions

  1. Log in to the CVM console.
  2. Click Security Group in the left sidebar to enter the security group management page.
  3. On the Security Group Management page, select Region and find the security group whose rules need to be set.
  4. In the row of the security group whose rules need to be set, click Manage Instances in the Action column to enter the Associate Instance page.
  5. On the Associated Instance Page, click Add Association.
  6. In the pop-up Add Instance Association window, select the instances you want to bind to the security group, and click OK.

Subsequent Operations

  • If you want to view all the security groups you have created in a certain region, you can query the Security Group List.
    For detailed operations, see View Security Groups.
  • If you do not want your Cloud Virtual Machine instance to belong to one or more security groups, you can remove the Cloud Virtual Machine instance from the security group.
    For detailed operations, see Remove from Security Group.
  • If your business no longer requires one or more security groups, you can delete the security group. After deletion, all rules within the security group will be deleted simultaneously.
    For detailed operations, see Delete Security Group.