cloudfront-s3-website
chgangaraju/cloudfront-s3-website/aws
Terraform module for creating a s3 static website with CloudFront distribution
Install
README
terraform-aws-cloudfront-s3-website Terraform module for creating an s3 static website with Cloudfront distribution The following resources will be created - S3 Bucket - CloudFront distribution - Route53 record - Upload sample HTML file (optional) Prerequisites (Optional in example2): - Route 53 hosted zone for example.com - ACM certificate for .example.com in us-east-1 region Example 1 provider "aws" { region = "us-east-1" } module "cloudfront_s3_website_with_domain" { source = "chgangaraju/cloudfront-s3-website/aws" version = "1.2.6" hosted_zone = "example.com" domain_name = "test.abc.example.com" acm_certificate_domain = ".abc.example.com" upload_sample_file = true } Example 2 module "cloudfront_s3_website_without_domain" { source = "chgangaraju/cloudfront-s3-website/aws" version = "1.2
Inputs (12)
| Name | Type | Description | Default |
|---|---|---|---|
| domain_name | string | domain name (or application name if no domain name available) | required |
| cloudfront_default_ttl | number | The default TTL for the cloudfront cache | 86400 |
| cloudfront_max_ttl | number | The maximum TTL for the cloudfront cache | 31536000 |
| cloudfront_geo_restriction_restriction_type | string | The method that you want to use to restrict distribution of your content by coun | "none" |
| price_class | string | CloudFront distribution price class | "PriceClass_100" |
| upload_sample_file | bool | Upload sample html file to s3 bucket | false |
| cloudfront_min_ttl | number | The minimum TTL for the cloudfront cache | 0 |
| acm_certificate_domain | string | Domain of the ACM certificate | null |
| use_default_domain | bool | Use CloudFront website address without Route53 and ACM certificate | false |
| cloudfront_geo_restriction_locations | list | The ISO 3166-1-alpha-2 codes for which you want CloudFront either to distribute | [] |
| tags | map(string) | tags for all the resources, if any | {} |
| hosted_zone | string | Route53 hosted zone | null |
Outputs (6)
s3_bucket_arns3_bucket_namecloudfront_domain_namecloudfront_dist_ids3_domain_namewebsite_addressResources (8)
Details
Similar packages
Azure landing zones Terraform module
Terraform supermodule for the Terraform platform engineering for Azure
Terraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Module to define a consistent naming convention by (namespace, stage,