Coder Social home page Coder Social logo

aws_vpc's Introduction

aws_vpc

Terraform module that creates a VPC with private and/or public subnets and route tables.

Inputs

module "aws_vpc" {
  source = "aws_vpc"
  
  vpc_cidr       = # CIDR of VPC
  vpc_extra_cidr = # List of extra CIDRs to add to VPC
  aws_region     = # Region that will be used
  private_subnet = # Map of private subnet specs
  public_subnet  = # Map of public subnet specs
}

Example

module "aws_vpc" {
  source = "aws_vpc"
  
  vpc_cidr       = 10.0.0.0/16
  vpc_extra_cidr = ["10.1.0.0/16", "10.2.0.0/16"]
  aws_region     = us-east-1
  private_subnet = map-private-subnets
  public_subnet  = map-public-subnets
}

Example of subnet map:

map_private_subnet = {
  private-subnet-1 = {
    subnet_cidr_block = "10.0.1.0/24"
    availability_zone = "us-east-1a"
  },
  private-subnet-2 = {
    subnet_cidr_block = "10.0.2.0/24"
    availability_zone = "us-east-1b"
  },
}

Outputs

output "vpc_id" {
  value = aws_vpc.vpc.id # id of VPC
}

output "private_subnet_spec" {
  value = aws_subnet.private_subnet # spec of private subnets
}

output "public_subnet_spec" {
  value = aws_subnet.public_subnet # spec of public subnets
}

aws_vpc's People

Stargazers

fabrizio avatar

Watchers

Marcus Mesquita 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.