-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
41 lines (34 loc) · 1.08 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
variable "namespace" {
description = "(Required) Namespace for the scaledObject"
type = string
}
variable "scaled_object_name" {
description = "(Required) scaledObject name"
type = string
}
variable "scale_target_refs" {
description = "(Required) .spec.ScaleTargetRef section holds the reference to the target resource, ie. Deployment, StatefulSet or Custom Resource."
type = map(any)
}
variable "manifest" {
description = "(Required) Object YAML"
type = map(any)
validation {
condition = lookup(var.manifest, "max_replica_count") <= 200
error_message = "Maximum number of pods to scale to cannot be larger than 200."
}
validation {
condition = lookup(var.manifest, "min_replica_count") != 0
error_message = "Minimum number of pods cannot be 0. scale to zero is disabled."
}
}
variable "advanced" {
description = "(Optional) Section to specify advanced options"
type = any
default = null
}
variable "triggers" {
description = "(Optional) Section to specify triggers"
type = any
default = null
}