MSSQL - Error Creating Managed Instance - Polling Failed

Gunnar Smith 0 Reputation points
2024-09-27T21:12:52.9666667+00:00

Trying to deploy a MSSQL Managed Instance via terraform.

We have checked our parameters and configurations. We have reached out to our app support team and continue to fail to deploy.

We are getting the following error message:

--Please note I have removed the IDs/Names from the error message for security purposes--

Error: creating Managed Instance (Subscription: "SUBSCRIPTION ID HERE"
│ Resource Group Name: "RESOURCE GROUP NAME HERE"
│ Managed Instance Name: "MANAGED INSTANCE NAME HERE"): polling after CreateOrUpdate: polling failed
│ 
│   with module.mssql-managed-instance.azurerm_mssql_managed_instance.mssql_managed_instance,
│   on .terraform/modules/mssql-managed-instance/main.tf line 30, in resource "azurerm_mssql_managed_instance" "mssql_managed_instance":
│   30: resource "azurerm_mssql_managed_instance" "mssql_managed_instance" {
│ 
│ creating Managed Instance (Subscription: "SUBSCRIPTION ID HERE"
│ Resource Group Name: "RESOURCE GROUP NAME HERE"
│ Managed Instance Name: "MANAGED INSTANCE NAME HERE"): polling after
│ CreateOrUpdate: polling failed
╵
Operation failed: failed running terraform apply (exit 1)
Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Mahesh Kurva 5,210 Reputation points Microsoft External Staff Moderator
    2024-09-28T00:22:34.2066667+00:00

    Hi @Gunnar Smith,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    As i understand that you are trying to deploy a MSSQL Managed Instance via terraform.

    The error message indicates that the polling after CreateOrUpdate has failed.

    Here are some troubleshooting steps that might help:

    • Verify that the Managed Instance is being created successfully in Azure. You can do this by checking the Azure portal or using the Azure CLI to query the resource group and instance.
    • Double-check the Terraform configuration files, especially the main.tf file, to ensure that all required parameters are present and correct.
    • Enable Terraform debugging to get more detailed logs about the deployment process. This can help identify the exact point of failure.
    • Ensure that you haven’t hit any resource limits in your Azure subscription, such as the number of managed instances allowed.
    • You can try increasing the polling timeout in Terraform to give the creation operation more time to complete. This can be done by setting the timeout parameter in the azurerm_mssql_managed_instance resource.
    resource "azurerm_mssql_managed_instance" "mssql_managed_instance" {
      # ... other configuration ...
      timeouts {
        create = "60m"
        update = "60m"
        delete = "60m"
      }
    }
    

    For more information, please refer the document: Create instance with Terraform - Azure SQL Managed Instance.

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.