-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.tf
59 lines (52 loc) · 2.19 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
module "cognito" {
source = "./cognito"
region = var.region
gaspi-guest-username = var.gaspi-guest-username
gaspi-guest-password = var.gaspi-guest-password
gaspi-admin-username = var.gaspi-admin-username
gaspi-admin-password = var.gaspi-admin-password
dataportal-bucket-prefix = var.dataportal-bucket-prefix
common-tags = merge(var.common-tags, {
"NAME" = "cognito-infrastructure"
})
}
module "sbeacon" {
source = "./sbeacon"
region = var.region
variants-bucket-prefix = var.variants-bucket-prefix
metadata-bucket-prefix = var.metadata-bucket-prefix
lambda-layers-bucket-prefix = var.lambda-layers-bucket-prefix
dataportal-bucket-prefix = var.dataportal-bucket-prefix
beacon-ui-url = module.webgui.cloudfront-url
cognito-user-pool-arn = module.cognito.cognito_user_pool_arn
cognito-user-pool-id = module.cognito.cognito_user_pool_id
cognito-admin-group-name = module.cognito.cognito_admin_group_name
cognito-manager-group-name = module.cognito.cognito_manager_group_name
ses-source-email = var.ses-source-email
common-tags = merge(var.common-tags, {
"NAME" = "sbeacon-backend"
})
}
module "svep" {
source = "./svep"
region = var.region
data_portal_bucket_name = module.sbeacon.data-portal-bucket
data_portal_bucket_arn = module.sbeacon.data-portal-bucket-arn
common-tags = merge(var.common-tags, {
"NAME" = "svep-backend"
})
}
module "webgui" {
source = "./webgui/terraform-aws"
region = var.region
base_range = 5000
user_pool_id = module.cognito.cognito_user_pool_id
identity_pool_id = module.cognito.cognito_identity_pool_id
user_pool_web_client_id = module.cognito.cognito_client_id
data_portal_bucket = module.sbeacon.data-portal-bucket
api_endpoint_sbeacon = "${module.sbeacon.api_url}${module.sbeacon.api_stage}/"
api_endpoint_svep = module.svep.api_url
common-tags = merge(var.common-tags, {
"NAME" = "portal-frontend"
})
}