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 CDNS3
: for two founction, static asset hosting and Cloudfront access logsACM
: create certificate for the websiteIAM
: Create IAM user with rigths for deployment (update S3 assets and invalid cache)
Each of services has a modules on ./modules
.
This module was originally design for this article (in French) : link
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"
}
No requirements.
No provider.
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 |
No output.