-
Notifications
You must be signed in to change notification settings - Fork 152
/
variables.tf
206 lines (172 loc) · 7.66 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
variable "region" {
type = string
description = "AWS region in which to provision the AWS resources"
}
variable "description" {
type = string
default = "Jenkins server as Docker container running on Elastic Benastalk"
description = "Will be used as Elastic Beanstalk application description"
}
# https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html
# https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html#platforms-supported.docker
variable "solution_stack_name" {
type = string
default = "64bit Amazon Linux 2018.03 v2.12.17 running Docker 18.06.1-ce"
description = "Elastic Beanstalk stack, e.g. Docker, Go, Node, Java, IIS. For more info: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html"
}
variable "master_instance_type" {
type = string
default = "t2.medium"
description = "EC2 instance type for Jenkins master, e.g. 't2.medium'"
}
variable "vpc_id" {
type = string
description = "ID of the VPC in which to provision the AWS resources"
}
variable "availability_zones" {
type = list(string)
description = "List of Availability Zones for EFS"
}
variable "healthcheck_url" {
type = string
default = "/login"
description = "Application Health Check URL. Elastic Beanstalk will call this URL to check the health of the application running on EC2 instances"
}
variable "loadbalancer_type" {
type = string
default = "application"
description = "Load Balancer type, e.g. 'application' or 'classic'"
}
variable "loadbalancer_certificate_arn" {
type = string
description = "Load Balancer SSL certificate ARN. The certificate must be present in AWS Certificate Manager"
default = ""
}
variable "loadbalancer_ssl_policy" {
type = string
default = ""
description = "Specify a security policy to apply to the listener. This option is only applicable to environments with an application load balancer"
}
variable "loadbalancer_subnets" {
type = list(string)
description = "List of subnets to place Elastic Load Balancer"
}
variable "application_subnets" {
type = list(string)
description = "List of subnets to place EC2 instances and EFS"
}
variable "dns_zone_id" {
type = string
description = "Route53 parent zone ID. The module will create sub-domain DNS records in the parent zone for the EB environment and EFS"
}
variable "associated_security_group_ids" {
type = list(string)
default = []
description = "List of security groups to be allowed to connect to Jenkins master EC2 instances"
}
variable "ssh_key_pair" {
type = string
default = ""
description = "Name of SSH key that will be deployed on Elastic Beanstalk instances. The key should be present in AWS"
}
variable "github_oauth_token" {
type = string
description = "GitHub Oauth Token"
}
variable "github_organization" {
type = string
default = "cloudposse"
description = "GitHub organization, e.g. 'cloudposse'. By default, this module will deploy 'https://github.com/cloudposse/jenkins' repository"
}
variable "github_repo_name" {
type = string
default = "jenkins"
description = "GitHub repository name, e.g. 'jenkins'. By default, this module will deploy 'https://github.com/cloudposse/jenkins' repository"
}
variable "github_branch" {
type = string
default = "master"
description = "GitHub repository branch, e.g. 'master'. By default, this module will deploy 'https://github.com/cloudposse/jenkins' master branch"
}
# https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
variable "build_image" {
type = string
default = "aws/codebuild/docker:1.12.1"
description = "CodeBuild build image, e.g. 'aws/codebuild/amazonlinux2-x86_64-standard:1.0'. For more info: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html"
}
# https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html
variable "build_compute_type" {
type = string
default = "BUILD_GENERAL1_SMALL"
description = "CodeBuild compute type, e.g. 'BUILD_GENERAL1_SMALL'. For more info: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html"
}
variable "aws_account_id" {
type = string
description = "AWS Account ID. Used as CodeBuild ENV variable $AWS_ACCOUNT_ID when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html"
}
variable "availability_zone_selector" {
type = string
default = "Any"
description = "Availability Zone selector"
}
variable "environment_type" {
type = string
default = "LoadBalanced"
description = "Environment type, e.g. 'LoadBalanced' or 'SingleInstance'. If setting to 'SingleInstance', `rolling_update_type` must be set to 'Time' or `Immutable`, and `loadbalancer_subnets` will be unused (it applies to the ELB, which does not exist in SingleInstance environments)"
}
# https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-autoscalingupdatepolicyrollingupdate
variable "rolling_update_type" {
type = string
default = "Health"
description = "`Health`, `Time` or `Immutable`. Set it to `Immutable` to apply the configuration change to a fresh group of instances. For more details, see https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-autoscalingupdatepolicyrollingupdate"
}
variable "image_tag" {
type = string
description = "Docker image tag in the ECR repository, e.g. 'latest'. Used as CodeBuild ENV variable $IMAGE_TAG when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html"
default = "latest"
}
variable "env_vars" {
type = map(string)
default = {}
description = "Map of custom ENV variables to be provided to the Jenkins application running on Elastic Beanstalk, e.g. env_vars = { JENKINS_USER = 'admin' JENKINS_PASS = 'xxxxxx' }"
}
variable "use_efs_ip_address" {
type = bool
default = false
description = "If set to `true`, will provide the EFS IP address instead of DNS name to Jenkins as ENV var"
}
variable "efs_backup_schedule" {
type = string
description = "A CRON expression specifying when AWS Backup initiates a backup job"
default = null
}
variable "efs_backup_start_window" {
type = number
description = "The amount of time in minutes before beginning a backup. Minimum value is 60 minutes"
default = null
}
variable "efs_backup_completion_window" {
type = number
description = "The amount of time AWS Backup attempts a backup before canceling the job and returning an error. Must be at least 60 minutes greater than `start_window`"
default = null
}
variable "efs_backup_cold_storage_after" {
type = number
description = "Specifies the number of days after creation that a recovery point is moved to cold storage"
default = null
}
variable "efs_backup_delete_after" {
type = number
description = "Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than `cold_storage_after`"
default = null
}
variable "loadbalancer_logs_bucket_force_destroy" {
type = bool
default = false
description = "Force destroy the S3 bucket for load balancer logs even if it's not empty"
}
variable "cicd_bucket_force_destroy" {
type = bool
default = false
description = "Force destroy the CI/CD S3 bucket even if it's not empty"
}