How ramyadav08/three_tier_archietecture_terraform_github_action works
Project type and purpose
• This is a three-tier web application with full Infrastructure-as-Code (IaC) using Terraform and an automated deployment pipeline via GitHub Actions.
• The three tiers are:
– Web tier: React single-page application (SPA) served by Nginx on EC2
– App tier: Node.js/Express transaction service on EC2
– Data tier: AWS RDS (e.g., MySQL) and S3 for storage
File structure
• Top-level CI/CD:
– .github/workflows/deploy.yaml → GitHub Action to plan/apply Terraform, build artifacts, deploy to EC2.
• Terraform-Code directory:
– main.tf, provider.tf, variables.tf, terraform.tfvars → root configuration
– modules/ → reusable modules for vpc, sg (Security Groups), ec2, iam, rds, s3
– userdata.sh → bootstraps EC2 instances (e.g., installs Docker, Nginx, Node.js)
• application-code directory:
– web-tier/ → React app (create-react-app structure: public/, src/, package.json)
– app-tier/ → Node.js service (index.js, TransactionService.js, DbConfig.js) plus nginx.conf
• app-server-commands & web-server-commands → likely remote scripts or directives for each EC2 server
Key insights from README
• Minimal description, but project name “three_tier_archietecture_terraform_github_action” confirms the three-tier IaC pattern + CI/CD integration.
Detailed capture of essential elements
• Security Groups guarding EC2 and RDS.
• IAM role associations (e.g., EC2 role → S3 access).
• Don’t omit the nginx.conf proxy between web and app.
• Terraform→Apply step in the CI/CD flow.