Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The sqlVirtualMachineGroups 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 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 | The geo-location where the resource lives | string (required) |
| name | The resource name | string (required) |
| properties | Resource properties. | SqlVirtualMachineGroupProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
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 |
Usage Examples
Bicep Samples
A basic example of deploying Microsoft SQL Virtual Machine Group.
param resourceName string = 'acctest0001'
param location string = 'westus'
resource sqlVirtualMachineGroup 'Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups@2023-10-01' = {
name: resourceName
location: location
properties: {
sqlImageOffer: 'SQL2017-WS2016'
sqlImageSku: 'Developer'
wsfcDomainProfile: {
clusterBootstrapAccount: ''
clusterOperatorAccount: ''
clusterSubnetType: 'SingleSubnet'
domainFqdn: 'testdomain.com'
ouPath: ''
sqlServiceAccount: ''
storageAccountPrimaryKey: ''
storageAccountUrl: ''
}
}
}
ARM template resource definition
The sqlVirtualMachineGroups 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 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 |
|---|---|---|
| apiVersion | The api version | '2023-10-01' |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string (required) |
| properties | Resource properties. | SqlVirtualMachineGroupProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups' |
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 |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Deploy SQL Always ON setup with existing SQL Virtual Machines |
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"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
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"
}
}
}
}
Property Values
Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string (required) |
| properties | Resource properties. | SqlVirtualMachineGroupProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups@2023-10-01" |
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 |
Usage Examples
Terraform Samples
A basic example of deploying Microsoft SQL Virtual Machine Group.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westus"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "sqlVirtualMachineGroup" {
type = "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups@2023-10-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
sqlImageOffer = "SQL2017-WS2016"
sqlImageSku = "Developer"
wsfcDomainProfile = {
clusterBootstrapAccount = ""
clusterOperatorAccount = ""
clusterSubnetType = "SingleSubnet"
domainFqdn = "testdomain.com"
ouPath = ""
sqlServiceAccount = ""
storageAccountPrimaryKey = ""
storageAccountUrl = ""
}
}
}
}