In this section, you’ll attach the common development VPC to the transit gateway and create a dedicated transit gateway route table for your common development VPC and the test and production workload oriented VPC s that you’ll create in subsequent sections.
In order to attach a VPC to the transit gateway, you’ll need to enable sharing via AWS Resource Access Manager.
After attaching the common development VPC, you’ll create your second transit gateway route table. This route table will be dedicated to your common development VPC and the test and production workload-oriented VPCs that you’ll set up in a subsequent section.
You will need to enable sharing resources within your AWS Organizations from your master account. This will allow you to access Transit Gateway from each of your accounts created and maintained within Control Tower.
master
AWS accountManagement console
associated with the AWSAdministratorAccess
role.Resource Access Manager
Settings
in the left navigation panelEnable sharing within your AWS Organizations
checkbox, then click the Save settings
buttonFind your Organization ID: Navigate to AWS Organizations and click on any of the accounts to open the information panel on the right. Within the ARN
, after the word account, you will see your Organization ID (starts with o-
). Note this down for the next set of steps.
You will use AWS Resource Access Manager (RAM) to share your Transit Gateway for VPC attachments across your accounts and/or your organizations in AWS Organizations.
Resource Access Manager
Create a resource share
buttonField | Recommendation |
---|---|
Name |
infra-network-tgw-share-01 |
Select resource type |
Transit Gateways (and select your Transit Gateway) |
Allow external accounts |
(checked) |
Add AWS account number, OU or organization |
Enter the Organization ID from your master account (captured in the above steps) |
You will create VPC attachments to your Transit Gateway within each individual account. THis is available now that you have shared the Transit Gateway via Resource Access Manager to your root organization.
dev
AWS accountManagement console
associated with the AWSAdministratorAccess
role.VPC
Transit Gateway Attachments
in the left navigation panelCreate Transit Gateway Attachment
buttonField | Recommendation |
---|---|
Transit Gateway ID |
Select your transit gateway |
Attachment type |
VPC |
Attachment tag name |
tgw-dev |
DNS support |
checked |
IP v6 support |
only check if you are using IP v6 - otherwise, leave unchecked |
VPC ID |
Choose the VPC within your shared dev account that you want to attach |
Subnet IDs |
check any private subnets in the VPC that you want as part of the attachment |
Repeat for other VPCs: Repeat this step for any other accounts and VPCs that you want attached to the Transit Gateway.
infrastructure
AWS accountManagement console
associated with the AWSAdministratorAccess
role.VPC
Transit Gateway Attachments
in the left navigation panelWithin the table, you will see the list of your new pending acceptance
transit gateway attachments.
pending acceptance
Actions
button and select Accept
Accept
to confirm acceptance of the attachmentTransit Gateway Route Tables
Create Transit Gateway Route Table
Field | Recommendation |
---|---|
Name |
tgw-ssdev-rt |
Transit Gateway ID |
Select your transit gateway from the list |
Click Create Transit Gateway Route Table
Once the Transit Gateway Route Table is available
, click on the Associations
table at the bottom of the screen.
Create association
Field | Recommendation |
---|---|
Choose attachment to associate |
Choose the transit Gateway attachment id for the VPC attachment |
Click Create association
Once the Association is associated
, click on the Propagations
tab
Create propagation
Repeat for each association to be added
Field | Recommendation |
---|---|
Choose attachment to propogate |
Choose the transit Gateway attachment id for the VPC attachment |
Click Create propagation
Click on the Routes
tab and you should see that there is a route entry for your VPC CIDR.
In this step, you’ll update the route table for each of the private subnets in the dev-infra-shared
VPC to add an entry to route traffic destined to your on-premises network to the transit gateway.
Route Tables
Routes
tabEdit routes
Field | Recommendation |
---|---|
Destination |
Specify the CIDR range of your on-premises network |
Target |
Select your transit gateway. For example, infra-main |