forked from github-aws-runners/terraform-aws-github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
194 lines (163 loc) · 5.59 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
variable "aws_region" {
description = "AWS region."
type = string
}
variable "vpc_id" {
description = "The VPC for security groups of the action runners."
type = string
}
variable "subnet_ids" {
description = "List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`."
type = list(string)
}
variable "tags" {
description = "Map of tags that will be added to created resources. By default resources will be tagged with name and environment."
type = map(string)
default = {}
}
variable "environment" {
description = "A name that identifies the environment, used as prefix and for tagging."
type = string
}
variable "enable_organization_runners" {
type = bool
}
variable "github_app" {
description = "GitHub app parameters, see your github app. Ensure the key is base64 encoded."
type = object({
key_base64 = string
id = string
client_id = string
client_secret = string
webhook_secret = string
})
}
variable "scale_down_schedule_expression" {
description = "Scheduler expression to check every x for scale down."
type = string
default = "cron(*/5 * * * ? *)"
}
variable "minimum_running_time_in_minutes" {
description = "The time an ec2 action runner should be running at minimum before terminated if non busy."
type = number
default = 5
}
variable "runner_extra_labels" {
description = "Extra labels for the runners (GitHub). Separate each label by a comma"
type = string
default = ""
}
variable "webhook_lambda_zip" {
description = "File location of the webhook lambda zip file."
type = string
default = null
}
variable "webhook_lambda_timeout" {
description = "Time out of the webhook lambda in seconds."
type = number
default = 10
}
variable "runners_lambda_zip" {
description = "File location of the lambda zip file for scaling runners."
type = string
default = null
}
variable "runners_scale_up_lambda_timeout" {
description = "Time out for the scale down lambda in seconds."
type = number
default = 60
}
variable "runners_scale_down_lambda_timeout" {
description = "Time out for the scale up lambda in seconds."
type = number
default = 60
}
variable "runner_binaries_syncer_lambda_zip" {
description = "File location of the binaries sync lambda zip file."
type = string
default = null
}
variable "runner_binaries_syncer_lambda_timeout" {
description = "Time out of the binaries sync lambda in seconds."
type = number
default = 300
}
variable "role_permissions_boundary" {
description = "Permissions boundary that will be added to the created roles."
type = string
default = null
}
variable "role_path" {
description = "The path that will be added to role path for created roles, if not set the environment name will be used."
type = string
default = null
}
variable "instance_profile_path" {
description = "The path that will be added to the instance_profile, if not set the environment name will be used."
type = string
default = null
}
variable "instance_type" {
description = "Instance type for the action runner."
type = string
default = "m5.large"
}
variable "runner_as_root" {
description = "Run the action runner under the root user."
type = bool
default = false
}
variable "runners_maximum_count" {
description = "The maximum number of runners that will be created."
type = number
default = 3
}
variable "encrypt_secrets" {
description = "Encrypt secret variables for lambda's such as secrets and private keys."
type = bool
default = true
}
variable "manage_kms_key" {
description = "Let the module manage the KMS key."
type = bool
default = true
}
variable "kms_key_id" {
description = "Custom KMS key to encrypted lambda secrets, if not provided and `encrypt_secrets` = `true` a KMS key will be created by the module. Secrets will be encrypted with a context `Environment = var.environment`."
type = string
default = null
}
variable "userdata_pre_install" {
type = string
default = ""
description = "Script to be ran before the GitHub Actions runner is installed on the EC2 instances"
}
variable "userdata_post_install" {
type = string
default = ""
description = "Script to be ran after the GitHub Actions runner is installed on the EC2 instances"
}
variable "idle_config" {
description = "List of time period that can be defined as cron expression to keep a minimum amount of runners active instead of scaling down to 0. By defining this list you can ensure that in time periods that match the cron expression within 5 seconds a runner is kept idle."
type = list(object({
cron = string
timeZone = string
idleCount = number
}))
default = []
}
variable "enable_ssm_on_runners" {
description = "Enable to allow access the runner instances for debugging purposes via SSM. Note that this adds additional permissions to the runner instances."
type = bool
default = false
}
variable "logging_retention_in_days" {
description = "Specifies the number of days you want to retain log events for the lambda log group. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653."
type = number
default = 7
}
variable "runner_allow_prerelease_binaries" {
description = "Allow the runners to update to prerelease binaries."
type = bool
default = false
}