Skip to content

Commit

Permalink
feat(budget): Only read project data when budget will be created
Browse files Browse the repository at this point in the history
  • Loading branch information
gleichda committed Jul 19, 2023
1 parent de1c1a1 commit 55fc4a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/budget/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 55fc4a8

Please sign in to comment.