Giter VIP home page Giter VIP logo

aws-vpc's Introduction

Amazon AWS VPC

This Terraform configuration creates:

  • Amazon AWS VPC
  • Internet Gateway
  • Subnets in all configured availability zones and routing tables linking them to the Internet Gateway

Additionally, if variable private_subnets is set to true, it will create:

  • NAT with Elastic IP address in each availability zone
  • Private subnet in each availability zone with routing tables linking them to the NAT

This configuration uses my own module from Terraform Module Registry.

Prerequisites and dependencies

There are no other dependencies apart from Terraform.

Configuration

Option Explanation Example
aws_region AWS region which should be used eu-central-1
aws_zones List of AWS availability zones which should be used ["eu-central-1a", "eu-central-1b"]
vpc_name Name of the VPC which should ve created my-vpc
vpc_cidr CIDR address which should be used 10.0.0.0/16
tags Tags which should be applied to all resources { Hello = "World" }
private_subnets Create also private subnets with NAT in every avaialbility zone false or true

Creating the VPC

To create the VPC,

  • Export AWS credentials into environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
  • Apply Terraform configuration:
terraform init
terraform apply --var-file example.tfvars

Deleting the VPC

To delete the VPC,

  • Export AWS credentials into environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
  • Destroy Terraform configuration:
terraform destroy --var-file example.tfvars

aws-vpc's People

Contributors

scholzj avatar

Watchers

James Cloos avatar dhiren shumsher avatar  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.