-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunction_app.tf
33 lines (29 loc) · 1.12 KB
/
function_app.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
resource "azurerm_service_plan" "consumption_plan" {
name = "{service-plan-name}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
os_type = "Linux"
sku_name = "Y1"
}
resource "azurerm_linux_function_app" "naming_func" {
name = "{function-app-name}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
service_plan_id = azurerm_service_plan.consumption_plan.id
storage_account_name = azurerm_storage_account.storage_acct.name
storage_account_access_key = azurerm_storage_account.storage_acct.primary_access_key
identity {
type = "SystemAssigned"
}
app_settings = {
ENABLE_ORYX_BUILD = true
SCM_DO_BUILD_DURING_DEPLOYMENT = true
AzureWebJobsFeatureFlags = "EnableWorkerIndexing"
APPINSIGHTS_INSTRUMENTATIONKEY = azurerm_application_insights.func_app_insights.instrumentation_key
}
site_config {
application_stack {
python_version = "3.9"
}
}
}