Skip to content

Commit

Permalink
fix: Wrap budget_name output with length check (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpedro authored Jan 5, 2022
1 parent f991938 commit 21871b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/budget/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

output "name" {
description = "Resource name of the budget. Values are of the form `billingAccounts/{billingAccountId}/budgets/{budgetId}.`"
value = var.create_budget ? google_billing_budget.budget[0].name : ""
value = length(google_billing_budget.budget) > 0 ? google_billing_budget.budget[0].name : ""
}

0 comments on commit 21871b2

Please sign in to comment.