Skip to content

Commit a08b72d

Browse files
mbainterstack72
authored andcommitted
Update vpc_peering documentation (hashicorp#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.
1 parent f2bceec commit a08b72d

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

website/source/docs/providers/aws/r/vpc_peering.html.markdown

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ Provides an VPC Peering Connection resource.
1515
Basic usage:
1616

1717
```
18-
resource "aws_vpc" "main" {
19-
cidr_block = "10.0.0.0/16"
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}"
2022
}
2123
```
2224

@@ -28,6 +30,11 @@ resource "aws_vpc_peering_connection" "foo" {
2830
peer_owner_id = "${var.peer_owner_id}"
2931
peer_vpc_id = "${aws_vpc.bar.id}"
3032
vpc_id = "${aws_vpc.foo.id}"
33+
34+
auto_accept = true
35+
tags {
36+
Name = "VPC Peering between foo and bar"
37+
}
3138
}
3239
3340
resource "aws_vpc" "foo" {
@@ -58,4 +65,4 @@ The following attributes are exported:
5865

5966

6067
## Notes
61-
You still have to accept the peering with the AWS Console, aws-cli or aws-sdk-go.
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.

0 commit comments

Comments
 (0)