Skip to content

Commit

Permalink
feat(budget): Only read project data when budget will be created (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
gleichda committed Jul 27, 2023
1 parent de1c1a1 commit ee3865b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/gke_shared_vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ More information about GKE with Shared VPC can be found here: https://cloud.goog

## Outputs

No output.
No outputs.

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
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 ee3865b

Please sign in to comment.