This project provisions a multi-environment AWS infrastructure using Terraform modules.
It supports dev, staging (stag), and production (prod) environments with environment-specific configurations such as instance type, instance count, and storage size.
The infrastructure follows Terraform and DevOps best practices:
- Modular architecture
- Reusable infrastructure code
- Environment-based configuration
- Clean and scalable design
The following diagram represents the infrastructure created using Terraform:
| Environment | Instance Type | Purpose |
|---|---|---|
| dev | t2.micro | Development |
| stag | t3.medium | Staging / Pre-production |
| prod | t3.micro | Production |
Each environment provisions the following AWS resources:
- EC2 Instances
- Security Groups (SSH and HTTP access)
- Key Pair
- Default VPC
- Root EBS Volume
- S3 Bucket
- DynamoDB Table
- Environment-based resource tagging
- Clone the Repository:
git clone https://github.com/rahulp0817/terraform-aws-multi-env-infra.git
- Initialize Terraform:
terraform init
- Plan Terraform:
terraform plan
- Apply the Configuration:
terraform apply
- Check the State List:
terraform state list
- Destroy the Infrastructure (when needed):
terraform destroy
- Terraform installed (version 0.12 or higher)
- AWS CLI configured with appropriate credentials
- An existing SSH key pair in AWS for EC2 access
- Name: Rahul Pradhan
