forked from AmanM13/azure-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
52 lines (47 loc) · 1.65 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
provider "azurerm" {
features {}
}
module "resourcegroup" {
source = "./modules/resourcegroup"
name = var.name
location = var.location
}
module "networking" {
source = "./modules/networking"
location = module.resourcegroup.location_id
resource_group = module.resourcegroup.resource_group_name
vnetcidr = var.vnetcidr
websubnetcidr = var.websubnetcidr
appsubnetcidr = var.appsubnetcidr
dbsubnetcidr = var.dbsubnetcidr
}
module "securitygroup" {
source = "./modules/securitygroup"
location = module.resourcegroup.location_id
resource_group = module.resourcegroup.resource_group_name
web_subnet_id = module.networking.websubnet_id
app_subnet_id = module.networking.appsubnet_id
db_subnet_id = module.networking.dbsubnet_id
}
module "compute" {
source = "./modules/compute"
location = module.resourcegroup.location_id
resource_group = module.resourcegroup.resource_group_name
web_subnet_id = module.networking.websubnet_id
app_subnet_id = module.networking.appsubnet_id
web_host_name = var.web_host_name
web_username = var.web_username
web_os_password = var.web_os_password
app_host_name = var.app_host_name
app_username = var.app_username
app_os_password = var.app_os_password
}
module "database" {
source = "./modules/database"
location = module.resourcegroup.location_id
resource_group = module.resourcegroup.resource_group_name
primary_database = var.primary_database
primary_database_version = var.primary_database_version
primary_database_admin = var.primary_database_admin
primary_database_password = var.primary_database_password
}