-
-
Notifications
You must be signed in to change notification settings - Fork 149
/
variables.tf
206 lines (167 loc) · 7.81 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"
}
variable "availability_zones" {
type = list(string)
description = "List of availability zones"
}
variable "vpc_cidr_block" {
type = string
description = "VPC CIDR block"
}
variable "ecs_launch_type" {
type = string
description = "ECS launch type"
}
variable "container_name" {
type = string
description = "The name of the container. Up to 255 characters ([a-z], [A-Z], [0-9], -, _ allowed)"
}
variable "container_image" {
type = string
description = "The image used to start the container. Images in the Docker Hub registry available by default"
}
variable "container_memory" {
type = number
description = "The amount of memory (in MiB) to allow the container to use. This is a hard limit, if the container attempts to exceed the container_memory, the container is killed. This field is optional for Fargate launch type and the total amount of container_memory of all containers in a task will need to be lower than the task memory value"
}
variable "container_memory_reservation" {
type = number
description = "The amount of memory (in MiB) to reserve for the container. If container needs to exceed this threshold, it can do so up to the set container_memory hard limit"
}
variable "container_port_mappings" {
type = list(object({
containerPort = number
hostPort = number
protocol = string
}))
description = "The port mappings to configure for the container. This is a list of maps. Each map should contain \"containerPort\", \"hostPort\", and \"protocol\", where \"protocol\" is one of \"tcp\" or \"udp\". If using containers in a task with the awsvpc or host network mode, the hostPort can either be left blank or set to the same value as the containerPort"
}
variable "container_cpu" {
type = number
description = "The number of cpu units to reserve for the container. This is optional for tasks using Fargate launch type and the total amount of container_cpu of all containers in a task will need to be lower than the task-level cpu value"
}
variable "container_essential" {
type = bool
description = "Determines whether all other containers in a task are stopped, if this container fails or stops for any reason. Due to how Terraform type casts booleans in json it is required to double quote this value"
}
variable "container_environment" {
type = list(object({
name = string
value = string
}))
description = "The environment variables to pass to the container. This is a list of maps"
}
variable "container_readonly_root_filesystem" {
type = bool
description = "Determines whether a container is given read-only access to its root filesystem. Due to how Terraform type casts booleans in json it is required to double quote this value"
}
variable "network_mode" {
type = string
description = "The network mode to use for the task. This is required to be `awsvpc` for `FARGATE` `launch_type`"
}
variable "task_cpu" {
type = number
description = "The number of CPU units used by the task. If using `FARGATE` launch type `task_cpu` must match supported memory values (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)"
}
variable "task_memory" {
type = number
description = "The amount of memory (in MiB) used by the task. If using Fargate launch type `task_memory` must match supported cpu value (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)"
}
variable "desired_count" {
type = number
description = "The number of instances of the task definition to place and keep running"
}
variable "deployment_controller_type" {
type = string
description = "Type of deployment controller. Valid values are `CODE_DEPLOY` and `ECS`"
}
variable "deployment_maximum_percent" {
type = number
description = "The upper limit of the number of tasks (as a percentage of `desired_count`) that can be running in a service during a deployment"
}
variable "deployment_minimum_healthy_percent" {
type = number
description = "The lower limit (as a percentage of `desired_count`) of the number of tasks that must remain running and healthy in a service during a deployment"
}
variable "ignore_changes_task_definition" {
type = bool
description = "Whether to ignore changes in container definition and task definition in the ECS service"
}
variable "assign_public_ip" {
type = bool
description = "Assign a public IP address to the ENI (Fargate launch type only). Valid values are `true` or `false`. Default `false`"
}
variable "propagate_tags" {
type = string
description = "Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION"
}
variable "github_oauth_token" {
type = string
description = "GitHub OAuth Token with permissions to access private repositories"
}
variable "repo_owner" {
type = string
description = "GitHub Organization or Username"
}
variable "repo_name" {
type = string
description = "GitHub repository name of the application to be built and deployed to ECS"
}
variable "branch" {
type = string
description = "Branch of the GitHub repository, _e.g._ `master`"
}
variable "build_image" {
type = string
description = "Docker image for build environment, _e.g._ `amazonlinux2-x86_64-standard:5.0`"
}
variable "build_compute_type" {
type = string
description = "`CodeBuild` instance size. Possible values are: `BUILD_GENERAL1_SMALL` `BUILD_GENERAL1_MEDIUM` `BUILD_GENERAL1_LARGE`"
}
variable "build_timeout" {
type = number
description = "How long in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed"
}
# https://www.terraform.io/docs/configuration/variables.html
# It is recommended you avoid using boolean values and use explicit strings
variable "poll_source_changes" {
type = bool
description = "Periodically check the location of your source content and run the pipeline if changes are detected"
}
variable "privileged_mode" {
type = bool
description = "If set to true, enables running the Docker daemon inside a Docker container on the CodeBuild instance. Used when building Docker images"
}
variable "image_repo_name" {
type = string
description = "ECR repository name to store the Docker image built by this module. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html)"
}
variable "image_tag" {
type = string
description = "Docker image tag in the ECR repository, e.g. 'latest'. Used as CodeBuild ENV variable when building Docker images. [For more info](http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html)"
}
variable "environment_variables" {
type = list(object(
{
name = string
value = string
type = string
}))
description = "A list of maps, that contain the keys 'name', 'value', and 'type' to be used as additional environment variables for the build. Valid types are 'PLAINTEXT', 'PARAMETER_STORE', or 'SECRETS_MANAGER'"
}
variable "webhook_enabled" {
type = bool
description = "Set to false to prevent the module from creating any webhook resources"
}
variable "s3_bucket_force_destroy" {
type = bool
description = "A boolean that indicates all objects should be deleted from the CodePipeline artifact store S3 bucket so that the bucket can be destroyed without error"
}
variable "codebuild_extra_policy_arns" {
type = list(string)
default = []
description = "List of ARNs of extra policies to attach to the CodeBuild role"
}