The following modules allow for simple to provision single page application environments. The following resources are provisioned:
- Cloudfront Functions HTTP Strict Transport Security
- Cloudfront Functions Basic Auth (optional)
- Private S3 Bucket with SSE AES256
- Cloudfront distribution with OIA read access to bucket
- Route 53 DNS entry
- S3 bucket resource renamed to this from bucket:
terraform state mv module.x.aws_s3_bucket.bucket module.x.aws_s3_bucket.this
- Import needed
terraform import module.x.aws_s3_bucket_server_side_encryption_configuration.this <bucket name>
- Import needed
terraform import module.x.aws_s3_bucket_cors_rule.this <bucket name>
Name | Version |
---|---|
aws | >= 4.0 |
Name | Version |
---|---|
archive | n/a |
aws | >= 4.0 |
template | n/a |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
allowed_headers | Allowed Methods | list |
[ |
no |
allowed_methods | Allowed Methods | list |
[ |
no |
allowed_origins | Allowed Headers | list |
[ |
no |
basic_auth | Enable basic auth | bool |
false |
no |
certificate_id | Certificate ID | any |
n/a | yes |
custom_error_responses | Error Responses within cloudfront | list(object({ |
[ |
no |
domain | the domain you want to deploy to | any |
n/a | yes |
enable_prerender | Enable SEO Prerender bucket routing | bool |
false |
no |
environment | the subdomain environment you want to deploy to. If domain is naked, do not specify | string |
"" |
no |
index_redirect | Enable index redirect https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-add-index.html | bool |
false |
no |
password | the password to utilize for the domain | string |
"" |
no |
prerender_bucket | Prerender Bucket name | string |
"" |
no |
username | the username to utilize for the domain | string |
"" |
no |
zoneid | route53 zone id | string |
"" |
no |
Name | Description |
---|---|
bucket | n/a |
distribution | n/a |
identity | n/a |
route | n/a |