-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
executable file
·173 lines (146 loc) · 4.62 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
variable "domain_name" {
description = "The domain name for the cluster. Required."
}
variable "cluster_name" {
description = "The cluster name. Required if `sharded`"
default = null
}
variable "create" {
description = "Create resources, default `true`"
type = bool
default = true
}
variable "create_zone" {
description = "Creates private hosted zone with name `domain_name` in the `vpc_id`."
type = bool
default = false
}
variable "create_zone_records" {
description = "Create route53 zone records for MongoDB. `create_zone` must be true or `zone_id` must be provided."
type = bool
default = false
}
variable "create_security_group" {
description = "Creates a security group for MongoDB, defaults to `true`"
type = bool
default = true
}
variable "create_security_group_rules" {
description = "Creates a security group rules for MongoDB in the specified `security_group_id` or the created security group if `create_security_group` is true, defaults to `true`"
type = bool
default = true
}
variable "replica_sets" {
description = "Replica set configuration for data"
type = map(object({
shard_name = string
config_server = bool
members = list(object({
arbiter_only = bool
hidden = bool
image_id = string
instance_type = string
mongod_port = number
mongos_port = number
name = string
priority = number
volume_iops = number
volume_size = number
volume_type = string
votes = number
}))
}))
}
variable "router_nodes" {
description = "Standalone router node configuration"
type = list(object({
name = string
image_id = string
instance_type = string
mongos_port = number
}))
default = []
}
variable "ebs_block_device_name" {
description = "Block device name for data, default \"xvdb\""
default = "xvdb"
}
variable "ebs_block_device_mount_point" {
description = "MongoDB data mount point, default \"/data\""
default = "/data"
}
variable "mongod_conf" {
description = "Additional config to add to mongod.conf file."
default = ""
}
variable "mongos_conf" {
description = "Additional config to add to mongos.conf file."
default = ""
}
variable "mongodb_version" {
description = "MongoDB version tag (e.g. 4.0.0 or 4.0.0-ent), defaults to \"4.2\"."
default = "4.2"
}
variable "enterprise_binaries" {
description = "MongoDB Enterprise version, defaults to `false`."
type = bool
default = false
}
variable "enable_ssl" {
description = "Enable SSL for MongoDB connections, defaults to `false`."
type = bool
default = false
}
variable "vpc_id" {
description = "VPC id to use. Required."
}
variable "subnet_ids" {
description = "Subnet ids for the MongoDB server(s). Required."
type = list(string)
default = []
}
variable "zone_id" {
description = "Existing route53 private host zone id."
default = null
}
variable "user_data" {
description = "user_data script to pass in at runtime."
default = null
}
variable "ssh_key_name" {
description = "AWS key name you will use to access the MongoDB host instance(s). Required."
}
variable "security_group_id" {
description = "Security group to apply to the EC2 instance(s)."
default = null
}
variable "ssh_ingress_with_security_group_ids" {
description = "List of security group ids allowed to ingress on SSH port."
type = list(string)
default = []
}
variable "ssh_ingress_with_cidr_blocks" {
description = "List of CIDRs allowed to ingress on SSH port, defaults to empty list."
type = list(string)
default = []
}
variable "ssh_ingress_with_self" {
description = "Allowed ingress on SSH port from within the security group, defaults to `true`."
type = bool
default = true
}
variable "mongo_ingress_with_security_group_ids" {
description = "List of security group ids allowed to ingress on MongoDB port(s)."
type = list(string)
default = []
}
variable "mongo_ingress_with_cidr_blocks" {
description = "List of CIDRs allowed to ingress on MongoDB port(s), defaults to empty list."
type = list(string)
default = []
}
variable "tags" {
description = "Optional map of tags to set on resources, defaults to empty map."
type = map(string)
default = {}
}