Help Center/ Virtual Private Cloud/ User Guide/ VPC Sharing/ Sharing a Subnet with Other Accounts
Updated on 2024-08-07 GMT+08:00

Sharing a Subnet with Other Accounts

Scenarios

The owner of a VPC can share subnets in the VPC with principals. You need to create a resource share, select the subnets to share, associate permissions, and specify principals. Once a subnet is shared, principals can create instances in this subnet.

Prerequisites

A resource share is available. If there are no resource shares, create one by referring to Creating a Resource Share.

Notes and Constraints

  • A principal can receive a maximum of 100 subnet shares.
  • A subnet can be shared with a maximum of 100 principals.

Procedure

  1. Log in to the management console.
  1. Click in the upper left corner and select the desired region and project.
  2. Click in the upper left corner and choose Networking > Virtual Private Cloud.

    The Virtual Private Cloud page is displayed.

  3. Locate the subnet to share and click its name.

    The Summary page is displayed.

  4. Click the Sharing tab and click Share Subnet.

    The Share Subnet dialog box is displayed.

  5. Select an available resource share.
    If there is no resource share available, create one.
    1. Click Cancel to close the Share Subnet dialog box.

      The Sharing tab is displayed.

    2. Click Create Resource Share.

      Create a resource share on the RAM console by referring to Creating a Resource Share.

    3. Repeat 5 to 6 to add subnets to the existing resource share.
  6. Click OK.

    Return to the Sharing tab. You can view that the resource share is in Sharing status.

Follow-up Operations

After an owner shares a subnet with a principal, the principal needs to accept the sharing within a specified period to use the subnet. For details, see Responding to a Resource Sharing Invitation.