forked from cloudposse/terraform-aws-documentdb-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
164 lines (138 loc) · 5.27 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
variable "zone_id" {
type = string
default = ""
description = "Route53 parent zone ID. If provided (not empty), the module will create sub-domain DNS records for the DocumentDB master and replicas"
}
variable "allowed_security_groups" {
type = list(string)
default = []
description = "List of existing Security Groups to be allowed to connect to the DocumentDB cluster"
}
variable "allowed_cidr_blocks" {
type = list(string)
default = []
description = "List of CIDR blocks to be allowed to connect to the DocumentDB cluster"
}
variable "vpc_id" {
type = string
description = "VPC ID to create the cluster in (e.g. `vpc-a22222ee`)"
}
variable "subnet_ids" {
type = list(string)
description = "List of VPC subnet IDs to place DocumentDB instances in"
}
# https://docs.aws.amazon.com/documentdb/latest/developerguide/limits.html#suported-instance-types
variable "instance_class" {
type = string
default = "db.r4.large"
description = "The instance class to use. For more details, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-classes.html#db-instance-class-specs"
}
variable "cluster_size" {
type = number
default = 3
description = "Number of DB instances to create in the cluster"
}
variable "snapshot_identifier" {
type = string
default = ""
description = "Specifies whether or not to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot"
}
variable "db_port" {
type = number
default = 27017
description = "DocumentDB port"
}
variable "master_username" {
type = string
default = "admin1"
description = "(Required unless a snapshot_identifier is provided) Username for the master DB user"
}
variable "master_password" {
type = string
default = ""
description = "(Required unless a snapshot_identifier is provided) Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file. Please refer to the DocumentDB Naming Constraints"
}
variable "retention_period" {
type = number
default = 5
description = "Number of days to retain backups for"
}
variable "preferred_backup_window" {
type = string
default = "07:00-09:00"
description = "Daily time range during which the backups happen"
}
variable "preferred_maintenance_window" {
type = string
default = "Mon:22:00-Mon:23:00"
description = "The window to perform maintenance in. Syntax: `ddd:hh24:mi-ddd:hh24:mi`."
}
variable "cluster_parameters" {
type = list(object({
apply_method = string
name = string
value = string
}))
default = []
description = "List of DB parameters to apply"
}
variable "cluster_family" {
type = string
default = "docdb3.6"
description = "The family of the DocumentDB cluster parameter group. For more details, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-parameter-group-create.html"
}
variable "engine" {
type = string
default = "docdb"
description = "The name of the database engine to be used for this DB cluster. Defaults to `docdb`. Valid values: `docdb`"
}
variable "engine_version" {
type = string
default = "3.6.0"
description = "The version number of the database engine to use"
}
variable "storage_encrypted" {
type = bool
description = "Specifies whether the DB cluster is encrypted"
default = true
}
variable "kms_key_id" {
type = string
description = "The ARN for the KMS encryption key. When specifying `kms_key_id`, `storage_encrypted` needs to be set to `true`"
default = ""
}
variable "skip_final_snapshot" {
type = bool
description = "Determines whether a final DB snapshot is created before the DB cluster is deleted"
default = true
}
variable "deletion_protection" {
type = bool
description = "A value that indicates whether the DB cluster has deletion protection enabled"
default = false
}
variable "apply_immediately" {
type = bool
description = "Specifies whether any cluster modifications are applied immediately, or during the next maintenance window"
default = true
}
variable "auto_minor_version_upgrade" {
type = bool
description = "Specifies whether any minor engine upgrades will be applied automatically to the DB instance during the maintenance window or not"
default = true
}
variable "enabled_cloudwatch_logs_exports" {
type = list(string)
description = "List of log types to export to cloudwatch. The following log types are supported: `audit`, `error`, `general`, `slowquery`"
default = []
}
variable "cluster_dns_name" {
type = string
description = "Name of the cluster CNAME record to create in the parent DNS zone specified by `zone_id`. If left empty, the name will be auto-asigned using the format `master.var.name`"
default = ""
}
variable "reader_dns_name" {
type = string
description = "Name of the reader endpoint CNAME record to create in the parent DNS zone specified by `zone_id`. If left empty, the name will be auto-asigned using the format `replicas.var.name`"
default = ""
}