Azure / Azure/bicep-types-az

[Microsoft.Web/sites/extensions]: ZipDeploy not recognized by Bicep (works fine with JSON template)

Open
#968 3 comments 1 reaction 0 assignees View on GitHub
inaccuracy No RP Github RP: Microsoft.Web
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

### Resource Type

Microsoft.Web/sites/extensions

### Api Version

2022-03-01

### Issue Type

Other

### Other Notes

While trying to create a ZipDepoy extension resource for a function app, Bicep gives me the following error:
`Error BCP088: The property "name" expected a value of type "'MSDeploy' | 'onedeploy'" but the provided value is of type "'ZipDeploy'". Did you mean "'MSDeploy'"?`

I can't deploy my template because the validation is failing.

However, I don't have any error when deploying the same resource with a JSON template:
```
{
"type": "Microsoft.Web/sites/extensions",
"apiVersion": "2022-03-01",
"name": "[format('{0}/{1}', variables('functionAppName'), 'ZipDeploy')]",
"properties": {
"packageUri": "[variables('zipUrl')]"
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('functionAppName'))]",
]
}
```
![2022-07-21_181306](https://user-images.githubusercontent.com/53899348/180263880-3c7089a8-f660-46c3-9b84-7596679becda.png)

### Bicep Repro

```
resource functionAppZipDeploy 'Microsoft.Web/sites/extensions@2022-03-01' = {
parent: functionAppName
name: 'ZipDeploy'
properties: {
packageUri: zipUrl
}
}
```

### Confirm

- [X] I have searched this repository and have not found similar issue reports.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Bicep repro for Microsoft.Web/sites/extensions@2022-03-01 and compare its validation with the provided JSON template. Trace the type definition used for the extension name; the issue is done when the ZipDeploy resource validates without BCP088 for this API version.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.