This project demonstrates a Two-Tier architecture on AWS using Terraform for Infrastructure as Code (IaC). It follows a modular and security-enhanced approach to create a scalable, secure, and maintainable infrastructure.
- Modular Architecture β Reusable Terraform modules for better management
- Infrastructure as Code (IaC) β Automate AWS resource provisioning
- Security Best Practices β IAM roles, policies, and WAF integration
- Scalability & High Availability β Auto Scaling, Load Balancing, and Route 53
- Database Integration β Managed Amazon RDS deployment
- SSL & CDN Optimization β Secure connections and content acceleration
π Read the full tutorial with screenshots:
Deploy Two-Tier Architecture on AWS using Terraform
- Terraform >= 1.0.0
- AWS CLI configured with appropriate permissions
- An AWS account with sufficient IAM permissions
git clone https://github.com/NotHarshhaa/DevOps-Projects
cd DevOps-Projects/DevOps-Project-11/variables.tfvars file:
- Change
RDS-PWDto a secure password - Update
DOMAIN-NAMEto your actual domain - Modify other values as needed for your environment
terraform init
terraform plan -var-file=variables.tfvars
terraform apply -var-file=variables.tfvars --auto-approveterraform destroy -var-file=variables.tfvars --auto-approvemain.tf- Main Terraform configuration with module callsvariables.tf- Variable declarationsvariables.tfvars- Variable values (update these before deployment)backend.tf- Terraform backend and provider configurationmodules/- Reusable Terraform modules
β
VPC & Subnets β Securely isolated environment for your application
β
IAM & Role-Based Access Control β Fine-grained security permissions
β
AWS WAF β Protect against common web threats
β
Auto Scaling Group β Dynamic scaling based on demand
β
Application Load Balancer (ALB) β Efficient traffic distribution
β
EC2 Instances β Reliable computing power
β
Amazon RDS β Managed database for scalability and reliability
β
S3 Buckets β Secure storage for application assets
β
Amazon Route 53 β Scalable domain name system (DNS)
β
Amazon CloudFront (CDN) β Faster content delivery worldwide
β
SSL/TLS Encryption β Secure communication with ACM
This project is crafted by Harshhaa π‘.
Iβd love to hear your feedback! Feel free to share your thoughts.
π§ Connect with me:
- GitHub: @NotHarshhaa
- Blog: ProDevOpsGuy
- Telegram Community: Join Here
- LinkedIn: Harshhaa Vardhan Reddy
If you found this helpful, consider starring β the repository and sharing it with your network! π

