terraform-contour-mirror/modules/k8s-secret/variables.tf
2026-01-28 15:25:49 +03:00

72 lines
2.0 KiB
HCL

variable "secrets" {
description = "Список секретов для создания"
type = list(object({
name = string
namespace = string
secret_type = string
registry_url = optional(string, "")
dependencies = optional(object({
cluster = optional(string, "")
db = optional(string, "")
user = optional(string, "")
bucket = optional(string, "") # Имя бакета для s3 секретов
}), {})
custom_keys = optional(map(string), {})
random_keys = optional(map(object({
length = optional(number, 32)
special = optional(bool, false)
})), {}) # Случайные ключи
labels = optional(map(string), {})
annotations = optional(map(string), {})
ignore_changes = optional(bool, false)
}))
}
variable "s3_outputs" {
description = "Outputs от модуля S3 (default/первый бакет)"
type = object({
bucket_name = optional(string, "")
access_key = optional(string, "")
secret_key = optional(string, "")
})
default = {
bucket_name = ""
access_key = ""
secret_key = ""
}
}
variable "s3_buckets_map" {
description = "Map всех бакетов (name => data)"
type = map(object({
bucket_name = string
access_key = string
secret_key = string
service_account_id = optional(string, "")
}))
default = {}
}
variable "database_outputs_map" {
description = "Outputs от модулей Database, ключ = cluster_id:database_name:user_name"
type = map(object({
host = string
database_name = string
user_name = string
password = string
}))
default = {}
}
variable "constants" {
description = "Константные значения (CA сертификаты, endpoints и т.д.)"
type = map(string)
default = {}
}
variable "env_vars" {
description = "Environment variables"
type = map(string)
default = {}
}