From a08b72df9bf0280e315f91a68b5a0ea3c73b76df Mon Sep 17 00:00:00 2001 From: Mark Bainter Date: Thu, 9 Jun 2016 14:48:03 -0500 Subject: [PATCH] Update vpc_peering documentation (#7056) The documentation wording implies that in all cases you have to manually accept peering requests. This change is intended to clarify where this is required. The documentation also separates between "basic usage" and "basic usage with tags", but the expanded usage didn't actually provide much additional useful information. Expanded a bit to show the use of auto_accept since both VPCs are created by the content and to show setting the Name tag for proper display in the console. --- .../docs/providers/aws/r/vpc_peering.html.markdown | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/website/source/docs/providers/aws/r/vpc_peering.html.markdown b/website/source/docs/providers/aws/r/vpc_peering.html.markdown index cf3e16eb06..e8073f3bb4 100644 --- a/website/source/docs/providers/aws/r/vpc_peering.html.markdown +++ b/website/source/docs/providers/aws/r/vpc_peering.html.markdown @@ -15,8 +15,10 @@ Provides an VPC Peering Connection resource. Basic usage: ``` -resource "aws_vpc" "main" { - cidr_block = "10.0.0.0/16" +resource "aws_vpc_peering_connection" "foo" { + peer_owner_id = "${var.peer_owner_id}" + peer_vpc_id = "${aws_vpc.bar.id}" + vpc_id = "${aws_vpc.foo.id}" } ``` @@ -28,6 +30,11 @@ resource "aws_vpc_peering_connection" "foo" { peer_owner_id = "${var.peer_owner_id}" peer_vpc_id = "${aws_vpc.bar.id}" vpc_id = "${aws_vpc.foo.id}" + + auto_accept = true + tags { + Name = "VPC Peering between foo and bar" + } } resource "aws_vpc" "foo" { @@ -58,4 +65,4 @@ The following attributes are exported: ## Notes -You still have to accept the peering with the AWS Console, aws-cli or aws-sdk-go. +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.