{"id":23520125,"url":"https://github.com/ventx/terraform-aws-cloudfront-s3-static-site","last_synced_at":"2026-02-14T04:03:02.828Z","repository":{"id":94189103,"uuid":"172077304","full_name":"ventx/terraform-aws-cloudfront-s3-static-site","owner":"ventx","description":"terraform-aws-cloudfront-s3-static-site","archived":false,"fork":false,"pushed_at":"2019-03-01T16:05:31.000Z","size":14,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-04T07:32:28.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ventx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-02-22T14:10:49.000Z","updated_at":"2019-04-23T21:46:31.000Z","dependencies_parsed_at":"2023-03-04T21:45:28.003Z","dependency_job_id":null,"html_url":"https://github.com/ventx/terraform-aws-cloudfront-s3-static-site","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ventx/terraform-aws-cloudfront-s3-static-site","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventx%2Fterraform-aws-cloudfront-s3-static-site","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventx%2Fterraform-aws-cloudfront-s3-static-site/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventx%2Fterraform-aws-cloudfront-s3-static-site/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventx%2Fterraform-aws-cloudfront-s3-static-site/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ventx","download_url":"https://codeload.github.com/ventx/terraform-aws-cloudfront-s3-static-site/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventx%2Fterraform-aws-cloudfront-s3-static-site/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29435413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T03:34:37.767Z","status":"ssl_error","status_checked_at":"2026-02-14T03:34:09.092Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-12-25T16:12:06.271Z","updated_at":"2026-02-14T04:03:02.802Z","avatar_url":"https://github.com/ventx.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform-aws-cloudfront-s3-static-site\n\n## Purpose\n\nCreate a static website with S3 bucket as origin and deliver it with a Cloudfront distribution.\n\n### Sidenotes\n- The s3 bucket will be created 'private' and no static website hosting will be enabled.\n- The certificate and the validation will be made in 'us-east-1' because no other region is currently possible.\n- All the arguments with default values are optional\n\nAfter creating the resource, you have to place your content in your bucket ... that's it.\n\n\n\n## Argument Reference\n\n- `site_name` \n    \u003eDomain name for the new website. \n    \u003eThis is also used to create the name of the bucket and the caller id (current Account ID).\n\n- `create_hosted_zone` \n    \u003eOptional: If set to 'true' the named root domain will be created. Defaults to 'false'\n    \n- `root_domain_name` \n    \u003eRoot domain name for the site\n\n- `index_document` \n    \u003eOptional: Name of the index file. Defaults to *index.html*\n\n- `error_document` \n    \u003eOptional: Name of the error file. Defaults to *404.html*\n    \n- `is_ipv6_enabled`\n    \u003eOptional: State of IPv6 for Cloudfront. Defaults to 'true'\n    \n- `cdn_min-ttl`\n    \u003eOptional: Min TTL for Cloudfront distribution. Defaults to '0'\n    \n- `cdn_default_ttl`\n    \u003eOptional: Default TTL for Cloudfront distribution. Defaults to '1000'   \n\n- `cdn_max_ttl`\n    \u003eOptional: Max TTL for Cloudfront distribution. Defaults to '86400'\n\n## Attribute Reference\n\n- `bucket_arn` \n    \u003eARN of the used s3 bucket\n\n- `bucket_region` \n    \u003eAWS Region for the S3 Bucket\n\n- `bucket_name` \n    \u003eName of the S3 Bucket\n\n- `site_cdn_arn` \n    \u003eARN of the cloudfront distribution\n\n- `site_cdn_domain` \n    \u003eDomain name of the Cloudfront distribution\n\n- `site_cdn_origin` \n    \u003eThe Cloudfront distribution origin\n\n- `site_certificate_arn` \n    \u003eARN of Certificate for the website\n\n- `site_url` \n    \u003eURL of the static website\n\n\n## Example Usage\n\n```\n// Create your static site with given arguments\nmodule \"static_site\" {\n  source = \"github.com/ventx/terraform-aws-cloudfront-s3-static-site.git\"\n  site_name = \"staticsite.testdomain.com\"\n  root_domain_name = \"testdomain.com\"\n}\n\n\n// Upload your index.html and 404.html to your S3 Bucket\nresource \"aws_s3_bucket_object\" \"index_file\" {\n  bucket = \"${module.static_site.bucket_name}\"\n  key = \"index.html\"\n  source = \"/path/to/index.html\"\n  content_type = \"text/html\"\n}\n\nresource \"aws_s3_bucket_object\" \"error_file\" {\n  bucket = \"${module.static_site.bucket_name}\"\n  key = \"404.html\"\n  source = \"/path/to/404.html\"\n  content_type = \"text/html\"\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventx%2Fterraform-aws-cloudfront-s3-static-site","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fventx%2Fterraform-aws-cloudfront-s3-static-site","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventx%2Fterraform-aws-cloudfront-s3-static-site/lists"}