{"id":25070863,"url":"https://github.com/farhanshoukat/web-app-terraform","last_synced_at":"2026-05-08T03:01:36.535Z","repository":{"id":108177340,"uuid":"482524539","full_name":"FarhanShoukat/web-app-terraform","owner":"FarhanShoukat","description":"A simple web application deployed with terraform on AWS using a custom VPC and Autoscaling Group","archived":false,"fork":false,"pushed_at":"2022-04-23T05:02:39.000Z","size":980,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T16:32:37.304Z","etag":null,"topics":["automation","aws","cloud","iac","infrastructure-as-code","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FarhanShoukat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-17T13:02:14.000Z","updated_at":"2022-04-23T09:23:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"f178211d-bea4-4c1f-af57-81dee6ca90f7","html_url":"https://github.com/FarhanShoukat/web-app-terraform","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/FarhanShoukat/web-app-terraform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FarhanShoukat%2Fweb-app-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FarhanShoukat%2Fweb-app-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FarhanShoukat%2Fweb-app-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FarhanShoukat%2Fweb-app-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FarhanShoukat","download_url":"https://codeload.github.com/FarhanShoukat/web-app-terraform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FarhanShoukat%2Fweb-app-terraform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32764770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","aws","cloud","iac","infrastructure-as-code","terraform"],"created_at":"2025-02-06T21:38:58.012Z","updated_at":"2026-05-08T03:01:36.529Z","avatar_url":"https://github.com/FarhanShoukat.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web App Terraform\n\nA simple web application deployed on AWS using Terraform. This project does not focus on creating a web application rather how to deploy it on AWS and autoscale it according to the traffic. For this purpose, EC2 instances are running in an Autoscaling Group. To expose the application to the world, an Application Load Balancer is attached to the Autoscaling group.\n\n## Architecture\n\n\u003cp align=\"middle\"\u003e\n  \u003cimg src=\"./Diagram.png\"/\u003e\n\u003c/p\u003e\n\nAs it can be seen the EC2 instances (Web servers) are deployed in a private subnets to make sure they are not accessible publicly. The application is also deployed in two different Availability Zones for high availability.\n\n## Prerequisites\n\nAWS Command Line Interface (AWS CLI) and Terraform need to be installed and configured in order to run this application\n\n* Follow [this](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) guide to install AWS CLI.\n* Follow [this](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html) guide to configure AWS CLI.\n* Follow [this](https://learn.hashicorp.com/tutorials/terraform/install-cli) guide to install Terraform.\n\n## How to run\n\n* Upload your zipped build archive to the S3 bucket. A sample hello world build archive is included [here](./project-archive.zip).\n* Initialize Terraform project. This will download the required provider files.\n\n```bash\nterraform init\n```\n\n* Deploy the application\n\n```bash\nterraform apply \n  -var environment=\u003cenvironment-name\u003e  # e.g. dev, staging, production\n  -var s3_bucket=\u003cs3-bucket-name\u003e\n  -var archive_path=\u003carchive-path-in-s3\u003e\n```\n\n**Note:** You can find more variables like changing the minimum and maximum number of EC2 instances in [variables.tf](./variables.tf).\n\n## Delete Provisioned Resources\n\nRun the following command to destroy all the provisioned resources\n\n```bash\nterraform destroy \n  -var environment=\u003cenvironment-name\u003e  # e.g. dev, staging, production\n  -var s3_bucket=\u003cs3-bucket-name\u003e\n  -var archive_path=\u003carchive-path-in-s3\u003e\n```\n\n**Tip:** Instead of specifying all the variables in the terminal, they can also be placed in `terraform.tfvars` file.\n\n## Contact\n\nYou can get in touch with me on LinkedIn: [Farhan Shoukat](https://www.linkedin.com/in/farhan-shoukat/)\n\n## License\n\n[MIT](./LICENSE) Copyright (c) 2022 Farhan Shoukat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarhanshoukat%2Fweb-app-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarhanshoukat%2Fweb-app-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarhanshoukat%2Fweb-app-terraform/lists"}