Azure / Azure/bicep

schema problems for Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners@2017-03-01-preview

Open
#4,527 0 comments 0 reactions 0 assignees View on GitHub
provider bug types: swagger inaccuracy
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
Bicep CLI version 0.4.613 (d826ce8411)

**Describe the bug**
Missing property object availabilityGroupConfiguration: The property "availabilityGroupConfiguration" is not allowed on objects of type "AvailabilityGroupListenerProperties". Permissible properties include "createDefaultAvailabilityGroupIfNotExist". If this is an inaccuracy in the documentation, please report it to the Bicep Team.bicephttps://aka.ms/bicep-type-issues

**To Reproduce**

```bicep
resource availabilityGroupListener 'Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners@2017-03-01-preview' = {
name: '${sqlVirtualMachineGroup.name}-list'
parent: sqlVmGroup
properties: {
availabilityGroupName: '${sqlVirtualMachineGroup.name}-ag'
port: sqlVirtualMachineGroup.listenerPort
loadBalancerConfigurations: [
{
privateIpAddress: {
ipAddress: sqlVirtualMachineGroup.ipAddress
subnetResourceId: subnet.id
}
loadBalancerResourceId: internalLoadBalancer.id
probePort: sqlVirtualMachineGroup.probePort
sqlVirtualMachineInstances: [for (replica, i) in sqlVirtualMachineGroup.replicas: sqlVms[i].id]
}
]
// bug: https://github.com/Azure/bicep/issues/4527
availabilityGroupConfiguration: {
replicas: [for (replica, i) in sqlVirtualMachineGroup.replicas: {
commit: union(defaultReplicaObject, replica).synchronousCommit ? 'Synchronous_Commit' : 'Asynchronous_Commit'
failover: union(defaultReplicaObject, replica).automaticFailover ? 'Automatic' : 'Manual'
readableSecondary: union(defaultReplicaObject, replica).readableSecondary
role: i == 0 ? 'Primary' : 'Secondary'
sqlVirtualMachineInstanceId: sqlVms[i].id
}]
}
}
}

```

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported Bicep resource declaration for Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners@2017-03-01-preview and inspect the generated schema for AvailabilityGroupListenerProperties. Verify whether availabilityGroupConfiguration is present in the Azure resource definition but rejected by Bicep, then add or correct the corresponding schema coverage and a regression test. Done means the declaration accepts the property without the reported diagnostic.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.