Giter Club home page Giter Club logo

terraform-s3-cf-website's Introduction

terraform-s3-cf-website

Terraform module to create S3 static website along with CloudFront distribution for it to enable serving through SSL (HTTPS). This module is meant to be used in us-east-1 (N. Virginia) region only as CloudFront distrubution only supports ACM certificate from us-east-1. If you try to use a different region, you may encounter a lot of issues with respect to region.

Inputs

Name Description Type Default Required
host Host for the website string "" yes
certificate_arn Certificate ARN from AWS Certificate Manager string "" yes
logs_bucket S3 bucket to use for logging string "" yes
logs_path Path for logs in S3 bucket string "" yes
enable_encryption Enable or disable incryption for S3 bucket bool true no

Outputs

Name Description
cf_domain_name CloudFront Domain name (for use in DNS)
s3_bucket_name S3 Bucket name

Examples

module "my-s3-cf-website" {
  source  = "sharath-sequoia/cf-website/s3"
  version = "1.3.0"
  host  = "thenextbigthingto.com"
  certificate_arn = "arn:aws:acm:us-east-1:111111111111:certificate/59b6cdef-5911-09e8-3i9d-ck0370p3e812"
  logs_bucket = "next-big-thing-logs"
  logs_path = "logs/"
}

Credits

Most of the source code written in this module was referred from: https://medium.com/runatlantis/hosting-our-static-site-over-ssl-with-s3-acm-cloudfront-and-terraform-513b799aec0f

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.