From 55fc4a82b98484e85c41823886fcf3c6c50bc172 Mon Sep 17 00:00:00 2001 From: David Gleich Date: Wed, 19 Jul 2023 09:49:05 +0200 Subject: [PATCH] feat(budget): Only read project data when budget will be created --- modules/budget/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/budget/main.tf b/modules/budget/main.tf index eb644314..13bde8d3 100644 --- a/modules/budget/main.tf +++ b/modules/budget/main.tf @@ -34,7 +34,7 @@ locals { data "google_project" "project" { depends_on = [var.projects] - count = length(var.projects) + count = var.create_budget ? length(var.projects) : 0 project_id = element(var.projects, count.index) }