イベントドリブンのサーバーレス コンピューティング プラットフォームを提供する Azure サービス。
Hi @伊藤 壮平 ,
Thank you again for the detailed investigation and for sharing the Activity Log, policy definition, and Change History. Based on the information you provided, What we found
The Azure Policy itself does not appear to be deleting the function tag.
The policy you are using only adds the environment tag when it is missing. It does not contain any operation to remove or replace the function tag. Your Activity Log also shows that the policy action was limited to adding environment.
The more likely cause is the App Service plan update itself.
When the Always Ready setting is changed, the portal appears to perform an update on the App Service plan. Based on the behaviour you observed, that update may be replacing the resource's tag collection instead of preserving all existing tags.
This would explain the behaviour you are seeing:
-
environmentremains because the policy adds it back. -
functiondisappears because it is not managed by that policy. - There is no separate "delete tag" operation in the Activity Log because the tag may be lost as part of the overall resource update.
- The matching correlation ID between the App Service plan update and the policy action further supports that both operations occurred as part of the same update.
At this point, however, the exact request payload that Azure received is required to confirm this mechanism. We don't want to present the above as a confirmed Microsoft product defect without that evidence.
Recommended next step
Since you have already completed the portal-side investigation, the next useful step is to test whether the same Always Ready change behaves differently when performed through the Azure CLI.
If the tags remain intact when the change is made through CLI but are removed when the same change is made through the Azure portal, this would strongly indicate that the issue is specific to the portal update path.
If the tags are removed through both methods, it would instead point more toward the underlying App Service resource-provider update.
Temporary workaround
Until the behaviour is confirmed and addressed, you can protect the function tag by managing it through Azure Policy as well.
This would allow the policy to restore the tag automatically after an App Service plan update, avoiding the need for your team to manually add it back each time.
Please note that this is a workaround, not a root-cause fix. It is useful for preventing the operational impact while the underlying behaviour is investigated.