Coder Social home page Coder Social logo

mrraph / terraform-aws-website-serverless Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dannylinden/terraform-aws-website-serverless

0.0 0.0 0.0 24 KB

Infrastructure for Hugo bases static websites with AWS CDN, Route53, S3, CodePipeline, CodeBuild

Home Page: https://www.dannylinden.de

License: MIT License

HCL 100.00%

terraform-aws-website-serverless's Introduction

AWS Serverless Infrastructure for Static Website based on Hugo

Creates a static website Infrastructure on a domain hosted on S3 and delivered by CloudFront over HTTPS with Route53 managing DNS.

Terraform Registry: https://registry.terraform.io/modules/dannylinden/website-serverless/aws/

Features

  • Redirects the following to https://www.example.com

    • https://example.com
    • http://www.example.com
    • http://example.com
  • Push to CodeCommit Repository on master branch triggers a CodePipeline / CodeBuild run

Used Ressources:

Overview Infrastructure

Requirements:

Domain

To validate the SSL certificate you need to be able to recieve Emails to:

Email-Adress

Module Example Usage:

variable "aws_access_key" {}
variable "aws_secret_key" {}

provider "aws" {
  access_key = "${var.aws_access_key}"
  secret_key = "${var.aws_secret_key}"
  region = "eu-central-1"
}

provider "aws" {
  access_key = "${var.aws_access_key}"
  secret_key = "${var.aws_secret_key}"
  region = "us-east-1"
  alias = "us-east-1"
}

module "hugo-site" {
  source = "dannylinden/website-serverless/aws"
  www_domain   = "www.example.com" /* Your domain here */
  root_domain = "example.com" /* Your root domain here */
  ssl-validation = "EMAIL" /* How to validate */
  ssh_pub_key = "~/.ssh/id_rsa.pub" /* Path to the SSH Pub key for CodeCommit authentification */
  bucket_prefix = "" /* Prefix for S3 Buckets */
}

output "nameservers" {
  value = "${module.hugo-site.nameservers}"
}

output "git_remote_url" {
  value = "${module.hugo-site.git_remote_url}"
}

Output

The Output if the Module contains:

  • Git remote URL of the Repository to push the website code
  • Nameserver for the Domain

Authors

Module managed by Danny Linden.

License

MIT License. See LICENSE for full details.

terraform-aws-website-serverless's People

Contributors

dannylinden avatar

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.