Create an empty Githib Repo and within the Repo, create a directory named CF-Templates Clone this repo into your local directory Inside your CF template folder Create a CF stack (Infra.yaml) that will create the following resources and deploy it from console:
- VPC
- Private subnet
- Public subnet
- Route tables (public, private)
- Internet Gateway
- Security Groups
- Ingress rules for the SG groups
Once you can Deploy successfully, modify the same stack to deploy in a substack fashion. (Nested Stack). You will have a main stack that deploys substacks for each of the resources.