The steps to do VPC peering in AWS and GCP are quite similar. You need to have these info:
In AWS
- Account ID
- Source and Target VPC ID
- Permission
In GCP
- Project ID
- Source and Target VPC name
- Permission
The below steps assume that the VPC peering are done on 2 different accounts (on AWS) or projects (on GCP) and both source and target VPC have been created prior.
How to do VPC peering in AWS:
You'll do configure the VPC peering in the source account first then followed with target account with similar steps.
1. Login to the source account.
2. Go to VPC > Peering Connections > Create Peering Connections.
3. Fill up the required information and click "Create Peering Connection" button. You'll see the review page. If the information is correct, proceed with the creation.
4. You'll see your newly created peering status is "Pending Acceptance". Now login to the target account to accept the peering.
5. In the target account, go to VPC > Peering Connections.
6. You'll see there's pending peering connection request. Choose on that entry and click button "Actions" > Accept Request.
7. The status should turn Active now.
*You may need to update the route table and security group entries if it's necessary.
How to do VPC peering in GCP:
You'll configure the VPC peering in the source project first then move on to the target project with the similar steps.
- Go to the first/source project
- Go to VPC Networking > VPC Network Peering
- Click "Create Connection" > Continue
- Fill up the info and click button Create
You'll see the status is "Active" now.
gcloud compute routes list --project <target_project_id>
You should see entry with name starts with "peering-route" in the result.
No comments:
Post a Comment