简体   繁体   中英

Terraform Azure fails to create Database

Im using terraform 2.33.0 (I tested 2.90.0 too ) to create a sql server and then create a database

Today Ive started getting the following error:

Error waiting on create/update future for SQL Database "x" (Resource Group "y", Server "z"): Code="45157" Message="Server 'z' is busy with another operation. Please try your operation later.

I can create the sql database in the portal fine after this failure.

Has anybody seen this issue or anything like it?

The db is created like this

resource "azurerm_sql_database" "tenant_sqldb" {
  name                             = "x"
  resource_group_name              = azurerm_resource_group.tenant_rg.name
  location                         =  var.location
  server_name                      = z
  create_mode                      = "Default"
  edition                          = var.database_is_premium == true ? "Premium" : "Standard"
  requested_service_objective_name = var.database_is_premium == true ? "P4" : "S1"
  max_size_bytes = 268435456000
   tags = {
      Application = "bah"
      Tenant      = var.tenant
      CustomerId  = var.customer_id
      Environment = var.environment
    }
}

So.. I upgraded to 2.93.1 of the AzureRM (which requires terraform 0.12.31 minimum) and that solved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM