In this recipe, we will outline how to deploy subnets within our AWS VPCs using Ansible. Subnets are a fundamental networking construct within AWS in order to provide more resiliency for applications deployed on the AWS cloud. This extra resiliency is achieved by the fact that subnets can be mapped to different availability zones. Using this logic, we can provide high availability for our deployment by spreading our resources into different availability zones.
The Ansible control machine must have internet reachability and the VPCs must already be provisioned as per the previous recipe.