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=v0.3.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.69.0 |
aws.us-east-1 | 5.69.0 |
random | 3.6.3 |
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 |
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_name | n/a | string |
n/a | yes |
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 |
n/a | yes |
website_configuration | n/a | object({ |
null |
no |
No outputs.