Introduction
I'm trying to deploy an ARM template through Azure Pipelines in which a Synapse Workspace is deployed and a Synapse Serverless Database is created thereafter. Please note, this is not a Dedicated SQL Pool, it is a Synapse Serverless Database.
The 'clicky' way to do this is:
Existing Template
I have an ARM template that is successfully creating my Synapse Workspace:
{
"type": "Microsoft.Synapse/workspaces",
"apiVersion": "2021-06-01",
"name": "[variables('synapseName')]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"defaultDataLakeStorage": {
"resourceId": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageName'))]",
"createManagedPrivateEndpoint": true,
"accountUrl": "[concat('https://', variables('storageName'),'.dfs.core.windows.net')]",
"filesystem": "[concat('lake', parameters('project'))]"
},
"encryption": {},
"managedResourceGroupName": "[variables('synapseManager')]",
"managedVirtualNetwork": "default",
"sqlAdministratorLogin": "[variables('adminusername')]",
"sqlAdministratorLoginPassword": "[parameters('sec_syn')]",
"privateEndpointConnections": [],
"publicNetworkAccess": "Enabled",
"managedVirtualNetworkSettings": {
"preventDataExfiltration": false,
"allowedAadTenantIdsForLinking": []
},
"cspWorkspaceAdminProperties": {
"initialWorkspaceAdminObjectId": "[parameters('cliid')]"
},
"trustedServiceBypassEnabled": true,
"azureADOnlyAuthentication": false
},
"resources": [
{
"condition": true,
"type": "firewallRules",
"apiVersion": "2021-06-01",
"name": "AllowAllConnections",
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "255.255.255.255"
},
"dependsOn": [
"[resourceId('Microsoft.Synapse/workspaces', variables('synapseName'))]"
]
},
{
"condition": true,
"type": "firewallRules",
"apiVersion": "2021-06-01",
"name": "AllowAllWindowsAzureIps",
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "0.0.0.0"
},
"dependsOn": [
"[resourceId('Microsoft.Synapse/workspaces', variables('synapseName'))]"
]
},
{
"condition": true,
"type": "integrationRuntimes",
"apiVersion": "2021-06-01",
"name": "AutoResolveIntegrationRuntime",
"properties": {
"type": "Managed",
"typeProperties": {
"computeProperties": {
"location": "AutoResolve"
}
}
},
"dependsOn": [
"[resourceId('Microsoft.Synapse/workspaces', variables('synapseName'))]"
]
}
],
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/blobServices/containers', variables('storageName'), 'default', concat('lake', parameters('project')))]"
]
}
Options to Create Synapse Serverless SQL Database
However, there appear to be two documented options for creating a database. I have tried both shown below:
-
{ "type": "sqlDatabases", "apiVersion": "2020-04-01-preview", "name": "laketestdb", "location": "[parameters('location')]", "properties": { "collation": "Latin1_General_100_BIN2_UTF8" }, "dependsOn": [ "[resourceId('Microsoft.Synapse/workspaces', variables('synapseName'))]" ] }
This approach is nested within the Synapse resource template, but I have also run it externally in a follow-up pipeline task; the same error occurs and it fails during deployment:
-
{ "type": "Microsoft.Synapse/workspaces/sqlPools", "apiVersion": "2021-06-01", "name": "string", "location": "string", "tags": { "tagName1": "tagValue1", "tagName2": "tagValue2" }, "sku": { "capacity": "int", "name": "string", "tier": "string" }, "properties": { "collation": "string", "createMode": "string", "maxSizeBytes": "int", "provisioningState": "string", "recoverableDatabaseId": "string", "restorePointInTime": "string", "sourceDatabaseDeletionDate": "string", "sourceDatabaseId": "string", "storageAccountType": "string" } }
With this approach, I simply don't know if there's a service tier or sku that will create a serverless database. All examples online (of which there are few) seem to show typical data warehouse provisioning ("DW2000c", for example). I haven't been able to get it working with guesswork.
Azure Shell Attempt
I also notice that when I use the Azure Shell command:
New-AzSynapseSqlDatabase -ResourceGroupName rg_admin -WorkspaceName synjmi -Name testazpssqldb
I get the same error as I get during the deployment, namely:
New-AzSynapseSqlDatabase: Operation returned an invalid status code 'BadRequest' Specified edition or service level objective is not supported
I have absolutely no idea what's going wrong and can't seem to find much in the way of supporting documentation or troubleshooting materials online.
Any help is much appreciated.