Microsoft.DBforMySQL フレキシブルサーバー/構成 2023-12-30

Bicep リソース定義

flexibleServers/configurations リソースの種類は、次をターゲットとする操作と共にデプロイできます。

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

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

使用例

Bicep サンプル

デプロイの基本的な例MySQL フレキシブル サーバーでの MySQL フレキシブル サーバー構成値を設定します。

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

resource flexibleServer 'Microsoft.DBforMySQL/flexibleServers@2023-12-30' = {
  name: '${resourceName}-mysql'
  location: location
  sku: {
    name: 'Standard_B1ms'
    tier: 'Burstable'
  }
  properties: {
    administratorLogin: 'tfadmin'
    administratorLoginPassword: administratorLoginPassword
    backup: {
      backupRetentionDays: 7
      geoRedundantBackup: 'Disabled'
    }
    dataEncryption: {
      type: 'SystemManaged'
    }
    highAvailability: {
      mode: 'Disabled'
    }
    version: '8.0.21'
  }
}

resource configuration 'Microsoft.DBforMySQL/flexibleServers/configurations@2023-12-30' = {
  name: 'character_set_server'
  parent: flexibleServer
  properties: {
    value: 'utf8mb4'
  }
}

Azure 検証済みモジュール

次の Azure 検証済みモジュール を使用して、このリソースの種類をデプロイできます。

Module 形容
MySQL Flexible Server 用データベース - 設定 MySQL Flexible Server for DB for AVM Child Module - 設定

Azure クイック スタートのサンプル

次 Azure クイック スタート テンプレート、このリソースの種類をデプロイするための Bicep サンプルが含まれています。

Bicep ファイル 形容
Entra 認証を使用した MySQL フレキシブル サーバーのデプロイ このテンプレートは、Entra 認証を使用して Azure Database for MySQL フレキシブル サーバーをデプロイする方法を提供します。

リソースの形式

Microsoft.DBforMySQL/flexibleServers/configurations リソースを作成するには、次の Bicep をテンプレートに追加します。

resource symbolicname 'Microsoft.DBforMySQL/flexibleServers/configurations@2023-12-30' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    currentValue: 'string'
    source: 'string'
    value: 'string'
  }
}

プロパティ値

Microsoft.DBforMySQL/flexibleServers/configurations (英語)

名前 形容 価値
名前 リソース名 string (必須)
親 Bicep では、子リソースの親リソースを指定できます。 このプロパティを追加する必要があるのは、子リソースが親リソースの外部で宣言されている場合のみです。

詳細については、「親リソースの外部 子リソース」を参照してください。
種類のリソースのシンボリック名: flexibleServers
プロパティ 構成のプロパティ。 構成プロパティ

構成プロパティ

名前 形容 価値
現在の値 構成の現在の値。 文字列
ソース 構成のソース。 'システムデフォルト'
'ユーザーオーバーライド'
価値 構成の値。 文字列

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

flexibleServers/configurations リソースの種類は、次をターゲットとする操作と共にデプロイできます。

使用例

Azure クイックスタート テンプレート

このリソースの種類 デプロイする Azure クイック スタート テンプレート 次に示します。

Template 形容
Entra 認証を使用した MySQL フレキシブル サーバーのデプロイ

Azure に展開する
このテンプレートは、Entra 認証を使用して Azure Database for MySQL フレキシブル サーバーをデプロイする方法を提供します。

リソースの形式

Microsoft.DBforMySQL/flexibleServers/configurations リソースを作成するには、次の JSON をテンプレートに追加します。

{
  "type": "Microsoft.DBforMySQL/flexibleServers/configurations",
  "apiVersion": "2023-12-30",
  "name": "string",
  "properties": {
    "currentValue": "string",
    "source": "string",
    "value": "string"
  }
}

プロパティ値

Microsoft.DBforMySQL/flexibleServers/configurations (英語)

名前 形容 価値
apiVersion (英語) API のバージョン '2023-12-30'
名前 リソース名 string (必須)
プロパティ 構成のプロパティ。 構成プロパティ
型 リソースの種類 'Microsoft.DBforMySQL/flexibleServers/configurations'

構成プロパティ

名前 形容 価値
現在の値 構成の現在の値。 文字列
ソース 構成のソース。 'システムデフォルト'
'ユーザーオーバーライド'
価値 構成の値。 文字列

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

flexibleServers/configurations リソースの種類は、次をターゲットとする操作と共にデプロイできます。

  • リソースグループ 各APIバージョンの変更プロパティ一覧については、 変更ログをご覧ください。

使用例

Terraformサンプル

デプロイの基本的な例MySQL フレキシブル サーバーでの MySQL フレキシブル サーバー構成値を設定します。

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

provider "azapi" {
  skip_provider_registration = false
}

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

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

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

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

resource "azapi_resource" "flexibleServer" {
  type      = "Microsoft.DBforMySQL/flexibleServers@2023-12-30"
  parent_id = azapi_resource.resourceGroup.id
  name      = "${var.resource_name}-mysql"
  location  = var.location
  body = {
    properties = {
      administratorLogin         = "tfadmin"
      administratorLoginPassword = var.administrator_login_password
      backup = {
        backupRetentionDays = 7
        geoRedundantBackup  = "Disabled"
      }
      dataEncryption = {
        type = "SystemManaged"
      }
      highAvailability = {
        mode = "Disabled"
      }
      version = "8.0.21"
    }
    sku = {
      name = "Standard_B1ms"
      tier = "Burstable"
    }
  }
}

resource "azapi_update_resource" "configuration" {
  type      = "Microsoft.DBforMySQL/flexibleServers/configurations@2023-12-30"
  parent_id = azapi_resource.flexibleServer.id
  name      = "character_set_server"
  body = {
    properties = {
      value = "utf8mb4"
    }
  }
}

リソースの形式

Microsoft.DBforMySQL/flexibleServers/configurations リソースを作成するには、次の Terraform をテンプレートに追加します。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DBforMySQL/flexibleServers/configurations@2023-12-30"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      currentValue = "string"
      source = "string"
      value = "string"
    }
  }
}

プロパティ値

Microsoft.DBforMySQL/flexibleServers/configurations (英語)

名前 形容 価値
名前 リソース名 string (必須)
parent_id このリソースの親であるリソースの ID。 種類のリソースの ID: flexibleServers
プロパティ 構成のプロパティ。 構成プロパティ
型 リソースの種類 "Microsoft.DBforMySQL/flexibleServers/configurations@2023-12-30"

構成プロパティ

名前 形容 価値
現在の値 構成の現在の値。 文字列
ソース 構成のソース。 'システムデフォルト'
'ユーザーオーバーライド'
価値 構成の値。 文字列