Coder Social home page Coder Social logo

systemonkey / example-terraform-aws-vpc-peering Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicksantamaria/example-terraform-aws-vpc-peering

0.0 0.0 0.0 7 KB

Terraform project which demonstrates full peering between 2 VPCs in Amazon Web Services.

Home Page: https://www.nicksantamaria.net/post/how-to-peer-vpcs-with-terraform/

HCL 77.21% PHP 22.79%

example-terraform-aws-vpc-peering's Introduction

Example - Peering 2 VPCs with Terraform

This project aims to provide a very straight-forward example of peering 2 entire VPCs using Terraform.

Terraform provisions the following architecture:

Terraform diagram

Once provisioning is complete, run the test script to validate each of the connections.

Dependencies

  • Terraform v0.7 or greater
  • An AWS account

Usage

1. Ensure your AWS credentials are set up.

This can be done using environment variables:

$ export AWS_SECRET_ACCESS_KEY='your secret key'
$ export AWS_ACCESS_KEY_ID='your key id'

... or the ~/.aws/credentials file.

$ cat ~/.aws/credentials
[default]
aws_access_key_id = your key id
aws_secret_access_key = your secret key

2. Review the Terraform plan.

Execute the below command and ensure you are happy with the plan.

$ terraform plan

3. Execute the Terraform apply.

Now execute the plan to provision the AWS resources.

$ terraform apply

4. Run the test PHP script.

$ php test-instance-connectivity.php

5. Destroy the resources.

Once you are finished your testing, ensure you destroy the resources to avoid unnecessary AWS charges.

$ terraform destroy

example-terraform-aws-vpc-peering's People

Contributors

nicksantamaria 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.