{"id":29019608,"url":"https://github.com/senora-dev/terraform-aws-cloudfront","last_synced_at":"2026-02-04T17:02:37.059Z","repository":{"id":301182482,"uuid":"1000653397","full_name":"Senora-dev/terraform-aws-cloudfront","owner":"Senora-dev","description":"This Terraform module creates an AWS CloudFront distribution with highly customizable configuration options. The module is designed to be flexible and reusable across different use cases and organizations.","archived":false,"fork":false,"pushed_at":"2025-06-25T14:45:43.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T15:39:18.592Z","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/Senora-dev.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,"zenodo":null}},"created_at":"2025-06-12T05:54:12.000Z","updated_at":"2025-06-25T14:40:10.000Z","dependencies_parsed_at":"2025-06-25T15:39:20.492Z","dependency_job_id":"c1360bff-d540-440c-91ff-f1f9a8182fef","html_url":"https://github.com/Senora-dev/terraform-aws-cloudfront","commit_stats":null,"previous_names":["senora-dev/terraform-aws-cloudfront"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Senora-dev/terraform-aws-cloudfront","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Senora-dev%2Fterraform-aws-cloudfront","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Senora-dev%2Fterraform-aws-cloudfront/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Senora-dev%2Fterraform-aws-cloudfront/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Senora-dev%2Fterraform-aws-cloudfront/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Senora-dev","download_url":"https://codeload.github.com/Senora-dev/terraform-aws-cloudfront/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Senora-dev%2Fterraform-aws-cloudfront/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29091317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"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":"2025-06-26T00:31:19.691Z","updated_at":"2026-02-04T17:02:37.030Z","avatar_url":"https://github.com/Senora-dev.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS CloudFront Terraform Module\n\nThis Terraform module creates an AWS CloudFront distribution with highly customizable configuration options. The module is designed to be flexible and reusable across different use cases and organizations.\n\n## Features\n\n- Supports both S3 and custom origins\n- Configurable cache behaviors with support for ordered cache behaviors\n- Flexible SSL/TLS certificate configuration\n- Geographic restrictions support\n- Custom error responses\n- Web Application Firewall (WAF) integration\n- IPv6 support\n- Comprehensive tagging support\n\n## Usage\n\n### Basic Example with S3 Origin\n\n```hcl\nmodule \"cloudfront\" {\n  source = \"Senora-dev/cloudfront/aws\"\n\n  enabled             = true\n  is_ipv6_enabled    = true\n  distribution_comment = \"My CloudFront Distribution\"\n  price_class        = \"PriceClass_100\"\n  \n  origins = [{\n    domain_name = \"my-bucket.s3.amazonaws.com\"\n    origin_id   = \"my-s3-origin\"\n    s3_origin_config = {\n      origin_access_identity = \"origin-access-identity/cloudfront/XXXXX\"\n    }\n  }]\n\n  default_cache_behavior = {\n    target_origin_id    = \"my-s3-origin\"\n    allowed_methods     = [\"GET\", \"HEAD\"]\n    cached_methods      = [\"GET\", \"HEAD\"]\n    viewer_protocol_policy = \"redirect-to-https\"\n    forwarded_values = {\n      query_string = false\n      cookies = {\n        forward = \"none\"\n      }\n    }\n  }\n\n  tags = {\n    Environment = \"production\"\n    Project     = \"my-project\"\n  }\n}\n```\n\n### Example with Custom Origin and Multiple Cache Behaviors\n\n```hcl\nmodule \"cloudfront\" {\n  source = \"path/to/module\"\n\n  enabled             = true\n  is_ipv6_enabled    = true\n  distribution_comment = \"My Custom Origin Distribution\"\n  \n  origins = [{\n    domain_name = \"api.example.com\"\n    origin_id   = \"my-custom-origin\"\n    custom_origin_config = {\n      http_port              = 80\n      https_port             = 443\n      origin_protocol_policy = \"https-only\"\n      origin_ssl_protocols   = [\"TLSv1.2\"]\n    }\n  }]\n\n  default_cache_behavior = {\n    target_origin_id       = \"my-custom-origin\"\n    allowed_methods        = [\"DELETE\", \"GET\", \"HEAD\", \"OPTIONS\", \"PATCH\", \"POST\", \"PUT\"]\n    cached_methods         = [\"GET\", \"HEAD\"]\n    viewer_protocol_policy = \"redirect-to-https\"\n    forwarded_values = {\n      query_string = true\n      headers      = [\"Authorization\"]\n      cookies = {\n        forward = \"all\"\n      }\n    }\n  }\n\n  ordered_cache_behaviors = [\n    {\n      path_pattern           = \"/api/*\"\n      target_origin_id       = \"my-custom-origin\"\n      allowed_methods        = [\"GET\", \"HEAD\", \"OPTIONS\"]\n      cached_methods         = [\"GET\", \"HEAD\"]\n      viewer_protocol_policy = \"https-only\"\n      forwarded_values = {\n        query_string = true\n        headers      = [\"Origin\"]\n        cookies = {\n          forward = \"none\"\n        }\n      }\n    }\n  ]\n\n  viewer_certificate = {\n    acm_certificate_arn      = \"arn:aws:acm:us-east-1:XXXXXXXXXXXX:certificate/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\"\n    ssl_support_method       = \"sni-only\"\n    minimum_protocol_version = \"TLSv1.2_2021\"\n  }\n}\n```\n\n## Requirements\n\n- AWS Provider \u003e= 4.0\n- Terraform \u003e= 1.0\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| aws | \u003e= 4.0 |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| enabled | Whether the distribution is enabled | `bool` | `true` | no |\n| is_ipv6_enabled | Whether IPv6 is enabled for the distribution | `bool` | `true` | no |\n| distribution_comment | Comment for the distribution | `string` | `null` | no |\n| price_class | Price class for the distribution | `string` | `\"PriceClass_100\"` | no |\n| aliases | Extra CNAMEs for the distribution | `list(string)` | `[]` | no |\n| default_root_object | Default root object | `string` | `null` | no |\n| origins | List of origins for the distribution | `list(object)` | n/a | yes |\n| default_cache_behavior | Default cache behavior configuration | `object` | n/a | yes |\n| ordered_cache_behaviors | List of ordered cache behaviors | `list(object)` | `[]` | no |\n| geo_restrictions | Geographic restriction configuration | `object` | `null` | no |\n| viewer_certificate | SSL/TLS certificate configuration | `object` | See variables.tf | no |\n| custom_error_responses | Custom error response configuration | `list(object)` | `[]` | no |\n| tags | Resource tags | `map(string)` | `{}` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| distribution_id | The identifier for the distribution |\n| distribution_arn | The ARN for the distribution |\n| distribution_domain_name | The domain name of the distribution |\n| distribution_hosted_zone_id | The CloudFront Route 53 zone ID |\n| distribution_status | The current status of the distribution |\n| distribution_last_modified_time | The date and time the distribution was last modified |\n| distribution_in_progress_validation_batches | The number of invalidation batches currently in progress |\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT Licensed. See LICENSE for full details.\n\n## Maintainers\n\nThis module is maintained by [Senora.dev](https://senora.dev). ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenora-dev%2Fterraform-aws-cloudfront","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsenora-dev%2Fterraform-aws-cloudfront","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenora-dev%2Fterraform-aws-cloudfront/lists"}