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

vpc-peering-cross-accounts-accepter

View Source Release Notes

This module manages the accepter'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_accepter.thisresource
aws_vpc_peering_connection_options.thisresource

Inputs

NameDescriptionTypeDefaultRequired
dns_resolutionAllow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.boolfalseno
link_to_local_classicAllow a local linked EC2-Classic instance to communicate with instances in a peer VPC.boolfalseno
link_to_remote_classicAllow a local VPC to communicate with a linked EC2-Classic instance in a peer VPC.boolfalseno
requester_vpc_cidrThe VPC CIDR of the requester VPC.stringn/ayes
route_creation_timeoutThe timeout for the creation of the Route Tables. It defines how long to wait for a route table to be created before considering the operation failed. Ref: https://www.terraform.io/language/resources/syntax#operation-timeoutsstring"5m"no
route_deletion_timeoutThe timeout for the deletion of the Route Tables. It defines how long to wait for a route table to be deleted before considering the operation failed. Ref: https://www.terraform.io/language/resources/syntax#operation-timeoutsstring"5m"no
route_tablesList of route tables to add routes to.list(string)n/ayes
route_update_timeoutThe timeout for the update of the Route Tables. It defines how long to wait for a route table to be updated before considering the operation failed. Ref: https://www.terraform.io/language/resources/syntax#operation-timeoutsstring"2m"no
tagsA map of tags to assign to created resources.map(string){}no
vpc_peering_connection_idThe VPC Peering Connection ID to manage.stringn/ayes

Outputs

NameDescription
vpc_peering_accept_statusThe status of the VPC Peering Connection request.
vpc_peering_connection_idPeering connection ID.

Sample Usage

main.tf

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

module "vpc_peering_cross_accounts_accepter" {

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

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

# The VPC CIDR of the requester VPC.
requester_vpc_cidr = <string>

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

# The VPC Peering Connection ID to manage.
vpc_peering_connection_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.
dns_resolution = false

# The timeout for the creation of the Route Tables. It defines how long to
# wait for a route table to be created before considering the operation
# failed. Ref:
# https://www.terraform.io/language/resources/syntax#operation-timeouts
route_creation_timeout = "5m"

# The timeout for the deletion of the Route Tables. It defines how long to
# wait for a route table to be deleted before considering the operation
# failed. Ref:
# https://www.terraform.io/language/resources/syntax#operation-timeouts
route_deletion_timeout = "5m"

# The timeout for the update of the Route Tables. It defines how long to wait
# for a route table to be updated before considering the operation failed.
# Ref: https://www.terraform.io/language/resources/syntax#operation-timeouts
route_update_timeout = "2m"

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

}


Reference

Required

requester_vpc_cidrstringrequired

The VPC CIDR of the requester VPC.

route_tableslist(string)required

List of route tables to add routes to.

The VPC Peering Connection ID to manage.

Optional

dns_resolutionbooloptional

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

false

The timeout for the creation of the Route Tables. It defines how long to wait for a route table to be created before considering the operation failed. Ref: https://www.terraform.io/language/resources/syntax#operation-timeouts

"5m"

The timeout for the deletion of the Route Tables. It defines how long to wait for a route table to be deleted before considering the operation failed. Ref: https://www.terraform.io/language/resources/syntax#operation-timeouts

"5m"
route_update_timeoutstringoptional

The timeout for the update of the Route Tables. It defines how long to wait for a route table to be updated before considering the operation failed. Ref: https://www.terraform.io/language/resources/syntax#operation-timeouts

"2m"
tagsmap(string)optional

A map of tags to assign to created resources.

{}