Code Monkey home page Code Monkey logo

tf_aws_customer_gw's Introduction

AWS Customer Gateway

======================

This module is intended to deploy a single AWS Customer Gateway and other resources necessary to configure a functioning VPN Connection.

Module Input Variables

  • name - Unique name used to label the VPN Gateway and Customer Gateway.
  • vpn_gateway_id - VPN Gateway to associate with Customer Gateway and VPN Connection.
  • ip_address - The IP address of the gateway's Internet-routable external interface.
  • bgp_asn - BGP Autonomous System Number. If BGP is not in use, then by convention set this value to 65000.
  • destination_cidr_blocks - A comma separated list of CIDR blocks which sit behind the Customer Gateway device and should be routed over the VPN connection.
  • route_table_ids - (optional) A comma separated list of route tables ids. This must be provided if you plan to create static routes for the destination_cidr_blocks in each route table.
  • route_table_count - (optional) The total number of tables in the route_table_ids list. This must be provided if route_table_ids is set. This is necessary since value of count cannot be computed in modules.
  • static_routes_only - Determines whether routes learned from BGP will be propagated to route tables. If set to true, you must have vgw route propagation enabled on route tables, and of course you must be running BGP. Accepts true or false.
  • add_static_routes_to_tables - Determines whether static routes will be added to all route tables in route_table_ids list or if vgw route propagation will be used instead. If set to "true", then route_table_ids, route_table_count, and destination_cidr_blocks must also be provided.

Usage

module "vpc" {
  source = "github.com/terraform-community-modules/tf_aws_vpc_only"

  #properties omitted
}

module "public_subnet" {
  source = "github.com/terraform-community-modules/tf_aws_public_subnet"

  #properties omitted
}

module "private_subnet" {
  source = "github.com/terraform-community-modules/tf_aws_private_subnet_nat_gateway"

  #properties omitted
}

module "vpn" {
  source = "github.com/terraform-community-modules/tf_aws_vpn_gw"

  name   = "tf-aws-vpn-example"
  vpc_id = "${module.vpc.vpc_id}"
}


module "stockholm_cgw" {
  source = "github.com/terraform-community-modules/tf_aws_customer_gw"

  name = "stockholm"

  vpn_gateway_id     = "${module.vpn.vgw_id}"
  ip_address         = "66.66.66.66"
  bgp_asn            = "65000"
  static_routes_only = true

  add_static_routes_to_tables  = "true"
  route_table_ids              = "${concat(module.public_subnet.public_route_table_ids, module.private_subnet.private_route_table_ids)}"
  route_table_count            = 6
  destination_cidr_blocks      = ["10.1.1.0/24", "10.100.1.0/24"]
}

Outputs

  • cgw_id - ARN for the created Customer Gateway.
  • cgw_ip_address - The IP address of the gateway's Internet-routable external interface.
  • cgw_bgp_asn - The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).

Author

Created and maintained by Shayne Clausson

tf_aws_customer_gw's People

Contributors

trungnguyen avatar sclausson 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.