This project is my first Terraform project, please contribute if you see any issues or got new ideas.
- 4 EC2 instances (2 for web, 2 for app)
- 1 RDS instance
- 2 public/private ALB with access logs to S3 bucket
All of the above come with auto created VPC with 3 subnets for web, app, and database (3-tier architecture), secured and ready-to-use security groups.
- Create a secret file named
/.secret/staging_keys
or/.secret/production_keys
with AWS access key information:
[default]
aws_access_key_id=AKRAGAUMSDNTAWOWMKIQ
aws_secret_access_key=d6Uz8w9JD/+G2kgoxsZK6n21wdznE/XGYkUeB3E/
cd
to the environment folderstaging
orproduction
.- Customize project's variables in
_vars.tf
file. - Run
terraform init
thenterraform apply
to deploy. - Profit.
- Autoscaling group
- ElastiCache instances
- CloudFront CDN
- Master/slave databases