{"id":49339706,"url":"https://github.com/citadel-cloud-management/terraform-aws-cloudfront-cdn","last_synced_at":"2026-04-27T03:04:11.327Z","repository":{"id":344652995,"uuid":"1175440456","full_name":"Citadel-Cloud-Management/terraform-aws-cloudfront-cdn","owner":"Citadel-Cloud-Management","description":"Terraform module for AWS CloudFront CDN with origins, cache behaviors, Lambda@Edge, and WAF integration","archived":false,"fork":false,"pushed_at":"2026-04-11T22:19:57.000Z","size":21,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-17T19:10:18.839Z","etag":null,"topics":["aws","cdn","cloudfront","devops","edge","infrastructure-as-code","production-ready","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://citadel-cloud-management.github.io/terraform-aws-cloudfront-cdn/","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Citadel-Cloud-Management.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-07T18:03:00.000Z","updated_at":"2026-04-11T22:39:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Citadel-Cloud-Management/terraform-aws-cloudfront-cdn","commit_stats":null,"previous_names":["kogunlowo123/terraform-aws-cloudfront-cdn"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Citadel-Cloud-Management/terraform-aws-cloudfront-cdn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Citadel-Cloud-Management%2Fterraform-aws-cloudfront-cdn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Citadel-Cloud-Management%2Fterraform-aws-cloudfront-cdn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Citadel-Cloud-Management%2Fterraform-aws-cloudfront-cdn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Citadel-Cloud-Management%2Fterraform-aws-cloudfront-cdn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Citadel-Cloud-Management","download_url":"https://codeload.github.com/Citadel-Cloud-Management/terraform-aws-cloudfront-cdn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Citadel-Cloud-Management%2Fterraform-aws-cloudfront-cdn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32320686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aws","cdn","cloudfront","devops","edge","infrastructure-as-code","production-ready","terraform","terraform-module"],"created_at":"2026-04-27T03:04:04.838Z","updated_at":"2026-04-27T03:04:11.321Z","avatar_url":"https://github.com/Citadel-Cloud-Management.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Terraform](https://img.shields.io/badge/Terraform-%3E%3D1.5-blueviolet?logo=terraform)\n![AWS](https://img.shields.io/badge/AWS-FF9900?logo=amazonaws\u0026logoColor=white)\n![License](https://img.shields.io/badge/License-MIT-green)\n![CI](https://img.shields.io/github/actions/workflow/status/kogunlowo123/terraform-aws-cloudfront-cdn/terraform-ci.yml?label=CI)\n![GitHub release](https://img.shields.io/github/v/release/kogunlowo123/terraform-aws-cloudfront-cdn)\n\n# terraform-aws-cloudfront-cdn\n\nA production-ready Terraform module for deploying Amazon CloudFront CDN distributions with S3 and ALB origins, Origin Access Control, custom error responses, WAF integration, and Lambda@Edge support.\n\n## Architecture\n\n```mermaid\ngraph TB\n    Users[\"End Users\"] --\u003e CF[\"CloudFront Distribution\"]\n    CF --\u003e OAC[\"Origin Access Control\"]\n    CF --\u003e CFunc[\"CloudFront Function\u003cbr/\u003eViewer Request\"]\n    CF --\u003e LEdge[\"Lambda@Edge\"]\n    OAC --\u003e S3[\"S3 Bucket Origin\"]\n    CF --\u003e ALB[\"ALB Origin\"]\n    CF --\u003e WAF[\"AWS WAF Web ACL\"]\n    CF --\u003e CachePolicy[\"Cache Policy\"]\n    CF --\u003e RHP[\"Response Headers Policy\"]\n    CF --\u003e CustomErr[\"Custom Error Responses\"]\n    CF --\u003e R53[\"Route 53 DNS\"]\n    CF --\u003e Logs[\"S3 Access Logs\"]\n\n    style Users fill:#4A90D9,stroke:#2C5F8A,color:#FFFFFF\n    style CF fill:#E8742A,stroke:#C45D1E,color:#FFFFFF\n    style OAC fill:#7B68EE,stroke:#5B48CE,color:#FFFFFF\n    style CFunc fill:#FF6B6B,stroke:#CC5555,color:#FFFFFF\n    style LEdge fill:#FF6B6B,stroke:#CC5555,color:#FFFFFF\n    style S3 fill:#3ECF8E,stroke:#2BA86A,color:#FFFFFF\n    style ALB fill:#E8742A,stroke:#C45D1E,color:#FFFFFF\n    style WAF fill:#DD4444,stroke:#BB2222,color:#FFFFFF\n    style CachePolicy fill:#F5A623,stroke:#D4891A,color:#FFFFFF\n    style RHP fill:#F5A623,stroke:#D4891A,color:#FFFFFF\n    style CustomErr fill:#9B59B6,stroke:#7D3C98,color:#FFFFFF\n    style R53 fill:#4A90D9,stroke:#2C5F8A,color:#FFFFFF\n    style Logs fill:#3ECF8E,stroke:#2BA86A,color:#FFFFFF\n```\n\n## Features\n\n- CloudFront distribution with multi-origin support (S3 and ALB)\n- Origin Access Control (OAC) for secure S3 bucket access\n- Custom cache policy with configurable TTL and compression\n- Response headers policy with security headers and CORS\n- CloudFront Functions for lightweight viewer request handling\n- Lambda@Edge function associations for advanced edge logic\n- Custom error response configurations (SPA support)\n- AWS WAF Web ACL integration for DDoS and bot protection\n- Route 53 alias records for custom domain names\n- Access logging to S3\n- Geo restriction support\n\n## Usage\n\n### Basic\n\n```hcl\nmodule \"cloudfront_cdn\" {\n  source = \"github.com/kogunlowo123/terraform-aws-cloudfront-cdn\"\n\n  project_name = \"my-website\"\n  environment  = \"prod\"\n\n  s3_origin_bucket = {\n    bucket_regional_domain_name = aws_s3_bucket.website.bucket_regional_domain_name\n    bucket_id                   = aws_s3_bucket.website.id\n  }\n}\n```\n\n### Complete\n\nSee the [examples/complete](examples/complete/main.tf) directory for a full configuration example including custom domains, WAF, Lambda@Edge, and logging.\n\n## Requirements\n\n| Name      | Version   |\n|-----------|-----------|\n| terraform | \u003e= 1.5.0  |\n| aws       | \u003e= 5.30.0 |\n\n## Inputs\n\n| Name | Description | Type | Default |\n|------|-------------|------|---------|\n| project_name | Name of the project | string | - |\n| environment | Environment name | string | \"prod\" |\n| domain_names | List of CNAMEs | list(string) | [] |\n| acm_certificate_arn | ACM certificate ARN | string | null |\n| s3_origin_bucket | S3 origin configuration | object | null |\n| alb_origin | ALB origin configuration | object | null |\n| waf_web_acl_id | WAF Web ACL ID | string | null |\n| lambda_edge_functions | Lambda@Edge associations | list(object) | [] |\n| custom_error_responses | Custom error responses | list(object) | 403/404 SPA defaults |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| distribution_id | CloudFront distribution ID |\n| distribution_arn | CloudFront distribution ARN |\n| distribution_domain_name | CloudFront domain name |\n| oac_id | Origin Access Control ID |\n| cache_policy_id | Cache policy ID |\n\n## License\n\nMIT Licensed. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitadel-cloud-management%2Fterraform-aws-cloudfront-cdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitadel-cloud-management%2Fterraform-aws-cloudfront-cdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitadel-cloud-management%2Fterraform-aws-cloudfront-cdn/lists"}