Microsoft。Sqlサーバー/elasticPools 2014-04-01

Bicepリソースの定義

サーバー/elasticPools リソースの種類は、次を対象とする操作でデプロイできます。

  • リソース グループの - リソース グループのデプロイ コマンド 参照

各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。

リソースの形式

Microsoftを作るために。Sql/servers/elasticPoolsリソースで、テンプレートに以下のBicepを追加してください。

resource symbolicname 'Microsoft.Sql/servers/elasticPools@2014-04-01' = {
  parent: resourceSymbolicName
  location: 'string'
  name: 'string'
  properties: {
    databaseDtuMax: int
    databaseDtuMin: int
    dtu: int
    edition: 'string'
    storageMB: int
    zoneRedundant: bool
  }
  tags: {
    {customized property}: 'string'
  }
}

プロパティ値

Microsoft。Sql/servers/elasticPools

Name Description Value
位置 リソースの場所。 string (必須)
name リソース名 string (必須)
Bicepでは、子リソースの親リソースを指定することができます。 このプロパティを追加する必要があるのは、子リソースが親リソースの外部で宣言されている場合のみです。

詳細については、「親リソースの外部 子リソース」を参照してください。
種類のリソースのシンボリック名: サーバー
properties リソースを表すプロパティ。 ElasticPoolProperties
tags リソース タグ タグ名と値のディクショナリ。 テンプレート の タグを参照してください

ElasticPoolProperties

Name Description Value
databaseDtuMax 1 つのデータベースで使用できる最大 DTU。 int
databaseDtuMin すべてのデータベースの最小 DTU が保証されます。 int
dtu データベース エラスティック プールの共有 DTU の合計。 int
edition エラスティック プールのエディション。 'Basic'
'BusinessCritical'
'GeneralPurpose'
'Premium'
'Standard'
storageMB データベース エラスティック プールのストレージ制限を MB 単位で取得します。 int
zoneRedundant このデータベース エラスティック プールがゾーン冗長であるかどうかは、このデータベースのレプリカが複数の可用性ゾーンに分散されることを意味します。 bool

TrackedResourceTags

Name Description Value

使用例

Bicep サンプル

Azure SQL Elastic Poolの展開の基本的な例です。

param resourceName string = 'acctest0001'
param location string = 'westeurope'
@secure()
@description('The administrator login password for the SQL server')
param administratorLoginPassword string

resource server 'Microsoft.Sql/servers@2021-02-01-preview' = {
  name: resourceName
  location: location
  properties: {
    administratorLogin: '4dm1n157r470r'
    administratorLoginPassword: null
    minimalTlsVersion: '1.2'
    publicNetworkAccess: 'Enabled'
    restrictOutboundNetworkAccess: 'Disabled'
    version: '12.0'
  }
}

resource elasticPool 'Microsoft.Sql/servers/elasticPools@2020-11-01-preview' = {
  parent: server
  name: resourceName
  location: location
  properties: {
    maintenanceConfigurationId: resourceId('Microsoft.Maintenance/publicMaintenanceConfigurations', 'SQL_Default')
    maxSizeBytes: 5242880000
    perDatabaseSettings: {
      maxCapacity: 5
      minCapacity: 0
    }
    zoneRedundant: false
  }
  sku: {
    capacity: 50
    family: ''
    name: 'BasicPool'
    tier: 'Basic'
  }
}

ARM テンプレート リソース定義

サーバー/elasticPools リソースの種類は、次を対象とする操作でデプロイできます。

  • リソース グループの - リソース グループのデプロイ コマンド 参照

各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。

リソースの形式

Microsoftを作るために。Sql/servers/elasticPoolsリソースで、テンプレートに以下のJSONを追加してください。

{
  "type": "Microsoft.Sql/servers/elasticPools",
  "apiVersion": "2014-04-01",
  "name": "string",
  "location": "string",
  "properties": {
    "databaseDtuMax": "int",
    "databaseDtuMin": "int",
    "dtu": "int",
    "edition": "string",
    "storageMB": "int",
    "zoneRedundant": "bool"
  },
  "tags": {
    "{customized property}": "string"
  }
}

プロパティ値

Microsoft。Sql/servers/elasticPools

Name Description Value
apiVersion API のバージョン '2014-04-01'
位置 リソースの場所。 string (必須)
name リソース名 string (必須)
properties リソースを表すプロパティ。 ElasticPoolProperties
tags リソース タグ タグ名と値のディクショナリ。 テンプレート の タグを参照してください
リソースの種類 「Microsoft。Sql/servers/elasticPools'

ElasticPoolProperties

Name Description Value
databaseDtuMax 1 つのデータベースで使用できる最大 DTU。 int
databaseDtuMin すべてのデータベースの最小 DTU が保証されます。 int
dtu データベース エラスティック プールの共有 DTU の合計。 int
edition エラスティック プールのエディション。 'Basic'
'BusinessCritical'
'GeneralPurpose'
'Premium'
'Standard'
storageMB データベース エラスティック プールのストレージ制限を MB 単位で取得します。 int
zoneRedundant このデータベース エラスティック プールがゾーン冗長であるかどうかは、このデータベースのレプリカが複数の可用性ゾーンに分散されることを意味します。 bool

TrackedResourceTags

Name Description Value

使用例

Azure Quickstart Templates

以下のAzureクイックスタートテンプレートはこのリソースタイプを展開します。

Template Description
新しいSQLエラスティックプールをデプロイ

展開Azure
このテンプレートにより、新しいSQL Serverや割り当て可能な新しいSQLデータベースを備えた新しいSQLエラスティックプールを展開できます。

Terraform (AzAPI プロバイダー) リソース定義

サーバー/elasticPools リソースの種類は、次を対象とする操作でデプロイできます。

  • リソース グループ

各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。

リソースの形式

Microsoftを作るために。Sql/servers/elasticPoolsリソースで、テンプレートに以下のTerraformを追加してください。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/servers/elasticPools@2014-04-01"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      databaseDtuMax = int
      databaseDtuMin = int
      dtu = int
      edition = "string"
      storageMB = int
      zoneRedundant = bool
    }
  }
}

プロパティ値

Microsoft。Sql/servers/elasticPools

Name Description Value
位置 リソースの場所。 string (必須)
name リソース名 string (必須)
parent_id このリソースの親であるリソースの ID。 種類のリソースの ID: サーバー
properties リソースを表すプロパティ。 ElasticPoolProperties
tags リソース タグ タグ名と値のディクショナリ。
リソースの種類 「Microsoft。Sql/servers/elasticPools@2014-04-01"

ElasticPoolProperties

Name Description Value
databaseDtuMax 1 つのデータベースで使用できる最大 DTU。 int
databaseDtuMin すべてのデータベースの最小 DTU が保証されます。 int
dtu データベース エラスティック プールの共有 DTU の合計。 int
edition エラスティック プールのエディション。 'Basic'
'BusinessCritical'
'GeneralPurpose'
'Premium'
'Standard'
storageMB データベース エラスティック プールのストレージ制限を MB 単位で取得します。 int
zoneRedundant このデータベース エラスティック プールがゾーン冗長であるかどうかは、このデータベースのレプリカが複数の可用性ゾーンに分散されることを意味します。 bool

TrackedResourceTags

Name Description Value

使用例

Terraformサンプル

Azure SQL Elastic Poolの展開の基本的な例です。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
    azurerm = {
      source = "hashicorp/azurerm"
    }
  }
}

provider "azurerm" {
  features {
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

variable "administrator_login_password" {
  type        = string
  description = "The administrator login password for the SQL server"
  sensitive   = true
}

data "azurerm_client_config" "current" {
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "server" {
  type      = "Microsoft.Sql/servers@2021-02-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      administratorLogin            = "4dm1n157r470r"
      administratorLoginPassword    = var.administrator_login_password
      minimalTlsVersion             = "1.2"
      publicNetworkAccess           = "Enabled"
      restrictOutboundNetworkAccess = "Disabled"
      version                       = "12.0"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

data "azapi_resource_id" "publicMaintenanceConfiguration" {
  type      = "Microsoft.Maintenance/publicMaintenanceConfigurations@2023-04-01"
  parent_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}"
  name      = "SQL_Default"
}

resource "azapi_resource" "elasticPool" {
  type      = "Microsoft.Sql/servers/elasticPools@2020-11-01-preview"
  parent_id = azapi_resource.server.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      maintenanceConfigurationId = data.azapi_resource_id.publicMaintenanceConfiguration.id
      maxSizeBytes               = 5.24288e+09
      perDatabaseSettings = {
        maxCapacity = 5
        minCapacity = 0
      }
      zoneRedundant = false
    }
    sku = {
      capacity = 50
      family   = ""
      name     = "BasicPool"
      tier     = "Basic"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

Azure SQL Elastic Poolの展開の基本的な例です。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
    azurerm = {
      source = "hashicorp/azurerm"
    }
  }
}

provider "azurerm" {
  features {
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

variable "administrator_login_password" {
  type        = string
  description = "The administrator login password for the SQL server"
  sensitive   = true
}

data "azurerm_client_config" "current" {
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "server" {
  type      = "Microsoft.Sql/servers@2021-02-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      administratorLogin            = "4dm1n157r470r"
      administratorLoginPassword    = var.administrator_login_password
      minimalTlsVersion             = "1.2"
      publicNetworkAccess           = "Enabled"
      restrictOutboundNetworkAccess = "Disabled"
      version                       = "12.0"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

data "azapi_resource_id" "publicMaintenanceConfiguration" {
  type      = "Microsoft.Maintenance/publicMaintenanceConfigurations@2023-04-01"
  parent_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}"
  name      = "SQL_Default"
}

resource "azapi_resource" "elasticPool" {
  type      = "Microsoft.Sql/servers/elasticPools@2020-11-01-preview"
  parent_id = azapi_resource.server.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      maintenanceConfigurationId = data.azapi_resource_id.publicMaintenanceConfiguration.id
      maxSizeBytes               = 5.24288e+09
      perDatabaseSettings = {
        maxCapacity = 5
        minCapacity = 0
      }
      zoneRedundant = false
    }
    sku = {
      capacity = 50
      family   = ""
      name     = "BasicPool"
      tier     = "Basic"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}