forked from threeseed/terraform-emr-spark-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
72 lines (61 loc) · 2.43 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
module "sec" {
source = "./modules/sec"
cluster_name = var.cluster_name
region = var.region
}
module "sgs" {
source = "./modules/sgs"
cluster_name = var.cluster_name
vpc_id = module.sec.vpc_id
sns_source_addresses = var.sns_source_addresses
zeppelin_port = var.zeppelin_port
whitelist_ips = module.sec.net_whitelist_ip
}
module "s3" {
source = "./modules/s3"
cluster_name = var.cluster_name
region = var.region
}
module "bootstrap" {
source = "./modules/bootstrap"
cluster_name = var.cluster_name
region = var.region
zeppelin_port = var.zeppelin_port
zeppelin_keystore_password = module.sec.zeppelin_keystore_password
zeppelin_certs_archive_path = module.sec.zeppelin_certs_archive_path
}
module "emr" {
source = "./modules/emr"
cluster_name = var.cluster_name
certs_s3_object = module.bootstrap.certs_s3_object
kms_key_id = module.sec.iam_kms_key_id
release = var.emr_release
s3_bucket = module.s3.bucket
root_volume_size = var.root_volume_size
subnet_id = module.sec.subnet_ids[0]
master_security_group = module.sgs.master_security_group
core_security_group = module.sgs.core_security_group
instance_profile = module.sec.iam_instance_profile
autoscaling_role = module.sec.iam_autoscaling_role
ssh_key_name = module.sec.ssh_key_name
master_instance_type = var.master_instance_type
core_instance_type = var.core_instance_type
core_instance_count_min = var.core_instance_count_min
core_instance_count_max = var.core_instance_count_max
core_volume_size = var.core_volume_size
service_role = module.sec.iam_service_role
zeppelin_port = var.zeppelin_port
zeppelin_keystore_password = module.sec.zeppelin_keystore_password
bootstrap_script_s3_object = module.bootstrap.bootstrap_script_s3_object
region = var.region
}
module "lb" {
source = "./modules/lb"
cluster_name = var.cluster_name
vpc_id = module.sec.vpc_id
subnet_ids = module.sec.subnet_ids
lb_security_group = module.sgs.lb_security_group
zeppelin_port = var.zeppelin_port
master_id = module.emr.master_id
lb_cert_arn = module.sec.zeppelin_public_cert_arn
}