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
- Log in to the management console.
- Click in the upper left corner and select the desired region and project.
- Click in the upper left corner and choose Networking > Virtual Private Cloud.
The Virtual Private Cloud page is displayed.
- Locate the subnet to share and click its name.
The Summary page is displayed.
- Click the Sharing tab and click Share Subnet.
The Share Subnet dialog box is displayed.
- Select an available resource share.
If there is no resource share available, create one.
- Click Cancel to close the Share Subnet dialog box.
The Sharing tab is displayed.
- Click Create Resource Share.
Create a resource share on the RAM console by referring to Creating a Resource Share.
- Repeat 5 to 6 to add subnets to the existing resource share.
- 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.