Microsoft.SqlVirtualMachine sqlVirtualMachineGroups/availabilityGroupListeners

The sqlVirtualMachineGroups/availabilityGroupListeners resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners@2017-03-01-preview' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    availabilityGroupName: 'string'
    createDefaultAvailabilityGroupIfNotExist: bool
    loadBalancerConfigurations: [
      {
        loadBalancerResourceId: 'string'
        privateIpAddress: {
          ipAddress: 'string'
          subnetResourceId: 'string'
        }
        probePort: int
        publicIpAddressResourceId: 'string'
        sqlVirtualMachineInstances: [
          'string'
        ]
      }
    ]
    port: int
  }
}

Property values

sqlVirtualMachineGroups/availabilityGroupListeners

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2017-03-01-preview'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: sqlVirtualMachineGroups
properties The properties of an availability group listener. AvailabilityGroupListenerProperties

AvailabilityGroupListenerProperties

Name Description Value
availabilityGroupName Name of the availability group. string
createDefaultAvailabilityGroupIfNotExist Create a default availability group if it does not exist. bool
loadBalancerConfigurations List of load balancer configurations for an availability group listener. LoadBalancerConfiguration[]
port Listener port. int

LoadBalancerConfiguration

Name Description Value
loadBalancerResourceId Resource id of the load balancer. string
privateIpAddress A private IP address bound to the availability group listener. PrivateIPAddress
probePort Probe port. int
publicIpAddressResourceId Resource id of the public IP. string
sqlVirtualMachineInstances List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener. string[]

PrivateIPAddress

Name Description Value
ipAddress Private IP address bound to the availability group listener. string
subnetResourceId Subnet used to include private IP. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create SQL AvailabilityGroup listener on existing Always ON setup.

Deploy to Azure
Deploy SQL AvailabilityGroup listener on existing Always ON setup. This creates Listener on an existing SQL Availability Group, sets up corresponding load balancer rules and probe ports on Azure Load balancer to get the listener connections working.