次の方法で共有


Microsoft.SQL servers/encryptionProtector 2025-02-01-preview

Bicep リソース定義

servers/encryptionProtector リソースの種類は、次を対象とする操作と共にデプロイできます。

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

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

リソースの形式

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

resource symbolicname 'Microsoft.Sql/servers/encryptionProtector@2025-02-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    autoRotationEnabled: bool
    serverKeyName: 'string'
    serverKeyType: 'string'
  }
}

プロパティ値

Microsoft.Sql/servers/encryptionProtector

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

詳細については、Child resource outside parent resourceをご覧ください。
種類のリソースのシンボリック名: サーバー
プロパティ リソースのプロパティ。 EncryptionProtectorProperties

EncryptionProtectorProperties

名前 説明 価値
autoRotationEnabled キー自動ローテーションオプトイン フラグ。 true または false のいずれか。 ブール (bool)
serverKeyName サーバー キーの名前。 文字列
serverKeyType "ServiceManaged"、"AzureKeyVault" などの暗号化保護機能の種類。 'AzureKeyVault'
'ServiceManaged' (必須)

使用例

Bicep のサンプル

MSSQL Server の透過的なデータ暗号化構成をデプロイする基本的な例。

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

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

resource encryptionProtector 'Microsoft.Sql/servers/encryptionProtector@2023-08-01-preview' = {
  parent: server
  name: 'current'
  properties: {
    autoRotationEnabled: false
    serverKeyName: ''
    serverKeyType: 'ServiceManaged'
  }
}

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

servers/encryptionProtector リソースの種類は、次を対象とする操作と共にデプロイできます。

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

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

リソースの形式

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

{
  "type": "Microsoft.Sql/servers/encryptionProtector",
  "apiVersion": "2025-02-01-preview",
  "name": "string",
  "properties": {
    "autoRotationEnabled": "bool",
    "serverKeyName": "string",
    "serverKeyType": "string"
  }
}

プロパティ値

Microsoft.Sql/servers/encryptionProtector

名前 説明 価値
apiVersion API のバージョン '2025-02-01-プレビュー'
名前 リソース名 'current' (必須)
プロパティ リソースのプロパティ。 EncryptionProtectorProperties
リソースの種類 'Microsoft.Sql/servers/encryptionProtector'

EncryptionProtectorProperties

名前 説明 価値
autoRotationEnabled キー自動ローテーションオプトイン フラグ。 true または false のいずれか。 ブール (bool)
serverKeyName サーバー キーの名前。 文字列
serverKeyType "ServiceManaged"、"AzureKeyVault" などの暗号化保護機能の種類。 'AzureKeyVault'
'ServiceManaged' (必須)

使用例

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

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

テンプレート 説明
データ暗号化プロテクター

Azure にデプロイする
このテンプレートはAzure SQLサーバーを作成し、指定されたKey Vaultに保存された鍵を使ってデータ暗号化プロテクターを有効化します

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

servers/encryptionProtector リソースの種類は、次を対象とする操作と共にデプロイできます。

  • リソース グループ

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

リソースの形式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/servers/encryptionProtector@2025-02-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      autoRotationEnabled = bool
      serverKeyName = "string"
      serverKeyType = "string"
    }
  }
}

プロパティ値

Microsoft.Sql/servers/encryptionProtector

名前 説明 価値
名前 リソース名 'current' (必須)
parent_id このリソースの親であるリソースの ID。 種類のリソースの ID: サーバー
プロパティ リソースのプロパティ。 EncryptionProtectorProperties
リソースの種類 "Microsoft.Sql/servers/encryptionProtector@2025-02-01-preview"

EncryptionProtectorProperties

名前 説明 価値
autoRotationEnabled キー自動ローテーションオプトイン フラグ。 true または false のいずれか。 ブール (bool)
serverKeyName サーバー キーの名前。 文字列
serverKeyType "ServiceManaged"、"AzureKeyVault" などの暗号化保護機能の種類。 'AzureKeyVault'
'ServiceManaged' (必須)

使用例

Terraformサンプル

MSSQL Server の透過的なデータ暗号化構成をデプロイする基本的な例。

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 SQL server"
}

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@2023-08-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  identity {
    type         = "SystemAssigned"
    identity_ids = []
  }
  body = {
    properties = {
      administratorLogin            = "mradministrator"
      administratorLoginPassword    = var.administrator_login_password
      minimalTlsVersion             = "1.2"
      publicNetworkAccess           = "Enabled"
      restrictOutboundNetworkAccess = "Disabled"
      version                       = "12.0"
    }
  }
}

resource "azapi_resource" "encryptionProtector" {
  type      = "Microsoft.Sql/servers/encryptionProtector@2023-08-01-preview"
  parent_id = azapi_resource.server.id
  name      = "current"
  body = {
    properties = {
      autoRotationEnabled = false
      serverKeyName       = ""
      serverKeyType       = "ServiceManaged"
    }
  }
}