-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
variables.tf
249 lines (208 loc) · 7.26 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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
variable "create" {
description = "Whether cluster should be created (affects nearly all resources)"
type = bool
default = true
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
################################################################################
# RDS Proxy
################################################################################
variable "name" {
description = "The identifier for the proxy. This name must be unique for all proxies owned by your AWS account in the specified AWS Region. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens"
type = string
default = ""
}
variable "auth" {
description = "Configuration block(s) with authorization mechanisms to connect to the associated instances or clusters"
type = any
default = {}
}
variable "debug_logging" {
description = "Whether the proxy includes detailed information about SQL statements in its logs"
type = bool
default = false
}
variable "engine_family" {
description = "The kind of database engine that the proxy will connect to. Valid values are `MYSQL` or `POSTGRESQL`"
type = string
default = ""
}
variable "idle_client_timeout" {
description = "The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it"
type = number
default = 1800
}
variable "require_tls" {
description = "A Boolean parameter that specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy"
type = bool
default = true
}
variable "role_arn" {
description = "The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in AWS Secrets Manager"
type = string
default = ""
}
variable "vpc_security_group_ids" {
description = "One or more VPC security group IDs to associate with the new proxy"
type = list(string)
default = []
}
variable "vpc_subnet_ids" {
description = "One or more VPC subnet IDs to associate with the new proxy"
type = list(string)
default = []
}
variable "proxy_tags" {
description = "A map of tags to apply to the RDS Proxy"
type = map(string)
default = {}
}
# Proxy Default Target Group
variable "connection_borrow_timeout" {
description = "The number of seconds for a proxy to wait for a connection to become available in the connection pool"
type = number
default = null
}
variable "init_query" {
description = "One or more SQL statements for the proxy to run when opening each new database connection"
type = string
default = ""
}
variable "max_connections_percent" {
description = "The maximum size of the connection pool for each target in a target group"
type = number
default = 90
}
variable "max_idle_connections_percent" {
description = "Controls how actively the proxy closes idle database connections in the connection pool"
type = number
default = 50
}
variable "session_pinning_filters" {
description = "Each item in the list represents a class of SQL operations that normally cause all later statements in a session using a proxy to be pinned to the same underlying database connection"
type = list(string)
default = []
}
# Proxy Target
variable "target_db_instance" {
description = "Determines whether DB instance is targeted by proxy"
type = bool
default = false
}
variable "db_instance_identifier" {
description = "DB instance identifier"
type = string
default = ""
}
variable "target_db_cluster" {
description = "Determines whether DB cluster is targeted by proxy"
type = bool
default = false
}
variable "db_cluster_identifier" {
description = "DB cluster identifier"
type = string
default = ""
}
# Proxy endpoints
variable "endpoints" {
description = "Map of DB proxy endpoints to create and their attributes (see `aws_db_proxy_endpoint`)"
type = any
default = {}
}
################################################################################
# CloudWatch Logs
################################################################################
variable "manage_log_group" {
description = "Determines whether Terraform will create/manage the CloudWatch log group or not. Note - this will fail if set to true after the log group has been created as the resource will already exist"
type = bool
default = true
}
variable "log_group_retention_in_days" {
description = "Specifies the number of days you want to retain log events in the log group"
type = number
default = 30
}
variable "log_group_kms_key_id" {
description = "The ARN of the KMS Key to use when encrypting log data"
type = string
default = null
}
variable "log_group_tags" {
description = "A map of tags to apply to the CloudWatch log group"
type = map(string)
default = {}
}
################################################################################
# IAM Role
################################################################################
variable "create_iam_role" {
description = "Determines whether an IAM role is created"
type = bool
default = true
}
variable "iam_role_name" {
description = "The name of the role. If omitted, Terraform will assign a random, unique name"
type = string
default = ""
}
variable "use_role_name_prefix" {
description = "Whether to use unique name beginning with the specified `iam_role_name`"
type = bool
default = false
}
variable "iam_role_description" {
description = "The description of the role"
type = string
default = ""
}
variable "iam_role_path" {
description = "The path to the role"
type = string
default = null
}
variable "iam_role_force_detach_policies" {
description = "Specifies to force detaching any policies the role has before destroying it"
type = bool
default = true
}
variable "iam_role_max_session_duration" {
description = "The maximum session duration (in seconds) that you want to set for the specified role"
type = number
default = 43200 # 12 hours
}
variable "iam_role_permissions_boundary" {
description = "The ARN of the policy that is used to set the permissions boundary for the role"
type = string
default = null
}
variable "iam_role_tags" {
description = "A map of tags to apply to the IAM role"
type = map(string)
default = {}
}
# IAM Policy
variable "create_iam_policy" {
description = "Determines whether an IAM policy is created"
type = bool
default = true
}
variable "iam_policy_name" {
description = "The name of the role policy. If omitted, Terraform will assign a random, unique name"
type = string
default = ""
}
variable "use_policy_name_prefix" {
description = "Whether to use unique name beginning with the specified `iam_policy_name`"
type = bool
default = false
}
variable "kms_key_arns" {
description = "List of KMS Key ARNs to allow access to decrypt SecretsManager secrets"
type = list(string)
default = []
}