The above image is an overview of the infrastructure. I'll split into three main parts:
- Networking
- RDB
- Server App
This is the place for configuring:
- VPC.
- Public / Private subnets.
- Internet / NAT gateway.
This is for the database, I'll use the aurora-postgresql of AWS for the database on the cloud environment.
This part includes:
- Load balancer
- EKS
- ECR
Before continuing make sure that your PC has installed the terraform CLI.
The project has two main folders:
- modules: the base config of the resources.
- environments: for customizing resources base on the environments (staging, production).
For example for staging environment.
- Go to inside the staging folder
cd ./environments/staging/- Init the app:
terraform init- Plan the changes:
terraform plan- Apply the changes:
terraform apply


