Deploying VPCs using Ansible
AWS VPCs form the foundational network structure within AWS, essentially acting as virtual data centers within each AWS account. Before any other infrastructure-related services can be established, a VPC must first be in place. We’ll outline how to define the necessary VPC configurations and automate their deployment using Ansible.
Note
Most of the steps in this chapter have to be done incrementally. For example, you can’t create a subnet without a VPC. We recommend you follow the proposed order.
AWS divides its global infrastructure into Regions, each serving as an isolated fault domain with distinct orchestration and management systems. When creating a VPC, specifying the deployment Region is essential. In our example, we assign the us-east-1 Region for VPCs in the US and the eu-west-1 Region for VPCs in the EU. These values are specified in Ansible under the aws_region variable within the eu.yml and us.yml files...