You can finally set budgets via the API in GCP. This is a huge relief to all those org admins out there who have had to do this manually.
AND, hold on to your hats, there’s terraform support as well!
Looks like Christmas came late….
data "google_billing_account" "account" {
provider = google-beta
billing_account = "000000-0000000-0000000-000000"
}
resource "google_billing_budget" "budget" {
provider = google-beta
billing_account = data.google_billing_account.account.id
display_name = "Example Billing Budget"
amount {
specified_amount {
currency_code = "USD"
units = "100000"
}
}
threshold_rules {
threshold_percent = 0.5
}
}