Code Monkey home page Code Monkey logo

terraform-aws-vpc-peering's Introduction

AWS VPC Peering Connection Module

Welcome ๐Ÿ‘‹

SWUbanner

Additional information for users from Russia and Belarus

Glory to Ukraine! ๐Ÿ‡บ


terraform-aws-vpc-peering


This module configures VPC peering in different configurations.

These types of resources are supported:

Important Notice

  • * - There is a bug with applying VPC peering options currently. You can still specify and manage them with this module, but you will need to run apply twice.
  • Version v3.1.* supports both Terraform 0.14 and 0.15.0. However, it throws warnings regarding empty providers deprecation. Provider configuration was changed in Terraform 0.15.0. Therefore, newer versions would likely be incompatible with Terraform <=0.15. So, if you need to use both Terraform 0.14 and 0.15 at the same time or you're in the process of migration, please, use v3.1.* of this module.

Features

This module configures VPC peering between two VPCs. Cross-account and cross-region configurations are supported as well.

You can also manage peering options, but you need to run apply twice to do that.

Terraform Versions

Always make sure you pinned the module version!

  • For Terraform versions >=0.15 use v4.* versions of this module
  • For Terraform versions >=0.13 use v3.* versions of this module
  • For Terraform versions >=0.12 <0.13 use v2.* versions of this module
  • If you're still using Terraform 0.11, you can use v1.* versions of this module

Usage

Examples

Sample configuration is located in examples directory.

Simple Peering (single AWS account, same region)

Notice: You need to declare both providers even with single region peering.

module "single_account_single_region" {
  source = "../../"

  providers = {
    aws.this = aws
    aws.peer = aws
  }

  this_vpc_id = var.this_vpc_id
  peer_vpc_id = var.peer_vpc_id

  auto_accept_peering = true

  tags = {
    Name        = "tf-single-account-single-region"
    Environment = "Test"
  }
}

Changelog

See the changelog on the GitHub Releases page.

Contribution

Your contribution to this module is more than welcome!

If you have an idea on how to improve this theme or found a bug feel free to use GitHub issues to let me know.

If you want to contribute to this theme, please, fork this repository and create a pull request. For recent versions of Terraform, open a PR against the master branch. For Terraform 0.12, please, open a PR against terraform012 branch. For Terraform 0.11, please, open a PR against terraform011 branch.

Testing

This module is tested with Terratest You can find existing tests in the test/ directory.

Tests require AWS credentials. Since GitHub actions don't share the keys with fork repositories (on purpose), don't mind if tests for your PR failed. I will see it anyways and run them on my own. Alternatively, you can always run tests for your forks with your AWS credentials.

Authors

Module managed by Yurii Rochniak

About me

License

Apache 2 License is applied. See LICENSE for full details.

terraform-aws-vpc-peering's People

Contributors

grem11n avatar ctrlok avatar pjelar avatar alexanderkogan avatar egarbi avatar alexandrst88 avatar rblaine95 avatar saulius avatar tomasbackman avatar tyrken avatar tropnikovvl avatar zelch avatar yahel2410 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.