Microsoft.SqlVirtualMachine sqlVirtualMachineGroups

Bicep resource definition

The sqlVirtualMachineGroups resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

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

resource symbolicname 'Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups@2023-10-01' = {
  location: 'string'
  name: 'string'
  properties: {
    sqlImageOffer: 'string'
    sqlImageSku: 'string'
    wsfcDomainProfile: {
      clusterBootstrapAccount: 'string'
      clusterOperatorAccount: 'string'
      clusterSubnetType: 'string'
      domainFqdn: 'string'
      fileShareWitnessPath: 'string'
      isSqlServiceAccountGmsa: bool
      ouPath: 'string'
      sqlServiceAccount: 'string'
      storageAccountPrimaryKey: 'string'
      storageAccountUrl: 'string'
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

Property values

Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups

Name Description Value
location Resource location. string (required)
name The resource name string (required)
properties Resource properties. SqlVirtualMachineGroupProperties
tags Resource tags. TrackedResourceTags

SqlVirtualMachineGroupProperties

Name Description Value
sqlImageOffer SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. string
sqlImageSku SQL image sku. 'Developer'
'Enterprise'
wsfcDomainProfile Cluster Active Directory domain profile. WsfcDomainProfile

TrackedResourceTags

Name Description Value

WsfcDomainProfile

Name Description Value
clusterBootstrapAccount Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain). string
clusterOperatorAccount Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster. string
clusterSubnetType Cluster subnet type. 'MultiSubnet'
'SingleSubnet'
domainFqdn Fully qualified name of the domain. string
fileShareWitnessPath Optional path for fileshare witness. string
isSqlServiceAccountGmsa The flag to check if SQL service account is GMSA. bool
ouPath Organizational Unit path in which the nodes and cluster will be present. string
sqlServiceAccount Account name under which SQL service will run on all participating SQL virtual machines in the cluster. string
storageAccountPrimaryKey Primary key of the witness storage account. string
storageAccountUrl Fully qualified ARM resource id of the witness storage account. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Deploy SQL Always ON setup with existing SQL Virtual Machines

Deploy to Azure
Deploy SQL Always ON setup with existing SQL Virtual Machines. The virtual machines should already be joined to an existing domain and must be running enterprise version of SQL Server.

ARM template resource definition

The sqlVirtualMachineGroups resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

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

{
  "type": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups",
  "apiVersion": "2023-10-01",
  "name": "string",
  "location": "string",
  "properties": {
    "sqlImageOffer": "string",
    "sqlImageSku": "string",
    "wsfcDomainProfile": {
      "clusterBootstrapAccount": "string",
      "clusterOperatorAccount": "string",
      "clusterSubnetType": "string",
      "domainFqdn": "string",
      "fileShareWitnessPath": "string",
      "isSqlServiceAccountGmsa": "bool",
      "ouPath": "string",
      "sqlServiceAccount": "string",
      "storageAccountPrimaryKey": "string",
      "storageAccountUrl": "string"
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property values

Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups

Name Description Value
location Resource location. string (required)
name The resource name string (required)
properties Resource properties. SqlVirtualMachineGroupProperties
tags Resource tags. TrackedResourceTags

SqlVirtualMachineGroupProperties

Name Description Value
sqlImageOffer SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. string
sqlImageSku SQL image sku. 'Developer'
'Enterprise'
wsfcDomainProfile Cluster Active Directory domain profile. WsfcDomainProfile

TrackedResourceTags

Name Description Value

WsfcDomainProfile

Name Description Value
clusterBootstrapAccount Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain). string
clusterOperatorAccount Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster. string
clusterSubnetType Cluster subnet type. 'MultiSubnet'
'SingleSubnet'
domainFqdn Fully qualified name of the domain. string
fileShareWitnessPath Optional path for fileshare witness. string
isSqlServiceAccountGmsa The flag to check if SQL service account is GMSA. bool
ouPath Organizational Unit path in which the nodes and cluster will be present. string
sqlServiceAccount Account name under which SQL service will run on all participating SQL virtual machines in the cluster. string
storageAccountPrimaryKey Primary key of the witness storage account. string
storageAccountUrl Fully qualified ARM resource id of the witness storage account. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Deploy SQL Always ON setup with existing SQL Virtual Machines

Deploy to Azure
Deploy SQL Always ON setup with existing SQL Virtual Machines. The virtual machines should already be joined to an existing domain and must be running enterprise version of SQL Server.

Terraform (AzAPI provider) resource definition

The sqlVirtualMachineGroups 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 resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" = {
  type = "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups@2023-10-01"
  name = "string"
  location = "string"
  body = jsonencode({
    properties = {
      sqlImageOffer = "string"
      sqlImageSku = "string"
      wsfcDomainProfile = {
        clusterBootstrapAccount = "string"
        clusterOperatorAccount = "string"
        clusterSubnetType = "string"
        domainFqdn = "string"
        fileShareWitnessPath = "string"
        isSqlServiceAccountGmsa = bool
        ouPath = "string"
        sqlServiceAccount = "string"
        storageAccountPrimaryKey = "string"
        storageAccountUrl = "string"
      }
    }
  })
  tags = {
    {customized property} = "string"
  }
}

Property values

Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups

Name Description Value
location Resource location. string (required)
name The resource name string (required)
properties Resource properties. SqlVirtualMachineGroupProperties
tags Resource tags. TrackedResourceTags

SqlVirtualMachineGroupProperties

Name Description Value
sqlImageOffer SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. string
sqlImageSku SQL image sku. 'Developer'
'Enterprise'
wsfcDomainProfile Cluster Active Directory domain profile. WsfcDomainProfile

TrackedResourceTags

Name Description Value

WsfcDomainProfile

Name Description Value
clusterBootstrapAccount Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain). string
clusterOperatorAccount Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster. string
clusterSubnetType Cluster subnet type. 'MultiSubnet'
'SingleSubnet'
domainFqdn Fully qualified name of the domain. string
fileShareWitnessPath Optional path for fileshare witness. string
isSqlServiceAccountGmsa The flag to check if SQL service account is GMSA. bool
ouPath Organizational Unit path in which the nodes and cluster will be present. string
sqlServiceAccount Account name under which SQL service will run on all participating SQL virtual machines in the cluster. string
storageAccountPrimaryKey Primary key of the witness storage account. string
storageAccountUrl Fully qualified ARM resource id of the witness storage account. string