s3-origin
azavea/s3-origin/aws
A terraform module to create an S3 origin for use with CloudFront.
Install
README
terraform-aws-s3-origin  A Terraform module to create an origin S3 bucket (for use with CloudFront) with read-only access for anonymous users. Usage ``hcl module "static_site" { source = "github.com/azavea/terraform-aws-s3-origin" bucket_name = "mysite-bucket" logs_bucket_name = "mysite-logs-bucket" project = "Unknown" environment = "Unknown" } Cloudfront Distribution resource "aws_cloudfront_distribution" "site" { origin { domain_name = "${module.static_site.site_bucket}.s3.amazonaws.com" origin_id = "SwaggerSiteOriginEastId" } ... } ` Variables - bucket_name - Name of bucket where the site will be hosted. - logs_bucket_name - Name of the access logs bucket. - cors_allowed_headers - Allowed CORS headers (default: ["Authori
Inputs (10)
| Name | Type | Description | Default |
|---|---|---|---|
| bucket_name | string | required | |
| logs_bucket_name | string | required | |
| tags | map(string) | {} | |
| cors_expose_headers | list(string) | [] | |
| cors_max_age_seconds | number | 3000 | |
| project | string | "Unknown" | |
| cors_allowed_methods | list(string) | [
"GET"
] | |
| cors_allowed_origins | list(string) | [
"*"
] | |
| environment | string | "Unknown" | |
| cors_allowed_headers | list(string) | [
"Authorization"
] |
Outputs (3)
site_bucketsite_bucket_regional_domain_namelogs_bucketResources (1)
Topics & Tags
Details
Similar packages
Azure landing zones Terraform module
Terraform supermodule for the Terraform platform engineering for Azure
Terraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Module to define a consistent naming convention by (namespace, stage,