Description
According to the Bicep type definition of Microsoft.Web/sites@2022-01-01
the state
field in properties
is read-only. (This
See:
https://github.com/Azure/bicep-types-az/blob/main/generated/web/microsoft.web/2022-09-01/types.md#siteproperties
and:
I followed their guidance (https://github.com/Azure/bicep-types-az/blob/main/docs/troubleshooting.md#api-spec-swagger-inaccuracies) and saw the corresponding swagger definition line:
However, prompted by this SO answer when attempting to deploy an Azure Function App in a "Stopped" state https://stackoverflow.com/a/67699248/2847307 I set the value to "Stopped" and, sure enough the (pre-existing) FunctionApp updated from Running to Stopped. I changed the value to "Running" and sure enough, the Status of the function app in Azure Portal changed to "Running".
Therefore I conclude that the property is not read-only and should not be marked as such!
Can you update the definition & possibly prompt the Azure documentation to show its usage?
Cheers,
Greg