Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_mysql_active_directory_administrator always takes exactly 10 minutes, when it's actually ready after less than 1 minute #9592

Open
AdamCoulterOz opened this issue Dec 1, 2020 · 1 comment
Labels
bug service/mysql upstream/microsoft/waiting-on-service-team This label is applicable when waiting on the Microsoft Service Team v/2.x (legacy)

Comments

@AdamCoulterOz
Copy link
Contributor

AdamCoulterOz commented Dec 1, 2020

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.13.5
AzureRM v2.38.0

Affected Resource

  • azurerm_mysql_active_directory_administrator

Terraform Configuration Files

provider "azurerm" {
  features {}
}

data "azurerm_client_config" "current" {}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West US"
}

resource "azurerm_mysql_server" "example" {
  name                         = "example-mysqlserver"
  location                     = azurerm_resource_group.example.location
  resource_group_name          = azurerm_resource_group.example.name
  administrator_login          = "mysqladminun"
  administrator_login_password = "H@Sh1CoR3!"
  sku_name                     = "B_Gen5_2"
  storage_mb                   = 5120
  version                      = "8.0"
  ssl_enforcement_enabled      = false
}

resource "azurerm_mysql_active_directory_administrator" "example" {
  server_name         = azurerm_mysql_server.example.name
  resource_group_name = azurerm_resource_group.example.name
  login               = "sqladmin"
  tenant_id           = data.azurerm_client_config.current.tenant_id
  object_id           = data.azurerm_client_config.current.object_id
}

Debug Output

https://gist.github.com/AdamCoulterOz/a0e2511fe8dfd17a50c3bf9a1d4d1f8b

Expected Behaviour

Resource azurerm_mysql_active_directory_administrator.example should have reported complete in <20 seconds.

Actual Behaviour

Resource azurerm_mysql_active_directory_administrator.example reported complete in exactly 10 minutes, as it always does.

Steps to Reproduce

  1. terraform apply

Important Factoids

Portal screen shot showing user assignment has completed at 6:15:52 pm (to correlate with the attached logs):
Screen Shot 2020-12-01 at 6 15 52 pm

References

@evertonmc this might be something you can help with?

@AdamCoulterOz
Copy link
Contributor Author

I've found the root cause is the Azure go-autorest library enforces a Retry-After: 600 header returned by the Azure Rest API (600 seconds = my 10 minute issue). However, when using the portal it makes this same request, but it ignores this RetryAfter value and retries every 5 seconds.

What would be a way to work around this until / if the appropriate Azure API team ever updates it?

@katbyte katbyte added bug service/mysql upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR labels Jul 14, 2021
@rcskosir rcskosir added upstream/microsoft/waiting-on-service-team This label is applicable when waiting on the Microsoft Service Team and removed upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug service/mysql upstream/microsoft/waiting-on-service-team This label is applicable when waiting on the Microsoft Service Team v/2.x (legacy)
Projects
None yet
Development

No branches or pull requests

3 participants