Skip to content

Commit

Permalink
Merge pull request #3012 from uktrade/feat/paas-peering-only-if-confi…
Browse files Browse the repository at this point in the history
…gured

feat: only configure with PaaS if configured (part 2)
  • Loading branch information
michalc authored Feb 8, 2024
2 parents 1edd391 + b024020 commit 35dd8bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion infra/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ resource "aws_flow_log" "datasets" {
}

resource "aws_vpc_peering_connection" "datasets_to_paas" {
count = var.paas_cidr_block != "" ? 1 : 0
peer_vpc_id = "${var.paas_vpc_id}"
vpc_id = "${aws_vpc.datasets.id}"
auto_accept = true
Expand Down Expand Up @@ -387,7 +388,7 @@ resource "aws_route" "pcx_datasets_to_paas" {
count = var.paas_cidr_block != "" ? 1 : 0
route_table_id = "${aws_route_table.datasets.id}"
destination_cidr_block = "${var.paas_cidr_block}"
vpc_peering_connection_id = "${aws_vpc_peering_connection.datasets_to_paas.id}"
vpc_peering_connection_id = "${aws_vpc_peering_connection.datasets_to_paas[0].id}"
}

resource "aws_route" "pcx_datasets_to_main" {
Expand Down

0 comments on commit 35dd8bf

Please sign in to comment.