github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/d/vpc_peering_connection.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_vpc_peering_connection" 4 sidebar_current: "docs-aws-datasource-vpc-peering-connection" 5 description: |- 6 Provides details about a specific VPC peering connection. 7 --- 8 9 # aws\_vpc\_peering\_connection 10 11 The VPC Peering Connection data source provides details about 12 a specific VPC peering connection. 13 14 ## Example Usage 15 16 ``` 17 # Declare the data source 18 data "aws_vpc_peering_connection" "pc" { 19 vpc_id = "${aws_vpc.foo.id}" 20 peer_cidr_block = "10.0.1.0/22" 21 } 22 23 # Create a route table 24 resource "aws_route_table" "rt" { 25 vpc_id = "${aws_vpc.foo.id}" 26 } 27 28 # Create a route 29 resource "aws_route" "r" { 30 route_table_id = "${aws_route_table.rt.id}" 31 destination_cidr_block = "${data.aws_vpc_peering_connection.pc.peer_cidr_block}" 32 vpc_peering_connection_id = "${data.aws_vpc_peering_connection.pc.id}" 33 } 34 ``` 35 36 ## Argument Reference 37 38 The arguments of this data source act as filters for querying the available VPC peering connection. 39 The given filters must match exactly one VPC peering connection whose data will be exported as attributes. 40 41 * `id` - (Optional) The ID of the specific VPC Peering Connection to retrieve. 42 43 * `status` - (Optional) The status of the specific VPC Peering Connection to retrieve. 44 45 * `vpc_id` - (Optional) The ID of the requester VPC of the specific VPC Peering Connection to retrieve. 46 47 * `owner_id` - (Optional) The AWS account ID of the owner of the requester VPC of the specific VPC Peering Connection to retrieve. 48 49 * `cidr_block` - (Optional) The CIDR block of the requester VPC of the specific VPC Peering Connection to retrieve. 50 51 * `peer_vpc_id` - (Optional) The ID of the accepter VPC of the specific VPC Peering Connection to retrieve. 52 53 * `peer_owner_id` - (Optional) The AWS account ID of the owner of the accepter VPC of the specific VPC Peering Connection to retrieve. 54 55 * `peer_cidr_block` - (Optional) The CIDR block of the accepter VPC of the specific VPC Peering Connection to retrieve. 56 57 * `filter` - (Optional) Custom filter block as described below. 58 59 * `tags` - (Optional) A mapping of tags, each pair of which must exactly match 60 a pair on the desired VPC Peering Connection. 61 62 More complex filters can be expressed using one or more `filter` sub-blocks, 63 which take the following arguments: 64 65 * `name` - (Required) The name of the field to filter by, as defined by 66 [the underlying AWS API](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcPeeringConnections.html). 67 68 * `values` - (Required) Set of values that are accepted for the given field. 69 A VPC Peering Connection will be selected if any one of the given values matches. 70 71 ## Attributes Reference 72 73 All of the argument attributes except `filter` are also exported as result attributes. 74 75 * `accepter` - A configuration block that describes [VPC Peering Connection] 76 (http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide) options set for the accepter VPC. 77 78 * `requester` - A configuration block that describes [VPC Peering Connection] 79 (http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide) options set for the requester VPC. 80 81 #### Accepter and Requester Attributes Reference 82 83 * `allow_remote_vpc_dns_resolution` - Indicates whether a local VPC can resolve public DNS hostnames to 84 private IP addresses when queried from instances in a peer VPC. 85 86 * `allow_classic_link_to_remote_vpc` - Indicates whether a local ClassicLink connection can communicate 87 with the peer VPC over the VPC peering connection. 88 89 * `allow_vpc_to_remote_classic_link` - Indicates whether a local VPC can communicate with a ClassicLink 90 connection in the peer VPC over the VPC peering connection.