Analysis updated 2026-05-18
Learn how to define a basic AWS web server deployment as Terraform code.
Provision an EC2 instance behind an Application Load Balancer automatically.
See a real debugging story about a common Terraform SSH connection mistake.
Use the security group setup as a template for restricting direct server access.
| momeek/web-deployment-with-terraform | anas727189/devsecops-pipeline | edwinjdevops/damolak-challenge | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | HCL | HCL | HCL |
| Setup difficulty | moderate | — | hard |
| Complexity | 3/5 | — | 3/5 |
| Audience | ops devops | ops devops | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires an AWS account and Terraform installed locally.
This is a Terraform project that sets up a minimal web server deployment on Amazon Web Services. Terraform is an infrastructure-as-code tool that lets you define cloud resources in configuration files and provision them automatically. The repository is written in HCL (HashiCorp Configuration Language), Terraform's native format. The deployment creates an Apache web server on an EC2 instance (AWS's virtual machine service), places it behind an Application Load Balancer (a service that distributes incoming traffic), and stores the Terraform state file in an S3 storage bucket. Traffic flows from the internet to the load balancer on port 80, then from the load balancer to the EC2 instance. Security groups restrict direct internet access: only the load balancer can reach the server on port 80, and port 22 is open for SSH provisioning. After the EC2 instance starts, Terraform connects via SSH to run a bootstrap script called myweb.sh that installs Apache, downloads the Infinite Loop HTML template from Tooplate, and starts the web server. The instance runs Amazon Linux 2 on a t3.micro machine in the us-east-1a region, using AWS's default VPC. A notable part of the README is a debugging account. The author spent time troubleshooting an SSH authentication error, checking key files, security group rules, AMI usernames, and public IP assignment, before discovering the fix was simply saving the editor file with Ctrl+S before running terraform apply. The connection block had been written but not saved, so Terraform was reading the old version. The README includes this story alongside a reference table of other legitimate SSH auth fixes for this setup.
A Terraform project that provisions a simple Apache web server on AWS behind a load balancer.
Mainly HCL. The stack also includes Terraform, HCL, AWS EC2.
The README does not state a license.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly ops devops.
This repo across BitVibe Labs
Verify against the repo before relying on details.