VPC Modules 0.27.0Last updated in version 0.27.0
View Source
Release Notes
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
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.27.0"
# ----------------------------------------------------------------------------------------------------
# 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 = {}
}
terragrunt.hcl
# ------------------------------------------------------------------------------------------------------
# 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.27.0"
}
inputs = {
# ----------------------------------------------------------------------------------------------------
# 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
- Inputs
- Outputs
Required
accepter_owner_id
stringThe account ID of the accepter VPC.
accepter_region
stringThe region of the accepter VPC.
accepter_vpc_cidr
stringThe VPC CIDR of the accepter VPC.
accepter_vpc_id
stringThe ID of the accepter VPC.
route_tables
list(string)List of route tables to add routes to.
vpc_id
stringThe 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
route_creation_timeout
stringHow long to wait for a route to be created before considering the operation failed.
"2m"
route_deletion_timeout
stringHow long to wait for a route to be deleted before considering the operation failed.
"5m"
tags
map(string)A map of tags to assign to resources.
{}
Peering connection ID.