-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvariables.tf
55 lines (49 loc) · 2.24 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
variable "instance_types_list" {
description = "List of instance types. If not default will overwrite `instance_types_weighted_map`. "
type = list(string)
default = []
}
variable "instance_types_weighted_map" {
description = "Map of instance_type and their weighted_capacity. Conflict with `instance_types_list`"
type = list(object({
instance_type = string
weighted_capacity = string
}))
default = [{ instance_type = "t3.micro", weighted_capacity = "1" }]
}
variable "instance_weight_default" {
description = "Default number of capacity units for all instance types."
type = number
default = 1
validation {
condition = var.instance_weight_default >= 1 && var.instance_weight_default <= 999
error_message = "Value must be in the range of 1 to 999."
}
}
variable "availability_zones_names_list" {
description = "The list with AZs names"
type = list(string)
}
variable "product_description_list" {
description = "The product description for the Spot price (Linux/UNIX | Red Hat Enterprise Linux | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC))."
type = list(string)
default = ["Linux/UNIX", "Linux/UNIX (Amazon VPC)"]
}
variable "custom_price_modifier" {
description = "Modifier for getting custom prices. Must be between 1 and 2. Values greater than 1.7 will often not make sense. Because it will be equal or greater than on-demand price."
type = number
default = 1.05
validation {
condition = var.custom_price_modifier >= 1 && var.custom_price_modifier <= 2
error_message = "Modifier for getting custom prices. Must be between 1 and 2. Values greater than 1.7 will often not make sense. Because it will be equal or greater than on-demand price."
}
}
variable "normalization_modifier" {
description = "Modifier for price normalization (rounded up / ceil). Helps to avoid small price fluctuations. Must be 10, 100, 1000 or 10000."
type = number
default = 1000
validation {
condition = contains([10, 100, 1000, 10000], var.normalization_modifier)
error_message = "Modifier for price normalization must be 10, 100, 1000 or 10000."
}
}