-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
168 lines (142 loc) · 4.13 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
variable "ami_id" {
type = string
description = "'the ami id to use for the instances'"
}
variable "tags" {
type = map(string)
description = "common tags to add to the ressources"
default = {}
}
variable "subnet_ids_cluster" {
type = list(string)
description = "a list of subnet ids in which the ASG deploys to"
}
variable "vpc_id" {
type = string
description = "the VPC the ASG should be deployed in"
}
variable "availability_zones" {
description = "unused (DEPRECATED)"
default = ["a", "b", "c"]
}
variable "alb_instance_sgs" {
type = list(string)
description = "SGs which are beeing added to the instances (DEPRECATED, use allow_to_sgs from now on)"
default = []
}
variable "allow_to_sgs" {
type = list(string)
description = <<DOC
a new rule is beeing added to the provided list of security groups which allows the EC2 instances access to a specififed port, e.G. : `["$${var.sg_name},6379"]`
DOC
default = []
}
variable "instance_ssh_cidr_blocks" {
type = list(string)
description = "a list of CIDR blocks which are allowed ssh access, since it's internal no restriction is needed"
default = ["0.0.0.0/0"]
}
variable "desired_capacity" {
type = string
description = "the ASG desired_capacity of the EC2 machines (number of hosts which should be running)"
}
variable "health_check_type" {
type = string
description = "the ASG health_check_type of the EC2 machines"
default = "ELB"
}
variable "max_size" {
type = string
description = "the ASG max_size of the EC2 machines"
}
variable "min_size" {
type = string
description = "the ASG min_size of the EC2 machines"
}
variable "instance_type" {
description = "the EC2 instance type which shuld be spawend"
default = "t2.small"
}
variable "root_volume_size" {
description = "the instance root device volume size"
default = "20"
}
variable "root_volume_type" {
description = "the instance root device volume type"
default = "gp2"
}
variable "instance_volume_size" {
description = "the instance volume size"
default = "64"
}
variable "instance_volume_type" {
description = "the instance volume type"
default = "gp2"
}
variable "ssh_key_name" {
description = "the ssh_key_name which is used as the EC2 Key Name"
default = ""
}
variable "log_retention" {
description = "Log retention in Days"
default = 30
}
variable "instance_tags" {
type = list(object({
key = string
value = string
propagate_at_launch = bool
}))
description = <<DOC
Tags to be added to each EC2 instances part of the cluster.
This must be a list like this
[{
key = "InstallCW"
value = "true"
propagate_at_launch = true
},
{
key = "test"
value = "Test2"
propagate_at_launch = true
}]
DOC
default = []
}
variable "docker_registry_config" {
type = map(string)
description = <<DOC
Set Docker registry authentication information used by ECS. In dependendcy of `ecs_engine_auth_type` set this map like:
1. for dockercfg:
"repository" = "auth,email"
1. for docker
"repository" = "username,password,email"
1. for jfrog
"repository" = "token,username"
see: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html
DOC
default = {}
}
variable "ecs_engine_auth_type" {
description = <<DOC
Set Docker registry authentication type information used by ECS. Valid values are:
- dockercfg
- docker
- jfrog
See:
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html
DOC
default = ""
}
variable "datadog_api_key" {
description = "if the datadog_api_key variable is set a single datadog agent task definition is deployed on every EC2 machine for metrics and log gathering"
default = ""
}
variable "environment" {
type = string
description = "the environment this cluster is running in (e.g. 'testing')"
}
variable "squad" {
type = string
description = "the owner of this cluster"
}