disable googleapi routes creation when vpc is not created (#1489)

This commit is contained in:
Ludovico Magnocavallo
2023-07-03 09:10:12 +02:00
committed by GitHub
parent aeaf1f66fd
commit 86cc6eee4c
3 changed files with 6 additions and 3 deletions

View File

@@ -31,7 +31,10 @@ locals {
priority = 1000
tags = null
}
if lookup(coalesce(var.create_googleapis_routes, {}), k, false)
if(
var.vpc_create &&
lookup(coalesce(var.create_googleapis_routes, {}), k, false)
)
}
_routes = merge(local._googleapis_routes, coalesce(var.routes, {}))
routes = {