Microsoft.SqlVirtualMachine sqlVirtualMachineGroups/availabilityGroupListeners
Bicep resource definition
The sqlVirtualMachineGroups/availabilityGroupListeners resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners@2023-10-01' = {
name: 'string'
properties: {
availabilityGroupConfiguration: {
replicas: [
{
commit: 'string'
failover: 'string'
readableSecondary: 'string'
role: 'string'
sqlVirtualMachineInstanceId: 'string'
}
]
}
availabilityGroupName: 'string'
createDefaultAvailabilityGroupIfNotExist: bool
loadBalancerConfigurations: [
{
loadBalancerResourceId: 'string'
privateIpAddress: {
ipAddress: 'string'
subnetResourceId: 'string'
}
probePort: int
publicIpAddressResourceId: 'string'
sqlVirtualMachineInstances: [
'string'
]
}
]
multiSubnetIpConfigurations: [
{
privateIpAddress: {
ipAddress: 'string'
subnetResourceId: 'string'
}
sqlVirtualMachineInstance: 'string'
}
]
port: int
}
}
Property values
AgConfiguration
Name | Description | Value |
---|---|---|
replicas | Replica configurations. | AgReplica[] |
AgReplica
Name | Description | Value |
---|---|---|
commit | Replica commit mode in availability group. | 'Asynchronous_Commit' 'Synchronous_Commit' |
failover | Replica failover mode in availability group. | 'Automatic' 'Manual' |
readableSecondary | Replica readable secondary mode in availability group. | 'All' 'No' 'Read_Only' |
role | Replica Role in availability group. | 'Primary' 'Secondary' |
sqlVirtualMachineInstanceId | Sql VirtualMachine Instance Id. | string |
AvailabilityGroupListenerProperties
Name | Description | Value |
---|---|---|
availabilityGroupConfiguration | Availability Group configuration. | AgConfiguration |
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[] |
multiSubnetIpConfigurations | List of multi subnet IP configurations for an AG listener. | MultiSubnetIpConfiguration[] |
port | Listener port. | int |
LoadBalancerConfiguration
Name | Description | Value |
---|---|---|
loadBalancerResourceId | Resource id of the load balancer. | string |
privateIpAddress | Private IP address. | 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[] |
Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners
Name | Description | Value |
---|---|---|
name | The resource name | string (required) |
properties | Resource properties. | AvailabilityGroupListenerProperties |
MultiSubnetIpConfiguration
Name | Description | Value |
---|---|---|
privateIpAddress | Private IP address. | PrivateIPAddress (required) |
sqlVirtualMachineInstance | SQL virtual machine instance resource id that are enrolled into the availability group listener. | string (required) |
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 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. |
ARM template resource definition
The sqlVirtualMachineGroups/availabilityGroupListeners resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners resource, add the following JSON to your template.
{
"type": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners",
"apiVersion": "2023-10-01",
"name": "string",
"properties": {
"availabilityGroupConfiguration": {
"replicas": [
{
"commit": "string",
"failover": "string",
"readableSecondary": "string",
"role": "string",
"sqlVirtualMachineInstanceId": "string"
}
]
},
"availabilityGroupName": "string",
"createDefaultAvailabilityGroupIfNotExist": "bool",
"loadBalancerConfigurations": [
{
"loadBalancerResourceId": "string",
"privateIpAddress": {
"ipAddress": "string",
"subnetResourceId": "string"
},
"probePort": "int",
"publicIpAddressResourceId": "string",
"sqlVirtualMachineInstances": [ "string" ]
}
],
"multiSubnetIpConfigurations": [
{
"privateIpAddress": {
"ipAddress": "string",
"subnetResourceId": "string"
},
"sqlVirtualMachineInstance": "string"
}
],
"port": "int"
}
}
Property values
AgConfiguration
Name | Description | Value |
---|---|---|
replicas | Replica configurations. | AgReplica[] |
AgReplica
Name | Description | Value |
---|---|---|
commit | Replica commit mode in availability group. | 'Asynchronous_Commit' 'Synchronous_Commit' |
failover | Replica failover mode in availability group. | 'Automatic' 'Manual' |
readableSecondary | Replica readable secondary mode in availability group. | 'All' 'No' 'Read_Only' |
role | Replica Role in availability group. | 'Primary' 'Secondary' |
sqlVirtualMachineInstanceId | Sql VirtualMachine Instance Id. | string |
AvailabilityGroupListenerProperties
Name | Description | Value |
---|---|---|
availabilityGroupConfiguration | Availability Group configuration. | AgConfiguration |
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[] |
multiSubnetIpConfigurations | List of multi subnet IP configurations for an AG listener. | MultiSubnetIpConfiguration[] |
port | Listener port. | int |
LoadBalancerConfiguration
Name | Description | Value |
---|---|---|
loadBalancerResourceId | Resource id of the load balancer. | string |
privateIpAddress | Private IP address. | 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[] |
Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners
Name | Description | Value |
---|---|---|
name | The resource name | string (required) |
properties | Resource properties. | AvailabilityGroupListenerProperties |
MultiSubnetIpConfiguration
Name | Description | Value |
---|---|---|
privateIpAddress | Private IP address. | PrivateIPAddress (required) |
sqlVirtualMachineInstance | SQL virtual machine instance resource id that are enrolled into the availability group listener. | string (required) |
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 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. |
Terraform (AzAPI provider) resource definition
The sqlVirtualMachineGroups/availabilityGroupListeners resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" = {
type = "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners@2023-10-01"
name = "string"
body = jsonencode({
properties = {
availabilityGroupConfiguration = {
replicas = [
{
commit = "string"
failover = "string"
readableSecondary = "string"
role = "string"
sqlVirtualMachineInstanceId = "string"
}
]
}
availabilityGroupName = "string"
createDefaultAvailabilityGroupIfNotExist = bool
loadBalancerConfigurations = [
{
loadBalancerResourceId = "string"
privateIpAddress = {
ipAddress = "string"
subnetResourceId = "string"
}
probePort = int
publicIpAddressResourceId = "string"
sqlVirtualMachineInstances = [
"string"
]
}
]
multiSubnetIpConfigurations = [
{
privateIpAddress = {
ipAddress = "string"
subnetResourceId = "string"
}
sqlVirtualMachineInstance = "string"
}
]
port = int
}
})
}
Property values
AgConfiguration
Name | Description | Value |
---|---|---|
replicas | Replica configurations. | AgReplica[] |
AgReplica
Name | Description | Value |
---|---|---|
commit | Replica commit mode in availability group. | 'Asynchronous_Commit' 'Synchronous_Commit' |
failover | Replica failover mode in availability group. | 'Automatic' 'Manual' |
readableSecondary | Replica readable secondary mode in availability group. | 'All' 'No' 'Read_Only' |
role | Replica Role in availability group. | 'Primary' 'Secondary' |
sqlVirtualMachineInstanceId | Sql VirtualMachine Instance Id. | string |
AvailabilityGroupListenerProperties
Name | Description | Value |
---|---|---|
availabilityGroupConfiguration | Availability Group configuration. | AgConfiguration |
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[] |
multiSubnetIpConfigurations | List of multi subnet IP configurations for an AG listener. | MultiSubnetIpConfiguration[] |
port | Listener port. | int |
LoadBalancerConfiguration
Name | Description | Value |
---|---|---|
loadBalancerResourceId | Resource id of the load balancer. | string |
privateIpAddress | Private IP address. | 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[] |
Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners
Name | Description | Value |
---|---|---|
name | The resource name | string (required) |
properties | Resource properties. | AvailabilityGroupListenerProperties |
MultiSubnetIpConfiguration
Name | Description | Value |
---|---|---|
privateIpAddress | Private IP address. | PrivateIPAddress (required) |
sqlVirtualMachineInstance | SQL virtual machine instance resource id that are enrolled into the availability group listener. | string (required) |
PrivateIPAddress
Name | Description | Value |
---|---|---|
ipAddress | Private IP address bound to the availability group listener. | string |
subnetResourceId | Subnet used to include private IP. | string |