Skip to content

Commit 21871b2

Browse files
authored
fix: Wrap budget_name output with length check (#673)
1 parent f991938 commit 21871b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/budget/outputs.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616

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

0 commit comments

Comments
 (0)