local machines
This commit is contained in:
parent
a29b5c4357
commit
cd02f24f3b
2 changed files with 2 additions and 48 deletions
|
@ -1,48 +0,0 @@
|
||||||
#todo fix billing alert creation
|
|
||||||
data "google_billing_account" "account" {
|
|
||||||
billing_account = var.billing-account
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "google_billing_budget" "budget" {
|
|
||||||
billing_account = data.google_billing_account.account.id
|
|
||||||
display_name = "budget"
|
|
||||||
amount {
|
|
||||||
specified_amount {
|
|
||||||
currency_code = "USD"
|
|
||||||
units = var.billing-budget
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
budget_filter {
|
|
||||||
projects = ["projects/${var.project-id}"]
|
|
||||||
credit_types_treatment = "EXCLUDE_ALL_CREDITS"
|
|
||||||
#services = ["services/24E6-581D-38E5"] # Bigquery
|
|
||||||
}
|
|
||||||
|
|
||||||
threshold_rules {
|
|
||||||
threshold_percent = 0.5
|
|
||||||
}
|
|
||||||
threshold_rules {
|
|
||||||
threshold_percent = 0.9
|
|
||||||
}
|
|
||||||
threshold_rules {
|
|
||||||
threshold_percent = 1.0
|
|
||||||
}
|
|
||||||
|
|
||||||
all_updates_rule {
|
|
||||||
monitoring_notification_channels = [
|
|
||||||
for k, v in google_monitoring_notification_channel.notification_channel : google_monitoring_notification_channel.notification_channel[k].id
|
|
||||||
]
|
|
||||||
disable_default_iam_recipients = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "google_monitoring_notification_channel" "notification_channel" {
|
|
||||||
for_each = var.billing-admins
|
|
||||||
display_name = each.key
|
|
||||||
type = "email"
|
|
||||||
|
|
||||||
labels = {
|
|
||||||
email_address = each.value
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -35,6 +35,8 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: buildkite-premerge-debian
|
- name: buildkite-premerge-debian
|
||||||
image: gcr.io/${project-id}/buildkite-premerge-debian:latest
|
image: gcr.io/${project-id}/buildkite-premerge-debian:latest
|
||||||
|
command: ["tail"]
|
||||||
|
args: ["-f", "/dev/null"]
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: ${cpu-request}
|
cpu: ${cpu-request}
|
||||||
|
|
Loading…
Reference in a new issue