From b9654e85287e8d0e78b4f9af23007953ce4340c9 Mon Sep 17 00:00:00 2001 From: Richard Mathie <10221178+Richard-Mathie@users.noreply.github.com> Date: Thu, 13 Jun 2019 15:50:43 +0100 Subject: [PATCH] fix route list count for tf v0.11 as par: https://github.com/grem11n/terraform-aws-vpc-peering/commit/eff16500c4541807440e7aa28d6922824e12ff20 --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 8564f1d..4c2b58d 100644 --- a/main.tf +++ b/main.tf @@ -62,7 +62,7 @@ resource "aws_vpc_peering_connection_options" "accepter" { ################### resource "aws_route" "this_routes_region" { provider = "aws.this" - count = "${var.create_peering == 1 ? length(data.aws_route_tables.peer_vpc_rts.ids) : 0}" + count = "${var.create_peering == 1 ? length(data.aws_route_tables.this_vpc_rts.ids) : 0}" route_table_id = "${data.aws_route_tables.this_vpc_rts.ids[count.index]}" destination_cidr_block = "${data.aws_vpc.peer_vpc.cidr_block}" vpc_peering_connection_id = "${var.peering_id == "" ? element(concat(aws_vpc_peering_connection.this.*.id, list("")), 0) : var.peering_id}"