generated from camptocamp/devops-stack-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
157 lines (137 loc) · 4.56 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#######################
## Standard variables
#######################
variable "argocd_project" {
description = "Name of the Argo CD AppProject where the Application should be created. If not set, the Application will be created in a new AppProject only for this Application."
type = string
default = null
}
variable "argocd_labels" {
description = "Labels to attach to the Argo CD Application resource."
type = map(string)
default = {}
}
variable "destination_cluster" {
description = "Destination cluster where the application should be deployed."
type = string
default = "in-cluster"
}
variable "target_revision" {
description = "Override of target revision of the application chart."
type = string
default = "v1.0.0" # x-release-please-version
}
variable "enable_service_monitor" {
description = "Enable Prometheus ServiceMonitor in the Helm chart."
type = bool
default = true
}
variable "helm_values" {
description = "Helm chart value overrides. They should be passed as a list of HCL structures."
type = any
default = []
}
variable "deep_merge_append_list" {
description = "A boolean flag to enable/disable appending lists instead of overwriting them."
type = bool
default = false
}
variable "app_autosync" {
description = "Automated sync options for the Argo CD Application resource."
type = object({
allow_empty = optional(bool)
prune = optional(bool)
self_heal = optional(bool)
})
default = {
allow_empty = false
prune = true
self_heal = true
}
}
variable "dependency_ids" {
description = "IDs of the other modules on which this module depends on."
type = map(string)
default = {}
}
#######################
## Module variables
#######################
variable "resources" {
description = <<-EOT
Resource limits and requests for External Secrets's and Reloader's components. Follow the style on https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/[official documentation] to understand the format of the values.
IMPORTANT: These are not production values. You should always adjust them to your needs.
EOT
type = object({
external_secrets_operator = optional(object({
requests = optional(object({
cpu = optional(string, "10m")
memory = optional(string, "32Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "128Mi")
}), {})
}), {})
external_secrets_webhook = optional(object({
requests = optional(object({
cpu = optional(string, "10m")
memory = optional(string, "32Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "128Mi")
}), {})
}), {})
external_secrets_cert_controller = optional(object({
requests = optional(object({
cpu = optional(string, "10m")
memory = optional(string, "32Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "128Mi")
}), {})
}), {})
reloader = optional(object({
requests = optional(object({
cpu = optional(string, "10m")
memory = optional(string, "32Mi")
}), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string, "128Mi")
}), {})
}), {})
})
default = {}
}
variable "replicas" {
description = "Number of replicas for the External Secrets and Reloader components."
type = object({
external_secrets = number
reloader = number
})
default = {
external_secrets = 1
reloader = 1
}
nullable = false
validation {
condition = var.replicas.external_secrets >= 1
error_message = "The number of replicas for the External Secrets component must be greater than or equal to 1."
}
validation {
condition = var.replicas.reloader >= 1
error_message = "The number of replicas for the Reloader component must be greater than or equal to 1."
}
}
variable "auto_reload_all" {
description = <<-EOT
Boolean to enable auto reloading for all resources.
In this case, all resources that do not have the auto annotation (or its typed version) set to "false", will be reloaded automatically when their ConfigMaps or Secrets are updated. Notice that setting the auto annotation to an undefined value counts as false as-well. " # TOD
EOT
type = bool
default = false
nullable = false
}