-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
220 lines (188 loc) · 6.39 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
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
217
218
219
220
# ----------------------------------------------------------------
# common variables
# ----------------------------------------------------------------
variable "project" {
type = string
description = "Project Name"
}
variable "environment" {
type = string
description = "Environment Name"
}
variable "region" {
type = string
description = "AWS Region Name"
}
variable "github_repo_url" {
type = string
}
# ----------------------------------------------------------------
# VPC Variables
# ----------------------------------------------------------------
variable "enable_public_subnet" {
type = bool
description = "Enable public subnets if needed"
}
variable "availability_zones_count" {
description = "The number of AZs."
type = number
}
variable "vpc_cidr" {
description = "The CIDR block for the VPC"
type = string
}
variable "subnet_cidr_bits" {
description = "The number of subnet bits for the CIDR"
type = number
}
# ----------------------------------------------------------------
# Route53 variables
# ----------------------------------------------------------------
## Public DNS Zone Variables
variable "public_zone_a_records" {
type = map(any)
description = "A map with record name and IP address value."
default = {}
}
variable "public_zone_cname_records" {
type = map(any)
description = "A map with record name and CNAME value."
default = {}
}
variable "public_zone_name" {
type = string
description = "This is the name of the hosted zone"
}
variable "public_zone_comment" {
type = string
description = "A comment for the hosted zone."
default = null
}
variable "public_zone_tags" {
type = map(string)
description = "A mapping of tags to assign to the zone."
default = {}
}
variable "public_zone_nameservers" {
type = map(any)
description = "A map with the subdomain name and a list of name servers that host the subzone configuration."
default = {}
}
variable "public_zone_aliases" {
description = "List of Private Zone aliases"
type = any
}
## Private DNS Zone Variables
variable "private_zone_a_records" {
type = map(any)
description = "A map with record name and IP address value."
default = {}
}
variable "private_zone_cname_records" {
type = map(any)
description = "A map with record name and CNAME value."
default = {}
}
variable "private_zone_name" {
type = string
description = "This is the name of the hosted zone"
}
variable "private_zone_comment" {
type = string
description = "A comment for the hosted zone."
default = null
}
variable "private_zone_tags" {
type = map(string)
description = "A mapping of tags to assign to the zone."
default = {}
}
variable "private_zone_nameservers" {
type = map(any)
description = "A map with the subdomain name and a list of name servers that host the subzone configuration."
default = {}
}
variable "private_zone_aliases" {
description = "List of Private Zone aliases"
type = any
}
# ----------------------------------------------------------------
# IAM Variables
# ----------------------------------------------------------------
variable "account_alias" {
description = "Assign the account alias for the AWS Account. Unmanaged by default. Resource will be created if the string is non-empty."
type = string
default = ""
}
variable "account_pass_policy" {
description = "Manages Password Policy for the AWS Account. Unmanaged by default. Resource will be created if 'manage' is set to true."
type = object({
manage = bool # Set to true, to manage the AWS account password policy
allow_users_to_change_password = bool # Allow users to change their own password?
hard_expiry = bool # Users are prevented from setting a new password after their password has expired?
max_password_age = number # Number of days that an user password is valid
minimum_password_length = number # Minimum length to require for user passwords
password_reuse_prevention = number # The number of previous passwords that users are prevented from reusing
require_lowercase_characters = bool # Require lowercase characters for user passwords?
require_numbers = bool # Require numbers for user passwords?
require_symbols = bool # Require symbols for user passwords?
require_uppercase_characters = bool # Require uppercase characters for user passwords?
})
default = {
manage = false
allow_users_to_change_password = null
hard_expiry = null
max_password_age = null
minimum_password_length = null
password_reuse_prevention = null
require_lowercase_characters = null
require_numbers = null
require_symbols = null
require_uppercase_characters = null
}
}
# ----------------------------------------------------------------
# AWS KMS Variables
# ----------------------------------------------------------------
variable "kms_alias" {
type = string
description = "The display name of the key."
default = ""
validation {
condition = var.kms_alias == "" || can(regex("alias\\/.+", var.kms_alias))
error_message = "The name must start with the word 'alias' followed by a forward slash."
}
}
variable "use_aws_key_material" {
type = bool
description = "Whether to use AWS managed key materia or customer managed key material"
default = false
}
# ----------------------------------------------------------------
# AWS RDS Variables
# ----------------------------------------------------------------
variable "rds_instances" {
type = any
description = "List of AWS RDS Instances"
default = []
}
variable "bucket" {
description = "Name of bucket"
type = string
default = null
}
# ----------------------------------------------------------------
# AWS EKS Variables
# ----------------------------------------------------------------
variable "kubernetes_version" {
type = string
description = "Version of EKS"
}
variable "eks_node_groups" {
type = any
description = "List of EKS Node Groups"
default = []
}
variable "aws_eks_addons" {
type = list(any)
}