Terraform-provider-azurerm: azurerm_mssql_virtual_machine: API returning 500's

Created on 14 Jul 2020  ·  15Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Terraform (and AzureRM Provider) Version

Terraform: v0.12.28
AzureRM Provider: v2.18.0

Affected Resource(s)

azurerm_mssql_virtual_machine

Terraform Configuration Files

resource "azurerm_mssql_virtual_machine" "sqlvm" {
  virtual_machine_id               = azurerm_virtual_machine.vm.id
  sql_license_type                 = "AHUB"
  r_services_enabled               = false
  sql_connectivity_port            = 1433
  sql_connectivity_type            = "PRIVATE"
  sql_connectivity_update_password = var.password
  sql_connectivity_update_username = var.username

  tags = {
    client = var.client
  }

  auto_patching {
    day_of_week                            = "Sunday"
    maintenance_window_duration_in_minutes = 60
    maintenance_window_starting_hour       = 2
  }
}

Debug Output

https://gist.github.com/tysimo/af74b396e938fc8c6d0a11eb7481aa1f

Expected Behavior

Terraform plan completes successfully.

Actual Behavior

Terraform plan fails to refresh azurerm_mssql_virtual_machine resources.

Steps to Reproduce

  1. terraform plan

Important Factoids

Running in North Central US Azure region. Worked fine a little over a week ago. Possible api issue in Azure?

servicmssql upstream-microsoft

Most helpful comment

@tombuildsstuff we are having a call with Azure support shortly, we believe we have traced the issue back to this commit https://github.com/terraform-providers/terraform-provider-azurerm/commit/6654794e18922c49fecb127221255e9bf9a3dfc3 that was made 4 days ago updating the azure-sdk-for-go v44.0.0 vs the previous version which was azure-sdk-for-go v43.2.0

Opened an issue in azure-sdk-for-go https://github.com/Azure/azure-sdk-for-go/issues/11575

cc @yutyang @tysimo

All 15 comments

We are also facing this issue in EastUS2, any guidance on how we can resolve? We currently cannot provision new environments because of this issue.

cc @yutyang

hey @fnocera @tysimo

Thanks for opening this issue.

Taking a look into this this appears to be an internal server error repeatedly coming back from the Azure API here - as such Terraform is polling a number of times (3 from memory) to try and work around this, but we're still getting a 500 "internal server error" back from the Azure API here.

Looking at the log files here, this is coming from the Get SqlVirtualMachine API - as such I'd suggest filing an issue with Microsoft Support here - unfortunately this isn't something that we can fix within Terraform, but when the API is fixed this should continue working automatically.

Thanks!

@tombuildsstuff we are having a call with Azure support shortly, we believe we have traced the issue back to this commit https://github.com/terraform-providers/terraform-provider-azurerm/commit/6654794e18922c49fecb127221255e9bf9a3dfc3 that was made 4 days ago updating the azure-sdk-for-go v44.0.0 vs the previous version which was azure-sdk-for-go v43.2.0

Opened an issue in azure-sdk-for-go https://github.com/Azure/azure-sdk-for-go/issues/11575

cc @yutyang @tysimo

@fnocera can you share the case number with Azure support so I can connect it with some other related cases I'm tracking?

@doherty100 the Azure Support case number is 120071421002079.

@yutyang thanks I've connected these support cases and azure engineering is aware of them. I believe a fix is being rolled out as we speak but it will take some time to percolate into all the azure global regions.

FYI fix being deployed, I tested it in westcentralus and working there. It will take some time for this to roll out to all Azure regions.

I can confirm @doherty100 that it's working on westcentralus. Just tried on France Central and it's not working there yet

Hi. I have the same issue in South Central US. How much time needed for updating other regions?

This issue appears to be resolved in the North Central US region now.

Resolved in East US 2 region too

Resolved in eastus!

@ikukulevskyi my understanding is that the fix should be rolled out worldwide by EoD 23-July-2020 PST.

Resolved in westeurope region

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings