Used to publish static website files to an S3 bucket with proper MIME type, etag, acl, cache control, and object level server-side encryption.
>=1.2.0
module "s3-static-website" {
source = "Lupus-Metallum/s3-static-website/aws"
version = "2.0.0"
bucket_id = aws_s3_bucket.example.id
file_path = "${path.module}/src/my-website-files/" # Where your index.html and TLD web content lives
acl = "public-read"
storage_class = "STANDARD"
cache_control = "max-age=31536000"
content_language = "en-US"
sse_encrypt = true #Changing this variable will force the recreation of each file managed by this module
}
Name | Version |
---|---|
terraform | >= 1.2.0 |
Name | Version |
---|---|
aws | n/a |
random | n/a |
Name | Type |
---|---|
aws_s3_object.this | resource |
random_pet.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
bucket_id | The bucket id to use as the destination for the static website | string |
n/a | yes |
file_path | The base filepath that contains the files to publish, you may need path.module/my/src/dir | string |
n/a | yes |
acl | The object acl to use for this site, defaults to public-read | string |
"public-read" |
no |
cache_control | The header to use for cache control | string |
"max-age=1440" |
no |
content_language | en-US or en-GB for language header? | string |
"en-US" |
no |
sse_encrypt | Should we apply SSE for objects created by this module? | bool |
true |
no |
storage_class | The object storage class to use for this site, defaults to STANDARD | string |
"STANDARD" |
no |