Problem
Getting Error: vnet_image_pull_enabled cannot be disabled for app running in an app service environment
after upgrading AzureRM provider to v4.x
Prerequisites
Having azurerm_linux_function_app
, azurerm_linux_function_app_slot
, azurerm_windows_function_app
and/or azurerm_windows_function_app_slot
resources that were created with an older version of AzureRM provider (e.g. v3.x)
Cause
Starting from AzureRM v4.0, a new vnet_image_pull_enabled
property has been added.
This property must be set to true
if your App is running in an App Service Environment.
Solution
Add vnet_image_pull_enabled = true
to configuration of the affected resources
Outcome
terraform plan
and terraform apply
will not return the error message anymore
Additional Information
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide