{"id":16314458,"url":"https://github.com/ntno/tf-module-static-site","last_synced_at":"2026-03-18T18:56:10.713Z","repository":{"id":133095822,"uuid":"531268618","full_name":"ntno/tf-module-static-site","owner":"ntno","description":"creates AWS infrastructure for HTTPS static website","archived":false,"fork":false,"pushed_at":"2025-03-16T23:33:27.000Z","size":28,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-27T07:11:44.226Z","etag":null,"topics":[],"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/ntno.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,"zenodo":null}},"created_at":"2022-08-31T21:43:11.000Z","updated_at":"2025-04-06T06:59:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8068d92-6d8f-4b9f-b468-b614294c89f5","html_url":"https://github.com/ntno/tf-module-static-site","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntno%2Ftf-module-static-site","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntno%2Ftf-module-static-site/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntno%2Ftf-module-static-site/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntno%2Ftf-module-static-site/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntno","download_url":"https://codeload.github.com/ntno/tf-module-static-site/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251106587,"owners_count":21537185,"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":[],"created_at":"2024-10-10T21:54:00.591Z","updated_at":"2026-01-24T03:32:01.731Z","avatar_url":"https://github.com/ntno.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tf-module-static-site\ncreates AWS infrastructure for HTTPS static website.  compatible with [ntno/tf-module-static-site-cicd](https://github.com/ntno/tf-module-static-site-cicd).\n\nfor variable `domain_name` = \"site.com\" this module will create:  \n- S3 bucket site.com (with static website config)\n- S3 bucket www.site.com (with redirect to site.com static website config)\n- cloudfront distribution for the site.com s3 bucket\n- cloudfront distribution for the www.site.com s3 bucket\n- route53 alias records pointing to the cloudfront distributions\n\n## prerequisites\n- register custom domain name for site  (site.com)\n- request ACM certificate for site  (site.com)\n- request ACM certificate for www subdomain  (*.site.com)\n- verify ACM certificates by adding CNAME record to custom domain hosted zone (use console wizard for this)\n\n## example usage:\n\n\n```\n# update x.x.x to desired version\nmodule \"docs_site\" {\n  source = \"git::https://github.com/ntno/tf-module-static-site?ref=x.x.x\"\n  index_document                = \"index.html\"\n  error_document                = \"404.html\"\n  versioning_state              = \"Enabled\"\n  domain_name                   = var.domain_name\n  domain_acm_certificate_arn    = local.domain_to_cert_arn[var.domain_name]\n  subdomain_acm_certificate_arn = local.domain_to_subdomain_cert_arn[var.domain_name]\n  tags                = local.global_tags\n  advanced_config = {\n    routing_rules = [\n      {\n        condition = {\n          key_prefix_equals = \"docs/img/\"\n        },\n        redirect = {\n          replace_key_prefix_with = \"img/\"\n        }\n      }\n    ]\n  }\n}\n\n```\n\n### see also\n- [ntno/tf-module-static-site-cicd](https://github.com/ntno/tf-module-static-site-cicd)\n\n### references\n- https://github.com/terraform-aws-modules/terraform-aws-s3-bucket/  \n- https://docs.aws.amazon.com/AmazonS3/latest/userguide/website-hosting-custom-domain-walkthrough.html  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntno%2Ftf-module-static-site","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntno%2Ftf-module-static-site","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntno%2Ftf-module-static-site/lists"}