-
Notifications
You must be signed in to change notification settings - Fork 13
/
variables.tf
170 lines (140 loc) · 3.64 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
variable "project" {
type = "string"
default = "test"
description = "Project name is used to identify resources"
}
variable "environment" {
type = "string"
default = "env"
description = "Environment name is used to identify resources"
}
variable "service" {
description = "Service name (will be used as family name in task definition)"
default = "SuperService"
}
variable "use_existant_cluster" {
description = "Bool statement to declare usage of existant ECS cluster"
default = "false"
}
variable "ecs_cluster_id" {
description = "ID of existing ECS cluster (if want to attach service and etc to existing cluster)"
default = "none"
}
variable "ecs_cluster_name" {
description = "Name of existing ECS cluster (if want to attach service and etc to existing cluster)"
default = "none"
}
variable "container_cpu" {
description = "Amount of cpu used by the task"
default = "512"
}
variable "container_port" {
description = "exposed port in container"
default = "80"
}
variable "container_memory" {
description = "Amount of memory used by the task"
default = "1024"
}
variable "health_check_grace_period_seconds" {
description = "Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown"
default = "30"
}
variable "container_definitions" {
description = "Fargate container definition"
default = <<DEFINITION
[
{
"name": "SuperService-env",
"cpu": 512,
"memory": 512,
"image": "nginx:alpine",
"essential": true,
"portMappings": [
{
"containerPort": 80,
"hostPort": 80
}
]
}
]
DEFINITION
}
variable "task_role_arn" {
description = "ARN of IAM role that should be passed into container to access AWS resources from it."
default = ""
}
variable "tags" {
type = "map"
description = "Additional tags for all resources"
default = {}
}
variable "vpc_id" {
description = "The ID of VPC"
type = "string"
}
variable "subnets" {
description = "List of subnets where to run ECS Service"
type = "list"
}
variable "create_security_group" {
default = "true"
}
variable "security_groups" {
type = "list"
}
variable "assign_public_ip" {
default = "false"
}
variable "alb_target_group_arn" {
description = "ARN of target group"
type = "string"
default = "none"
}
variable "key-pair-name" {
description = "key-pair name for ec2"
type = "string"
default = "ecs-nodes"
}
variable "instance_type" {
description = "EC2 instance type"
type = "string"
default = "t2.small"
}
variable "launch_type" {
description = "Launch type for ECS [ FARGATE | EC2 ]"
type = "string"
default = "FARGATE"
}
variable "use_fargate_spot" {
default = "false"
}
variable "volume_type" {
description = "Volume type for EC2"
type = "string"
default = "standard"
}
variable "volume_size" {
description = "Volume size for EC2"
default = "100"
}
variable "availability_zones" {
description = "List of availability zones which will be provisined by autoscailing group"
type = "list"
}
variable "autoscaling_min_capacity" {
description = "Amount of min running task or EC2 instances"
default = "1"
}
variable "autoscaling_max_capacity" {
description = "Amount of max running task or EC2 instances"
default = "10"
}
variable "autoscaling_cpu_high_threshold" {
description = "Autoscaling CPU threshold for scale-up"
default = "50"
}
variable "autoscaling_cpu_low_threshold" {
description = "Autoscaling CPU threshold for scale-down"
default = "40"
}