-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars.tf
217 lines (171 loc) · 4.56 KB
/
vars.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#
# Terraform Provider(s) Variables
#
variable "master_id" {
description = "The 12-digit account ID used for role assumption"
/* default = "489641906295" */
}
variable "region" {
description = "AWS region"
type = string
}
variable "profile" {
type = string
default = "default"
}
#
# KMS Variables
#
variable "kms_description" {
description = "Unique identifier for this KMS key"
default = "Testing 1 KMS Key"
}
variable "key_usage" {
description = "KMS key is either Symectric ot Asymetric"
default = "ENCRYPT_DECRYPT"
}
variable "deletion_window_in_days" {
description = "Number of days for key deletion"
default = "7"
}
variable "is_enabled" {
description = "Is this KMS key Enabled or Disabled"
type = bool
default = "true"
}
variable "key_rotation" {
description = "Allow KMS to auto rotate the KMS Key"
type = bool
default = "true"
}
variable "kms_alias" {
default = "alias/synergy-kms-key"
}
# KMS_RDS VARIABLES
variable "kms_rds_description" {
description = "Unique identifier for this KMS key"
default = "Testing KMS RDS Key"
}
variable "kms_rds_alias" {
default = "alias/synergy-kms-rds-key"
}
# KMS_ECS VARIABLES
variable "kms_ecs_description" {
description = "Unique identifier for this KMS key"
default = "Testing KMS ECS Key"
}
variable "kms_ecs_alias" {
default = "alias/synergy-kms-ecs-key"
}
# VPC VARIABLES
variable "vpc_namespace" {
description = "The project namespace to use for unique resource naming"
// default = "wordpress-on-fargate"
default = "wordpress-fargate-using-efs"
type = string
}
variable "prefix" {
default = "wp"
description = "Common prefix for AWS resources names"
}
variable "vpc_cidr" {
description = "AWS VPC CIDR range"
type = string
default = "192.168.0.0/16"
}
variable "private_subnets" {
description = "The list of private subnets by AZ"
type = list(string)
default = ["192.168.4.0/24", "192.168.5.0/24"]
}
variable "public_subnets" {
description = "The list of public subnets by AZ"
type = list(string)
default = ["192.168.0.0/24", "192.168.1.0/24"]
}
variable "enable_nat" {
description = "To deploy or not to deploy a NAT Gateway"
default = "true"
}
variable "maduro_dickhead" {
description = "Do you agree that Maduro is a dictator and should be removed from venezuelan government? More info: https://dictators-wiki.fandom.com/es/wiki/Nicol%C3%A1s_Maduro"
type = bool
default = true
}
# APPLICATION LOAD BALANCER VARIABLES
variable "app_port" {
type = number
description = "app port for the alb"
default = 80
}
// variable for wordpress
/* variable "health_check_path" {
default = "/index.php" # proper path for wordpress container
} */
variable "health_check_path" {
default = "/" # proper path for nginx app container
}
## RDS VARIABLES ##
variable "instance_class" {
type = string
description = "(Required) The instance type of the RDS instance"
default = "t2.micro"
}
variable "db_name" {
description = "Database name"
type = string
default = "wordpressfargatedev"
}
variable "db_password" {
description = "DataBase Password"
type = string
default = "admin1234!"
}
variable "db_username" {
description = "DataBase user name"
type = string
default = "admin"
}
variable "rds_port" {
description = "DataBase security group port"
default = 3306
}
variable "db_subnet_group_name" {
type = string
description = "(optional) describe your variable"
default = "wordpress_db_subnet_group_dev"
}
# ECS FARGATE VARIABLES
variable "az_count" {
description = "Number of AZs to cover in a given region"
default = "2"
}
variable "app_count" {
type = number
description = "(total numbers of containers to be deployed"
default = 2
}
variable "app_name" {
description = "Docker image to run in the ECS cluster"
// default = "wordpress-on-fargate"
default = "wordpress-fargate-dev"
}
variable "app_image" {
description = "Docker image to run in the ECS cluster"
// default = "wordpress"
default = "wordpress"
}
variable "fargate_cpu" {
description = "Fargate instance CPU units to provision (1 vCPU = 1024 CPU units)"
default = "1024"
}
variable "fargate_memory" {
description = "Fargate instance memory to provision (in MiB)"
default = "2048"
}
// EFS VARS
variable "volume_name" {
type = string
description = "efs volume name"
default = "efs_volume-dev"
}