# Failover group for a SQL Managed Instance

**URL:** <https://discuss.hashicorp.com/t/failover-group-for-a-sql-managed-instance/31204>\
**Category:** Azure\
**Tags:** azure\
**Created:** [October 27, 2021, 3:52pm UTC](https://discuss.hashicorp.com/t/failover-group-for-a-sql-managed-instance/31204 "2021-10-27T15:52:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcatacut](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/fcatacut/32/21396_2.png) [@fcatacut](https://discuss.hashicorp.com/u/fcatacut)\
**Post date:** [October 27, 2021, 3:52pm UTC](https://discuss.hashicorp.com/t/failover-group-for-a-sql-managed-instance/31204/1 "2021-10-27T15:52:41Z")

</div>

With the relatively recent release of [`azurerm_sql_managed_instance`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/sql_managed_instance), has anyone been able to create a failover group? I see [`azurerm_sql_failover_group`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/sql_failover_group) but this looks to be for /providers/Microsoft.Sql/servers whereas a managed instance is /providers/Microsoft.Sql/managedInstances.

I suppose that we can run az commands to create the failover: [az sql instance-failover-group | Microsoft Docs](https://docs.microsoft.com/en-us/cli/azure/sql/instance-failover-group?view=azure-cli-latest#az_sql_instance_failover_group_create). But, I wanted to make sure that I wasn’t missing something.

---

<div class="post-metadata">

**Author:** ![aristosvo](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/aristosvo/32/14145_2.png) [@aristosvo](https://discuss.hashicorp.com/u/aristosvo)\
**Post date:** [November 10, 2021, 10:42pm UTC](https://discuss.hashicorp.com/t/failover-group-for-a-sql-managed-instance/31204/2 "2021-11-10T22:42:25Z")

</div>

> [@fcatacut](#):
>
> With the relatively recent release of [`azurerm_sql_managed_instance`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/sql_managed_instance), has anyone been able to create a failover group? I see [`azurerm_sql_failover_group`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/sql_failover_group) but this looks to be for /providers/Microsoft.Sql/servers whereas a managed instance is /providers/Microsoft.Sql/managedInstances.

Hi @fcatacut!

Indeed, although [`azurerm_sql_managed_instance_failover_group`: New resource by aristosvo · Pull Request #13974 · hashicorp/terraform-provider-azurerm · GitHub](https://github.com/hashicorp/terraform-provider-azurerm/pull/13974) is ready to get reviewed and merged, it is a big one which may take some time to get merged 🙂
