forked from outerbounds/terraform-aws-metaflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
115 lines (92 loc) · 5.25 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
module "metaflow-datastore" {
source = "./modules/datastore"
resource_prefix = local.resource_prefix
resource_suffix = local.resource_suffix
db_instance_type = var.db_instance_type
postgres_engine_version = var.postgres_engine_version
metadata_service_security_group_id = module.metaflow-metadata-service.metadata_service_security_group_id
metaflow_vpc_id = var.vpc_id
subnet1_id = var.subnet1_id
subnet2_id = var.subnet2_id
standard_tags = var.tags
}
module "metaflow-metadata-service" {
source = "./modules/metadata-service"
resource_prefix = local.resource_prefix
resource_suffix = local.resource_suffix
access_list_cidr_blocks = var.access_list_cidr_blocks
api_basic_auth = var.api_basic_auth
database_password_secret_manager_arn = module.metaflow-datastore.database_password_secret_manager_arn
database_username = module.metaflow-datastore.database_username
datastore_s3_bucket_kms_key_arn = module.metaflow-datastore.datastore_s3_bucket_kms_key_arn
ecs_cluster_id = var.ecs_cluster_id
fargate_execution_role_arn = module.metaflow-computation.ecs_execution_role_arn
iam_partition = var.iam_partition
metadata_service_container_image = local.metadata_service_container_image
metaflow_vpc_id = var.vpc_id
rds_master_instance_endpoint = module.metaflow-datastore.rds_master_instance_endpoint
s3_bucket_arn = module.metaflow-datastore.s3_bucket_arn
subnet1_id = var.subnet1_id
subnet2_id = var.subnet2_id
vpc_cidr_blocks = var.vpc_cidr_blocks
standard_tags = var.tags
}
module "metaflow-ui" {
source = "./modules/ui"
count = 1
resource_prefix = local.resource_prefix
resource_suffix = local.resource_suffix
database_password_secret_manager_arn = module.metaflow-datastore.database_password_secret_manager_arn
database_username = module.metaflow-datastore.database_username
datastore_s3_bucket_kms_key_arn = module.metaflow-datastore.datastore_s3_bucket_kms_key_arn
ecs_cluster_id = var.ecs_cluster_id
fargate_execution_role_arn = module.metaflow-computation.ecs_execution_role_arn
iam_partition = var.iam_partition
metaflow_vpc_id = var.vpc_id
rds_master_instance_endpoint = module.metaflow-datastore.rds_master_instance_endpoint
s3_bucket_arn = module.metaflow-datastore.s3_bucket_arn
subnet1_id = var.subnet1_id
subnet2_id = var.subnet2_id
ui_backend_container_image = local.metadata_service_container_image
ui_static_container_image = local.ui_static_container_image
alb_internal = var.ui_alb_internal
ui_allow_list = var.ui_allow_list
METAFLOW_DATASTORE_SYSROOT_S3 = module.metaflow-datastore.METAFLOW_DATASTORE_SYSROOT_S3
certificate_arn = var.ui_certificate_arn
metadata_service_security_group_id = module.metaflow-metadata-service.metadata_service_security_group_id
extra_ui_static_env_vars = var.extra_ui_static_env_vars
extra_ui_backend_env_vars = var.extra_ui_backend_env_vars
standard_tags = var.tags
}
module "metaflow-computation" {
source = "./modules/computation"
resource_prefix = local.resource_prefix
resource_suffix = local.resource_suffix
database_password_secret_manager_arn = module.metaflow-datastore.database_password_secret_manager_arn
batch_type = var.batch_type
compute_environment_ami_id = var.compute_environment_ami_id
compute_environment_spot_bid_percentage = var.compute_environment_spot_bid_percentage
compute_environment_user_data_base64 = var.compute_environment_user_data_base64
compute_environment_desired_vcpus = var.compute_environment_desired_vcpus
compute_environment_instance_types = var.compute_environment_instance_types
compute_environment_max_vcpus = var.compute_environment_max_vcpus
compute_environment_min_vcpus = var.compute_environment_min_vcpus
ecs_cluster_id = var.ecs_cluster_id
compute_environment_egress_cidr_blocks = var.compute_environment_egress_cidr_blocks
iam_partition = var.iam_partition
metaflow_vpc_id = var.vpc_id
subnet1_id = var.subnet1_id
subnet2_id = var.subnet2_id
standard_tags = var.tags
}
module "metaflow-step-functions" {
source = "./modules/step-functions"
resource_prefix = local.resource_prefix
resource_suffix = local.resource_suffix
active = var.enable_step_functions
batch_job_queue_arns = [module.metaflow-computation.METAFLOW_BATCH_JOB_QUEUE]
iam_partition = var.iam_partition
s3_bucket_arn = module.metaflow-datastore.s3_bucket_arn
s3_bucket_kms_arn = module.metaflow-datastore.datastore_s3_bucket_kms_key_arn
standard_tags = var.tags
}