-
Notifications
You must be signed in to change notification settings - Fork 5
/
variables.tf
240 lines (199 loc) · 6.95 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
variable "admin_password" {
description = "The master admin password. Used to bootstrap and login to the master. Also pushed to ssm parameter store for posterity."
type = string
}
variable "agent_lt_version" {
description = "The version of the agent launch template to use. Only use if you need to programatically select an older version of the launch template. Not recommended to change."
type = string
default = "$Latest"
}
variable "agent_max" {
description = "The maximum number of agents to run in the agent ASG."
type = number
default = 6
}
variable "agent_min" {
description = "The minimum number of agents to run in the agent ASG."
type = number
default = 2
}
variable "agent_volume_size" {
description = "The size of the agent volume."
type = number
default = 16
}
variable "ami_name" {
description = "The name of the amzn2 ami. Used for searching for AMI id."
type = string
default = "amzn2-ami-hvm-2.0.*-x86_64-gp2"
}
variable "ami_owner" {
description = "The owner of the amzn2 ami."
type = string
default = "amazon"
}
variable "api_ssm_parameter" {
description = "The path value of the API key, stored in ssm parameter store."
type = string
default = "/api_key"
}
variable "application" {
description = "The application name, to be interpolated into many resources and tags. Unique to this project."
type = string
default = "jenkins"
}
variable "auto_update_plugins_cron" {
description = "Cron to set to auto update plugins. The default is set to February 31st, disabling this functionality. Overwrite this variable to have plugins auto update."
type = string
default = "0 0 31 2 *"
}
variable "bastion_sg_name" {
description = "The bastion security group name to allow to ssh to the master/agents."
type = string
}
variable "cidr_ingress" {
description = "IP address cidr ranges allowed access to the LB."
type = list(string)
default = ["0.0.0.0/0"]
}
variable "custom_plugins" {
description = "Custom plugins to install alongside the defaults. Pull from outside the module."
type = string
default = ""
}
variable "domain_name" {
description = "The root domain name used to lookup the route53 zone information."
type = string
}
variable "efs_mode" {
description = "The EFS throughput mode. Options are bursting and provisioned. To set the provisioned throughput in mibps, configure efs_provisioned_throughput variable."
type = string
default = "bursting"
}
variable "efs_provisioned_throughput" {
description = "The EFS provisioned throughput in mibps. Ignored if EFS throughput mode is set to bursting."
type = number
default = 3
}
variable "executors" {
description = "The number of executors to assign to each agent. Must be an even number, divisible by two."
type = number
default = 4
}
variable "extra_agent_userdata" {
description = "Extra agent user-data to add to the default built-in."
type = string
default = ""
}
variable "extra_agent_userdata_merge" {
description = "Control how cloud-init merges extra agent user-data sections."
type = string
default = "list(append)+dict(recurse_array)+str()"
}
variable "extra_master_userdata" {
description = "Extra master user-data to add to the default built-in."
type = string
default = ""
}
variable "extra_master_userdata_merge" {
description = "Control how cloud-init merges extra master user-data sections."
type = string
default = "list(append)+dict(recurse_array)+str()"
}
variable "instance_type_controller" {
description = "The type of instances to use for controller autoscaling group (ASG)."
type = list(string)
default = ["t3a.xlarge"]
}
variable "instance_type_agents" {
description = "The type of instances to use for agent's autoscaling group (ASG)"
type = list(string)
default = ["t3.xlarge", "t3a.xlarge", "t2.xlarge", "t2a.xlarge"]
}
variable "jenkins_version" {
description = "The version number of Jenkins to use on the master. Change this value when a new version comes out, and it will update the launch configuration and the autoscaling group."
type = string
default = "2.346.3"
}
variable "key_name" {
description = "SSH Key to launch instances."
type = string
default = null
}
variable "master_lt_version" {
description = "The version of the master launch template to use. Only use if you need to programatically select an older version of the launch template. Not recommended to change."
type = string
default = "$Latest"
}
variable "password_ssm_parameter" {
description = "The path value of the master admin passowrd, stored in ssm parameter store."
type = string
default = "/admin_password"
}
variable "private_subnet_name" {
description = "The name prefix of the private subnets to pull in as a data source."
type = string
}
variable "public_subnet_name" {
description = "The name prefix of the public subnets to pull in as a data source."
type = string
}
variable "r53_record" {
description = "The FQDN for the route 53 record."
type = string
}
variable "region" {
description = "The AWS region to deploy the infrastructure too."
type = string
}
variable "retention_in_days" {
description = "How many days to retain cloudwatch logs."
type = number
default = 90
}
variable "scale_down_number" {
description = "Number of agents to destroy when scaling down."
type = number
default = -1
}
variable "scale_up_number" {
description = "Number of agents to create when scaling up."
type = number
default = 1
}
variable "ssl_certificate" {
description = "The name of the SSL certificate to use on the load balancer."
type = string
}
variable "ssm_parameter" {
description = "The full ssm parameter path that will house the api key and master admin password. Also used to grant IAM access to this resource."
type = string
}
variable "swarm_version" {
description = "The version of swarm plugin to install on the agents. Update by updating this value."
type = string
default = "3.34"
}
variable "tags" {
description = "tags to define locally, and interpolate into the tags in this module."
type = map(string)
}
variable "vpc_name" {
description = "The name of the VPC the infrastructure will be deployed to."
type = string
}
variable "asg_default_cooldown" {
description = "cooling period for ASG to pick up another scaling activity after one is complete"
type = number
default = 500
}
variable "agent_enabled_metrics" {
description = "A list of metrics to collect for each agent"
type = list(any)
default = []
}
variable "master_enabled_metrics" {
description = "A list of metrics to collect for the master"
type = list(any)
default = []
}