GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — terraform-aws-zero/modules/s3_hosting at main · commitdev/terraform-aws-zero

Expand file tree

/

s3_hosting

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

s3_hosting

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 
main.tf
main.tf
 
 
outputs.tf
outputs.tf
 
 
variables.tf
variables.tf
 
 
versions.tf
versions.tf
 
 

README.md

Outline

s3_hosting

Create an S3 bucket and Cloudfront distribution for holding frontend application assets.

Notes

Requirements

Name Version
terraform >= 0.13

Providers

Name Version
aws n/a

Inputs

Name Description Type Default Required
aliases Additional domains that this cloudfront distribution will serve traffic for list(string) n/a yes
allowed_cors_origins a list of CORS origins domains allowed to access the S3 bucket list(string) [] no
certificate_arn ARN of the certificate to use for this cloudfront distribution string n/a yes
certificate_validation Id of the certificate validation record for the provided cert. Used to create a dependency so we don't use the cert before it is ready string n/a yes
cf_lambda_function_associations A config block that triggers a lambda function with specific actions (maximum 4)
list(object({
event_type = string
lambda_arn = string
include_body = bool
}))
[] no
cf_signed_downloads Enable Cloudfront signed URLs bool false no
cf_trusted_signers Only available when cf_signed_downloads is enabled, a list of trusted signers(self/account_id) for Cloudfront, used for signing URLs list(string)
[
"self"
]
no
create_s3_bucket_policy Useful when multiple CF distributions access the same bucket. You would need to create a bucket policy that allows access from multiple distributions bool true no
domain Domain to host content for. This will be the name of the bucket string n/a yes
environment The environment (stage/prod) any n/a yes
project The name of the project, mostly for tagging any n/a yes
route53_zone_id ID of the Route53 zone to create a record in string n/a yes
use_existing_s3_bucket Name of existing s3 Bucket to use instead of creating a new one string "" no

Outputs

Name Description
bucket_arn ARN of the created S3 bucket
cf_origin_assets_access_identity_arn Cloudfront origin assets access identity, useful when multiple CF using the same bucket to manage S3 bucket policies
cf_signing_enabled Does this require signed URL downloads?
cloudfront_distribution_id Identifier of the created cloudfront distribution
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.