-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.tf
231 lines (215 loc) · 12.2 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
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
module "amis" {
source = "./modules/amis"
}
module "ecs" {
source = "./modules/ecs"
ami_id = "${lookup(module.amis.ecs_amis, var.region)}"
instance_type = "${var.ecs_instance_type}"
key_name = "${var.key_name}"
max_cluster_size = "${var.ecs_max_cluster_size}"
min_cluster_size = "${var.ecs_min_cluster_size}"
platform_instance_id = "${var.platform_instance_id}"
proxy_endpoint = "${var.proxy_endpoint}"
region = "${var.region}"
ssh_cidr_blocks = "${var.ssh_cidr_blocks}"
statsite_nsg = "${var.statsite_nsg}"
subnet_id_1 = "${var.ecs_subnet_id_1}"
subnet_id_2 = "${var.ecs_subnet_id_2}"
user_init = "${var.ecs_user_init}"
volume_size = "${var.ecs_volume_size}"
}
module "queues" {
source = "./modules/queues"
platform_instance_id = "${var.platform_instance_id}"
}
module "elasticache" {
source = "./modules/elasticache"
instance_type_services = "${var.elasticache_instance_type_services}"
platform_instance_id = "${var.platform_instance_id}"
subnet_id_1 = "${var.services_subnet_id_1}"
subnet_id_2 = "${var.services_subnet_id_2}"
}
module "elasticsearch" {
source = "./modules/elasticsearch"
dedicated_master_count = "${var.elasticsearch_dedicated_master_count}"
dedicated_master_type = "${var.elasticsearch_dedicated_master_type}"
instance_count = "${var.elasticsearch_instance_count}"
instance_type = "${var.elasticsearch_instance_type}"
platform_instance_id = "${var.platform_instance_id}"
region = "${var.region}"
security_group_ids = "${module.services.services_security_group_id}"
subnet_id_1 = "${var.elasticsearch_subnet_id_1}"
subnet_id_2 = "${var.elasticsearch_subnet_id_2}"
volume_size = "${var.elasticsearch_volume_size}"
}
module "rds" {
source = "./modules/rds"
allocated_storage = "${var.db_allocated_storage}"
apply_immediately = "${var.db_apply_immediately}"
db_backup_retention = "${var.db_backup_retention}"
db_backup_window = "${var.db_backup_window}"
db_instance_size = "${var.db_instance_size}"
db_kms_key_id = "${var.db_kms_key_id}"
db_multi_az = "${var.db_multi_az}"
db_password = "${var.db_password}"
db_snapshot = "${var.db_snapshot}"
db_storage_encrypted = "${var.db_storage_encrypted}"
db_username = "${var.db_username}"
db_version = "${var.db_version}"
platform_instance_id = "${var.platform_instance_id}"
rds_subnet_id_1 = "${var.rds_subnet_id_1}"
rds_subnet_id_2 = "${var.rds_subnet_id_2}"
services_subnet_id_1 = "${var.services_subnet_id_1}"
services_subnet_id_2 = "${var.services_subnet_id_2}"
}
module "services" {
source = "./modules/services"
account_lockout_attempts = "${var.account_lockout_attempts}"
account_lockout_interval = "${var.account_lockout_interval}"
account_lockout_period = "${var.account_lockout_period}"
ami_id = "${lookup(module.amis.services_amis, var.region)}"
aws_cust_labels_bucket = "${var.aws_cust_labels_bucket}"
aws_cust_labels_bucket_arn = "${module.bucketcustomlabels.bucket_arn}"
aws_cust_labels_inference_units = "${var.aws_cust_labels_inference_units}"
az1_nat_ip = "${var.az1_nat_ip}"
az2_nat_ip = "${var.az2_nat_ip}"
box_com_client_id = "${var.box_com_client_id}"
box_com_secret_key = "${var.box_com_secret_key}"
bcrypt_cost = "${var.bcrypt_cost}"
client_secret_fe = "${var.client_secret_fe}"
client_secret_internal = "${var.client_secret_internal}"
customer = "${var.customer}"
cw_dest_bucket = "${lookup(var.cloudwatch_export_bucket, var.region)}"
db_endpoint = "${module.rds.endpoint}"
db_password = "${var.db_password}"
db_username = "${var.db_username}"
dropbox_app_key = "${var.dropbox_app_key}"
dropbox_app_secret = "${var.dropbox_app_secret}"
dropbox_teams_app_key = "${var.dropbox_teams_app_key}"
dropbox_teams_app_secret = "${var.dropbox_teams_app_secret}"
dns_name = "${var.dns_name}"
ecs_cluster = "${module.ecs.cluster}"
ecs_cpu_reservation = "${var.ecs_cpu_reservation}"
ecs_memory_hard_reservation = "${var.ecs_memory_hard_reservation}"
ecs_memory_soft_reservation = "${var.ecs_memory_soft_reservation}"
elasticache_services = "${module.elasticache.endpoint_services}"
elasticsearch_endpoint = "https://${module.elasticsearch.endpoint}"
encrypted_config_blob = "${var.encrypted_config_blob}"
encryption_key = "${var.encryption_key}"
faces_endpoint = "${var.faces_endpoint}"
file_storage_s3_bucket_arn = "${var.file_storage_s3_bucket_arn}"
gm_celeb_detection_enabled = "${var.gm_celeb_detection_enabled}"
gm_celeb_detection_interval = "${var.gm_celeb_detection_interval}"
gm_celeb_detection_min_confidence = "${var.gm_celeb_detection_min_confidence}"
gm_celeb_detection_provider = "${var.gm_celeb_detection_provider}"
gm_es_bulk_size = "${var.gm_es_bulk_size}"
gm_es_bulk_workers = "${var.gm_es_bulk_workers}"
gm_es_replicas = "${var.gm_es_replicas}"
gm_es_shards = "${var.gm_es_shards}"
gm_jwt_expiration_time = "${var.gm_jwt_expiration_time}"
gm_license_key = "${var.gm_license_key}"
gm_scheduled_max_items = "${var.gm_scheduled_max_items}"
gm_scheduled_min_bytes = "${var.gm_scheduled_min_bytes}"
gm_scheduled_wait_duration = "${var.gm_scheduled_wait_duration}"
gm_threshold_to_harvest = "${var.gm_threshold_to_harvest}"
gm_walkd_max_item_concurrency = "600"
gm_walkd_redis_max_active = "1200"
google_maps_key = "${var.google_maps_key}"
harvest_complete_stow_fields = "${var.harvest_complete_stow_fields}"
harvest_polling_time = "${var.harvest_polling_time}"
indexer_concurrency = "${var.indexer_concurrency}"
instance_type = "${var.services_instance_type}"
item_disable_transaction = "${var.item_disable_transaction}"
jwt_key = "${var.jwt_key}"
key_name = "${var.key_name}"
log_retention = "${var.log_retention}"
logograb_key = "${var.logograb_key}"
max_cluster_size = "${var.services_max_cluster_size}"
min_cluster_size = "${var.services_min_cluster_size}"
mlservices_endpoint = "${var.mlservices_endpoint}"
notifications_from_addr = "${var.notifications_from_addr}"
notifications_region = "${coalesce(var.notifications_region, var.region)}"
oauthconnect_encryption_key = "${var.oauthconnect_encryption_key}"
onedrive_client_id = "${var.onedrive_client_id}"
onedrive_client_secret = "${var.onedrive_client_secret}"
password_min_length = "${var.password_min_length}"
platform_access_cidrs = "${var.platform_access_cidrs}"
platform_instance_id = "${var.platform_instance_id}"
proxy_endpoint = "${var.proxy_endpoint}"
public_subnet_id_1 = "${var.public_subnet_id_1}"
public_subnet_id_2 = "${var.public_subnet_id_2}"
region = "${var.region}"
rollbar_token = "${var.rollbar_token}"
s3subscriber_priority = "${var.s3subscriber_priority}"
saml_attr_email = "${var.saml_attr_email}"
saml_attr_firstname = "${var.saml_attr_firstname}"
saml_attr_lastname = "${var.saml_attr_lastname}"
saml_attr_uid = "${var.saml_attr_uid}"
saml_cert = "${var.saml_cert}"
saml_idp_metadata_url = "${var.saml_idp_metadata_url}"
saml_key = "${var.saml_key}"
segment_write_key = "${var.segment_write_key}"
services_iam_role_name = "${var.services_iam_role_name}"
services_scale_down_threshold_cpu = "${var.services_scale_down_threshold_cpu}"
services_scale_up_threshold_cpu = "${var.services_scale_up_threshold_cpu}"
sharepoint_client_id = "${var.sharepoint_client_id}"
sharepoint_client_secret = "${var.sharepoint_client_secret}"
sqs_activity = "${module.queues.activity}"
sqs_activity_arn = "${module.queues.activity_arn}"
sqs_index = "${module.queues.index}"
sqs_index_arn = "${module.queues.index_arn}"
sqs_itemcleanup = "${module.queues.itemcleanup}"
sqs_itemcleanup_arn = "${module.queues.itemcleanup_arn}"
sqs_s3notifications = "${var.sqs_s3notifications}"
sqs_s3notifications_arn = "${var.sqs_s3notifications_arn}"
sqs_stage01 = "${module.queues.stage01}"
sqs_stage01_arn = "${module.queues.stage01_arn}"
sqs_stage02 = "${module.queues.stage02}"
sqs_stage02_arn = "${module.queues.stage02_arn}"
sqs_stage03 = "${module.queues.stage03}"
sqs_stage03_arn = "${module.queues.stage03_arn}"
sqs_stage04 = "${module.queues.stage04}"
sqs_stage04_arn = "${module.queues.stage04_arn}"
sqs_stage05 = "${module.queues.stage05}"
sqs_stage05_arn = "${module.queues.stage05_arn}"
sqs_stage06 = "${module.queues.stage06}"
sqs_stage06_arn = "${module.queues.stage06_arn}"
sqs_stage07 = "${module.queues.stage07}"
sqs_stage07_arn = "${module.queues.stage07_arn}"
sqs_stage08 = "${module.queues.stage08}"
sqs_stage08_arn = "${module.queues.stage08_arn}"
sqs_stage09 = "${module.queues.stage09}"
sqs_stage09_arn = "${module.queues.stage09_arn}"
sqs_stage10 = "${module.queues.stage10}"
sqs_stage10_arn = "${module.queues.stage10_arn}"
sqs_walk = "${module.queues.walk}"
sqs_walk_arn = "${module.queues.walk_arn}"
ssh_cidr_blocks = "${var.ssh_cidr_blocks}"
ssl_certificate_arn = "${var.ssl_certificate_arn}"
statsd_host = "${var.statsite_ip}:8125"
statsite_nsg = "${var.statsite_nsg}"
subnet_id_1 = "${var.services_subnet_id_1}"
subnet_id_2 = "${var.services_subnet_id_2}"
temporary_bucket_arn = "${module.ecs.temporary_bucket_arn}"
temporary_bucket_name = "${module.ecs.temporary_bucket_name}"
usage_s3_bucket_arn = "${var.usage_s3_bucket_arn}"
user_init = "${var.services_user_init}"
walkd_item_batch_size = "300"
}
module "dashboard" {
source = "./modules/dashboard"
dashboard_name = "GrayMetaPlatform-${var.platform_instance_id}"
es_domain = "graymeta-${var.platform_instance_id}"
platform_instance_id = "${var.platform_instance_id}"
proxy_asg = "${var.proxy_asg}"
rds_name = "gm-${var.platform_instance_id}-platform"
region = "${var.region}"
services_alb = "${module.services.services_alb_cw}"
services_asg = "${module.services.services_asg}"
}
module "bucketcustomlabels" {
source = "./modules/bucketcustomlabels"
bucket_name = "${var.aws_cust_labels_bucket}"
platform_instance_id = "${var.platform_instance_id}"
region = "${var.region}"
}