Merge remote-tracking branch 'origin/master' into fast-dev

This commit is contained in:
Ludovico Magnocavallo
2025-11-05 06:53:32 +00:00
15 changed files with 419 additions and 73 deletions

View File

@@ -20,6 +20,43 @@ variable "auto_create_network" {
default = false
}
variable "bigquery_reservations" {
description = "BigQuery reservations and assignments. Assignment specified as {JOB_TYPE = ['projects/PROJECT_ID']}."
type = map(object({
location = string
slot_capacity = number
ignore_idle_slots = optional(bool, false)
concurrency = optional(number)
edition = optional(string, "STANDARD")
secondary_location = optional(string)
max_slots = optional(number)
scaling_mode = optional(string, "AUTOSCALE_ONLY")
assignments = optional(map(list(string)), {})
}))
validation {
condition = alltrue([
for name, reservation in var.bigquery_reservations :
# Check the keys of the 'assignments' map within each reservation object.
# If 'assignments' is omitted (defaults to {}), the inner 'alltrue' evaluates to true.
alltrue([
for key in keys(reservation.assignments) :
contains(["JOB_TYPE_UNSPECIFIED",
"PIPELINE",
"QUERY",
"ML_EXTERNAL",
"BACKGROUND",
"CONTINUOUS",
"BACKGROUND_CHANGE_DATA_CAPTURE",
"BACKGROUND_COLUMN_METADATA_INDEX",
"BACKGROUND_SEARCH_INDEX_REFRESH"], key)
])
])
error_message = "All keys in the nested 'assignments' map (within 'bigquery_reservations') must be one of the following allowed values: ML_EXTERNAL, QUERY, or BACKGROUND."
}
default = {}
nullable = false
}
variable "billing_account" {
description = "Billing account id."
type = string