Skip to content

A standalone AWS S3 Bucket Terraform module that can also leverage CloudFront for static hosting and Lamba Edge for setting up site Authentication.

License

Notifications You must be signed in to change notification settings

RussellGilmore/red-bucket

Repository files navigation

Red Bucket

Requirements:

  1. Terraform 1.13.5
  2. Trivy >= 0.67.2

Trivy can be installed via Homebrew on macOS with the command:

brew install aquasecurity/trivy/trivy

Red Bucket Module

A S3 Bucket module designed to be practical for casual use.

Contains useful Makefile for creating static asset directory and files.

Requirements

Name Version
terraform 1.13.5
aws 6.20.0

Providers

Name Version
aws 6.20.0

Modules

No modules.

Resources

Name Type
aws_acm_certificate.public_cert resource
aws_acm_certificate_validation.public_cert_validation resource
aws_cloudfront_distribution.distribution resource
aws_cloudfront_origin_access_identity.default resource
aws_route53_record.public_cert_validation resource
aws_route53_record.record resource
aws_s3_bucket.red_bucket resource
aws_s3_bucket_policy.bucket_policy resource
aws_s3_bucket_public_access_block.s3_public_access_block resource
aws_s3_bucket_server_side_encryption_configuration.s3_encryption resource
aws_s3_bucket_versioning.s3_versioning resource
aws_s3_bucket_website_configuration.hosting resource
aws_s3_object.website_files resource
aws_caller_identity.current data source
aws_partition.current data source
aws_region.current data source
aws_route53_zone.zone data source

Inputs

Name Description Type Default Required
apex_domain Set the domain name. string "" no
auth_lambda_arn ARN of the Lambda@Edge function for authentication string "" no
bucket_name Set the name of the S3 bucket. string n/a yes
enable_authentication Enable GitHub OAuth authentication bool false no
enable_static_website Enable the creation of resources needed to support a secure and available static website. bool false no
force_destroy Set the force destroy option for the S3 bucket. bool true no
project_name Set the project name. string n/a yes
record_name Set the sub-domain name. string "" no
region Set the appropriate AWS region. string n/a yes
website_path Set the path to the website content. string "../site" no

Outputs

Name Description
red_bucket_name The S3 bucket for storing whatever you want
s3_url S3 hosting URL (HTTP)
website_record Route 53 record for the website
website_url Website URL (HTTPS)

About

A standalone AWS S3 Bucket Terraform module that can also leverage CloudFront for static hosting and Lamba Edge for setting up site Authentication.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published