Azure SQL Managed Instance – Terraform command available

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.

SQLMIOPS cover.png

We continue investment into #sqlmiops, and after recent changes in managed instance delete flow, IaC (Infrastracture-as-Code) area is expanded with SQL Managed Instance terraform command.

 

Command for Azure SQL Managed Instance  deployment is officially available in Terraform registry as part of the Azure provider under Database group of commands. So far, customers used ARM templates as workaround for deploying managed instance, but with recent changes (PR 2.76.0 (September 10, 2021)) all templates can be switched to the fresh azurerm_sql_managed_instance command.

 

There are couple of tips that can come handy:

  • If you have only one managed instance deployed in the subnet and you want to re-create it, first create new instance, and then remove the old one.
    Explanation: The only benefit of this order of operations is shorter duration. There is nothing that would prevent opposite order (first removing the old one, then creating new). Subsequent instance creations mostly require virtual cluster resize typically taking up to 2.5 hours to complete. In case of first instance creation in the subnet, virtual cluster creation is triggered with typical duration of 4 hours. Removal of the last instance in the subnet takes up to 1.5 hours.
    ReferenceManagement operations overview page
  • Removal of the last instance in subnet is long running operation  typically taking 1.5 hours. Non-last instance removal is fast operation that completes in up to 5 minutes.
    Explanation: Removal of the last instance in subnet will remove all dependent networking resources created as part of the instance creation including virtual cluster.
    ReferenceAzure SQL MI now removes virtual cluster as part of the delete flow

 

List of Azure SQL Managed Instance related commands:

 

Key concepts to have in mind before deploying Azure SQL Managed Instance:

 

Stay tuned with #sqlmiops!

 

Index article: Azure SQL Managed Instance – introduction to #SQLMIOPS

Call to action: Nominate the topics for upcoming blog posts using comment section and votes, or writing directly to mdcssqlmipm@microsoft.com

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.