Skip to main content
VPC Modules 0.28.1Last updated in version 0.27.0

vpc-peering-cross-accounts-requester

View Source Release Notes

This module manages the requester's side of the VPC Peering Connection between two differents accounts that you control.

Requirements

NameVersion
terraform>= 1.0.0

Providers

NameVersion
awsn/a

Modules

No modules.

Resources

NameType
aws_route.thisresource
aws_vpc_peering_connection.thisresource

Inputs

NameDescriptionTypeDefaultRequired
accepter_owner_idThe account ID of the accepter VPC.stringn/ayes
accepter_regionThe region of the accepter VPC.stringn/ayes
accepter_vpc_cidrThe VPC CIDR of the accepter VPC.stringn/ayes
accepter_vpc_idThe ID of the accepter VPC.stringn/ayes
route_tablesList of route tables to add routes to.list(string)n/ayes
tagsA map of tags to assign to resources.map(string){}no
vpc_idThe VPC ID.stringn/ayes

Outputs

NameDescription
vpc_peering_connection_idPeering connection ID.

Sample Usage

main.tf

# ------------------------------------------------------------------------------------------------------
# DEPLOY GRUNTWORK'S VPC-PEERING-CROSS-ACCOUNTS-REQUESTER MODULE
# ------------------------------------------------------------------------------------------------------

module "vpc_peering_cross_accounts_requester" {

source = "git::git@github.com:gruntwork-io/terraform-aws-vpc.git//modules/vpc-peering-cross-accounts-requester?ref=v0.28.1"

# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# ----------------------------------------------------------------------------------------------------

# The account ID of the accepter VPC.
accepter_owner_id = <string>

# The region of the accepter VPC.
accepter_region = <string>

# The VPC CIDR of the accepter VPC.
accepter_vpc_cidr = <string>

# The ID of the accepter VPC.
accepter_vpc_id = <string>

# List of route tables to add routes to.
route_tables = <list(string)>

# The VPC ID.
vpc_id = <string>

# ----------------------------------------------------------------------------------------------------
# OPTIONAL VARIABLES
# ----------------------------------------------------------------------------------------------------

# Allow a local VPC to resolve public DNS hostnames to private IP addresses
# when queried from instances in the peer VPC.
allow_remote_vpc_dns_resolution = false

# How long to wait for a route to be created before considering the operation
# failed.
route_creation_timeout = "2m"

# How long to wait for a route to be deleted before considering the operation
# failed.
route_deletion_timeout = "5m"

# A map of tags to assign to resources.
tags = {}

}


Reference

Required

accepter_owner_idstringrequired

The account ID of the accepter VPC.

accepter_regionstringrequired

The region of the accepter VPC.

accepter_vpc_cidrstringrequired

The VPC CIDR of the accepter VPC.

accepter_vpc_idstringrequired

The ID of the accepter VPC.

route_tableslist(string)required

List of route tables to add routes to.

vpc_idstringrequired

The VPC ID.

Optional

Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

false

How long to wait for a route to be created before considering the operation failed.

"2m"

How long to wait for a route to be deleted before considering the operation failed.

"5m"
tagsmap(string)optional

A map of tags to assign to resources.

{}