-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
92 lines (84 loc) · 1.87 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
variable "aws_access_key_id" {
description = "Your aws access key id"
type = string
}
variable "aws_secret_access_key" {
description = "Your aws secret access key"
type = string
}
variable "region" {
description = "AWS region"
default = "us-east-1"
type = string
}
# What image you want to build
# How many container should be spawned
# port
variable "app_type" {
description = "Application and configuration"
type = object({
image = string
count = number
port = number
})
default = {
image = "nginx:latest"
count = 2
port = 80
}
}
variable "aws_launch_type" {
description = "ECS Launch type. (1vCPU = 1024, memory in MiB)"
type = object({
type = string
cpu = number
memory = number
})
default = {
type = "FARGATE"
cpu = 256
memory = 512
}
}
variable "availability_zones_count" {
description = "Many instance that will be created"
type = number
default = 2
}
variable "vpc_cidr_block" {
description = "CIDR block for your vpc"
type = string
default = "172.16.0.0/16" # 16 bit hosts, 2^16 which is maximal
}
variable "autoscale_config" {
description = "Configuration for app autoscaling target"
type = object({
min = number
max = number
})
default = {
min = 1
max = 4
}
}
variable "autoscale_metric" {
description = "Configuration for cloud metric alarm"
type = object({
period = string
cooldown = number
evaluation_periods = string
max_threshold = string
min_threshold = string
up = number
down = number
})
default = {
period = "120"
cooldown = 120
evaluation_periods = "3"
max_threshold = "80"
min_threshold = "10"
up = 1
down = -1
}
}