forked from trussworks/terraform-aws-ecs-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
184 lines (153 loc) · 4.79 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
variable "name" {
description = "The service name."
type = string
}
variable "environment" {
description = "Environment tag, e.g prod."
type = string
}
variable "cloudwatch_alarm_name" {
description = "Generic name used for CPU and Memory Cloudwatch Alarms"
default = ""
type = "string"
}
variable "cloudwatch_alarm_actions" {
description = "The list of actions to take for cloudwatch alarms"
type = "list"
default = []
}
variable "cloudwatch_alarm_cpu_enable" {
description = "Enable the CPU Utilization CloudWatch metric alarm"
type = "string"
default = true
}
variable "cloudwatch_alarm_cpu_threshold" {
description = "The CPU Utilization threshold for the CloudWatch metric alarm"
default = 80
type = "string"
}
variable "cloudwatch_alarm_mem_enable" {
description = "Enable the Memory Utilization CloudWatch metric alarm"
type = "string"
default = true
}
variable "cloudwatch_alarm_mem_threshold" {
description = "The Memory Utilization threshold for the CloudWatch metric alarm"
default = 80
type = "string"
}
variable "logs_cloudwatch_retention" {
description = "Number of days you want to retain log events in the log group."
default = 90
type = string
}
variable "logs_cloudwatch_group" {
description = "CloudWatch log group to create and use. Default: /ecs/{name}-{environment}"
default = ""
type = string
}
variable "ecr_repo_arns" {
description = "The ARNs of the ECR repos. By default, allows all repositories."
type = list(string)
default = ["*"]
}
variable "ecs_use_fargate" {
description = "Whether to use Fargate for the task definition."
default = false
type = string
}
variable "ecs_cluster" {
description = "ECS cluster object for this task."
type = object({
arn = string
name = string
})
}
variable "ecs_instance_role" {
description = "The name of the ECS instance role."
default = ""
type = string
}
variable "ecs_vpc_id" {
description = "VPC ID to be used by ECS."
type = string
}
variable "ecs_subnet_ids" {
description = "Subnet IDs for the ECS tasks."
type = list(string)
}
variable "fargate_task_cpu" {
description = "Number of cpu units used in initial task definition. Default is minimum."
default = 256
type = string
}
variable "fargate_task_memory" {
description = "Amount (in MiB) of memory used in initial task definition. Default is minimum."
default = 512
type = string
}
variable "tasks_desired_count" {
description = "The number of instances of a task definition."
default = 1
type = string
}
variable "tasks_minimum_healthy_percent" {
description = "Lower limit on the number of running tasks."
default = "100"
type = string
}
variable "tasks_maximum_percent" {
description = "Upper limit on the number of running tasks."
default = "200"
type = string
}
variable "container_image" {
description = "The image of the container."
default = "golang:1.12.5-alpine"
type = string
}
variable "container_port" {
description = "The port on which the container will receive traffic."
default = 80
type = string
}
variable "container_health_check_port" {
description = "An additional port on which the container can receive a health check. Zero means the container port can only receive a health check on the port set by the container_port variable."
default = 0
type = string
}
variable "container_definitions" {
description = "Container definitions provided as valid JSON document. Default uses golang:1.12.5-alpine running a simple hello world."
default = ""
type = string
}
variable "target_container_name" {
description = "Name of the container the Load Balancer should target. Default: {name}-{environment}"
default = ""
type = string
}
variable "associate_alb" {
description = "Whether to associate an Application Load Balancer (ALB) with the ECS service."
default = false
type = string
}
variable "associate_nlb" {
description = "Whether to associate a Network Load Balancer (NLB) with the ECS service."
default = false
type = string
}
variable "alb_security_group" {
description = "Application Load Balancer (ALB) security group ID to allow traffic from."
default = ""
type = string
}
variable "lb_target_group" {
description = "Either Application Load Balancer (ALB) or Network Load Balancer (NLB) target group ARN tasks will register with."
default = ""
type = string
}
variable "nlb_subnet_cidr_blocks" {
description = "List of Network Load Balancer (NLB) CIDR blocks to allow traffic from."
default = []
type = list(string)
}