-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathvariables.tf
More file actions
252 lines (211 loc) · 7.72 KB
/
variables.tf
File metadata and controls
252 lines (211 loc) · 7.72 KB
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
variable "availability_zone" {
type = string
description = "The availability zone to create the instance in."
}
variable "docker_mirror_machine_ami" {
type = string
default = ""
description = "AMI for the EC2 instance to use. Must be in the same availability zone. Leave empty to use latest compatible with the Sourcegraph version."
}
variable "docker_mirror_machine_type" {
type = string
default = "m5.large" // 2 vCPU, 8GB
description = "Docker registry mirror node machine type."
}
variable "docker_mirror_boot_disk_size" {
type = number
default = 64
description = "Docker registry mirror node disk size in GB."
}
variable "docker_mirror_disk_iops" {
type = number
default = 3000
description = "Persistent Docker registry mirror additional IOPS."
}
variable "docker_mirror_static_ip" {
type = string
default = "10.0.1.4"
description = "The IP to statically assign to the instance. Should be internal."
}
variable "docker_mirror_ssh_access_cidr_range" {
type = string
default = "0.0.0.0/0"
description = "CIDR range from where SSH access to the EC2 instance is acceptable."
}
variable "docker_mirror_http_access_cidr_range" {
type = string
default = "10.0.0.0/16"
description = "DEPRECATED. This is not used anymore."
}
variable "executor_resource_prefix" {
type = string
default = ""
description = "An optional prefix to add to all resources created."
}
variable "executor_machine_image" {
type = string
default = ""
description = "Executor node machine disk image to use for creating the boot volume. Leave empty to use latest compatible with the Sourcegraph version."
}
variable "executor_machine_type" {
type = string
default = "c5n.metal" // 72 vCPU, 192GB
description = "Executor node machine type."
}
variable "executor_boot_disk_size" {
type = number
default = 100 // 100GB
description = "Executor node disk size in GB"
}
variable "executor_boot_disk_iops" {
type = number
default = 3000
description = "Executor node disk additional IOPS."
}
variable "executor_preemptible_machines" {
type = bool
default = false
description = "Whether to use preemptible machines instead of standard machines; usually way cheaper but might be terminated at any time"
}
variable "executor_instance_tag" {
type = string
description = "A label tag to add to all the executors. Can be used for filtering out the right instances in stackdriver monitoring."
}
variable "executor_ssh_access_cidr_range" {
type = string
default = "0.0.0.0/0"
description = "CIDR range from where SSH access to the EC2 instances is acceptable."
}
variable "executor_http_access_cidr_range" {
type = string
default = "0.0.0.0/0"
description = "DEPRECATED. This is not used anymore."
}
variable "executor_sourcegraph_external_url" {
type = string
description = "The externally accessible URL of the target Sourcegraph instance."
}
variable "executor_sourcegraph_executor_proxy_password" {
type = string
description = "The shared password used to authenticate requests to the internal executor proxy."
sensitive = true
}
variable "executor_queue_name" {
type = string
default = ""
description = "The single queue from which the executor should dequeue jobs. Either this or `executor_queue_names` is required"
}
variable "executor_queue_names" {
type = list(string)
default = null
description = "The multiple queues from which the executor should dequeue jobs. Either this or `executor_queue_name` is required"
}
variable "executor_maximum_runtime_per_job" {
type = string
default = "30m"
description = "The maximum wall time that can be spent on a single job"
}
variable "executor_maximum_num_jobs" {
type = number
default = 18
description = "The number of jobs to run concurrently per executor instance"
}
variable "executor_num_total_jobs" {
type = number
default = 1800
description = "The maximum number of jobs that will be dequeued by the worker"
}
variable "executor_max_active_time" {
type = string
default = "2h"
description = "The maximum time that can be spent by the worker dequeueing records to be handled"
}
variable "executor_firecracker_num_cpus" {
type = number
default = 4
description = "The number of CPUs to give to each firecracker VM"
}
variable "executor_job_num_cpus" {
type = number
default = 4
description = "The number of CPUs to allocate to each virtual machine or container"
}
variable "executor_firecracker_memory" {
type = string
default = "12GB"
description = "The amount of memory to give to each firecracker VM"
}
variable "executor_job_memory" {
type = string
default = "12GB"
description = "The amount of memory to allocate to each virtual machine or container"
}
variable "executor_firecracker_disk_space" {
type = string
default = "20GB"
description = "The amount of disk space to give to each firecracker VM"
}
variable "executor_use_firecracker" {
type = bool
default = true
description = "Whether to isolate commands in virtual machines"
}
variable "executor_min_replicas" {
type = number
default = 1
description = "The minimum number of executor instances to run in the autoscaling group."
}
variable "executor_max_replicas" {
type = number
default = 1
description = "The maximum number of executor instances to run in the autoscaling group."
}
variable "executor_jobs_per_instance_scaling" {
type = number
default = 360
description = "The amount of jobs a single instance should have in queue. Used for autoscaling."
}
variable "executor_metrics_environment_label" {
type = string
description = "The value for environment by which to filter the custom metrics."
}
variable "private_networking" {
type = bool
default = false
description = "If true, the executors and docker mirror will live in a private subnet and communicate with the internet through NAT."
}
variable "security_group_id" {
type = string
default = ""
description = "If provided, the default security groups will not be created. The ID of the security group to associate the Docker Mirror network and the Launch Template network with."
}
variable "executor_docker_auth_config" {
type = string
default = ""
description = "If provided, this docker auth config file will be used to authorize image pulls. See [Using private registries](https://docs.sourcegraph.com/admin/deploy_executors#using-private-registries) for how to configure."
sensitive = true
}
variable "randomize_resource_names" {
type = bool
default = false
description = "Use randomized names for resources. Deployments using the legacy naming convention will be updated in-place with randomized names when enabled."
}
variable "permissions_boundary_arn" {
type = string
default = ""
description = "If not provided, there will be no permissions boundary on IAM roles and users created. The ARN of a policy to use for permissions boundaries with IAM roles and users."
}
variable "ami_version" {
type = string
default = ""
description = "Specify a Sourcegraph executor ami version to use rather than pulling latest"
validation {
condition = can(regex("^v?(\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z-.]+)?(\\+[0-9A-Za-z-.]+)?)?$", var.ami_version))
error_message = "The Soucegraph ami version must be valid semver."
}
}
variable "private_ca_cert_path" {
type = string
default = ""
description = "Path to the private CA certificate file"
}