-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.tf
50 lines (42 loc) · 1.27 KB
/
init.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
/* define which provider to use */
provider "aws" {
region = "${var.region["${var.buildenv}"]}"
}
/* process all global iam definitions */
module "iam" {
source = "iam/"
}
/* builds out the bastion VPC */
module "bastion" {
source = "env/bastion"
ecs_instance_profile = "${module.iam.moil_base_ecs_profile}"
}
/* builds the core vpc with a single ecs shared asset */
module "core" {
source = "env/core"
bastion_cidr = "${module.bastion.vpc_cidr}"
ecs_instance_profile = "${module.iam.moil_base_ecs_profile}"
ecs_base_role = "${module.iam.moil_base_ecs_role}"
ecs_base_policy = "${module.iam.moil_base_ecs_policy_arn}"
}
/* builds the app vpc with application level ecs assets */
module "app" {
source = "env/app"
bastion_cidr = "${module.bastion.vpc_cidr}"
ecs_instance_profile = "${module.iam.moil_base_ecs_profile}"
}
module "lambda" {
source = "modules/lambda/"
}
/*
module "web" {
source = "env/web"
bastion_cidr = "${module.bastion.vpc_cidr}"
ecs_instance_profile = "${module.iam.moil_base_profile}"
}
module "db" {
source = "env/db"
bastion_cidr = "${module.bastion.vpc_cidr}"
ecs_instance_profile = "${module.iam.moil_base_profile}"
}
*/