github.com/pmcatominey/terraform@v0.7.0-rc2.0.20160708105029-1401a52a5cc5/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_peering_connection" "foo" {
    19      peer_owner_id = "${var.peer_owner_id}"
    20      peer_vpc_id = "${aws_vpc.bar.id}"
    21      vpc_id = "${aws_vpc.foo.id}"
    22  }
    23  ```
    24  
    25  Basic usage with tags:
    26  
    27  ```
    28  
    29  resource "aws_vpc_peering_connection" "foo" {
    30      peer_owner_id = "${var.peer_owner_id}"
    31      peer_vpc_id = "${aws_vpc.bar.id}"
    32      vpc_id = "${aws_vpc.foo.id}"
    33      
    34      auto_accept = true
    35      tags { 
    36        Name = "VPC Peering between foo and bar" 
    37      }
    38  }
    39  
    40  resource "aws_vpc" "foo" {
    41      cidr_block = "10.1.0.0/16"
    42  }
    43  
    44  resource "aws_vpc" "bar" {
    45      cidr_block = "10.2.0.0/16"
    46  }
    47  ```
    48  
    49  ## Argument Reference
    50  
    51  The following arguments are supported:
    52  
    53  * `peer_owner_id` - (Required) The AWS account ID of the owner of the peer VPC.
    54  * `peer_vpc_id` - (Required) The ID of the VPC with which you are creating the VPC peering connection.
    55  * `vpc_id` - (Required) The ID of the requester VPC.
    56  * `auto_accept` - (Optional) Accept the peering (you need to be the owner of both VPCs).
    57  * `tags` - (Optional) A mapping of tags to assign to the resource.
    58  
    59  ## Attributes Reference
    60  
    61  The following attributes are exported:
    62  
    63  * `id` - The ID of the VPC Peering Connections
    64  * `accept_status` - The Status of the VPC peering connection request.
    65  
    66  
    67  ## Notes
    68  If you are not the owner of both VPCs, or do not enable auto_accept you will still have to accept the peering with the AWS Console, aws-cli or aws-sdk-go.