forked from terraform-aws-modules/terraform-aws-atlantis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
343 lines (290 loc) · 9.69 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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
variable "name" {
description = "Name to use on all resources created (VPC, ALB, etc)"
type = string
default = "atlantis"
}
variable "internal" {
description = "Whether the load balancer is internal or external"
type = bool
default = false
}
variable "tags" {
description = "A map of tags to use on all resources"
type = map(string)
default = {}
}
variable "atlantis_fqdn" {
description = "FQDN of Atlantis to use. Set this only to override Route53 and ALB's DNS name."
type = string
default = null
}
# VPC
variable "vpc_id" {
description = "ID of an existing VPC where resources will be created"
type = string
default = ""
}
variable "public_subnet_ids" {
description = "A list of IDs of existing public subnets inside the VPC"
type = list(string)
default = []
}
variable "private_subnet_ids" {
description = "A list of IDs of existing private subnets inside the VPC"
type = list(string)
default = []
}
variable "cidr" {
description = "The CIDR block for the VPC which will be created if `vpc_id` is not specified"
type = string
default = ""
}
variable "azs" {
description = "A list of availability zones in the region"
type = list(string)
default = []
}
variable "public_subnets" {
description = "A list of public subnets inside the VPC"
type = list(string)
default = []
}
variable "private_subnets" {
description = "A list of private subnets inside the VPC"
type = list(string)
default = []
}
# ALB
variable "alb_ingress_cidr_blocks" {
description = "List of IPv4 CIDR ranges to use on all ingress rules of the ALB."
type = list(string)
default = ["0.0.0.0/0"]
}
variable "alb_log_bucket_name" {
description = "S3 bucket (externally created) for storing load balancer access logs. Required if alb_logging_enabled is true."
type = string
default = ""
}
variable "alb_log_location_prefix" {
description = "S3 prefix within the log_bucket_name under which logs are stored."
type = string
default = ""
}
variable "alb_logging_enabled" {
description = "Controls if the ALB will log requests to S3."
type = bool
default = false
}
# ACM
variable "certificate_arn" {
description = "ARN of certificate issued by AWS ACM. If empty, a new ACM certificate will be created and validated using Route53 DNS"
type = string
default = ""
}
variable "acm_certificate_domain_name" {
description = "Route53 domain name to use for ACM certificate. Route53 zone for this domain should be created in advance. Specify if it is different from value in `route53_zone_name`"
type = string
default = ""
}
# Route53
variable "route53_zone_name" {
description = "Route53 zone name to create ACM certificate in and main A-record, without trailing dot"
type = string
default = ""
}
variable "route53_record_name" {
description = "Name of Route53 record to create ACM certificate in and main A-record. If null is specified, var.name is used instead. Provide empty string to point root domain name to ALB."
type = string
default = null
}
variable "create_route53_record" {
description = "Whether to create Route53 record for Atlantis"
type = bool
default = true
}
# Cloudwatch
variable "cloudwatch_log_retention_in_days" {
description = "Retention period of Atlantis CloudWatch logs"
type = number
default = 7
}
# SSM parameters for secrets
variable "webhook_ssm_parameter_name" {
description = "Name of SSM parameter to keep webhook secret"
type = string
default = "/atlantis/webhook/secret"
}
variable "atlantis_github_user_token_ssm_parameter_name" {
description = "Name of SSM parameter to keep atlantis_github_user_token"
type = string
default = "/atlantis/github/user/token"
}
variable "atlantis_gitlab_user_token_ssm_parameter_name" {
description = "Name of SSM parameter to keep atlantis_gitlab_user_token"
type = string
default = "/atlantis/gitlab/user/token"
}
variable "atlantis_bitbucket_user_token_ssm_parameter_name" {
description = "Name of SSM parameter to keep atlantis_bitbucket_user_token"
type = string
default = "/atlantis/bitbucket/user/token"
}
variable "ssm_kms_key_arn" {
description = "ARN of KMS key to use for encryption and decryption of SSM Parameters. Required only if your key uses a custom KMS key and not the default key"
type = string
default = ""
}
# ECS Service / Task
variable "ecs_service_assign_public_ip" {
description = "Should be true, if ECS service is using public subnets (more info: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_cannot_pull_image.html)"
type = bool
default = false
}
variable "policies_arn" {
description = "A list of the ARN of the policies you want to apply"
type = list(string)
default = ["arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"]
}
variable "ecs_service_desired_count" {
description = "The number of instances of the task definition to place and keep running"
type = number
default = 1
}
variable "ecs_service_deployment_maximum_percent" {
description = "The upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment"
type = number
default = 200
}
variable "ecs_service_deployment_minimum_healthy_percent" {
description = "The lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment"
type = number
default = 50
}
variable "ecs_task_cpu" {
description = "The number of cpu units used by the task"
type = number
default = 256
}
variable "ecs_task_memory" {
description = "The amount (in MiB) of memory used by the task"
type = number
default = 512
}
variable "container_memory_reservation" {
description = "The amount of memory (in MiB) to reserve for the container"
type = number
default = 128
}
variable "custom_container_definitions" {
description = "A list of valid container definitions provided as a single valid JSON document. By default, the standard container definition is used."
type = string
default = ""
}
# Atlantis
variable "atlantis_image" {
description = "Docker image to run Atlantis with. If not specified, official Atlantis image will be used"
type = string
default = ""
}
variable "atlantis_version" {
description = "Verion of Atlantis to run. If not specified latest will be used"
type = string
default = "latest"
}
variable "atlantis_port" {
description = "Local port Atlantis should be running on. Default value is most likely fine."
type = number
default = 4141
}
variable "atlantis_repo_whitelist" {
description = "List of allowed repositories Atlantis can be used with"
type = list(string)
}
variable "atlantis_allowed_repo_names" {
description = "Git repositories where webhook should be created"
type = list(string)
default = []
}
variable "allow_repo_config" {
description = "When true allows the use of atlantis.yaml config files within the source repos."
type = string
default = "false"
}
variable "atlantis_log_level" {
description = "Log level that Atlantis will run with. Accepted values are: <debug|info|warn|error>"
type = string
default = "debug"
}
# Github
variable "atlantis_github_user" {
description = "GitHub username that is running the Atlantis command"
type = string
default = ""
}
variable "atlantis_github_user_token" {
description = "GitHub token of the user that is running the Atlantis command"
type = string
default = ""
}
# Gitlab
variable "atlantis_gitlab_user" {
description = "Gitlab username that is running the Atlantis command"
type = string
default = ""
}
variable "atlantis_gitlab_user_token" {
description = "Gitlab token of the user that is running the Atlantis command"
type = string
default = ""
}
variable "atlantis_gitlab_hostname" {
description = "Gitlab server hostname, defaults to gitlab.com"
type = string
default = "gitlab.com"
}
# Bitbucket
variable "atlantis_bitbucket_user" {
description = "Bitbucket username that is running the Atlantis command"
type = string
default = ""
}
variable "atlantis_bitbucket_user_token" {
description = "Bitbucket token of the user that is running the Atlantis command"
type = string
default = ""
}
variable "atlantis_bitbucket_base_url" {
description = "Base URL of Bitbucket Server, use for Bitbucket on prem (Stash)"
type = string
default = ""
}
variable "custom_environment_secrets" {
description = "List of additional secrets the container will use (list should contain maps with `name` and `valueFrom`)"
type = list(object(
{
name = string
valueFrom = string
}
))
default = []
}
variable "custom_environment_variables" {
description = "List of additional environment variables the container will use (list should contain maps with `name` and `value`)"
type = list(object(
{
name = string
value = string
}
))
default = []
}
variable "security_group_ids" {
description = "List of one or more security groups to be added to the load balancer"
type = list(string)
default = []
}
variable "aws_ssm_path" {
description = "AWS ARN prefix for SSM (public AWS region or Govcloud). Valid options: aws, aws-us-gov."
type = string
default = "aws"
}