Microsoft.Sql managedInstances

The managedInstances 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.Sql/managedInstances resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Sql/managedInstances@2021-02-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  sku: {
    capacity: int
    family: 'string'
    name: 'string'
    size: 'string'
    tier: 'string'
  identity: {
    type: 'string'
    userAssignedIdentities: {}
  properties: {
    administratorLogin: 'string'
    administratorLoginPassword: 'string'
    administrators: {
      administratorType: 'ActiveDirectory'
      azureADOnlyAuthentication: bool
      login: 'string'
      principalType: 'string'
      sid: 'string'
      tenantId: 'string'
    collation: 'string'
    dnsZonePartner: 'string'
    instancePoolId: 'string'
    keyId: 'string'
    licenseType: 'string'
    maintenanceConfigurationId: 'string'
    managedInstanceCreateMode: 'string'
    minimalTlsVersion: 'string'
    primaryUserAssignedIdentityId: 'string'
    proxyOverride: 'string'
    publicDataEndpointEnabled: bool
    restorePointInTime: 'string'
    sourceManagedInstanceId: 'string'
    storageAccountType: 'string'
    storageSizeInGB: int
    subnetId: 'string'
    timezoneId: 'string'
    vCores: int
    zoneRedundant: bool

Property values


Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
name The resource name string (required)
location Resource location. string (required)
tags Resource tags. Dictionary of tag names and values. See Tags in templates
sku An ARM Resource SKU. Sku
identity Azure Active Directory identity configuration for a resource. ResourceIdentity
properties The properties of a managed instance. ManagedInstanceProperties


Name Description Value
type The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. 'None'
userAssignedIdentities The resource ids of the user assigned identities to use object


Name Description Value
administratorLogin Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). string
administratorLoginPassword The administrator login password (required for managed instance creation). string
administrators Properties of a active directory administrator. ManagedInstanceExternalAdministrator
collation Collation of the managed instance. string
dnsZonePartner The resource id of another managed instance whose DNS zone this managed instance will share after creation. string
instancePoolId The Id of the instance pool this managed server belongs to. string
keyId A CMK URI of the key to use for encryption. string
licenseType The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). 'BasePrice'
maintenanceConfigurationId Specifies maintenance configuration id to apply to this managed instance. string
managedInstanceCreateMode Specifies the mode of database creation.

Default: Regular instance creation.

Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified.
minimalTlsVersion Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' string
primaryUserAssignedIdentityId The resource id of a user assigned identity to be used by default. string
proxyOverride Connection type used for connecting to the instance. 'Default'
publicDataEndpointEnabled Whether or not the public data endpoint is enabled. bool
restorePointInTime Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. string
sourceManagedInstanceId The resource identifier of the source managed instance associated with create operation of this instance. string
storageAccountType The storage account type used to store backups for this instance. The options are LRS (LocallyRedundantStorage), ZRS (ZoneRedundantStorage) and GRS (GeoRedundantStorage) 'GRS'
storageSizeInGB Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. int
subnetId Subnet resource ID for the managed instance. string
timezoneId Id of the timezone. Allowed values are timezones supported by Windows.
Windows keeps details on supported timezones, including the id, in registry under
KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.
List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".
vCores The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. int
zoneRedundant Whether or not the multi-az is enabled. bool


Name Description Value
administratorType Type of the sever administrator. 'ActiveDirectory'
azureADOnlyAuthentication Azure Active Directory only Authentication enabled. bool
login Login name of the server administrator. string
principalType Principal Type of the sever administrator. 'Application'
sid SID (object ID) of the server administrator. string
tenantId Tenant ID of the administrator. string


Name Description Value
capacity Capacity of the particular SKU. int
family If the service has different generations of hardware, for the same SKU, then that can be captured here. string
name The name of the SKU, typically, a letter + Number code, e.g. P3. string (required)
size Size of the particular SKU string
tier The tier or edition of the particular SKU, e.g. Basic, Premium. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Deploy SQL Managed Instance with Networking

Deploy to Azure
Deploy UDR and NSG to support Azure SQL Managed Instance and deploy the Managed Instance
Create SQL MI inside the new virtual network

Deploy to Azure
Deploy Azure Sql Database Managed Instance (SQL MI) inside new Virtual Network.
Create SQL MI with configured sending of logs and metrics.

Deploy to Azure
This template allows you to deploy SQL MI and additional resources used for storing logs and metrics (diagnostic workspace, storage account, event hub).
Create SQL MI with jumpbox inside new virtual network

Deploy to Azure
Deploy Azure Sql Database Managed Instance (SQL MI) and JumpBox with SSMS inside new Virtual Network.
Create SQL MI with point-to-site connection configured

Deploy to Azure
Deploy Azure Sql Database Managed Instance (SQL MI) and Virtual network gateway configured for point-to-site connection inside the new virtual network.