@@ -68,24 +68,24 @@ resource "azapi_resource" "function" {
68
68
serverFarmId = azurerm_service_plan.service_plan.id
69
69
storageAccountRequired = false
70
70
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
73
72
vnetRouteAllEnabled = true
73
+ virtualNetworkSubnetId = azapi_resource.subnet_function.id
74
74
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
+ # }
89
89
acrUseManagedIdentityCreds = false
90
90
alwaysOn = true
91
91
appSettings = [
@@ -105,26 +105,6 @@ resource "azapi_resource" "function" {
105
105
name = " FUNCTIONS_EXTENSION_VERSION"
106
106
value = " ~4"
107
107
},
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
- },
128
108
{
129
109
name = " WEBSITE_CONTENTOVERVNET"
130
110
value = " 1"
@@ -133,18 +113,6 @@ resource "azapi_resource" "function" {
133
113
name = " WEBSITE_RUN_FROM_PACKAGE"
134
114
value = " 0"
135
115
},
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
- },
148
116
{
149
117
name = " AzureWebJobsStorage__accountName"
150
118
value = azurerm_storage_account.storage.name
@@ -157,6 +125,46 @@ resource "azapi_resource" "function" {
157
125
name = " AzureWebJobsSecretStorageKeyVaultUri"
158
126
value = azurerm_key_vault.key_vault.vault_uri
159
127
},
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
+ # },
160
168
{
161
169
name = " MY_SECRET_CONFIG"
162
170
value = " @Microsoft.KeyVault(SecretUri=${ azurerm_key_vault_secret . key_vault_secret_sample . id } )"
0 commit comments