-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.tf
68 lines (59 loc) · 1.84 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
module "pre-init-schematics" {
source = "./modules/pre-init"
count = (var.PRIVATE_SSH_KEY == "n.a" && var.BASTION_FLOATING_IP == "localhost" ? 0 : 1)
ID_RSA_FILE_PATH = var.ID_RSA_FILE_PATH
PRIVATE_SSH_KEY = var.PRIVATE_SSH_KEY
}
module "pre-init-cli" {
source = "./modules/pre-init/cli"
count = (var.PRIVATE_SSH_KEY == "n.a" && var.BASTION_FLOATING_IP == "localhost" ? 1 : 0)
ID_RSA_FILE_PATH = var.ID_RSA_FILE_PATH
}
module "precheck-ssh-exec" {
source = "./modules/precheck-ssh-exec"
count = (var.PRIVATE_SSH_KEY == "n.a" && var.BASTION_FLOATING_IP == "localhost" ? 0 : 1)
depends_on = [ module.pre-init-schematics ]
BASTION_FLOATING_IP = var.BASTION_FLOATING_IP
ID_RSA_FILE_PATH = var.ID_RSA_FILE_PATH
PRIVATE_SSH_KEY = var.PRIVATE_SSH_KEY
HOSTNAME = var.DB_HOSTNAME
SECURITY_GROUP = var.SECURITY_GROUP
}
module "vpc-subnet" {
source = "./modules/vpc/subnet"
depends_on = [ module.precheck-ssh-exec ]
ZONE = var.ZONE
VPC = var.VPC
SECURITY_GROUP = var.SECURITY_GROUP
SUBNET = var.SUBNET
}
module "db-vsi" {
source = "./modules/db-vsi"
depends_on = [ module.vpc-subnet ]
ZONE = var.ZONE
VPC = var.VPC
SECURITY_GROUP = var.SECURITY_GROUP
RESOURCE_GROUP = var.RESOURCE_GROUP
SUBNET = var.SUBNET
HOSTNAME = var.DB_HOSTNAME
PROFILE = var.DB_PROFILE
IMAGE = var.DB_IMAGE
SSH_KEYS = var.SSH_KEYS
VOLUME_SIZES = [ "40" , "32" , "64" , "128", "256" ]
VOL_PROFILE = "10iops-tier"
}
module "app-vsi" {
source = "./modules/app-vsi"
depends_on = [ module.vpc-subnet ]
ZONE = var.ZONE
VPC = var.VPC
SECURITY_GROUP = var.SECURITY_GROUP
RESOURCE_GROUP = var.RESOURCE_GROUP
SUBNET = var.SUBNET
HOSTNAME = var.APP_HOSTNAME
PROFILE = var.APP_PROFILE
IMAGE = var.APP_IMAGE
SSH_KEYS = var.SSH_KEYS
VOLUME_SIZES = [ "40" , "128" ]
VOL_PROFILE = "10iops-tier"
}