How nandha172/static-site-infra-aquatrivy-githubactions works
Project Type and Purpose
• This is an Infrastructure-as-Code project that uses Terraform to provision and deploy a static website (index.html, style.css, app.js) to AWS S3 behind a CloudFront CDN.
• The GitHub repo holds Terraform modules (modules/s3-cloudfront) and environment-specific configs (envs/dev), plus a GitHub Actions workflow to automate deployments.
File Structure
• Top level:
• .github/workflows/static-site-githubactions.yml → CI/CD pipeline
• app.js, index.html, style.css → front-end assets
• modules/s3-cloudfront/ → reusable Terraform module defining S3 + CloudFront
• envs/dev/ → environment-specific Terraform code (backend.tf, main.tf, provider.tf, outputs.tf, variables.tf, tfplan)
• Patterns:
• “modules” folder → Terraform module pattern
• “envs/dev” → separate IaC workspace/environment
• CI/CD integration via GitHub Actions
Extract Additional Insights from the README
• The README title (“My-Second-Terraform_project”) confirms the repo’s focus on Terraform.
Main Components & Relationships
a. Components
1. GitHub Repository
2. GitHub Actions CI/CD
3. Terraform (envs/dev workspace)
4. Terraform Module (s3-cloudfront)
5. AWS Account
– S3 Bucket (static site hosting)
– CloudFront Distribution (CDN)
6. Internet / End Users
b. Interactions
• Developer → pushes code → GitHub repo
• GitHub Actions → triggers on push → invokes Terraform init/plan/apply (using envs/dev)
• Terraform → calls modules/s3-cloudfront → provisions S3 bucket & CloudFront
• CI/CD → uploads index.html, style.css, app.js to S3
• End user → DNS → CloudFront → fetches from S3
c. Architectural Patterns
• Infrastructure as Code (Terraform modules + environments)
• Modular design: reusable module for S3 + CloudFront
• CI/CD pipeline for automated provisioning & deployment
d. Key Technologies
• Terraform (HCL)
• AWS: S3, CloudFront
• GitHub Actions for CI/CD