Inconsistent/errors when deploying using the latest 2022-03-01 ARM API
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
When using the latest `@2022-03-01` API, I get either inconsistent or errors when deploying static apps.
Here are a few problematic examples.
- With this Bicep template: https://github.com/sinedied/azure-checkin/blob/main/scripts/deployment/poc.bicep#L182, using the `@2021-03-01` version deployments works all the time. With the `@2022-03-01` version, the deployment fails the first time (every time) and works on the second try, which isn't really idempotent.
- Trying to deploy the simplest template:
```bicep
resource staticWebApp 'Microsoft.Web/staticSites@2022-03-01' = {
name: 'swa-test'
location: location
sku: {
name: 'Standard'
tier: 'Standard'
}
properties: {
}
}
```
Fails with the error
```
ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"InternalServerError","message":"{\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The response for resource had empty or invalid content.\"\r\n }\r\n}"}]}}
```
Using the `@2021-03-01` version, no issues.
As an additional issue, removing the empty `properties` entirely will fail deployment with any version, and a misleading error, even though the template is perfectly valid according to the Bicep linter:
```
ERROR: {"code": "InvalidTemplateDeployment", "message": "The template deployment 'deployment-ng-lite-todo-prod-eastus2' is not valid according to the validation procedure. The tracking id is '3c7f60ae-2464-4ed2-bb68-d2719addc946'. See inner errors for details."}
Inner Errors:
{"code": "ValidationForResourceFailed", "message": "Validation failed for a resource. Check 'Error.Details[0]' for more information."}
Inner Errors:
{"code": "InvalidName", "message": "One or more properties, including the resource name, are missing. Please add them and retry."}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.