Code Monkey home page Code Monkey logo

route53-example's Introduction

Route53 Learning with Terraform

Terraform project supporting the provisioning of aws infrastructure for Route53. It creates 2 hosted zones and DNS records for:

  • ACM certificate validation
  • API Gateway for 2 regions (us-east-1, sa-east-1)
  • S3 static website
  • Geolocation
  • Weighted traffic

It also provides 2 EC2 instances on both us-east-1 and sa-east-1 regions to test geolocation DNS records.

When provisioning the infrastructure, you have to provide a domain and a sub domain. For example, if you provide example.com as domain and subdomain.example.com as subdomain, you'll have:

  • http://example.com and http://www.example.com serving a static website
  • http://geo.subdomain.example.com serving content from 2 EC2 instances, one in each region
  • http://weighted.subdomain.example.com spreading the traffic for both regions
  • https://us-east-1.api.subdomain.example.com/todos serving dynamic content for us-east-1
  • https://sa-east-1.api.subdomain.example.com/todos serving dynamic content for sa-east-1

Prerequisites

Complete the following manual steps before provisioning:

  • Install terraform
  • Setup an aws profile (default is called personal)
  • Create 2 key pairs called Route53LearningKeyPairUS (us-east-1) and Route53LearningKeyPairBR (sa-east-1) or set your own to ssh_key_pair_name variable

Provisioning infrastructure

Run terraform plan -var 'hosted_zone_domain=<your domain>' -var 'hosted_zone_sub_domain=<your sub domain>'

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.