Giter Club home page Giter Club logo

terraform-aws-vpc's Introduction

terraform-aws-vpc

This is an opinionated Terraform Module for provisioning a VPC on AWS. It makes use of the community provided (extensive) module to provision a VPC on AWS.

In particular, it does the following:

  • Provisions (optional) public, private, database, intra and redshift subnets
  • One NAT gateway per AZ
  • Removes all default security group and ACL rules
  • Provides sane ACL rules for network access

Providers

Name Version
aws >= 2.0

Inputs

Name Description Type Default Required
additional_allowed_cidr_blocks Additional 'safe' CIDR blocks for internal traffic list(string) [] no
database_subnets List of CIDRs for database subnets list(string) [] no
eip_count Number of EIP for the gateways. This should be eqaual to the number of AZs if you have any private subnets number 3 no
elasticache_subnets List of CIDRs for Elasticache subnets list(string) [] no
enable_dynamodb_endpoint Should be true if you want to provision a DynamoDB endpoint to the VPC bool false no
enable_s3_endpoint Should be true if you want to provision an S3 endpoint to the VPC bool false no
ephemeral_from Lower end of the port range for ephemeral traffic number 1024 no
ephemeral_to Lower end of the port range for ephemeral traffic number 65535 no
intra_subnets List of CIDRs for intra subnets list(string) [] no
private_subnets List of CIDRs for private subnets list(string) [] no
public_subnets List of CIDRs for public subnets list(string) [] no
redshift_subnets List of CIDRs for Redshift subnets list(string) [] no
tags A map of tags to add to all resources map(string)
{
"Terraform": "true"
}
no
vpc_cidr CIDR for the VPC string n/a yes
vpc_name Name of the VPC string n/a yes

Outputs

Name Description
database_acl_id ACL ID of the database subnets
elasticache_route_table_ids List of IDs of elasticache route tables
elasticache_subnet_group ID of elasticache subnet group
elasticache_subnet_group_name Name of elasticache subnet group
elasticache_subnets List of IDs of elasticache subnets
elasticache_subnets_cidr_blocks List of cidr_blocks of elasticache subnets
intra_acl_id ACL ID of the intra subnets
intra_subnets_cidr_blocks List of cidr_blocks of intra subnets
private_acl_id ACL ID of the private subnets
private_subnets_cidr_blocks List of cidr_blocks of private subnets
public_acl_id ACL ID of the public subnets
public_subnets_cidr_blocks List of cidr_blocks of public subnets
redshift_route_table_ids List of IDs of redshift route tables
redshift_subnet_group ID of redshift subnet group
redshift_subnets List of IDs of redshift subnets
redshift_subnets_cidr_blocks List of cidr_blocks of redshift subnets
vpc_azs The AZs in the region the VPC belongs to
vpc_cidr_block The CIDR block of the VPC
vpc_database_subnet_group ID of database subnet group
vpc_database_subnets List of IDs of database subnets
vpc_database_subnets_cidr_blocks List of cidr_blocks of database subnets
vpc_id The ID of the VPC
vpc_intra_subnets 'Intra' subnets for the VPC
vpc_nat_eip_ids EIP for the NAT gateway in the VPC
vpc_nat_eip_public Public address for the EIP on the NAT Gateway
vpc_private_route_table_ids List of IDs of private route tables
vpc_private_subnets Private subnets for the VPC
vpc_public_route_table_ids The IDs of the public route tables
vpc_public_subnets Public subnets for the VPC
vpc_region The region the VPC belongs to

terraform-aws-vpc's People

Contributors

binhoul avatar guangie88 avatar lawliet89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-aws-vpc's Issues

Not compatible with aws provider >= v2.0

Referencing to this guide,

Using aws_provider >= 2.0 with the module will cause the below error when doing terraform plan:

provider "aws" {
  version = "~> 2.4.0"
  region  = "${var.aws_region}"
}

module "vpc" {
  source = "github.com/GovTechSG/terraform-aws-vpc.git?ref=v0.1.4"
  ...
  ...
}
$ terrafrom plan
Error: module.vpc.data.aws_region.current: "current": [REMOVED] Defaults to current provider region if no other filtering is enabled

due to the existence of this line in main.tf

# main.tf
...
data "aws_region" "current" {
  current = true # <-- has been removed in 2.0
}
...

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.