[Bug] Error in ARM typings/docs on `provider` property
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
If you try to create a SWA from a bicep template, for example something like this:
```
resource staticWebApp 'Microsoft.Web/staticSites@2021-01-15' = {
name: '${appName}-staticwebapp${dashSuffix}'
location: location
sku: {
name: 'Standard'
tier: 'Standard'
}
properties: {
repositoryUrl: 'https://github.com/${githubRepo}'
branch: 'main'
repositoryToken: githubToken
buildProperties: {
appLocation: '/'
apiLocation: '/api'
outputLocation: 'dist/'
skipGithubActionWorkflowGeneration: true
githubActionSecretNameOverride: 'AZURE_SWA_TOKEN'
}
stagingEnvironmentPolicy: 'Enabled'
allowConfigFileUpdates: false
}
}
```
The first deployment will work fine, but the second time your try to redeploy the template (even with no changes) you get this error: `Provider is invalid. Cannot change the Provider. Please detach your static site first if you wish to use to another deployment provider.`

After looking at related issue https://github.com/Azure/static-web-apps/issues/495, I added the property:
```
provider: 'GitHub'
```
to my template, which fixes the issue. The problem is that this property is wrongly reported as read-only and issues a warning:

Worse, it's not even present in the template docs: https://docs.microsoft.com/en-us/azure/templates/microsoft.web/staticsites?tabs=json#StaticSiteBuildProperties
**Expected behavior**
The `provider` property type should not be set as read-only and marked as a required property to have idempotent deployments.
**Additional context**
Related issues: https://github.com/Azure/static-web-apps/issues/516, https://github.com/Azure/static-web-apps/issues/495
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.