forked from terraform-aws-modules/terraform-aws-autoscaling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
263 lines (213 loc) · 8.29 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
variable "create_lc" {
description = "Whether to create launch configuration"
default = true
}
variable "create_asg" {
description = "Whether to create autoscaling group"
default = true
}
variable "create_asg_with_initial_lifecycle_hook" {
description = "Create an ASG with intial"
default = false
}
variable "initial_lifecycle_hook_name" {
description = "Initial lifecycle hook name required parameter"
default = ""
}
variable "initial_lifecycle_hook_transition" {
description = "Initial Lifecycle hook transtion type"
default = ""
}
variable "initial_lifecycle_hook_default_result" {
description = "Defines the default action the autoscaler takes when the lifecyle hook timesout"
default = "CONTINUE"
}
variable "initial_lifecycle_hook_notification_metadata" {
description = "Metadata for the lifecycle notification event"
default = ""
}
variable "initial_lifecycle_hook_heartbeat_time" {
description = "Lifecyle action timer"
default = "60"
}
variable "initial_lifecycle_hook_notification_target_arn" {
description = "SNS target arn to allow notifications from autoscaling group"
default = ""
}
variable "initial_lifecycle_hook_role_arn" {
description = "AWS iam role to grant access to notification target"
default = ""
}
variable "recreate_asg_when_lc_changes" {
description = "Whether to recreate an autoscaling group when launch configuration changes"
default = false
}
variable "name" {
description = "Creates a unique name beginning with the specified prefix"
}
variable "lc_name" {
description = "Creates a unique name for launch configuration beginning with the specified prefix"
default = ""
}
variable "asg_name" {
description = "Creates a unique name for autoscaling group beginning with the specified prefix"
default = ""
}
variable "launch_configuration" {
description = "The name of the launch configuration to use (if it is created outside of this module)"
default = ""
}
# Launch configuration
variable "image_id" {
description = "The EC2 image ID to launch"
default = ""
}
variable "instance_type" {
description = "The size of instance to launch"
default = ""
}
variable "iam_instance_profile" {
description = "The IAM instance profile to associate with launched instances"
default = ""
}
variable "key_name" {
description = "The key name that should be used for the instance"
default = ""
}
variable "security_groups" {
description = "A list of security group IDs to assign to the launch configuration"
type = "list"
default = []
}
variable "associate_public_ip_address" {
description = "Associate a public ip address with an instance in a VPC"
default = false
}
variable "user_data" {
description = "The user data to provide when launching the instance"
default = " "
}
variable "enable_monitoring" {
description = "Enables/disables detailed monitoring. This is enabled by default."
default = true
}
variable "ebs_optimized" {
description = "If true, the launched EC2 instance will be EBS-optimized"
default = false
}
variable "root_block_device" {
description = "Customize details about the root block device of the instance"
type = "list"
default = []
}
variable "ebs_block_device" {
description = "Additional EBS block devices to attach to the instance"
type = "list"
default = []
}
variable "ephemeral_block_device" {
description = "Customize Ephemeral (also known as 'Instance Store') volumes on the instance"
type = "list"
default = []
}
variable "spot_price" {
description = "The price to use for reserving spot instances"
default = ""
}
variable "placement_tenancy" {
description = "The tenancy of the instance. Valid values are 'default' or 'dedicated'"
default = "default"
}
# Autoscaling group
variable "max_size" {
description = "The maximum size of the auto scale group"
}
variable "min_size" {
description = "The minimum size of the auto scale group"
}
variable "desired_capacity" {
description = "The number of Amazon EC2 instances that should be running in the group"
}
variable "vpc_zone_identifier" {
description = "A list of subnet IDs to launch resources in"
type = "list"
}
variable "default_cooldown" {
description = "The amount of time, in seconds, after a scaling activity completes before another scaling activity can start"
default = 300
}
variable "health_check_grace_period" {
description = "Time (in seconds) after instance comes into service before checking health"
default = 300
}
variable "health_check_type" {
description = "Controls how health checking is done. Values are - EC2 and ELB"
}
variable "force_delete" {
description = "Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling group to delete even if it's in the process of scaling a resource. Normally, Terraform drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling"
default = false
}
variable "load_balancers" {
description = "A list of elastic load balancer names to add to the autoscaling group names"
default = []
}
variable "target_group_arns" {
description = "A list of aws_alb_target_group ARNs, for use with Application Load Balancing"
default = []
}
variable "termination_policies" {
description = "A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, Default"
type = "list"
default = ["Default"]
}
variable "suspended_processes" {
description = "A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer. Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly."
default = []
}
variable "tags" {
description = "A list of tag blocks. Each element should have keys named key, value, and propagate_at_launch."
default = []
}
variable "tags_as_map" {
description = "A map of tags and values in the same format as other resources accept. This will be converted into the non-standard format that the aws_autoscaling_group requires."
type = "map"
default = {}
}
variable "placement_group" {
description = "The name of the placement group into which you'll launch your instances, if any"
default = ""
}
variable "metrics_granularity" {
description = "The granularity to associate with the metrics to collect. The only valid value is 1Minute"
default = "1Minute"
}
variable "enabled_metrics" {
description = "A list of metrics to collect. The allowed values are GroupMinSize, GroupMaxSize, GroupDesiredCapacity, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupTerminatingInstances, GroupTotalInstances"
type = "list"
default = [
"GroupMinSize",
"GroupMaxSize",
"GroupDesiredCapacity",
"GroupInServiceInstances",
"GroupPendingInstances",
"GroupStandbyInstances",
"GroupTerminatingInstances",
"GroupTotalInstances",
]
}
variable "wait_for_capacity_timeout" {
description = "A maximum duration that Terraform should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to '0' causes Terraform to skip all Capacity Waiting behavior."
default = "10m"
}
variable "min_elb_capacity" {
description = "Setting this causes Terraform to wait for this number of instances to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes"
default = 0
}
variable "wait_for_elb_capacity" {
description = "Setting this will cause Terraform to wait for exactly this number of healthy instances in all attached load balancers on both create and update operations. Takes precedence over min_elb_capacity behavior."
default = false
}
variable "protect_from_scale_in" {
description = "Allows setting instance protection. The autoscaling group will not select instances with this setting for terminination during scale in events."
default = false
}