次の方法で共有


Microsoft.Sql サーバー/暗号化プロテクター 2022-08-01-preview

Bicep リソース定義

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

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

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

リソースの形式

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

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

プロパティ値

Microsoft.Sql/servers/encryptionProtector

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

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

EncryptionProtectorProperties

Name Description Value
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 リソースの種類は、次を対象とする操作と共にデプロイできます。

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

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

リソースの形式

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

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

プロパティ値

Microsoft.Sql/servers/encryptionProtector

Name Description Value
apiVersion API のバージョン '2022-08-01-preview'
name リソース名 'current' (必須)
properties リソースのプロパティ。 EncryptionProtectorProperties
リソースの種類 'Microsoft.Sql/servers/encryptionProtector'

EncryptionProtectorProperties

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

使用例

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

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

Template Description
データ暗号化保護機能を使用して Azure SQL Server を作成

Azure に展開する
このテンプレートは、Azure SQL サーバーを作成し、特定の Key Vault に格納されている特定のキーを使用してデータ暗号化保護機能をアクティブ化します

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

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

  • リソース グループ

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

リソースの形式

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

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

プロパティ値

Microsoft.Sql/servers/encryptionProtector

Name Description Value
name リソース名 'current' (必須)
parent_id このリソースの親であるリソースの ID。 種類のリソースの ID: サーバー
properties リソースのプロパティ。 EncryptionProtectorProperties
リソースの種類 "Microsoft.Sql/servers/encryptionProtector@2022-08-01-preview"

EncryptionProtectorProperties

Name Description Value
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"
    }
  }
}