Create free High Availability Azure Sql Db in 8 regions with fail-over group using arm template.

How to create free High Availability Azure Sql Db with fail-over group in 8 regions with Arm template for free.

Let’s go to https://portal.azure.com  and lets try to create it we will see that option is not available to crate free tire.

But if go and check here https://resources.azure.com other deployment template for other azure sql database we can see with what parameters it was created so we can play with it.

And the important are this 3 properties values on bottom edition, maxSizeBytes and requestedServiceObjectiveName.

{
  "name": "[variables('sqlDatabaseName')]",
  "type": "databases",
  "location": "[resourceGroup().location]",
  "tags": {
    "displayName": "Database"
  },
  "apiVersion": "2014-04-01-preview",
  "dependsOn": [
    "[resourceId('Microsoft.Sql/servers/', variables('sqlserverName'))]"
  ],
  "properties": {
    "edition": "Free",
    "collation": "[parameters('collation')]",
    "maxSizeBytes": "33554432",
    "requestedServiceObjectiveName": "Free"
  }
}

If we will create azure sql database with this parameters values using arm template deployment.

We will see that now we can see free version of azure sql database.

If we go now to our arm template and and will repeat sql resources multiple times or use arm template function copy-index and pass the list or regions as array we can crate multiple azure sql databases for free.  But this is not all because we what to have multiple read localization so we, go to azure portal create linked servers and check how it looks https://resources.azure.com, we repeat the same step to see how the fail over group are created.

Going all this steps we are able to create arm template that will create free High Availability Azure Sql Db in 8 regions with fail-over group.

 

Leave a Reply

Your email address will not be published. Required fields are marked *