s3-static-website

conortm/s3-static-website/aws

Terraform Module HCL AWS ⏱ stale 4y 4mo

Terraform Module for an Amazon S3 Static Website

Install

module "s3-static-website" {
source = "conortm/s3-static-website/aws"
version = "0.0.3"
}
⭐ Source on GitHub 📦 Registry page

README

AWS S3 Static Website Terraform Module Terraform Module for an Amazon S3 Static Website, fronted by a CloundFront Distribution. Note: This module "works" but is still in development. See TODO section. Also, suggestions welcome! Features This module allows for Hosting a Static Website on Amazon S3, provisioning the following: - S3 Bucket for static public files - CloudFront Distribution fronting the S3 Bucket - Route 53 Record Set aliased to the CloudFront Distribution It requires (for now?) that the following have been setup outside this module: - SSL Certificate - Route 53 Hosted Zone Usage ``HCL module "s3-static-website" { source = "conortm/s3-static-website/aws" domain_name = "www.my-aws-s3-static-website.com" redirects = ["my-aws-s3-static-website.com"] secret = "SOME_SECRET_MANAGED_O

Inputs (7)

NameTypeDescriptionDefault
secretanyA secret string between CloudFront and S3 to control access required
zone_idanyID of the Route 53 Hosted Zone in which to create an alias record required
cert_arnanyARN of the SSL Certificate to use for the Cloudfront Distribution required
domain_nameanyDomain name for the website (i.e. www.example.com) required
public_diranyDirectory in S3 Bucket from which to serve public files (no leading or trailing "public"
redirectsanyA list of domains that should redirect to domain_name (i.e. for redirecting nake[]
tagsanyA mapping of tags to assign to each resource{}

Outputs (1)

cdn_domain_name — Domain name of the Cloudfront Distribution

Resources (4)

aws_cloudfront_distributionaws_route53_recordaws_s3_bucketaws_s3_bucket_policy

Details

FrameworkTerraform Module
LanguageHCL
Version0.0.3
Cloud AWS
★ Stars9
Forks18
Total downloads8.0k
Inputs7
Outputs1
Resources4
LicenseMIT
Namespaceconortm
Updated