This repository contains Shell Scripts Codes to automate the deployment of aws public private subnet architecture using AWS CLI
The infrastructure contains following key components:
-
VPC Configuration:
- Region: ap-southeast-2
- Dual Availability Zones (ap-southeast-2a, ap-southeast-2b)
- Public and Private Subnets
- NAT Gateways for private subnet connectivity
- Internet gateway for public access
-
Network Configuration:
- VPC CIDR: 10.0.0.0/16
- Public Subnet 2a: 10.0.1.0/24
- Private Subnet 2a: 10.0.2.0/24
- Public Subnet 2b: 10.0.3.0/24
- Private Subnet 2b: 10.0.4.0/24
- AWS Account with proper permissions
- Bash Installed
- AWS CLI configured with credentials
- Git to clone
global_variables.sh: Contains the global variablesglobal_functions.sh: Contains the global functionsstart_script.sh: Starts the script and contains all the other run able scripts.vpc.sh: Contains the script to create vpc and enables dns hostname and dns support.subnets.sh: Creates the subnets and enables auto-assign public ip address when instances are launchedigw.sh: Creates the internet gateway and attaches it to the vpcnat_gateways.sh: Creates the nate gateways on public subnetsroute_tables.sh: Creates the route tables, create routes and associates the subnets with route tablessecurity_group.sh: Creates security group and associates inbound ruleskey_pair.sh: Creates fresh keypair and stores it on your local machinelaunch_template.sh: Creates the launch template to create instances for auto scalingauto_scaling_group.sh: Creates an auto scaling grouptarget_group.sh: Creates a target group for lb load_balancer.shload_balancer.sh: Creates a load balanceruser_data.sh: Contains user data which gets executed when instances are launched
This project is based under The MIT License.
