-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
94 lines (75 loc) · 3.64 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
data "azurerm_client_config" "current" {
}
module "resource_name" {
source = "github.com/nexient-llc/tf-module-resource_name.git?ref=0.1.0"
for_each = var.resource_types
logical_product_name = var.logical_product_name
region = var.resource_group.location
class_env = var.class_env
cloud_resource_type = each.value.type
instance_env = var.instance_env
instance_resource = var.instance_resource
maximum_length = each.value.maximum_length
use_azure_region_abbr = var.use_azure_region_abbr
}
module "resource_group" {
source = "github.com/nexient-llc/tf-azurerm-module-resource_group.git?ref=0.1.0"
resource_group = var.resource_group
resource_group_name = local.resource_group_name
}
module "app_insights" {
source = "github.com/nexient-llc/tf-azurerm-module-app_insights.git?ref=0.1.0"
resource_group = local.resource_group
app_insights = var.app_insights
app_insights_name = local.app_insights_name
log_analytics = var.log_analytics
log_analytics_workspace_name = local.log_analytics_workspace_name
}
module "service_plan" {
source = "github.com/nexient-llc/tf-azurerm-module-service_plan.git?ref=0.1.0"
resource_group = local.resource_group
service_plan = var.service_plan
service_plan_name = local.service_plan_name
}
module "storage_account" {
source = "github.com/nexient-llc/tf-azurerm-module-storage_account.git?ref=0.1.0"
resource_group = local.resource_group
storage_account_name = local.storage_account_name
storage_account = var.storage_account
storage_containers = var.storage_containers
storage_shares = var.storage_shares
}
module "function_app" {
source = "github.com/nexient-llc/tf-azurerm-module-linux_function_app.git?ref=0.1.0"
resource_group = local.resource_group
storage_account = local.storage_account
application_insights = local.application_insights
service_plan = local.service_plan
container_registry = var.container_registry
function_app_name = local.function_app_name
application_stack = var.application_stack
docker_image_name = var.docker_image_name
docker_image_tag = var.docker_image_tag
dotnet_version = var.dotnet_version
java_version = var.java_version
node_version = var.node_version
python_version = var.python_version
powershell_version = var.powershell_version
use_custom_runtime = var.use_custom_runtime
site_config = var.site_config
application_settings = var.application_settings
connection_strings = var.connection_strings
cors = var.cors
deployment_slots = var.deployment_slots
custom_tags = var.custom_tags
depends_on = [module.service_plan.service_plan_name, module.storage_account.storage_account, module.service_plan.service_plan_name, module.app_insights.appins_name]
}
module "key_vault" {
source = "github.com/nexient-llc/tf-azurerm-module-key_vault.git?ref=0.1.0"
resource_group = local.resource_group
key_vault_name = local.key_vault_name
soft_delete_retention_days = var.soft_delete_retention_days
sku_name = var.key_vault_sku
access_policies = local.key_vault_access_policies
custom_tags = var.custom_tags
}