The terraform-aws-terrablog module is a simple Terraform module that provisions storage and CDN hosting for static websites on Amazon Web Services.
Althought the module is named terrablog
it can host any static content.
This module creates an S3 bucket to store the content, a CloudFront distribution for optimized content delivery, a Route 53 DNS entry pointing to the CloudFront distribution, an SSL Certificate via Certificate Manager, and all necessary Identify and Access Management roles/policies.
Users of the module are responsible for publishing the actual content to the created S3 bucket.
There is a complete example in the examples
directory. You can simply copy the example directory and modify it by changing the values.