我们创建了一个新的弹性池并移入了一些数据库。旧弹性池中的数据库的所有数据库的 CAP_CPU 和 MAX_CPU 均为 85。在新池中它们是 45。我如何匹配旧值?
您可以使用名为 azurerm_mssql_elasticpool 的 Terraform 提供程序。我发现与 CLI、PowerShell 甚至 Azure 门户相比,使用 Terraform 配置 Azure 弹性池更好、更容易。请参阅以下示例中的 min_capacity 和 max_capacity:
resource "azurerm_resource_group" "example" {
name = "my-resource-group"
location = "West Europe"
}
resource "azurerm_mssql_server" "example" {
name = "my-sql-server"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
version = "12.0"
administrator_login = "4dm1n157r470r"
administrator_login_password = "4-v3ry-53cr37-p455w0rd"
}
resource "azurerm_mssql_elasticpool" "example" {
name = "test-epool"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
server_name = azurerm_mssql_server.example.name
license_type = "LicenseIncluded"
max_size_gb = 756
sku {
name = "BasicPool"
tier = "Basic"
family = "Gen4"
capacity = 4
}
per_database_settings {
min_capacity = 0.25
max_capacity = 4
}
}