-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
35 lines (27 loc) · 977 Bytes
/
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
resource "azurerm_resource_group" "resource_group" {
name = var.rg-name
location = var.location
}
module "cosmosdb" {
source = "./modules/cosmosdb"
cosmosdb_name = var.cosmosdb_name
rg-name = azurerm_resource_group.resource_group.name
location = azurerm_resource_group.resource_group.location
}
module "function-app" {
source = "./modules/function-app"
rg-name = azurerm_resource_group.resource_group.name
location = azurerm_resource_group.resource_group.location
fn_storage_account_name = var.fn_storage_account_name
fn_app_service_plan_name = var.fn_app_service_plan_name
function_app_name = var.function_app_name
connection_str = module.cosmosdb.connection_str
depends_on = [module.cosmosdb]
}
module "apim" {
source = "./modules/apim"
rg-name = azurerm_resource_group.resource_group.name
location = azurerm_resource_group.resource_group.location
apim_name = var.apim_name
depends_on = [azurerm_resource_group.resource_group]
}