This repository contains Terraform configurations to deploy and manage AWS infrastructure using Infrastructure as Code (IaC).
✅ Deploys multiple Amazon EC2 instances with customizable configurations.
✅ Configures Elastic IPs (EIP) for static public IP assignments.
✅ Manages IAM roles and permissions for secure access.
✅ Creates S3 buckets with security policies.
✅ Provisions VPC, Subnets, and Route Tables for network configuration.
✅ Automates GitHub repository setup using Terraform.
Before you begin, ensure you have:
- Terraform installed → Install Terraform
- AWS CLI configured → AWS CLI Setup
- An AWS IAM User with required permissions (EC2, S3, IAM, GitHub).
- A GitHub Personal Access Token for managing repositories.
git clone https://github.com/sempedia/TERRAFORM_AWS_AUTOMATION.git
cd TERRAFORM_AWS_AUTOMATION
terraform init
terraform plan
terraform apply
Type yes
when prompted.
terraform destroy
You can customize your infrastructure by editing terraform.tfvars or passing variables dynamically:
export TF_VAR_variable_name="value"
Key Configurable Variables EC2 Instance Type AWS Region Security Group Rules S3 Bucket Policies VPC Subnets and Routes GitHub Repository Name & Settings
TERRAFORM_AWS_AUTOMATION
.
├── C4_Diagram.puml
├── environments
│ └── qa
│ └── qa.auto.tfvars
├── main.tf
├── modules
│ ├── ec2
│ │ ├── data_sources.tf
│ │ ├── ec2.tf
│ │ ├── locals.tf
│ │ ├── outputs.tf
│ │ └── variables.tf
│ ├── eip
│ │ ├── eip_association.tf
│ │ ├── eip.tf
│ │ ├── outputs.tf
│ │ └── variables.tf
│ ├── github
│ │ ├── github.tf
│ │ ├── providers.tf
│ │ └── variables.tf
│ ├── iam
│ │ └── iam.tf
│ ├── s3
│ │ ├── locals.tf
│ │ ├── outputs.tf
│ │ ├── random_id.tf
│ │ ├── s3_security.tf
│ │ └── s3.tf
│ └── vpc
│ ├── data_sources.tf
│ ├── internet_gateway.tf
│ ├── outputs.tf
│ ├── public_subnet.tf
│ ├── route_table.tf
│ ├── route.tf
│ ├── rt_association.tf
│ ├── vpc_security.tf
│ └── vpc.tf
├── outputs.tf
├── plans
│ └── instance_type_and_count.plan
├── plantuml.jar
├── providers.tf
├── README.md
├── scripts
│ ├── user_data
│ └── variables.tf
├── system_design
│ └── C4_Diagram.png
├── terraform.tfvars
└── variables.tf
13 directories, 40 files
- Terraform does not detect manual changes made in AWS Console unless refreshed.
- Ensure
.gitignore
prevents sensitive files (e.g., credentials) from being committed.
This project is open-source under the MIT License.
Created by @sempedia 🚀