Available in VPC
Create a VPC peering instance through the peering request.
Syntax
The createVpcPeeringInstance syntax is as follows:
./ncloud vpc createVpcPeeringInstance \
--sourceVpcNo <source-vpc-no> \
--targetVpcNo <target-vpc-no> \
[--targetVpcName <target-vpc-name>] \
[--targetVpcLoginId <target-vpc-login-id>] \
[--vpcPeeringName <vpc-peering-name>] \
[--vpcPeeringDescription <vpc-peering-description>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running createVpcPeeringInstance.
Required options
The following options are required for createVpcPeeringInstance.
| Options | Type | Required | Description |
|---|---|---|---|
--sourceVpcNo |
String | Required | VPC number sending the peering request
|
--targetVpcNo |
String | Required | VPC number receiving the peering request
|
--targetVpcName |
String | Conditional | Name of the VPC receiving the peering request
|
--targetVpcLoginId |
String | Conditional | Owner ID (email format) of the VPC receiving the peering request
|
Optional options
These are the optional options for createVpcPeeringInstance. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--vpcPeeringName |
String | Optional | VPC peering name
|
--vpcPeeringDescription |
String | Optional | Description of the VPC peering (byte)
|
Common options
For information about the options common to all vpc subcommands, see VPC options.
Examples
If the request to create a VPC peering instance is successful, the instance's configuration information and creation status are returned.
Command
The command example is as follows:
./ncloud vpc createVpcPeeringInstance \
--sourceVpcNo 12345678 \
--targetVpcNo 12345679 \
--targetVpcName test-vpc-02 \
--targetVpcLoginId user2@example.com \
--vpcPeeringName test-peering \
--vpcPeeringDescription "VPC peering example" \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"createVpcPeeringInstanceResponse": {
"totalRows": 1,
"vpcPeeringInstanceList": [
{
"vpcPeeringInstanceNo": "67890123",
"vpcPeeringName": "test-peering",
"regionCode": "KR",
"createDate": "2026-07-07T16:41:47+0900",
"lastModifyDate": "2026-07-07T16:41:47+0900",
"vpcPeeringInstanceStatus": {
"code": "INIT",
"codeName": "Under preparation"
},
"vpcPeeringInstanceStatusName": "Waiting",
"vpcPeeringInstanceOperation": {
"code": "NULL",
"codeName": "NULL OP"
},
"sourceVpcNo": "12345678",
"sourceVpcName": "test-vpc-01",
"sourceVpcIpv4CidrBlock": "10.0.0.0/16",
"sourceVpcLoginId": "user@example.com",
"targetVpcNo": "12345679",
"targetVpcName": "test-vpc-02",
"targetVpcIpv4CidrBlock": "172.31.0.0/16",
"targetVpcLoginId": "user2@example.com",
"vpcPeeringDescription": "VPC peering example",
"hasReverseVpcPeering": false,
"isBetweenAccounts": true,
"reverseVpcPeeringInstanceNo": ""
}
],
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"returnCode": "0",
"returnMessage": "success"
}
}