Skip to content

Commit

Permalink
Use terraform 0.12 syntax for vpc_peering_connections tests and examp…
Browse files Browse the repository at this point in the history
…les.
  • Loading branch information
tmccombs committed Aug 19, 2020
1 parent bbb3228 commit ab895d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions aws/data_source_aws_vpc_peering_connections_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ resource "aws_vpc" "baz" {
}
resource "aws_vpc_peering_connection" "conn1" {
vpc_id = "${aws_vpc.foo.id}"
peer_vpc_id = "${aws_vpc.bar.id}"
vpc_id = aws_vpc.foo.id
peer_vpc_id = aws_vpc.bar.id
auto_accept = true
tags = {
Expand All @@ -62,8 +62,8 @@ resource "aws_vpc_peering_connection" "conn1" {
}
resource "aws_vpc_peering_connection" "conn2" {
vpc_id = "${aws_vpc.foo.id}"
peer_vpc_id = "${aws_vpc.baz.id}"
vpc_id = aws_vpc.foo.id
peer_vpc_id = aws_vpc.baz.id
auto_accept = true
tags = {
Expand All @@ -75,7 +75,7 @@ resource "aws_vpc_peering_connection" "conn2" {
data "aws_vpc_peering_connections" "test_by_filters" {
filter {
name = "requester-vpc-info.vpc-id"
values = ["${aws_vpc.foo.id}"]
values = [aws_vpc.foo.id]
}
depends_on = ["aws_vpc_peering_connection.conn1", "aws_vpc_peering_connection.conn2"]
Expand Down
6 changes: 3 additions & 3 deletions website/docs/d/vpc_peering_connections.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ the data source, as noted in [issue 4149](https://github.com/hashicorp/terraform
data "aws_vpc_peering_connections" "pcs" {
filter {
name = "requester-vpc-info.vpc-id"
values = ["${aws_vpc.foo.id}"]
values = [aws_vpc.foo.id]
}
}
# get the details of each resource
data "aws_vpc_peering_connection" "pc" {
count = "${length(data.aws_vpc_peering_connections.pcs.ids)}"
id = "${data.aws_vpc_peering_connections.pcs.ids[count.index]}"
count = length(data.aws_vpc_peering_connections.pcs.ids)
id = data.aws_vpc_peering_connections.pcs.ids[count.index]
}
```

Expand Down

0 comments on commit ab895d5

Please sign in to comment.