You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: variables.tf
+43-4Lines changed: 43 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,167 +1,199 @@
1
-
2
1
// Variables specific to module label
3
2
variable"attributes" {
4
3
description="Suffix name with additional attributes (policy, role, etc.)"
5
4
type="list"
6
5
default=[]
7
6
}
7
+
8
8
variable"delimiter" {
9
9
description="Delimiter to be used between `name`, `namespaces`, `attributes`, etc."
10
10
default="-"
11
11
}
12
+
12
13
variable"environment" {
13
14
description="Environment (ex: `dev`, `qa`, `stage`, `prod`). (Second or top level namespace. Depending on namespacing options)"
14
15
}
16
+
15
17
variable"name" {
16
18
description="Base name for resources"
17
19
}
20
+
18
21
variable"namespace-env" {
19
22
description="Prefix name with the environment. If true, format is: <env>-<name>"
20
23
default=true
21
24
}
25
+
22
26
variable"namespace-org" {
23
27
description="Prefix name with the organization. If true, format is: <org>-<env namespaced name>. If both env and org namespaces are used, format will be <org>-<env>-<name>"
24
28
default=false
25
29
}
30
+
26
31
variable"organization" {
27
32
description="Organization name (Top level namespace)."
28
33
default=""
29
34
}
35
+
30
36
variable"tags" {
31
37
description="A map of additional tags"
32
38
type="map"
33
39
default={}
34
40
}
35
41
36
-
37
42
// Variables specific to this module
38
43
variable"enabled" {
39
44
description="Set to false to prevent the module from creating anything"
description="The IAM instance profile to associate with launched instances"
57
64
default=""
58
65
}
66
+
59
67
variable"key_name" {
60
68
description="The key name that should be used for the instance"
61
69
default=""
62
70
}
71
+
63
72
variable"security_groups" {
64
73
description="A list of security group IDs to assign to the launch configuration"
65
74
type="list"
66
75
}
76
+
67
77
variable"associate_public_ip_address" {
68
78
description="Associate a public ip address with an instance in a VPC"
69
79
default=false
70
80
}
81
+
71
82
variable"user_data" {
72
83
description="The user data to provide when launching the instance"
73
84
default=""
74
85
}
86
+
75
87
variable"enable_monitoring" {
76
88
description="Enables/disables detailed monitoring. This is enabled by default."
77
89
default=true
78
90
}
91
+
79
92
variable"ebs_optimized" {
80
93
description="If true, the launched EC2 instance will be EBS-optimized"
81
94
default=false
82
95
}
96
+
83
97
variable"ebs_block_device" {
84
98
description="Additional EBS block devices to attach to the instance"
85
99
type="list"
86
100
default=[]
87
101
}
102
+
88
103
variable"ephemeral_block_device" {
89
104
description="Customize Ephemeral (also known as 'Instance Store') volumes on the instance"
90
105
type="list"
91
106
default=[]
92
107
}
108
+
93
109
variable"root_block_device" {
94
110
description="Customize details about the root block device of the instance"
95
111
type="list"
96
112
default=[]
97
113
}
114
+
98
115
variable"placement_tenancy" {
99
116
description="The tenancy of the instance. Valid values are 'default' or 'dedicated'"
100
117
default="default"
101
118
}
119
+
102
120
variable"spot_price" {
103
121
description="The price to use for reserving spot instances"
104
122
default=0
105
123
}
106
124
107
-
108
125
// Autoscaling group variables
109
126
variable"asg_name" {
110
127
description="Override autoscaling group prefix name"
111
128
default=""
112
129
}
130
+
113
131
variable"launch_configuration" {
114
132
description="The name of the launch configuration to use (if it is created outside of this module)"
115
133
default=""
116
134
}
135
+
117
136
variable"max_size" {
118
137
description="The maximum size of the auto scale group"
119
138
}
139
+
120
140
variable"min_size" {
121
141
description="The minimum size of the auto scale group"
122
142
}
143
+
123
144
variable"desired_capacity" {
124
145
description="The number of Amazon EC2 instances that should be running in the group"
125
146
}
147
+
126
148
variable"default_cooldown" {
127
149
description="The amount of time, in seconds, after a scaling activity completes before another scaling activity can start"
128
150
default=300
129
151
}
152
+
130
153
variable"force_delete" {
131
154
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"
132
155
default=false
133
156
}
157
+
134
158
variable"health_check_grace_period" {
135
159
description="Time (in seconds) after instance comes into service before checking health"
136
160
default=300
137
161
}
162
+
138
163
variable"health_check_type" {
139
164
description="Controls how health checking is done. Values are - EC2 and ELB"
140
165
}
166
+
141
167
variable"load_balancers" {
142
168
description="A list of elastic load balancer names to add to the autoscaling group names"
143
169
default=[]
144
170
}
171
+
145
172
variable"suspended_processes" {
146
173
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."
147
174
default=[]
148
175
}
176
+
149
177
variable"target_group_arns" {
150
178
description="A list of aws_alb_target_group ARNs, for use with Application Load Balancing"
151
179
default=[]
152
180
}
181
+
153
182
variable"termination_policies" {
154
183
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"
155
184
type="list"
156
185
default=["OldestLaunchConfiguration", "Default"]
157
186
}
187
+
158
188
variable"placement_group" {
159
189
description="The name of the placement group into which you'll launch your instances, if any"
160
190
default=""
161
191
}
192
+
162
193
variable"enabled_metrics" {
163
194
description="A list of metrics to collect. The allowed values are GroupMinSize, GroupMaxSize, GroupDesiredCapacity, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupTerminatingInstances, GroupTotalInstances"
description="The granularity to associate with the metrics to collect. The only valid value is 1Minute"
178
211
default="1Minute"
179
212
}
213
+
180
214
variable"min_elb_capacity" {
181
215
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"
182
216
default=0
183
217
}
218
+
184
219
variable"protect_from_scale_in" {
185
220
description="Allows setting instance protection. The autoscaling group will not select instances with this setting for terminination during scale in events."
186
221
default=false
187
222
}
223
+
188
224
variable"tags_ag" {
189
225
description="Additional tags for Autoscaling group. A list of tag blocks. Each element is a map with key, value, and propagate_at_launch."
190
226
default=[]
191
227
}
228
+
192
229
variable"vpc_zone_identifier" {
193
230
description="A list of subnet IDs to launch resources in"
194
231
type="list"
195
232
}
233
+
196
234
variable"wait_for_capacity_timeout" {
197
235
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."
198
236
default="10m"
199
237
}
238
+
200
239
variable"wait_for_elb_capacity" {
201
240
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."
0 commit comments