From ee3865b68703b80da8e41d789e3a081152441b78 Mon Sep 17 00:00:00 2001 From: David Gleich Date: Thu, 27 Jul 2023 03:26:33 +0200 Subject: [PATCH] feat(budget): Only read project data when budget will be created (#829) --- examples/gke_shared_vpc/README.md | 2 +- modules/budget/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gke_shared_vpc/README.md b/examples/gke_shared_vpc/README.md index dbb03d67..6bd4ec50 100644 --- a/examples/gke_shared_vpc/README.md +++ b/examples/gke_shared_vpc/README.md @@ -36,6 +36,6 @@ More information about GKE with Shared VPC can be found here: https://cloud.goog ## Outputs -No output. +No outputs. 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) }