mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-08-05 18:31:00 +03:00
51 lines
1.5 KiB
HCL
51 lines
1.5 KiB
HCL
variable "environment" {
|
|
description = "Target environment name, for example stage/preprod/prod."
|
|
type = string
|
|
}
|
|
|
|
variable "topics" {
|
|
description = "Kafka topics declared in infrastructure.yaml under environments.<env>.kafka.topics."
|
|
type = list(any)
|
|
default = []
|
|
}
|
|
|
|
variable "kafka_cluster_refs" {
|
|
description = "Environment clusterRef mapping from infrastructure.yaml."
|
|
type = map(object({
|
|
cluster_id = string
|
|
default_partitions = optional(number, 3)
|
|
default_replication_factor = optional(number, 1)
|
|
max_replication_factor = optional(number, 1)
|
|
default_topic_config = optional(map(string), {})
|
|
}))
|
|
}
|
|
|
|
variable "kafka_policy" {
|
|
description = "Platform policy for service-owned Kafka declarations."
|
|
type = object({
|
|
allow_create = optional(bool, true)
|
|
allow_delete = optional(bool, false)
|
|
allow_partition_increase = optional(bool, true)
|
|
allow_partition_decrease = optional(bool, false)
|
|
})
|
|
default = {}
|
|
}
|
|
|
|
variable "create_users" {
|
|
description = "Create one Kafka user per topic owner."
|
|
type = bool
|
|
default = true
|
|
}
|
|
|
|
variable "default_user_roles" {
|
|
description = "Kafka roles granted to generated owner users on their topics."
|
|
type = list(string)
|
|
default = ["ACCESS_ROLE_PRODUCER", "ACCESS_ROLE_CONSUMER"]
|
|
}
|
|
|
|
variable "user_password_length" {
|
|
description = "Generated Kafka user password length."
|
|
type = number
|
|
default = 32
|
|
}
|