Skip to content

Commit a54fad2

Browse files
Made billing budget filter labels updatable (#5545) (#10767)
Signed-off-by: Modular Magician <[email protected]>
1 parent 4539e26 commit a54fad2

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.changelog/5545.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
billingbudget: fixed a bug where `google_billing_budget.budget_filter.labels` was not updating.
3+
```

google/resource_billing_budget.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,8 @@ func resourceBillingBudgetUpdate(d *schema.ResourceData, meta interface{}) error
468468
}
469469

470470
if d.HasChange("budget_filter") {
471-
updateMask = append(updateMask, "budgetFilter.projects")
471+
updateMask = append(updateMask, "budgetFilter.projects",
472+
"budgetFilter.labels")
472473
}
473474

474475
if d.HasChange("amount") {

google/resource_billing_budget_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ resource "google_billing_budget" "budget" {
128128
129129
budget_filter {
130130
projects = ["projects/${data.google_project.project.number}"]
131+
labels = {
132+
label = "bar"
133+
}
131134
}
132135
133136
amount {
@@ -173,6 +176,7 @@ resource "google_billing_budget" "budget" {
173176
174177
budget_filter {
175178
projects = []
179+
labels = {}
176180
}
177181
178182
amount {
@@ -218,6 +222,9 @@ resource "google_billing_budget" "budget" {
218222
219223
budget_filter {
220224
projects = []
225+
labels = {
226+
label1 = "bar2"
227+
}
221228
}
222229
223230
amount {

0 commit comments

Comments
 (0)