Personal Projects and experiments, including building tools, web apps, and career focused projects.
Terraform project that provisions a complete AWS networking foundation and a Linux development EC2 instance from scratch. Fully repeatable — run terraform apply and get a ready-to-use dev node in minutes.
AWS (us-west-2)
└── VPC: 10.123.0.0/16
└── Public Subnet: 10.123.1.0/24 (us-west-2a)
├── Internet Gateway
├── Route Table (0.0.0.0/0 → IGW)
└── EC2: t2.micro — Ubuntu 22.04 LTS
└── Security Group: dev_sg
| Resource | Name | Details |
|---|---|---|
aws_vpc |
dev |
CIDR 10.123.0.0/16, DNS enabled |
aws_subnet |
dev-public |
10.123.1.0/24, public IP on launch |
aws_internet_gateway |
— | Attached to VPC |
aws_route_table |
dev_public_rt |
Default route to IGW |
aws_route_table_association |
— | Links subnet to route table |
aws_security_group |
dev_sg |
All inbound/outbound traffic |
aws_instance |
dev-node |
t2.micro, Ubuntu 22.04, 10GB gp2 |
- Terraform >= 1.7
- AWS CLI configured (
aws configure) - An existing EC2 key pair in
us-west-2(default:mtckey)
# 1. Clone the repo
git clone https://github.com/Abeharding/terraform-aws-dev-env.git
cd terraform-aws-dev-env
# 2. Initialize Terraform
terraform init
# 3. Preview the plan
terraform plan
# 4. Apply
terraform apply
# 5. SSH into the dev node (once apply completes)
ssh -i ~/.ssh/mtckey.pem ubuntu@<public_ip>
# 6. Tear down when done
terraform destroy| Variable | Default | Description |
|---|---|---|
aws_region |
us-west-2 |
AWS region to deploy into |
key_name |
mtckey |
EC2 key pair name for SSH access |
instance_type |
t2.micro |
EC2 instance type |
To override, create a terraform.tfvars file:
aws_region = "us-east-1"
key_name = "my-key"
instance_type = "t3.small"The project dynamically fetches the latest Ubuntu 22.04 LTS (Jammy) AMI using a data source — no hard-coded AMI IDs. The image is always current for the target region.
- The security group currently allows all inbound and outbound traffic (
0.0.0.0/0). This is intentional for a dev environment — lock it down before using in production. - The instance uses a
t2.microwhich falls under the AWS Free Tier (750 hrs/month for eligible accounts). - State is stored locally by default. For team use, configure an S3 remote backend.
Abraham Harding — LinkedIn | AWS Certified Cloud Practitioner