cloudfront-s3-website

chgangaraju/cloudfront-s3-website/aws

Terraform Module HCL AWS

Terraform module for creating a s3 static website with CloudFront distribution

Install
module "cloudfront-s3-website" {
source = "chgangaraju/cloudfront-s3-website/aws"
version = "1.2.6"
}
plain text: /constructs/tfmod-chgangaraju-cloudfront-s3-website-aws/install.txt
⭐ Source on GitHub 📦 Registry page
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)
NameTypeDescriptionDefault
domain_namestringdomain name (or application name if no domain name available) required
cloudfront_default_ttlnumberThe default TTL for the cloudfront cache86400
cloudfront_max_ttlnumberThe maximum TTL for the cloudfront cache31536000
cloudfront_geo_restriction_restriction_typestringThe method that you want to use to restrict distribution of your content by coun"none"
price_classstringCloudFront distribution price class"PriceClass_100"
upload_sample_fileboolUpload sample html file to s3 bucketfalse
cloudfront_min_ttlnumberThe minimum TTL for the cloudfront cache0
acm_certificate_domainstringDomain of the ACM certificatenull
use_default_domainboolUse CloudFront website address without Route53 and ACM certificatefalse
cloudfront_geo_restriction_locationslistThe ISO 3166-1-alpha-2 codes for which you want CloudFront either to distribute []
tagsmap(string)tags for all the resources, if any{}
hosted_zonestringRoute53 hosted zonenull
Outputs (6)
s3_bucket_arn
s3_bucket_name
cloudfront_domain_name
cloudfront_dist_id
s3_domain_name
website_address
Resources (8)
aws_cloudfront_distributionaws_cloudfront_origin_access_identityaws_route53_recordaws_s3_bucketaws_s3_bucket_policyaws_s3_bucket_versioningaws_s3_bucket_website_configurationaws_s3_object
Details
FrameworkTerraform Module
LanguageHCL
Version1.2.6
Cloud AWS
★ Stars36
Forks68
Total downloads15.3k
Inputs12
Outputs6
Resources8
LicenseApache-2.0
Namespacechgangaraju
Updated