Skip to content

DamyrFr/terraform-aws-static-site-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform for setup a static website

Simple module to deploy a static hosting stack (witch access logs and user for deployment).

This stack is composed by there services :

  • Cloudfront : used as front entry point CDN
  • S3 : for two founction, static asset hosting and Cloudfront access logs
  • ACM : create certificate for the website
  • IAM : Create IAM user with rigths for deployment (update S3 assets and invalid cache)

Each of services has a modules on ./modules.

AWS SCHEMA

This module was originally design for this article (in French) : link

Exemple

You need to create a DNS zone before use this module.

module "site" {
  source  = "DamyrFr/static-site-stack/aws"
  version = "2.0.5"
	domain  = "yourdomain"
	zone_id = "yourIDforRoute53zone"
}

Requirements

No requirements.

Providers

No provider.

Inputs

Name Description Type Default Required
domain The domain of static website string n/a yes
error The name of website error files string "error.html" no
index The name of website index files string "index.html" no
logs_retention Number of days for logs retention number 31 no
ttl_def Default ttl number 3600 no
ttl_max Maximum ttl number 86400 no
ttl_min Minimal ttl number 0 no
zone_id The ID for DNS zone string n/a yes

Outputs

No output.

About

Terraform module for create a AWS static website hosting (S3, Cloudfront, ACM).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages