Create a terraform template for AWS VPC. We will use this VPC later for running our workloads
A template should contain the following resources:
- VPC
- At least two public subnets
- At least two private subnets
- Internet gateway
- At least two NAT gateways
- Public route table
- Private route table
You should be able to launch a virtual machine in a private subnet, establish an SSH connection to it, and download updates from the internet.
Amazon Virtual Private Cloud (VPC) gives you complete control over your virtual networking environment including resource placement, connectivity, and security.
The first step is to create your VPC. Then you can add resources to it, such as Amazon Elastic Compute Cloud (EC2) and Amazon Relational Database Service (RDS) instances. Finally, you can define how your VPCs communicate with each other, across accounts, Availability Zones (AZs), or Regions.
In this case network traffic is being shared between two VPCs within each region.