次の方法で共有


Microsoft。Sqlサーバー/encryptionProtector 2023-05-01-preview

Bicepリソースの定義

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

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

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

リソースの形式

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

resource symbolicname 'Microsoft.Sql/servers/encryptionProtector@2023-05-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": "2023-05-01-preview",
  "name": "string",
  "properties": {
    "autoRotationEnabled": "bool",
    "serverKeyName": "string",
    "serverKeyType": "string"
  }
}

プロパティ値

Microsoft。SQL/servers/encryptionProtector

Name Description Value
apiVersion API のバージョン '2023-05-01-preview'
name リソース名 'current' (必須)
properties リソースのプロパティ。 EncryptionProtectorProperties
リソースの種類 「Microsoft。SQL/サーバー/暗号化プロテクター

EncryptionProtectorProperties

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

使用例

Azure Quickstart Templates

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

Template Description
データ暗号化プロテクター

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

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

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

  • リソース グループ

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

リソースの形式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/servers/encryptionProtector@2023-05-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@2023-05-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"
    }
  }
}