Standard CDN properties.azureOrigin fails
- Dominant language
- TypeScript
- Stars
- 108
- Forks
- 44
- Avg merge
- 18h 53m
- Merged PRs (30d)
- 29
Description
**Bicep version**
Bicep CLI version 0.10.61 (8f44805506)
**Describe the bug**
Using `properties.AzureOrigin` when creating a Standard FrontDoor as [documented](https://learn.microsoft.com/en-us/azure/templates/microsoft.cdn/2020-09-01/profiles/origingroups/origins?pivots=deployment-language-bicep) causes this error:
`Could not find member 'azureOrigin' on object of type 'AfdOrigin'. Path 'properties.azureOrigin'`
**To Reproduce**
This fails:
```bicep
resource originGroup 'Microsoft.Cdn/profiles/originGroups@2022-05-01-preview' = {
parent: frontdoorProfile
name: '${systemName}-og'
properties: {
loadBalancingSettings: {
sampleSize: 4
successfulSamplesRequired: 3
}
}
// This fails
resource webappOrigin 'origins' = {
name: '${webapp.name}-origin'
properties: {
enabledState:'Enabled'
azureOrigin: {
id: webapp.id
}
}
}
}
```
Full version: [https://github.com/flytzen/Bicep.Play/blob/main/cdn.bicep](https://github.com/flytzen/Bicep.Play/blob/main/cdn.bicep)
This works:
```bicep
resource originGroup 'Microsoft.Cdn/profiles/originGroups@2022-05-01-preview' = {
parent: frontdoorProfile
name: '${systemName}-og'
properties: {
loadBalancingSettings: {
sampleSize: 4
successfulSamplesRequired: 3
}
}
resource webappOrigin 'origins' = {
name: '${webapp.name}-origin'
properties: {
hostName: webapp.properties.defaultHostName
httpPort: 80
httpsPort: 443
originHostHeader: webapp.properties.defaultHostName
priority: 1
weight: 1000
}
}
}
```
Full version: [https://github.com/flytzen/Bicep.Play/blob/main/cdn2.bicep](https://github.com/flytzen/Bicep.Play/blob/main/cdn2.bicep)
**Additional context**
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.