generated from snowplow-devops/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvariables.tf
167 lines (137 loc) · 4.36 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
158
159
160
161
162
163
164
165
166
167
variable "user_supplied_script" {
description = "The user-data script extension to execute"
type = string
}
variable "name" {
description = "A name which will be pre-pended to the resources created"
type = string
}
variable "tags" {
description = "The tags to append to this resource"
default = {}
type = map(string)
}
# --- Launch Template
variable "amazon_linux_2_ami_id" {
description = "The AMI ID to use which must be based of of Amazon Linux 2; by default the latest community version is used"
default = ""
type = string
}
variable "instance_type" {
description = "The instance type to use"
type = string
}
variable "ssh_key_name" {
description = "The name of the SSH key-pair to attach to all EC2 nodes deployed"
type = string
}
variable "iam_instance_profile_name" {
description = "The name of the IAM instance profile to associate with the launch template"
type = string
}
variable "associate_public_ip_address" {
description = "Whether to assign a public ip address to this instance"
type = bool
default = true
}
variable "security_groups" {
description = "A list of security groups to associate with the launch template"
type = list(string)
default = []
}
variable "root_block_device_name" {
description = "The name of the root block device for the AMI being used"
type = string
default = "/dev/xvda"
}
variable "root_block_device_volume_type" {
description = "The type of volume to assign to the root block device"
type = string
default = "gp3"
}
variable "root_block_device_volume_size_gb" {
description = "The size of the root block device in gb"
type = number
default = 10
}
variable "metadata_http_tokens" {
description = "Whether to enforce IMDSv2 on the metadata service (Options: required, optional)"
type = string
default = "required"
}
variable "metadata_http_put_response_hop_limit" {
description = "The desired HTTP PUT response hop limit for instance metadata requests"
type = number
default = 2
}
# --- Auto Scaling Group
variable "min_size" {
description = "The minimum number of servers in this server-group"
default = 1
type = number
}
variable "max_size" {
description = "The maximum number of servers in this server-group"
default = 2
type = number
}
variable "health_check_grace_period_sec" {
description = "Time (in seconds) after instance comes into service before checking health"
default = 300
type = number
}
variable "health_check_type" {
description = "EC2 or ELB - controls how health checking is done"
default = "EC2"
type = string
}
variable "subnet_ids" {
description = "The list of subnets to deploy Enrich across"
type = list(string)
}
variable "target_group_arns" {
description = "The list of target groups to associate the ASG with"
type = list(string)
default = []
}
variable "instance_refresh_min_healthy_percentage" {
description = "Percentage of ASG that must remain healthy during an instance refresh for the process to continue"
default = 90
type = number
}
# --- Auto Scaling Policies
variable "enable_auto_scaling" {
description = "Whether to enable auto-scaling policies for the service"
default = true
type = bool
}
variable "scale_up_cooldown_sec" {
description = "Time (in seconds) until another scale-up action can occur"
default = 180
type = number
}
variable "scale_up_cpu_threshold_percentage" {
description = "The average CPU percentage that must be exceeded to scale-up"
default = 60
type = number
}
variable "scale_up_eval_minutes" {
description = "The number of consecutive minutes that the threshold must be breached to scale-up"
default = 5
type = number
}
variable "scale_down_cooldown_sec" {
description = "Time (in seconds) until another scale-down action can occur"
default = 600
type = number
}
variable "scale_down_cpu_threshold_percentage" {
description = "The average CPU percentage that we must be below to scale-down"
default = 20
type = number
}
variable "scale_down_eval_minutes" {
description = "The number of consecutive minutes that we must be below the threshold to scale-down"
default = 60
type = number
}