This module provisions a static website using CloudFront+S3. Optionally, the website can be protected with OpenID Connect.
module "static_site" {
source = "github.com/chatloop/terraform-aws-static-site?ref=v1.1.0"
providers = {
aws.us-east-1 = aws.us-east-1
}
acm_certificate_name = "example.com"
domain_name = "static-site-test.example.com"
name = "terraform-aws-static-site"
route53_zone_name = "example.com"
}
Name | Version |
---|---|
terraform | ~> 1.0 |
aws | ~> 5.0 |
random | ~> 3.0 |
Name | Version |
---|---|
aws | ~> 5.0 |
aws.us-east-1 | ~> 5.0 |
random | ~> 3.0 |
Name | Source | Version |
---|---|---|
authorizer | github.com/chatloop/terraform-aws-cloudfront-auth | 695c3eb440a90e2441a006f9d091e6f73218fb0d |
cloudfront | github.com/terraform-aws-modules/terraform-aws-cloudfront | a0f0506106a4c8815c1c32596e327763acbef2c2 |
s3_bucket | github.com/terraform-aws-modules/terraform-aws-s3-bucket | 8a0b697adfbc673e6135c70246cff7f8052ad95a |
website_configuration | github.com/terraform-aws-modules/terraform-aws-lambda | 1d122404c2a3834ce39a7c5a319a3e754d5b0c29 |
Name | Type |
---|---|
aws_route53_record.this | resource |
random_string.refer_secret | resource |
aws_acm_certificate.this | data source |
aws_iam_policy_document.s3_policy | data source |
aws_iam_policy_document.s3_policy_cloudfront_oac | data source |
aws_iam_policy_document.s3_policy_website_endpoint | data source |
aws_route53_zone.this | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
acm_certificate_arn | n/a | string |
null |
no |
acm_certificate_name | n/a | string |
null |
no |
aliases | n/a | list(string) |
[] |
no |
authorizer | n/a | object({ |
null |
no |
bucket_name | n/a | string |
null |
no |
comment | n/a | string |
null |
no |
custom_error_response | n/a | list(object({ |
[] |
no |
default_cache_behavior | n/a | object({ |
{} |
no |
default_root_object | n/a | string |
"index.html" |
no |
domain_name | n/a | string |
n/a | yes |
name | n/a | string |
n/a | yes |
ordered_cache_behavior | n/a | list(object({ |
[] |
no |
route53_zone_name | n/a | string |
null |
no |
website_configuration | n/a | object({ |
null |
no |
Name | Description |
---|---|
cloudfront_domain_name | n/a |