Logic App VNET Integration Fails with ERROR: There was a conflict. SiteConfig.VnetRouteAllEnabled cannot be modified. Please modify the Site.VnetRouteAllEnabled property

Scenario Link to heading

Something changed in Azure in the last week of April 2024. Specifically, one infrastructure as code pipeline that has been working fine for months started failing April 30. More specifically, this pipeline deploys a Logic App Standard Application, then setups VNET Integration for the logic app to be able to call internal and on-premises services.

The command

az webapp vnet-integration add --resource-group  \
              --name $(logicAppName) \
              --vnet $(vnetResourceId) \
              --subnet $(subnetName)

Fails with the error message

ERROR: There was a conflict. SiteConfig.VnetRouteAllEnabled cannot be modified. Please modify the Site.VnetRouteAllEnabled property

Workaround Link to heading

Not really sure what happened or what changed. This pipeline is reused among many logic apps in different subscriptions and still works for some of the existing logic apps.

Searching for the error message, I was surprised by Bing Chat understanding the problem and suggesting a solution that worked!

az resource update --resource-group <group-name> --name <app-name> --resource-type "Microsoft.Web/sites" --set properties.vnetRouteAllEnabled=[true|false]

Used that command with true as the value and now my pipeline is back in business.