4-projects/modules/ml_env/variables.tf (84 lines of code) (raw):
/**
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
variable "business_code" {
description = "The business code (ex. ml)."
type = string
}
variable "business_unit" {
description = "The business (ex. ml_business_unit)."
type = string
}
variable "env" {
description = "The environment to prepare (ex. development)."
type = string
}
variable "business_unit_folder" {
description = "The Business Unit Folder (Created in base_env)"
type = string
}
variable "project_budget" {
description = <<EOT
Budget configuration.
budget_amount: The amount to use as the budget.
alert_spent_percents: A list of percentages of the budget to alert on when threshold is exceeded.
alert_pubsub_topic: The name of the Cloud Pub/Sub topic where budget related messages will be published, in the form of `projects/{project_id}/topics/{topic_id}`.
alert_spend_basis: The type of basis used to determine if spend has passed the threshold. Possible choices are `CURRENT_SPEND` or `FORECASTED_SPEND` (default).
EOT
type = object({
budget_amount = optional(number, 1000)
alert_spent_percents = optional(list(number), [1.2])
alert_pubsub_topic = optional(string, null)
alert_spend_basis = optional(string, "FORECASTED_SPEND")
})
default = {}
}
variable "location_gcs" {
description = "Case-Sensitive Location for GCS Bucket (Should be same region as the KMS Keyring)"
type = string
default = ""
}
variable "gcs_bucket_prefix" {
description = "Name prefix to be used for GCS Bucket"
type = string
default = "bkt"
}
variable "region" {
type = string
description = "The resource region, one of [us-central1, us-east4]."
default = "us-central1"
validation {
condition = contains(["us-central1", "us-east4"], var.region)
error_message = "Region must be one of [us-central1, us-east4]."
}
}
variable "remote_state_bucket" {
description = "Backend bucket to load Terraform Remote State Data from previous steps."
type = string
}
variable "tfc_org_name" {
description = "Name of the TFC organization"
type = string
}
variable "folder_prefix" {
description = "Name prefix to use for folders created. Should be the same in all steps."
type = string
default = "fldr"
}
variable "key_rotation_period" {
description = "Rotation period in seconds to be used for KMS Key"
type = string
default = "7776000s"
}