vpc-peering-cross-accounts-requester
This module manages the requester's side of the VPC Peering Connection between two differents accounts that you control.
Requirements
| Name | Version |
|---|---|
| terraform | >= 1.0.0 |
Providers
| Name | Version |
|---|---|
| aws | n/a |
Modules
No modules.
Resources
| Name | Type |
|---|---|
| aws_route.this | resource |
| aws_vpc_peering_connection.this | resource |
Inputs
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| accepter_owner_id | The account ID of the accepter VPC. | string | n/a | yes |
| accepter_region | The region of the accepter VPC. | string | n/a | yes |
| accepter_vpc_cidr | The VPC CIDR of the accepter VPC. | string | n/a | yes |
| accepter_vpc_id | The ID of the accepter VPC. | string | n/a | yes |
| route_tables | List of route tables to add routes to. | list(string) | n/a | yes |
| tags | A map of tags to assign to resources. | map(string) | {} | no |
| vpc_id | The VPC ID. | string | n/a | yes |
Outputs
| Name | Description |
|---|---|
| vpc_peering_connection_id | Peering connection ID. |
Sample Usage
- Terraform
- Terragrunt
# ------------------------------------------------------------------------------------------------------
# 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.12"
# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# ----------------------------------------------------------------------------------------------------
# The account ID of the accepter VPC.
accepter_owner_id = <string>
# The region of the accepter VPC.
accepter_region = <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
# ----------------------------------------------------------------------------------------------------
# DEPRECATED: Use accepter_vpc_cidrs instead. The VPC CIDR of the accepter
# VPC.
accepter_vpc_cidr = null
# A list of CIDR blocks of the accepter VPC. When the accepter VPC has
# multiple CIDR blocks, all of them should be listed here so that routes are
# created for each. If not set, falls back to accepter_vpc_cidr.
accepter_vpc_cidrs = []
# 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 = {}
}
# ------------------------------------------------------------------------------------------------------
# DEPLOY GRUNTWORK'S VPC-PEERING-CROSS-ACCOUNTS-REQUESTER MODULE
# ------------------------------------------------------------------------------------------------------
terraform {
source = "git::git@github.com:gruntwork-io/terraform-aws-vpc.git//modules/vpc-peering-cross-accounts-requester?ref=v0.28.12"
}
inputs = {
# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# ----------------------------------------------------------------------------------------------------
# The account ID of the accepter VPC.
accepter_owner_id = <string>
# The region of the accepter VPC.
accepter_region = <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
# ----------------------------------------------------------------------------------------------------
# DEPRECATED: Use accepter_vpc_cidrs instead. The VPC CIDR of the accepter
# VPC.
accepter_vpc_cidr = null
# A list of CIDR blocks of the accepter VPC. When the accepter VPC has
# multiple CIDR blocks, all of them should be listed here so that routes are
# created for each. If not set, falls back to accepter_vpc_cidr.
accepter_vpc_cidrs = []
# 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
- Inputs
- Outputs
Required
accepter_owner_idstringThe account ID of the accepter VPC.
accepter_regionstringThe region of the accepter VPC.
accepter_vpc_idstringThe ID of the accepter VPC.
route_tableslist(string)List of route tables to add routes to.
vpc_idstringThe VPC ID.
Optional
accepter_vpc_cidrstringDEPRECATED: Use accepter_vpc_cidrs instead. The VPC CIDR of the accepter VPC.
nullaccepter_vpc_cidrslist(string)A list of CIDR blocks of the accepter VPC. When the accepter VPC has multiple CIDR blocks, all of them should be listed here so that routes are created for each. If not set, falls back to accepter_vpc_cidr.
[]Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.
falseroute_creation_timeoutstringHow long to wait for a route to be created before considering the operation failed.
"2m"route_deletion_timeoutstringHow long to wait for a route to be deleted before considering the operation failed.
"5m"tagsmap(string)A map of tags to assign to resources.
{}Peering connection ID.