vpc-peering-cross-accounts-accepter
This module manages the accepter'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_accepter.this | resource |
| aws_vpc_peering_connection_options.this | resource |
Inputs
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| dns_resolution | Allow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC. | bool | false | no |
| link_to_local_classic | Allow a local linked EC2-Classic instance to communicate with instances in a peer VPC. | bool | false | no |
| link_to_remote_classic | Allow a local VPC to communicate with a linked EC2-Classic instance in a peer VPC. | bool | false | no |
| requester_vpc_cidr | The VPC CIDR of the requester VPC. | string | n/a | yes |
| route_creation_timeout | 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 | string | "5m" | no |
| route_deletion_timeout | 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 | string | "5m" | no |
| route_tables | List of route tables to add routes to. | list(string) | n/a | yes |
| route_update_timeout | 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 | string | "2m" | no |
| tags | A map of tags to assign to created resources. | map(string) | {} | no |
| vpc_peering_connection_id | The VPC Peering Connection ID to manage. | string | n/a | yes |
Outputs
| Name | Description |
|---|---|
| vpc_peering_accept_status | The status of the VPC Peering Connection request. |
| vpc_peering_connection_id | Peering connection ID. |
Sample Usage
- Terraform
- Terragrunt
# ------------------------------------------------------------------------------------------------------
# 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.12"
# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# ----------------------------------------------------------------------------------------------------
# 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
# DEPRECATED: Use requester_vpc_cidrs instead. The VPC CIDR of the requester
# VPC.
requester_vpc_cidr = null
# A list of CIDR blocks of the requester VPC. When the requester 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 requester_vpc_cidr.
requester_vpc_cidrs = []
# 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 = {}
}
# ------------------------------------------------------------------------------------------------------
# DEPLOY GRUNTWORK'S VPC-PEERING-CROSS-ACCOUNTS-ACCEPTER MODULE
# ------------------------------------------------------------------------------------------------------
terraform {
source = "git::git@github.com:gruntwork-io/terraform-aws-vpc.git//modules/vpc-peering-cross-accounts-accepter?ref=v0.28.12"
}
inputs = {
# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# ----------------------------------------------------------------------------------------------------
# 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
# DEPRECATED: Use requester_vpc_cidrs instead. The VPC CIDR of the requester
# VPC.
requester_vpc_cidr = null
# A list of CIDR blocks of the requester VPC. When the requester 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 requester_vpc_cidr.
requester_vpc_cidrs = []
# 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
- Inputs
- Outputs
Required
route_tableslist(string)List of route tables to add routes to.
The VPC Peering Connection ID to manage.
Optional
dns_resolutionboolAllow a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.
falserequester_vpc_cidrstringDEPRECATED: Use requester_vpc_cidrs instead. The VPC CIDR of the requester VPC.
nullrequester_vpc_cidrslist(string)A list of CIDR blocks of the requester VPC. When the requester 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 requester_vpc_cidr.
[]route_creation_timeoutstringThe 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"route_deletion_timeoutstringThe 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_timeoutstringThe 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)A map of tags to assign to created resources.
{}The status of the VPC Peering Connection request.
Peering connection ID.