This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
143 lines (120 loc) · 3.65 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
variable "ami_image_id" {
type = string
description = "EC2 AMI image to run in the ECS cluster"
}
variable "app_count" {
type = string
description = "Number of docker containers to run"
}
variable "app_name" {
type = string
description = "Name of the application"
}
variable "container_cpu" {
type = string
description = "Container instance CPU units to provision (1 vCPU = 1024 CPU units)"
}
variable "container_instance_type" {
type = string
description = "Container OS being used (windows or linux)"
validation {
condition = contains(["windows", "linux"], var.container_instance_type)
error_message = "Valid values for var: container_instance_type are (windows, linux)."
}
}
variable "container_memory" {
type = string
description = "Container instance memory to provision (in MiB)"
}
variable "ec2_desired_capacity" {
type = string
description = "Number of EC2s in the cluster"
}
variable "ec2_max_size" {
type = string
description = "Max Number of EC2s in the cluster"
}
variable "ec2_min_size" {
type = string
description = "Min Number of EC2s in the cluster"
}
variable "instance_type" {
type = string
description = "EC2 instance type to run in the ECS cluster"
}
variable "key_name" {
type = string
description = "Key to access EC2s in ECS cluster"
}
variable "lb_tg_name" {
type = string
description = "Load balancer target group name used by ECS service"
}
variable "network_mode" {
type = string
description = "The network mode used for the containers in the task. If OS used is Windows network_mode must equal none."
validation {
condition = contains(["none", "bridge", "host", "awsvpc"], var.network_mode)
error_message = "Valid values for var: network_mode are (none, bridge, host, awsvpc)."
}
}
variable "server_port" {
type = string
description = "The port the containers will be listening on"
}
variable "subnet_set_name" {
type = string
description = "The name of the subnet set associated with the account"
}
variable "tags_common" {
type = map(string)
description = "Common tags to be used by all resources"
}
variable "ec2_ingress_rules" {
description = "Security group ingress rules for the cluster EC2s"
type = map(object({
description = string
from_port = number
to_port = number
protocol = string
security_groups = list(string)
cidr_blocks = list(string)
}))
}
variable "ec2_egress_rules" {
description = "Security group egress rules for the cluster EC2s"
type = map(object({
description = string
from_port = number
to_port = number
protocol = string
security_groups = list(string)
cidr_blocks = list(string)
}))
}
variable "task_definition" {
type = string
description = "Task definition to be used by the ECS service"
}
variable "task_definition_volume" {
type = string
description = "Name of the volume referenced in the sourceVolume parameter of container definition in the mountPoints section"
}
variable "appscaling_min_capacity" {
type = number
description = "Minimum capacity of the application scaling target"
default = 1
}
variable "appscaling_max_capacity" {
type = number
description = "Maximum capacity of the application scaling target"
default = 3
}
variable "user_data" {
type = string
description = "The configuration used when creating EC2s used for the ECS cluster"
}
variable "vpc_id" {
type = string
description = "The ID of the VPC used to create resources"
}