Networking Commands¶
VPC peering and private connectivity for Redis Cloud.
VPC Peering¶
List Peerings¶
Create Peering¶
AWS VPC Peering¶
# Using first-class parameters (recommended)
redisctl cloud connectivity vpc-peering create --subscription 123456 \
--region us-east-1 \
--aws-account-id 123456789012 \
--vpc-id vpc-abc123 \
--wait
# With multiple CIDR blocks
redisctl cloud connectivity vpc-peering create --subscription 123456 \
--region us-east-1 \
--aws-account-id 123456789012 \
--vpc-id vpc-abc123 \
--vpc-cidr 10.0.0.0/16 \
--vpc-cidr 10.1.0.0/16 \
--wait
GCP VPC Peering¶
redisctl cloud connectivity vpc-peering create --subscription 123456 \
--gcp-project-id my-gcp-project \
--gcp-network-name my-network \
--wait
Using JSON (escape hatch for advanced options)¶
redisctl cloud connectivity vpc-peering create --subscription 123456 \
--data '{
"region": "us-east-1",
"awsAccountId": "123456789012",
"vpcId": "vpc-abc123",
"vpcCidr": "10.0.0.0/16"
}' --wait
Update Peering¶
# Update CIDR blocks
redisctl cloud connectivity vpc-peering update --subscription 123456 --peering-id 789 \
--vpc-cidr 10.0.0.0/16 \
--vpc-cidr 10.1.0.0/16 \
--wait
Delete Peering¶
AWS PrivateLink¶
Get PrivateLink Status¶
Create PrivateLink Service¶
# Using first-class parameters
redisctl cloud connectivity privatelink create --subscription 123456 \
--share-name my-privatelink-share \
--wait
# Using JSON
redisctl cloud connectivity privatelink create --subscription 123456 \
--data '{"shareName": "my-privatelink-share"}' \
--wait
Add Principal (Allow AWS Account)¶
# Using first-class parameters
redisctl cloud connectivity privatelink add-principal --subscription 123456 \
--principal 123456789012 \
--type aws-account \
--wait
# Using JSON
redisctl cloud connectivity privatelink add-principal --subscription 123456 \
--data '{"principal": "123456789012", "principalType": "aws_account"}' \
--wait
Remove Principal¶
redisctl cloud connectivity privatelink remove-principal --subscription 123456 \
--principal 123456789012 \
--type aws-account \
--wait
Delete PrivateLink¶
Private Service Connect (GCP)¶
Get PSC Service¶
Create PSC Service¶
List PSC Endpoints¶
Create PSC Endpoint¶
# Using first-class parameters (recommended)
redisctl cloud connectivity psc endpoint-create 123456 \
--gcp-project-id my-gcp-project \
--gcp-vpc-name my-vpc \
--gcp-vpc-subnet-name my-subnet \
--endpoint-connection-name redis-psc \
--wait
# Using JSON
redisctl cloud connectivity psc endpoint-create 123456 \
--data '{
"gcpProjectId": "my-gcp-project",
"gcpVpcName": "my-vpc",
"gcpVpcSubnetName": "my-subnet"
}' --wait
Update PSC Endpoint¶
redisctl cloud connectivity psc endpoint-update 123456 \
--endpoint-id 789 \
--psc-service-id 456 \
--gcp-vpc-subnet-name new-subnet \
--wait
Delete PSC Endpoint¶
Transit Gateway (AWS)¶
List Attachments¶
Create Attachment¶
# Using first-class parameters (recommended)
redisctl cloud connectivity tgw attachment-create 123456 \
--aws-account-id 123456789012 \
--tgw-id tgw-abc123 \
--wait
# With CIDR blocks
redisctl cloud connectivity tgw attachment-create 123456 \
--aws-account-id 123456789012 \
--tgw-id tgw-abc123 \
--cidr 10.0.0.0/16 \
--cidr 10.1.0.0/16 \
--wait
# Using JSON file
redisctl cloud connectivity tgw attachment-create 123456 \
--data @tgw-config.json \
--wait
Update Attachment CIDRs¶
redisctl cloud connectivity tgw attachment-update 123456 \
--attachment-id att-abc123 \
--cidr 10.0.0.0/16 \
--cidr 10.2.0.0/16 \
--wait
Delete Attachment¶
List Invitations¶
Accept/Reject Invitation¶
redisctl cloud connectivity tgw invitation-accept 123456 inv-abc123
redisctl cloud connectivity tgw invitation-reject 123456 inv-abc123
Common Patterns¶
Check Peering Status¶
redisctl cloud connectivity vpc-peering get --subscription 123456 -o json -q '[].{
id: id,
status: status,
vpcId: vpcId
}'
Wait for Peering Active¶
redisctl cloud connectivity vpc-peering create \
--subscription 123456 \
--region us-east-1 \
--aws-account-id 123456789012 \
--vpc-id vpc-abc123 \
--wait \
--wait-timeout 600
Raw API Access¶
# VPC Peerings
redisctl api cloud get /subscriptions/123456/peerings
# PrivateLink
redisctl api cloud get /subscriptions/123456/privateLink
# PSC
redisctl api cloud get /subscriptions/123456/private-service-connect
# Transit Gateway
redisctl api cloud get /subscriptions/123456/transitGateways
Related¶
- Subscriptions - Subscription management
- VPC Peering Cookbook - Step-by-step guide