{"id":19653156,"url":"https://github.com/wurde/terraform-aws-web-app","last_synced_at":"2025-02-27T01:32:27.392Z","repository":{"id":106607636,"uuid":"280816219","full_name":"wurde/terraform-aws-web-app","owner":"wurde","description":"Terraform module for deploying a web application to AWS.","archived":false,"fork":false,"pushed_at":"2020-10-04T18:58:09.000Z","size":37,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-10T00:17:11.059Z","etag":null,"topics":["aws","terraform"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/wurde/web-app","language":"HCL","has_issues":false,"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/wurde.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":"2020-07-19T07:36:39.000Z","updated_at":"2025-01-06T00:16:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"9192a160-96f0-4c52-b668-46d6d654235a","html_url":"https://github.com/wurde/terraform-aws-web-app","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wurde%2Fterraform-aws-web-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wurde%2Fterraform-aws-web-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wurde%2Fterraform-aws-web-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wurde%2Fterraform-aws-web-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wurde","download_url":"https://codeload.github.com/wurde/terraform-aws-web-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240961511,"owners_count":19885342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws","terraform"],"created_at":"2024-11-11T15:13:25.433Z","updated_at":"2025-02-27T01:32:27.384Z","avatar_url":"https://github.com/wurde.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform a Web App on AWS\n\nThis Terraform module deploys a web application to AWS.\nIt uses S3, CloudFront, and Route53 services. The only\nrequirements are a domain and a distribution directory.\nIt hosts all static assets found in the directory on S3.\nThose assets get added to a CloudFront distribution.\nThen all traffic to the domain get routed to CloudFront.\n\n## Getting started\n\nStart by adding Terraform to the `.gitignore` file:\n\n    npx gitignore terraform\n\nNext define a Terraform configuration in `terraform.tf`:\n\n```terraform\nterraform {\n  required_version = \"~\u003e 0.13\"\n}\n```\n\nNext define the Terraform module in `web-app.tf`:\n\n```terraform\nmodule \"web-app\" {\n  source  = \"wurde/web-app/aws\"\n  version = \"1.3.0\"\n\n  dist_dir      = \"./dist\"\n  domain        = \"example.com\"\n  alias_domains = [\"www.example.com\"]\n}\n```\n\nNext initialize the Terraform working directory:\n\n    terraform init\n\nNext run the plan and apply commands.\n    \n    terraform plan    #=\u003e generates an execution plan.\n    terraform apply   #=\u003e builds infrastructure on AWS.\n\nFinally verify domain ownership between AWS and the domain\nname provider. Route53 generates custom DNS name servers\nto set within the domain name provider. Example name\nservers provided via Route53:\n\n    ns-111.awsdns-32.net. \n    ns-1211.awsdns-9.co.uk.\n    ns-153.awsdns-10.com.\n    ns-1138.awsdns-14.org.\n\n## Variables\n\nRequired:\n\n- **dist_dir**\n\n      type: string\n      description: The distribution directory to serve via static asset host\n\n- **domain**\n\n      type: string\n      description: The primary domain name.\n\nOptional:\n\n- **alias_domains**\n\n      type: list(string)\n      description: The other alias domain names (www.example.com).\n      default: []\n\n- **default_ttl**\n\n      type: number\n      description: The default TTL in seconds (default is 1 day).\n      default: 86400\n\n- **price_class**\n\n      type: string\n      description: Control CloudFront costs (default is PriceClass_All).\n      default: \"PriceClass_All\"\n\n- **country_blacklist**\n\n      type: list(string)\n      description: List of countries (ISO 3166-1-alpha-2 codes) to blacklist.\n      default: [\"IR\", \"KP\"]\n\n## Cost Estimates\n\n**$2 dollars a month.**\nPrimary charges are Route53 Hosted Zone and S3 storage.\n(If the website receives zero traffic then at most you'll be\ncharged $0.55 cents for Route53.)\n\n## Terraform 0.13\n\nThis module requires a Terraform version between `v0.13 and v1.0`.\n\nTerraform is a DevOps tool that enables Infrastructure as Code (IaC).\n[Learn more about it here](https://www.terraform.io).\n\n## License\n\nThis project is __FREE__ to use, reuse, remix, and resell.\nThis is made possible by the [MIT license](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwurde%2Fterraform-aws-web-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwurde%2Fterraform-aws-web-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwurde%2Fterraform-aws-web-app/lists"}