-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
109 lines (100 loc) · 3.63 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
variable "aws_access_key_id" {
description = "value of AWS_ACCESS_KEY_ID"
type = string
default = ""
}
variable "aws_secret_access_key" {
description = "value of AWS_SECRET_ACCESS_KEY"
type = string
default = ""
}
variable "aws_region" {
description = "value of AWS_DEFAULT_REGION"
type = string
}
variable "account_id" {
description = "value of AWS account id"
type = string
}
variable "vpc_cidr_block" {
description = "CIDR block of the VPC"
type = string
default = null
}
variable "public_subnet_cidr_blocks" {
description = "CIDR blocks of the public subnets"
type = list(string)
default = []
}
variable "private_subnet_cidr_blocks" {
description = "CIDR blocks of the private subnets"
type = list(string)
default = []
}
variable "security_group_name" {
description = "Name of the security group"
type = string
default = null
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
variable "clusters" {
description = "A list of ecs clusters to create with configurations"
type = list(object({
name = string # Name of the cluster
create_cluster = optional(bool) # Whether to create the cluster
services = list(object({
name = string # Name of the service
enable_queue_auto_scaling = optional(bool) # Whether to enable queue auto scaling
auto_scaling = optional(object({
min_capacity = number # Minimum number of tasks
max_capacity = number # Maximum number of tasks
queue_name = string # Name of the queue
steps = list(object({
lower_bound = number # Lower bound of the step
upper_bound = optional(number) # Upper bound of the step
change = number # Desired count to be changed
}))
}))
task_definition = object({
family_name = string # Name of the task definition family
container_definitions = list(object({
name = string # Name of the container
create_repository_setup = optional(bool) # Whether to create the repository
repository_name = string # Name of ECR repository to be used
dockerfile_location = optional(string) # path to the Dockerfile
portMappings = optional(list(object({
containerPort = number # Port of the container
hostPort = number # Port of the host
protocol = string # Protocol of the port
})))
environment = optional(list(object({
name = string # Name of the environment variable
value = string # Value of the environment variable
}))) # Environment variables
secret_manager = optional(string) # ARN of the secret to get the environment variables
secrets = optional(list(object({
name = string # Name of the secret
valueFrom = string # ARN of the secret
})))
}))
cpu = number # CPU units
memory = number # Memory units
})
desired_count = number # Desired number of tasks
network = optional(object({
security_groups_tag = object({
key = string # Key of the tag
values = list(string) # Value of the tag
})
subnets_tag = object({
key = string # Key of the tag
values = list(string) # Value of the tag
})
}))
}))
}))
}