-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
106 lines (92 loc) · 3.09 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
variable "namespace" {
description = "Namespace prefix for all resources"
type = string
}
variable "environment" {
description = "Environment name"
type = string
}
variable "operator_version" {
description = "Version of the Materialize operator to install"
type = string
default = "v25.1.1"
}
variable "helm_repository" {
description = "Repository URL for the Materialize operator Helm chart. Leave empty if using local chart."
type = string
default = "https://materializeinc.github.io/materialize/"
}
variable "helm_chart" {
description = "Chart name from repository or local path to chart. For local charts, set the path to the chart directory."
type = string
default = "materialize-operator"
}
variable "use_local_chart" {
description = "Whether to use a local chart instead of one from a repository"
type = bool
default = false
}
variable "helm_values" {
description = "Values to pass to the Helm chart"
type = any
}
variable "operator_namespace" {
description = "Namespace for the Materialize operator"
type = string
default = "materialize"
}
variable "monitoring_namespace" {
description = "Namespace for monitoring resources"
type = string
default = "monitoring"
}
variable "metrics_server_version" {
description = "Version of metrics-server to install"
type = string
default = "3.12.2"
}
variable "install_metrics_server" {
description = "Whether to install the metrics-server"
type = bool
default = true
}
variable "instances" {
description = "Configuration for Materialize instances"
type = list(object({
name = string
namespace = optional(string)
create_database = optional(bool, true)
database_name = string
metadata_backend_url = string
persist_backend_url = string
environmentd_version = optional(string, "v0.130.1")
cpu_request = optional(string, "1")
memory_request = optional(string, "1Gi")
memory_limit = optional(string, "1Gi")
in_place_rollout = optional(bool, false)
request_rollout = optional(string)
force_rollout = optional(string)
}))
default = []
validation {
condition = alltrue([
for instance in var.instances :
instance.request_rollout == null ||
can(regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", instance.request_rollout))
])
error_message = "Request rollout must be a valid UUID in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
validation {
condition = alltrue([
for instance in var.instances :
instance.force_rollout == null ||
can(regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", instance.force_rollout))
])
error_message = "Force rollout must be a valid UUID in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
variable "postgres_version" {
description = "Postgres version to use for the metadata backend"
type = string
default = "15"
}