# Fix: Pulumi error Cannot modify this site because another operation is in progress creating Azure Function on Dynamic Consumption plan

https://blog.cynexia.com/fix-pulumi-error-cannot-modify-this-site-because-another-operation-is-in-progress-creating-azure-function-on-dynamic-consumption-plan

Author: [Rob Aleck](https://blog.cynexia.com/pages/about) · https://github.com/mnbf9rca · https://www.linkedin.com/in/robertaleck/ · https://family-foqos.app/

Published: 2024-09-03
Categories: Fix


Another post which is more to remind me than anything else. When creating an Azure Function in Pulumi, you may get the following error:

`Cannot modify this site because another operation is in progress`

After a bit of digging, i found [this issue](<https://github.com/pulumi/pulumi-azure-native/issues/3411>) on the Pulumi repo, which points to a [page on the Azure Functions wiki](<https://github.com/Azure/Azure-Functions/wiki/Enable-Always-On-when-running-on-dedicated-App-Service-Plan>) where they say:

> If you run in a dedicated mode, you need to turn on the Always On setting for your Function App to run properly ... When running in a Consumption Plan or Premium Plan you should not enable Always On.

The Always On setting for Python is actually part of the constructor of `pulumi_azure_native.web.SiteConfigArgs`:

```
(parameter) always_on: Input[bool] | None
always_on: true if Always On is enabled; otherwise, false.
```

Setting this to `true` solved the problem.

