github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/website/source/docs/providers/aws/r/vpc_peering.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_vpc_peering_connection" 4 sidebar_current: "docs-aws-resource-vpc-peering" 5 description: |- 6 Provides an VPC Peering Connection resource. 7 --- 8 9 # aws\_vpc\_peering\_connection 10 11 Provides an VPC Peering Connection resource. 12 13 ## Example Usage 14 15 Basic usage: 16 17 ``` 18 resource "aws_vpc" "main" { 19 cidr_block = "10.0.0.0/16" 20 } 21 ``` 22 23 Basic usage with tags: 24 25 ``` 26 27 resource "aws_vpc_peering_connection" "foo" { 28 peer_owner_id = "${var.peer_owner_id}" 29 peer_vpc_id = "${aws_vpc.bar.id}" 30 vpc_id = "${aws_vpc.foo.id}" 31 } 32 33 resource "aws_vpc" "foo" { 34 cidr_block = "10.1.0.0/16" 35 } 36 37 resource "aws_vpc" "bar" { 38 cidr_block = "10.2.0.0/16" 39 } 40 ``` 41 42 ## Argument Reference 43 44 The following arguments are supported: 45 46 * `peer_owner_id` - (Required) The AWS account ID of the owner of the peer VPC. 47 * `peer_vpc_id` - (Required) The ID of the VPC with which you are creating the VPC peering connection. 48 * `vpc_id` - (Required) The ID of the requester VPC. 49 * `auto_accept` - (Optional) Accept the peering (you need to be the owner of both VPCs). 50 * `tags` - (Optional) A mapping of tags to assign to the resource. 51 52 ## Attributes Reference 53 54 The following attributes are exported: 55 56 * `id` - The ID of the VPC Peering Connections 57 * `accept_status` - The Status of the VPC peering connection request. 58 59 60 ## Notes 61 You still have to accept the peering with the AWS Console, aws-cli or aws-sdk-go.