-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathvariables.tf
168 lines (133 loc) · 5.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
#---------------------------------------------------------------------------------------------------------------------
# REQUIRED MODULE PARAMETERS
# These variables must be passed in by the operator.
# ---------------------------------------------------------------------------------------------------------------------
variable "aws_region" {
description = "The AWS region in which the ECS Service will be created."
type = string
}
variable "service_name" {
description = "The name of the ECS service (e.g. my-service-stage)"
type = string
}
variable "platform_version" {
description = "The ECS Fargate version to run Grafana on"
type = string
}
variable "ecs_cluster" {
description = "The ECS cluster to run the service on"
type = string
}
# Docker image configuration
variable "image" {
description = "The Docker image to run"
type = string
}
variable "image_version" {
description = "Which version (AKA tag) of the var.image Docker image to deploy (e.g. 0.57)"
type = string
}
variable "container_port" {
description = "The port number on which this service's Docker container accepts incoming HTTP or HTTPS traffic."
type = number
}
variable "cloudwatch_log_group_name" {
description = "The name of the cloudwatch log group where the application will send logs to"
type = string
}
# Runtime properties of this ECS Service in the ECS Cluster
variable "cpu" {
description = "The number of CPU units to allocate to the ECS Service."
type = number
}
variable "memory" {
description = "How much memory, in MB, to give the ECS Service."
type = number
}
variable "desired_number_of_tasks" {
description = "How many instances of the ECS Service to run across the ECS cluster"
type = number
}
variable "allow_inbound_from_cidr_blocks" {
description = "A list of IP CIDR blocks allowed to access the service"
type = list
}
# VPC information
variable "vpc_id" {
description = "The VPC ID in which to deploy the resources"
type = string
}
variable "private_subnet_ids" {
description = "The list of private subnet IDs"
type = list
}
variable "public_subnet_ids" {
description = "The list of public subnet IDs"
type = list
}
variable "ssl_cert_arn" {
description = "The ARN of the SSL certificate to use on the ALB"
type = string
}
# ---------------------------------------------------------------------------------------------------------------------
# OPTIONAL MODULE PARAMETERS
# These variables have defaults, but may be overridden by the operator.
# ---------------------------------------------------------------------------------------------------------------------
variable "health_check_grace_period_seconds" {
description = "Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 1800. Only valid for services configured to use load balancers."
type = number
default = 15
}
# ALB options
variable "alb_target_group_protocol" {
description = "The network protocol to use for routing traffic from the ALB to the Targets. Must be one of HTTP or HTTPS. Note that if HTTPS is used, per https://goo.gl/NiOVx7, the ALB will use the security settings from ELBSecurityPolicy2015-05."
type = string
default = "HTTP"
}
variable "alb_target_group_deregistration_delay" {
description = "The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds."
type = number
default = 15
}
# Deployment Options
variable "deployment_maximum_percent" {
description = "The upper limit, as a percentage of var.desired_number_of_tasks, of the number of running ECS Tasks that can be running in a service during a deployment. Setting this to more than 100 means that during deployment, ECS will deploy new instances of a Task before undeploying the old ones."
type = number
default = 200
}
variable "deployment_minimum_healthy_percent" {
description = "The lower limit, as a percentage of var.desired_number_of_tasks, of the number of running ECS Tasks that must remain running and healthy in a service during a deployment. Setting this to less than 100 means that during deployment, ECS may undeploy old instances of a Task before deploying new ones."
type = number
default = 100
}
# Health check options
variable "health_check_interval" {
description = "The approximate amount of time, in seconds, between health checks of an individual Target. Minimum value 5 seconds, Maximum value 300 seconds."
type = number
default = 30
}
variable "health_check_protocol" {
description = "The protocol the ALB uses when performing health checks on Targets. Must be one of HTTP and HTTPS."
type = string
default = "HTTP"
}
variable "health_check_timeout" {
description = "The amount of time, in seconds, during which no response from a Target means a failed health check. The acceptable range is 2 to 60 seconds."
type = number
default = 5
}
variable "health_check_healthy_threshold" {
description = "The number of consecutive successful health checks required before considering an unhealthy Target healthy. The acceptable range is 2 to 10."
type = number
default = 5
}
variable "health_check_unhealthy_threshold" {
description = "The number of consecutive failed health checks required before considering a target unhealthy. The acceptable range is 2 to 10."
type = number
default = 2
}
variable "health_check_matcher" {
description = "The HTTP codes to use when checking for a successful response from a Target. You can specify multiple values (e.g. '200,202') or a range of values (e.g. '200-299')."
type = string
default = "200"
}