-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathvariables.tf
152 lines (125 loc) · 3.93 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
variable "vpc_id" {
description = "ID of the VPC."
type = "string"
}
variable "vpc_cidr" {
description = "CIDR for the VPC."
type = "string"
}
variable "environment" {
description = "Logical name of the environment, will be used as prefix and in tags."
type = "string"
}
variable "lb_subnetids" {
description = "List of subnets to which the load balancer needs to be attached. Mandatory when enable_lb = true."
type = "list"
default = []
}
variable "task_role_arn" {
description = "The AWS IAM role that will be provided to the task to perform AWS actions."
type = "string"
default = ""
}
variable "ecs_cluster_id" {
description = "The id of the ECS cluster"
type = "string"
}
variable "task_network_mode" {
description = "The network mode to be used in the task definiton. Supported modes are awsvpc and bridge."
default = "awsvpc"
}
variable "service_name" {
description = "Logical name of the service."
type = "string"
}
variable "lb_target_group" {
description = "The target group to connectect the container to the load balancer listerner."
type = "map"
default = {
container_port = 8080
host_port = 80
protocol = "http"
deregistration_delay = 300
}
}
variable "lb_listener" {
description = "The listner for the load balancer, SSL in only applied once a certificate arn is provided."
type = "map"
default = {
port = "80"
certificate_arn = ""
ssl_policy = "ELBSecurityPolicy-TLS-1-1-2017-01"
}
}
variable "awsvpc_service_security_groups" {
description = "List of security groups to be attached to service running in awsvpc network mode."
default = []
}
variable "awsvpc_service_subnetids" {
description = "List of subnet ids to which a service is deployed in fargate mode."
default = []
}
variable "lb_internal" {
description = "Indicates if the load balancer should be internal or external."
default = "true"
}
variable "task_definition" {
description = "The AWS task definition of the containers to be created."
type = "string"
}
variable "service_desired_count" {
description = "The number of instances of the task definition to place and keep running."
default = "1"
}
variable "lb_health_check" {
description = "A health check block for the load balancer, see https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html more for details."
type = "list"
default = [{}]
}
variable "awsvpc_task_execution_role_arn" {
description = "The role arn used for task execution. Required for network mode awsvpc."
type = "string"
default = ""
}
variable "service_launch_type" {
description = "The launch type, can be EC2 or FARGATE."
type = "string"
default = "EC2"
}
variable "task_cpu" {
description = "CPU value for the task, required for FARGATE."
type = "string"
default = ""
}
variable "task_memory" {
description = "Memory value for the task, required for FARGATE."
type = "string"
default = ""
}
variable "task_volumes" {
description = "List of volume blocks for task definition"
type = "list"
default = []
}
variable "enable_lb" {
description = "Enable or disable the load balancer."
default = true
}
variable "ecs_service_role" {
default = ""
}
variable "public_alb_whitelist" {
type = "list"
description = "Enables to limit the ips that can access the ALB over public network"
default = ["0.0.0.0/0"]
}
variable "lb_security_group_ids" {
description = "Custom Load Balancer security group ids"
type = "list"
default = []
}
variable "lb_health_check_grace_period_seconds" {
description = "Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647"
type = "string"
default = "0"
}