-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
84 lines (69 loc) · 2.2 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
variable "autoscaling_group_name" {
description = "Name of AWS Auto Scaling Group that are part of the ECS Cluster"
type = string
}
variable "cluster_name" {
description = "Name of ECS Cluster Name"
type = string
}
variable "name_prefix" {
description = "Prefix of the resources (cloudwatch, autoscaling policy) name"
type = string
default = "ecs-cluster"
}
variable "autoscaling" {
description = "Auto Scaling Configuration"
type = object({
scale_in = optional(object({
evaluation_periods = optional(number, 5)
cooldown = optional(number, 300)
interval_period = optional(number, 60)
}), {})
scale_out = optional(object({
evaluation_periods = optional(number, 3)
cooldown = optional(number, 60)
interval_period = optional(number, 60)
}), {})
min_size = optional(number, 1)
max_size = optional(number, 3)
})
default = {
scale_in = {
evaluation_period = 5
cooldown = 300
interval_period = 60
}
scale_out = {
evaluation_period = 3
cooldown = 60
interval_period = 60
}
min_size = 1
max_size = 3
}
}
variable "metric" {
description = "Target Metric Configuration"
type = object({
name = optional(string, "MemoryReservation") # Available built-in metrics: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-metrics.html#ecs-metrics
statistic_type = optional(string, "Average") # Available built-in statistic type: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html
target_high = optional(number, 85)
target_low = optional(number, 30)
})
default = {
name = "MemoryReservation"
statistic_type = "Average"
target_high = 85
target_low = 30
}
}
variable "additional_alarm_actions" {
description = "Additional Alarm Action to be Executed"
type = list(string)
default = []
}
variable "tags" {
description = "Tags of Resources"
type = map(string)
default = {}
}