All Modules
AWSCompute

CloudFront + S3

S3 static site with CloudFront CDN, Origin Access Control, and optional WAF

Usage

module "cloudfront_s3" {
  source = "github.com/fencepencil/fencepencil-aws-modules//cloudfront-s3"

  name = "<name>"

  tags = var.tags
}

Inputs (7)

NameTypeDescriptionDefaultRequired
namestringName prefix for all resourcesyes
domain_nameslist(string)Domain names (CNAMEs) for CloudFront[]no
acm_certificate_arnstringACM certificate ARN for HTTPSnullno
index_documentstringIndex document for the siteindex.htmlno
error_documentstring404 error document404.htmlno
web_acl_arnstringWAF Web ACL ARN to associatenullno
tagsmap(string)Tags to apply to all resources{}no

Outputs (4)

NameDescription
distribution_idCloudFront distribution ID
distribution_domain_nameCloudFront domain name
bucket_nameS3 bucket name
bucket_arnS3 bucket ARN

More AWS Modules

Browse our full library of AWS infrastructure modules.

View all AWS modules