This repository implements a proof-of-concept AWS Landing Zone using Terraform, designed to work within AWS Free Tier limits. The solution automates the provisioning of core infrastructure with GitHub Actions CI/CD pipelines.
- Core Networking: VPC, subnets, route tables, and internet gateway
- Compute Resources: EC2 instances with security groups
- Centralized Logging: VPC Flow Logs to S3 and CloudWatch
- Environment Isolation: Separate pre-prod and prod environments
- Automated Deployment: CI/CD pipeline via GitHub Actions
test_aws_land_zone/
├── README.md
├── diagrams
│ ├── architecture.py
│ ├── aws_landing_zone_architecture.png
│ ├── workflow.mermaid
│ └── workflow.png
├── environments
│ ├── outputs.tf
│ ├── pre-prod
│ │ ├── backend.tf
│ │ ├── main.tf
│ │ ├── outputs.tf
│ │ ├── terraform.tfvars
│ │ └── variables.tf
│ ├── prod
│ │ ├── backend.conf
│ │ ├── main.tf
│ │ ├── outputs.tf
│ │ ├── terraform.tfvars
│ │ └── variables.tf
│ ├── providers.tf
│ └── variables.tf
├── modules
│ ├── compute
│ │ ├── main.tf
│ │ ├── outputs.tf
│ │ └── variables.tf
│ ├── logging
│ │ ├── main.tf
│ │ ├── outputs.tf
│ │ └── variables.tf
│ └── networking
│ ├── main.tf
│ ├── outputs.tf
│ └── variables.tf
└── remote_state_S3.sh
9 directories, 28 files
The GitHub Actions pipeline:
- Triggers on pushes to
pre-prodorprodbranches - Runs
terraform init,validate, andplan - Applies changes automatically after approval
- Maintains separate state files for each environment
- AWS account with Free Tier eligibility
- Terraform installed (v1.0+)
- GitHub repository access
- Clone the repository:
git clone https://github.com/98-Anas/test_aws_land_zone.git
cd test_aws_land_zone- Deploy to pre-production:
cd envs/pre-prod
terraform init
terraform plan
terraform apply- Deploy to production:
cd ../prod
terraform init
terraform plan
terraform apply- Push to
pre-prodbranch deploys to pre-production environment - Merge to
prodbranch deploys to production environment
# Initialize Terraform
terraform init
# Validate configuration
terraform validate
# Show execution plan
terraform plan
# Apply changes
terraform apply
# Destroy infrastructure
terraform destroyAll resources follow the pattern: poc-<env>-<resource>
- Example VPC:
poc-pre-prod-vpc - Example EC2 instance:
poc-prod-instance1 - Example log group:
poc-prod-logs
- Implement more granular IAM policies
- Add monitoring and alerting
- Expand logging capabilities
- Implement cost monitoring
- Add security scanning in CI/CD pipeline
MIT License - see LICENSE file for details.

