@@ -68,24 +68,24 @@ resource "azapi_resource" "function" {
6868 serverFarmId = azurerm_service_plan.service_plan.id
6969 storageAccountRequired = false
7070 vnetContentShareEnabled = true
71- vnetImagePullEnabled = true
72- virtualNetworkSubnetId = azapi_resource.subnet_function.id
71+ vnetImagePullEnabled = false # Set to 'true' when pulling image from private Azure Container Registry
7372 vnetRouteAllEnabled = true
73+ virtualNetworkSubnetId = azapi_resource.subnet_function.id
7474 siteConfig = {
75- autoHealEnabled = true
76- autoHealRules = {
77- actions = {
78- actionType = " LogEvent"
79- }
80- triggers = {
81- statusCodes = [
82- " 429" ,
83- " 504" ,
84- " 507" ,
85- " 508"
86- ]
87- }
88- }
75+ # autoHealEnabled = true # Enable to auto heal app based on configs
76+ # autoHealRules = {
77+ # actions = {
78+ # actionType = "LogEvent"
79+ # }
80+ # triggers = {
81+ # statusCodes = [
82+ # "429",
83+ # "504",
84+ # "507",
85+ # "508"
86+ # ]
87+ # }
88+ # }
8989 acrUseManagedIdentityCreds = false
9090 alwaysOn = true
9191 appSettings = [
@@ -105,26 +105,6 @@ resource "azapi_resource" "function" {
105105 name = " FUNCTIONS_EXTENSION_VERSION"
106106 value = " ~4"
107107 },
108- {
109- name = " FUNCTIONS_WORKER_RUNTIME"
110- value = " python"
111- },
112- {
113- name = " FUNCTIONS_WORKER_SHARED_MEMORY_DATA_TRANSFER_ENABLED"
114- value = " 1"
115- },
116- {
117- name = " DOCKER_SHM_SIZE"
118- value = " 268435456"
119- },
120- {
121- name = " PYTHON_THREADPOOL_THREAD_COUNT"
122- value = " None"
123- },
124- {
125- name = " PYTHON_ENABLE_DEBUG_LOGGING"
126- value = " 0"
127- },
128108 {
129109 name = " WEBSITE_CONTENTOVERVNET"
130110 value = " 1"
@@ -133,18 +113,6 @@ resource "azapi_resource" "function" {
133113 name = " WEBSITE_RUN_FROM_PACKAGE"
134114 value = " 0"
135115 },
136- {
137- name = " PYTHON_ENABLE_WORKER_EXTENSIONS"
138- value = " 1"
139- },
140- {
141- name = " ENABLE_ORYX_BUILD"
142- value = " 1"
143- },
144- {
145- name = " SCM_DO_BUILD_DURING_DEPLOYMENT"
146- value = " 1"
147- },
148116 {
149117 name = " AzureWebJobsStorage__accountName"
150118 value = azurerm_storage_account.storage.name
@@ -157,6 +125,46 @@ resource "azapi_resource" "function" {
157125 name = " AzureWebJobsSecretStorageKeyVaultUri"
158126 value = azurerm_key_vault.key_vault.vault_uri
159127 },
128+ {
129+ name = " WEBSITES_ENABLE_APP_SERVICE_STORAGE" # Disable when not running a container
130+ value = " false"
131+ },
132+ {
133+ name = " DOCKER_REGISTRY_SERVER_URL" # Disable when not running a container
134+ value = var.function_container_registry_url
135+ },
136+ # {
137+ # name = "FUNCTIONS_WORKER_RUNTIME" # Enable when running Python directly on the Function host
138+ # value = "python"
139+ # },
140+ # {
141+ # name = "FUNCTIONS_WORKER_SHARED_MEMORY_DATA_TRANSFER_ENABLED" # Enable when running Python directly on the Function host
142+ # value = "1"
143+ # },
144+ # {
145+ # name = "DOCKER_SHM_SIZE" # Enable when running Python directly on the Function host
146+ # value = "268435456"
147+ # },
148+ # {
149+ # name = "PYTHON_THREADPOOL_THREAD_COUNT" # Enable when running Python directly on the Function host
150+ # value = "None"
151+ # },
152+ # {
153+ # name = "PYTHON_ENABLE_DEBUG_LOGGING" # Enable when running Python directly on the Function host
154+ # value = "0"
155+ # },
156+ # {
157+ # name = "PYTHON_ENABLE_WORKER_EXTENSIONS" # Enable when running Python directly on the Function host
158+ # value = "1"
159+ # },
160+ # {
161+ # name = "ENABLE_ORYX_BUILD" # Enable when running Python directly on the Function host
162+ # value = "1"
163+ # },
164+ # {
165+ # name = "SCM_DO_BUILD_DURING_DEPLOYMENT" # Enable when running Python directly on the Function host
166+ # value = "1"
167+ # },
160168 {
161169 name = " MY_SECRET_CONFIG"
162170 value = " @Microsoft.KeyVault(SecretUri=${ azurerm_key_vault_secret . key_vault_secret_sample . id } )"
0 commit comments