bicep
bicep copied to clipboard
Standard CDN properties.azureOrigin fails
Bicep version Bicep CLI version 0.10.61 (8f44805506)
Describe the bug
Using properties.AzureOrigin when creating a Standard FrontDoor as documented causes this error:
Could not find member 'azureOrigin' on object of type 'AfdOrigin'. Path 'properties.azureOrigin'
To Reproduce This fails:
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
This works:
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
Additional context Add any other context about the problem here.