forked from brantburnett/terraform-aws-couchbase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
197 lines (171 loc) · 10.3 KB
/
main.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
terraform {
required_version = ">= 0.10.3" # introduction of Local Values configuration language feature
}
locals {
iam_instance_profile = "${element(concat(compact(list(var.iam_instance_profile)), aws_iam_instance_profile.couchbase.*.name), 0)}"
}
module "mds_group_1" {
source = "./mds-group"
cluster_name = "${var.cluster_name}"
cluster_admin_username = "${var.cluster_admin_username}"
cluster_admin_password = "${var.cluster_admin_password}"
cluster_index_storage = "${var.cluster_index_storage}"
cluster_ram_size = "${var.cluster_ram_size}"
analytics_mpp = "${var.analytics_mpp}"
installer_url = "${var.installer_url}"
couchbase_version = "${var.couchbase_version}"
couchbase_edition = "${var.couchbase_edition}"
key_pair_name = "${var.key_pair_name}"
ami = "${var.ami}"
apply_updates = "${var.apply_updates}"
subnet_ids = "${var.subnet_ids}"
security_group_ids = "${concat(var.security_group_ids, list(aws_security_group.internode.id, aws_security_group.client.id))}"
topology = "${var.topology}"
iam_instance_profile = "${local.iam_instance_profile}"
termination_protection = "${var.termination_protection}"
detailed_monitoring = "${var.detailed_monitoring}"
placement_tenancy = "${var.placement_tenancy}"
boot_volume = "${var.boot_volume}"
name = "${local.group_name["1"]}"
node_count = "${local.node_count["1"]}"
tags = "${local.tags["1"]}"
services = "${local.services["1"]}"
instance_type = "${local.instance_type["1"]}"
data_volume = "${local.data_volume["1"]}"
ebs_optimized = "${local.ebs_optimized["1"]}"
additional_initialization_script = "${local.additional_initialization_script["1"]}"
auto_rebalance = "${var.auto_rebalance}"
rally_autoscaling_group_id = ""
}
module "mds_group_2" {
source = "./mds-group"
cluster_name = "${var.cluster_name}"
cluster_admin_username = "${var.cluster_admin_username}"
cluster_admin_password = "${var.cluster_admin_password}"
cluster_index_storage = "${var.cluster_index_storage}"
cluster_ram_size = "${var.cluster_ram_size}"
analytics_mpp = "${var.analytics_mpp}"
installer_url = "${var.installer_url}"
couchbase_version = "${var.couchbase_version}"
couchbase_edition = "${var.couchbase_edition}"
key_pair_name = "${var.key_pair_name}"
ami = "${var.ami}"
apply_updates = "${var.apply_updates}"
subnet_ids = "${var.subnet_ids}"
security_group_ids = "${concat(var.security_group_ids, list(aws_security_group.internode.id, aws_security_group.client.id))}"
topology = "${var.topology}"
iam_instance_profile = "${local.iam_instance_profile}"
termination_protection = "${var.termination_protection}"
detailed_monitoring = "${var.detailed_monitoring}"
placement_tenancy = "${var.placement_tenancy}"
boot_volume = "${var.boot_volume}"
name = "${local.group_name["2"]}"
node_count = "${local.node_count["2"]}"
tags = "${local.tags["2"]}"
services = "${local.services["2"]}"
instance_type = "${local.instance_type["2"]}"
data_volume = "${local.data_volume["2"]}"
ebs_optimized = "${local.ebs_optimized["2"]}"
additional_initialization_script = "${local.additional_initialization_script["2"]}"
auto_rebalance = "${var.auto_rebalance}"
rally_autoscaling_group_id = "${module.mds_group_1.autoscaling_group_id}"
}
module "mds_group_3" {
source = "./mds-group"
cluster_name = "${var.cluster_name}"
cluster_admin_username = "${var.cluster_admin_username}"
cluster_admin_password = "${var.cluster_admin_password}"
cluster_index_storage = "${var.cluster_index_storage}"
cluster_ram_size = "${var.cluster_ram_size}"
analytics_mpp = "${var.analytics_mpp}"
installer_url = "${var.installer_url}"
couchbase_version = "${var.couchbase_version}"
couchbase_edition = "${var.couchbase_edition}"
key_pair_name = "${var.key_pair_name}"
ami = "${var.ami}"
apply_updates = "${var.apply_updates}"
subnet_ids = "${var.subnet_ids}"
security_group_ids = "${concat(var.security_group_ids, list(aws_security_group.internode.id, aws_security_group.client.id))}"
topology = "${var.topology}"
iam_instance_profile = "${local.iam_instance_profile}"
termination_protection = "${var.termination_protection}"
detailed_monitoring = "${var.detailed_monitoring}"
placement_tenancy = "${var.placement_tenancy}"
boot_volume = "${var.boot_volume}"
name = "${local.group_name["3"]}"
node_count = "${local.node_count["3"]}"
tags = "${local.tags["3"]}"
services = "${local.services["3"]}"
instance_type = "${local.instance_type["3"]}"
data_volume = "${local.data_volume["3"]}"
ebs_optimized = "${local.ebs_optimized["3"]}"
additional_initialization_script = "${local.additional_initialization_script["3"]}"
auto_rebalance = "${var.auto_rebalance}"
rally_autoscaling_group_id = "${module.mds_group_1.autoscaling_group_id}"
}
module "mds_group_4" {
source = "./mds-group"
cluster_name = "${var.cluster_name}"
cluster_admin_username = "${var.cluster_admin_username}"
cluster_admin_password = "${var.cluster_admin_password}"
cluster_index_storage = "${var.cluster_index_storage}"
cluster_ram_size = "${var.cluster_ram_size}"
analytics_mpp = "${var.analytics_mpp}"
installer_url = "${var.installer_url}"
couchbase_version = "${var.couchbase_version}"
couchbase_edition = "${var.couchbase_edition}"
key_pair_name = "${var.key_pair_name}"
ami = "${var.ami}"
apply_updates = "${var.apply_updates}"
subnet_ids = "${var.subnet_ids}"
security_group_ids = "${concat(var.security_group_ids, list(aws_security_group.internode.id, aws_security_group.client.id))}"
topology = "${var.topology}"
iam_instance_profile = "${local.iam_instance_profile}"
termination_protection = "${var.termination_protection}"
detailed_monitoring = "${var.detailed_monitoring}"
placement_tenancy = "${var.placement_tenancy}"
boot_volume = "${var.boot_volume}"
name = "${local.group_name["4"]}"
node_count = "${local.node_count["4"]}"
tags = "${local.tags["4"]}"
services = "${local.services["4"]}"
instance_type = "${local.instance_type["4"]}"
data_volume = "${local.data_volume["4"]}"
ebs_optimized = "${local.ebs_optimized["4"]}"
additional_initialization_script = "${local.additional_initialization_script["4"]}"
auto_rebalance = "${var.auto_rebalance}"
rally_autoscaling_group_id = "${module.mds_group_1.autoscaling_group_id}"
}
module "mds_group_5" {
source = "./mds-group"
cluster_name = "${var.cluster_name}"
cluster_admin_username = "${var.cluster_admin_username}"
cluster_admin_password = "${var.cluster_admin_password}"
cluster_index_storage = "${var.cluster_index_storage}"
cluster_ram_size = "${var.cluster_ram_size}"
analytics_mpp = "${var.analytics_mpp}"
installer_url = "${var.installer_url}"
couchbase_version = "${var.couchbase_version}"
couchbase_edition = "${var.couchbase_edition}"
key_pair_name = "${var.key_pair_name}"
ami = "${var.ami}"
apply_updates = "${var.apply_updates}"
subnet_ids = "${var.subnet_ids}"
security_group_ids = "${concat(var.security_group_ids, list(aws_security_group.internode.id, aws_security_group.client.id))}"
topology = "${var.topology}"
iam_instance_profile = "${local.iam_instance_profile}"
termination_protection = "${var.termination_protection}"
detailed_monitoring = "${var.detailed_monitoring}"
placement_tenancy = "${var.placement_tenancy}"
boot_volume = "${var.boot_volume}"
name = "${local.group_name["5"]}"
node_count = "${local.node_count["5"]}"
tags = "${local.tags["5"]}"
services = "${local.services["5"]}"
instance_type = "${local.instance_type["5"]}"
data_volume = "${local.data_volume["5"]}"
ebs_optimized = "${local.ebs_optimized["5"]}"
additional_initialization_script = "${local.additional_initialization_script["5"]}"
auto_rebalance = "${var.auto_rebalance}"
rally_autoscaling_group_id = "${module.mds_group_1.autoscaling_group_id}"
}