Bicep リソース定義
sqlVirtualMachines リソースの種類は、次をターゲットとする操作と共にデプロイできます。
- リソース グループの - リソース グループのデプロイ コマンド 参照
各 API バージョンで変更されたプロパティの一覧については、変更ログの
使用例
Bicep サンプル
Microsoft SQL 仮想マシンのデプロイの基本的な例。
param location string = 'westeurope'
@secure()
@description('The administrator password for the SQL virtual machine')
param vmAdminPassword string
param resourceName string = 'acctest0001'
resource publicIPAddress 'Microsoft.Network/publicIPAddresses@2024-05-01' = {
name: resourceName
location: 'azapi_resource.resourceGroup.location'
sku: {
name: 'Basic'
tier: 'Regional'
}
properties: {
ddosSettings: {
protectionMode: 'VirtualNetworkInherited'
}
idleTimeoutInMinutes: 4
ipTags: []
publicIPAddressVersion: 'IPv4'
publicIPAllocationMethod: 'Dynamic'
}
}
resource sqlvirtualMachine 'Microsoft.SqlVirtualMachine/sqlVirtualMachines@2023-10-01' = {
name: 'azapi_resource.virtualMachine.name'
location: 'azapi_resource.virtualMachine.location'
properties: {
sqlServerLicenseType: 'PAYG'
virtualMachineResourceId: virtualMachine.id
enableAutomaticUpgrade: true
leastPrivilegeMode: 'Enabled'
sqlImageOffer: 'SQL2017-WS2016'
sqlImageSku: 'Developer'
sqlManagement: 'Full'
}
}
resource virtualMachine 'Microsoft.Compute/virtualMachines@2024-07-01' = {
name: resourceName
location: 'azapi_resource.resourceGroup.location'
properties: {
osProfile: {
adminUsername: 'testadmin'
adminPassword: vmAdminPassword
allowExtensionOperations: true
computerName: 'winhost01'
secrets: []
windowsConfiguration: {
timeZone: 'Pacific Standard Time'
enableAutomaticUpdates: true
patchSettings: {
patchMode: 'AutomaticByOS'
assessmentMode: 'ImageDefault'
}
provisionVMAgent: true
}
}
storageProfile: {
dataDisks: []
imageReference: {
offer: 'SQL2017-WS2016'
publisher: 'MicrosoftSQLServer'
sku: 'SQLDEV'
version: 'latest'
}
osDisk: {
diskSizeGB: 127
managedDisk: {
storageAccountType: 'Premium_LRS'
}
name: 'acctvm-250116171212663925OSDisk'
osType: 'Windows'
writeAcceleratorEnabled: false
caching: 'ReadOnly'
createOption: 'FromImage'
deleteOption: 'Detach'
}
}
hardwareProfile: {
vmSize: 'Standard_F2s'
}
networkProfile: {
networkInterfaces: [
{
properties: {
primary: false
}
id: networkInterface.id
}
]
}
}
}
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-07-01' = {
name: resourceName
location: location
properties: {
addressSpace: {
addressPrefixes: [
'10.0.0.0/16'
]
}
}
}
resource subnet 'Microsoft.Network/virtualNetworks/subnets@2022-07-01' = {
name: resourceName
parent: virtualNetwork
properties: {
addressPrefix: '10.0.0.0/24'
networkSecurityGroup: {
id: networkSecurityGroup.id
}
}
}
resource networkInterface 'Microsoft.Network/networkInterfaces@2024-05-01' = {
name: resourceName
location: 'azapi_resource.resourceGroup.location'
properties: {
disableTcpStateTracking: false
dnsSettings: {
dnsServers: []
}
enableAcceleratedNetworking: false
enableIPForwarding: false
ipConfigurations: [
{
type: 'Microsoft.Network/networkInterfaces/ipConfigurations'
name: 'testconfiguration1'
properties: {
privateIPAddressVersion: 'IPv4'
privateIPAllocationMethod: 'Dynamic'
publicIPAddress: {
id: publicIPAddress.id
}
subnet: {
id: subnet.id
}
primary: true
privateIPAddress: '10.0.0.4'
}
}
]
nicType: 'Standard'
auxiliaryMode: 'None'
auxiliarySku: 'None'
}
}
resource networkSecurityGroup 'Microsoft.Network/networkSecurityGroups@2024-05-01' = {
name: resourceName
location: 'azapi_resource.resourceGroup.location'
properties: {
securityRules: [
{
name: 'MSSQLRule'
properties: {
access: 'Allow'
destinationAddressPrefix: '*'
destinationAddressPrefixes: []
destinationPortRange: '1433'
destinationPortRanges: []
direction: 'Inbound'
priority: 1001
protocol: 'Tcp'
sourceAddressPrefix: '167.220.255.0/25'
sourceAddressPrefixes: []
sourcePortRange: '*'
sourcePortRanges: []
}
}
]
}
}
Microsoft SQL 仮想マシンのデプロイの sqlbestpracticesassessment の例。
param resourceName string = 'acctest0001'
param location string = 'westeurope'
@secure()
@description('The administrator password for the virtual machine')
param adminPassword string
resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-07-01' = {
name: resourceName
location: location
properties: {
addressSpace: {
addressPrefixes: [
'10.0.0.0/16'
]
}
}
}
resource subnet 'Microsoft.Network/virtualNetworks/subnets@2022-07-01' = {
name: resourceName
parent: virtualNetwork
properties: {
addressPrefix: '10.0.0.0/24'
networkSecurityGroup: {
id: networkSecurityGroup.id
}
}
}
resource networkSecurityGroup 'Microsoft.Network/networkSecurityGroups@2024-05-01' = {
name: resourceName
location: 'azapi_resource.resourceGroup.location'
properties: {
securityRules: [
{
name: 'MSSQLRule'
properties: {
access: 'Allow'
destinationAddressPrefix: '*'
destinationAddressPrefixes: []
destinationPortRange: '1433'
destinationPortRanges: []
direction: 'Inbound'
priority: 1001
protocol: 'Tcp'
sourceAddressPrefix: '167.220.255.0/25'
sourceAddressPrefixes: []
sourcePortRange: '*'
sourcePortRanges: []
}
}
]
}
}
resource publicIPAddress 'Microsoft.Network/publicIPAddresses@2024-05-01' = {
name: resourceName
location: 'azapi_resource.resourceGroup.location'
sku: {
name: 'Basic'
tier: 'Regional'
}
properties: {
ddosSettings: {
protectionMode: 'VirtualNetworkInherited'
}
idleTimeoutInMinutes: 4
ipTags: []
publicIPAddressVersion: 'IPv4'
publicIPAllocationMethod: 'Dynamic'
}
}
resource virtualMachine 'Microsoft.Compute/virtualMachines@2024-07-01' = {
name: resourceName
location: 'azapi_resource.resourceGroup.location'
properties: {
osProfile: {
adminUsername: 'testadmin'
adminPassword: adminPassword
allowExtensionOperations: true
computerName: 'winhost01'
secrets: []
windowsConfiguration: {
timeZone: 'Pacific Standard Time'
enableAutomaticUpdates: true
patchSettings: {
patchMode: 'AutomaticByOS'
assessmentMode: 'ImageDefault'
}
provisionVMAgent: true
}
}
storageProfile: {
dataDisks: []
imageReference: {
offer: 'SQL2017-WS2016'
publisher: 'MicrosoftSQLServer'
sku: 'SQLDEV'
version: 'latest'
}
osDisk: {
diskSizeGB: 127
managedDisk: {
storageAccountType: 'Premium_LRS'
}
name: 'acctvm-250116171212663925OSDisk'
osType: 'Windows'
writeAcceleratorEnabled: false
caching: 'ReadOnly'
createOption: 'FromImage'
deleteOption: 'Detach'
}
}
hardwareProfile: {
vmSize: 'Standard_F2s'
}
networkProfile: {
networkInterfaces: [
{
properties: {
primary: false
}
id: networkInterface.id
}
]
}
}
}
resource extension 'Microsoft.Compute/virtualMachines/extensions@2024-07-01' = {
name: 'AzureMonitorWindowsAgent'
location: 'westeurope'
parent: virtualMachine
properties: {
autoUpgradeMinorVersion: true
enableAutomaticUpgrade: true
publisher: 'Microsoft.Azure.Monitor'
suppressFailures: false
type: 'AzureMonitorWindowsAgent'
typeHandlerVersion: '1.0'
}
}
resource workspace 'Microsoft.OperationalInsights/workspaces@2020-08-01' = {
name: resourceName
location: 'azapi_resource.resourceGroup.location'
properties: {
features: {
disableLocalAuth: false
enableLogAccessUsingOnlyResourcePermissions: true
legacy: 0
searchVersion: 1
}
publicNetworkAccessForIngestion: 'Enabled'
publicNetworkAccessForQuery: 'Enabled'
retentionInDays: 30
sku: {
name: 'PerGB2018'
}
workspaceCapping: {
dailyQuotaGb: -1
}
}
}
resource table 'Microsoft.OperationalInsights/workspaces/tables@2023-09-01' = {
name: 'SqlAssessment_CL'
parent: workspace
properties: {
schema: {
columns: [
{
name: 'TimeGenerated'
type: 'datetime'
}
{
name: 'RawData'
type: 'string'
}
]
name: 'SqlAssessment_CL'
}
}
}
resource dataCollectionEndpoint 'Microsoft.Insights/dataCollectionEndpoints@2022-06-01' = {
name: '${location}-DCE-1'
location: 'azapi_resource.resourceGroup.location'
properties: {
networkAcls: {
publicNetworkAccess: 'Enabled'
}
}
}
resource dataCollectionRule 'Microsoft.Insights/dataCollectionRules@2022-06-01' = {
name: 'azapi_resource.workspace.output.properties.customerId_azapi_resource.resourceGroup.location_DCR_1'
location: 'azapi_resource.resourceGroup.location'
dependsOn: [
table
]
properties: {
streamDeclarations: {
'Custom-SqlAssessment_CL': {
columns: [
{
name: 'TimeGenerated'
type: 'datetime'
}
{
type: 'string'
name: 'RawData'
}
]
}
}
dataCollectionEndpointId: dataCollectionEndpoint.id
dataFlows: [
{
outputStream: 'Custom-SqlAssessment_CL'
streams: [
'Custom-SqlAssessment_CL'
]
transformKql: 'source'
destinations: [
workspace.name
]
}
]
dataSources: {
logFiles: [
{
filePatterns: [
'C:\\Windows\\System32\\config\\systemprofile\\AppData\\Local\\Microsoft SQL Server IaaS Agent\\Assessment\\*.csv'
]
format: 'text'
name: 'Custom-SqlAssessment_CL'
settings: {
text: {
recordStartTimestampFormat: 'ISO 8601'
}
}
streams: [
'Custom-SqlAssessment_CL'
]
}
]
}
description: ''
destinations: {
logAnalytics: [
{
name: workspace.name
workspaceResourceId: workspace.id
}
]
}
}
}
resource dataCollectionRuleAssociation 'Microsoft.Insights/dataCollectionRuleAssociations@2022-06-01' = {
name: 'azapi_resource.workspace.output.properties.customerId_azapi_resource.resourceGroup.location_DCRA_1'
scope: virtualMachine
properties: {
dataCollectionRuleId: dataCollectionRule.id
}
}
resource networkInterface 'Microsoft.Network/networkInterfaces@2024-05-01' = {
name: resourceName
location: 'azapi_resource.resourceGroup.location'
properties: {
disableTcpStateTracking: false
dnsSettings: {
dnsServers: []
}
enableAcceleratedNetworking: false
enableIPForwarding: false
ipConfigurations: [
{
type: 'Microsoft.Network/networkInterfaces/ipConfigurations'
name: 'testconfiguration1'
properties: {
privateIPAddressVersion: 'IPv4'
privateIPAllocationMethod: 'Dynamic'
publicIPAddress: {
id: publicIPAddress.id
}
subnet: {
id: subnet.id
}
primary: true
privateIPAddress: '10.0.0.4'
}
}
]
nicType: 'Standard'
auxiliaryMode: 'None'
auxiliarySku: 'None'
}
}
resource sqlvirtualMachine 'Microsoft.SqlVirtualMachine/sqlVirtualMachines@2023-10-01' = {
name: 'azapi_resource.virtualMachine.name'
location: 'azapi_resource.virtualMachine.location'
dependsOn: [
dataCollectionRuleAssociation
extension
]
properties: {
sqlServerLicenseType: 'PAYG'
virtualMachineResourceId: virtualMachine.id
enableAutomaticUpgrade: true
leastPrivilegeMode: 'Enabled'
sqlImageOffer: 'SQL2017-WS2016'
sqlImageSku: 'Developer'
sqlManagement: 'Full'
assessmentSettings: {
enable: true
runImmediately: false
schedule: {
dayOfWeek: 'Monday'
enable: true
startTime: '00:00'
weeklyInterval: 1
}
}
}
}
Azure クイック スタートのサンプル
次 Azure クイック スタート テンプレート、このリソースの種類をデプロイするための Bicep サンプルが含まれています。
| Bicep ファイル | 形容 |
|---|---|
| パフォーマンスが最適化されたストレージ設定を使用して SQL Server VM を | PremiumSSD でパフォーマンスが最適化されたストレージ設定を使用して SQL Server 仮想マシンを作成する |
リソースの形式
Microsoft.SqlVirtualMachine/sqlVirtualMachines リソースを作成するには、次の Bicep をテンプレートに追加します。
resource symbolicname 'Microsoft.SqlVirtualMachine/sqlVirtualMachines@2022-02-01-preview' = {
identity: {
type: 'string'
}
location: 'string'
name: 'string'
properties: {
assessmentSettings: {
enable: bool
runImmediately: bool
schedule: {
dayOfWeek: 'string'
enable: bool
monthlyOccurrence: int
startTime: 'string'
weeklyInterval: int
}
}
autoBackupSettings: {
backupScheduleType: 'string'
backupSystemDbs: bool
daysOfWeek: [
'string'
]
enable: bool
enableEncryption: bool
fullBackupFrequency: 'string'
fullBackupStartTime: int
fullBackupWindowHours: int
logBackupFrequency: int
password: 'string'
retentionPeriod: int
storageAccessKey: 'string'
storageAccountUrl: 'string'
storageContainerName: 'string'
}
autoPatchingSettings: {
dayOfWeek: 'string'
enable: bool
maintenanceWindowDuration: int
maintenanceWindowStartingHour: int
}
keyVaultCredentialSettings: {
azureKeyVaultUrl: 'string'
credentialName: 'string'
enable: bool
servicePrincipalName: 'string'
servicePrincipalSecret: 'string'
}
serverConfigurationsManagementSettings: {
additionalFeaturesServerConfigurations: {
isRServicesEnabled: bool
}
sqlConnectivityUpdateSettings: {
connectivityType: 'string'
port: int
sqlAuthUpdatePassword: 'string'
sqlAuthUpdateUserName: 'string'
}
sqlInstanceSettings: {
collation: 'string'
isIfiEnabled: bool
isLpimEnabled: bool
isOptimizeForAdHocWorkloadsEnabled: bool
maxDop: int
maxServerMemoryMB: int
minServerMemoryMB: int
}
sqlStorageUpdateSettings: {
diskConfigurationType: 'string'
diskCount: int
startingDeviceId: int
}
sqlWorkloadTypeUpdateSettings: {
sqlWorkloadType: 'string'
}
}
sqlImageOffer: 'string'
sqlImageSku: 'string'
sqlManagement: 'string'
sqlServerLicenseType: 'string'
sqlVirtualMachineGroupResourceId: 'string'
storageConfigurationSettings: {
diskConfigurationType: 'string'
sqlDataSettings: {
defaultFilePath: 'string'
luns: [
int
]
}
sqlLogSettings: {
defaultFilePath: 'string'
luns: [
int
]
}
sqlSystemDbOnDataDisk: bool
sqlTempDbSettings: {
dataFileCount: int
dataFileSize: int
dataGrowth: int
defaultFilePath: 'string'
logFileSize: int
logGrowth: int
luns: [
int
]
persistFolder: bool
persistFolderPath: 'string'
}
storageWorkloadType: 'string'
}
virtualMachineResourceId: 'string'
wsfcDomainCredentials: {
clusterBootstrapAccountPassword: 'string'
clusterOperatorAccountPassword: 'string'
sqlServiceAccountPassword: 'string'
}
wsfcStaticIp: 'string'
}
tags: {
{customized property}: 'string'
}
}
プロパティ値
Microsoft.SqlVirtualMachine/sqlVirtualMachines
| 名前 | 形容 | 価値 |
|---|---|---|
| ID | サーバーの Azure Active Directory ID。 | リソースアイデンティティ |
| 位置 | リソースの場所。 | string (必須) |
| 名前 | リソース名 | string (必須) |
| プロパティ | リソースのプロパティ。 | SqlVirtualMachineProperties の |
| タグ | リソース タグ | タグ名と値のディクショナリ。 テンプレート の |
追加機能サーバー構成
| 名前 | 形容 | 価値 |
|---|---|---|
| isRServicesEnabled (英語) | R サービス (SQL 2016 以降) を有効または無効にします。 | ブール (bool) |
AssessmentSettings (評価設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| 有効にする | SQL 仮想マシンで評価機能を有効または無効にします。 | ブール (bool) |
| runImmediately(ランリッシュティッシュ) | SQL 仮想マシンで評価を直ちに実行します。 | ブール (bool) |
| 計画 | 評価のスケジュール。 | スケジュール の |
AutoBackupSettings (自動バックアップ設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| backupScheduleType (バックアップスケジュールタイプ) | バックアップ スケジュールの種類。 | 「自動化」 「マニュアル」 |
| backupSystemDbs の | システム データベースを自動バックアップに含めるか、自動バックアップから除外します。 | ブール (bool) |
| daysOfWeek (週の日数) | FullBackupFrequency が [週単位] に設定されている場合のバックアップの曜日。 | 次のいずれかを含む文字列配列: 「フライデー」 「月曜日」 「サタデー」 「サンデー」 「木曜日」 「火曜日」 「水曜日」 |
| 有効にする | SQL 仮想マシンでの自動バックを有効または無効にします。 | ブール (bool) |
| enable暗号化 | SQL 仮想マシンでのバックアップの暗号化を有効または無効にします。 | ブール (bool) |
| fullBackupFrequency | 完全バックアップの頻度。 どちらの場合も、完全バックアップは次のスケジュールされた時間枠の間に開始されます。 | 「毎日」 「毎週」 |
| fullBackupStartTime | 完全バックアップを実行できる特定の日の開始時刻。 0 ~ 23 時間。 | 整数 (int) |
| fullBackupWindowHours (英語) | 完全バックアップを実行できる特定の日の時間枠の期間。 1 ~ 23 時間。 | 整数 (int) |
| logBackupFrequency | ログ バックアップの頻度。 5 ~ 60 分。 | 整数 (int) |
| パスワード | バックアップ時の暗号化のパスワード。 | 文字列 |
| 保持期間 | バックアップの保持期間: 1 ~ 90 日。 | 整数 (int) |
| ストレージアクセスキー | バックアップの保存先となるストレージ アカウント キー。 | 文字列 |
| storageAccountのURL | バックアップの保存先となるストレージ アカウントの URL。 | 文字列 |
| ストレージコンテナ名 | バックアップの保存先となるストレージ コンテナー名。 | 文字列 |
AutoPatchingSettings (自動パッチ設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| dayOfWeekの | パッチを適用する曜日。 | 「毎日」 「フライデー」 「月曜日」 「サタデー」 「サンデー」 「木曜日」 「火曜日」 「水曜日」 |
| 有効にする | SQL 仮想マシンで自動パッチを有効または無効にします。 | ブール (bool) |
| メンテナンスウィンドウ期間 | 修正プログラムの適用期間。 | 整数 (int) |
| maintenanceWindowStartingHour (英語) | 修正プログラムの適用が開始される 1 日の時間。 ローカル VM 時刻。 | 整数 (int) |
KeyVaultCredentialSettings (英語)
| 名前 | 形容 | 価値 |
|---|---|---|
| azureKeyVaultのURL | Azure Key Vault の URL。 | 文字列 |
| クレデンシャル名 | 資格情報の名前。 | 文字列 |
| 有効にする | キー コンテナーの資格情報設定を有効または無効にします。 | ブール (bool) |
| サービスプリンシパル名 | キー コンテナーにアクセスするためのサービス プリンシパル名。 | 文字列 |
| サービスプリンシパルシークレット | キー コンテナーにアクセスするためのサービス プリンシパル名シークレット。 | 文字列 |
リソースアイデンティティ
| 名前 | 形容 | 価値 |
|---|---|---|
| 型 | ID の種類。 リソースの Azure Active Directory プリンシパルを自動的に作成して割り当てるには、これを "SystemAssigned" に設定します。 | 「なし」 'システム割り当て' |
計画
| 名前 | 形容 | 価値 |
|---|---|---|
| dayOfWeekの | 評価を実行する曜日。 | 「フライデー」 「月曜日」 「サタデー」 「サンデー」 「木曜日」 「火曜日」 「水曜日」 |
| 有効にする | SQL 仮想マシンの評価スケジュールを有効または無効にします。 | ブール (bool) |
| 月刊オカレンス | 評価をスケジュールする 1 か月以内の DayOfWeek 日の発生。 1、2、3、4、-1 の値を受け取ります。 月の最後の DayOfWeek 日に -1 を使用する | 整数 (int) |
| 開始時間 | HH:mm 形式の時刻。例えば。17:30 | 文字列 |
| weeklyインターバル | 2 つの評価実行の間にスケジュールする週数。 1 から 6 の値を受け取ります | 整数 (int) |
ServerConfigurationsManagement設定
| 名前 | 形容 | 価値 |
|---|---|---|
| additionalFeaturesサーバー構成 | その他の SQL 機能の設定。 | AdditionalFeaturesServerConfigurations の |
| sqlConnectivityUpdateSettings | SQL 接続の種類の設定。 | SqlConnectivityUpdateSettings |
| sqlInstanceSettings (英語) | SQL インスタンスの設定。 | SQLInstanceSettings (英語) |
| sqlStorageUpdateSettings (英語) | SQL ストレージの更新設定。 | SqlStorageUpdateSettings |
| sqlWorkloadTypeUpdateSettings | SQL ワークロードの種類の設定。 | SqlWorkloadTypeUpdateSettings |
SqlConnectivityUpdateSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| connectivityType (接続タイプ) | SQL Server 接続オプション。 | 「ローカル」 「プライベート」 「パブリック」 |
| ポート | SQL Server ポート。 | 整数 (int) |
| sqlAuthUpdatePassword | SQL Server sysadmin ログイン パスワード。 | 文字列 |
| sqlAuthUpdateUserName (英語) | 作成する SQL Server sysadmin ログイン。 | 文字列 |
SQLInstanceSettings (英語)
| 名前 | 形容 | 価値 |
|---|---|---|
| 照合順序 | SQL Server 照合順序。 | 文字列 |
| isIfiEnabled (英語) | SQL Server IFI。 | ブール (bool) |
| isLpimEnabled (英語) | SQL Server LPIM。 | ブール (bool) |
| isOptimizeForAdHocワークロードEnabled | アドホック ワークロード用の SQL Server Optimize。 | ブール (bool) |
| マックスドップ | SQL Server MAXDOP。 | 整数 (int) |
| 最大サーバーメモリMB | SQL Server の最大メモリ。 | 整数 (int) |
| minServerメモリMB | SQL Server の最小メモリ。 | 整数 (int) |
SQLStorageSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| defaultFilePath (デフォルト ファイルパス) | SQL Server の既定のファイル パス | 文字列 |
| LUN | ディスクの論理ユニット番号。 | int[] |
SqlStorageUpdateSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| diskConfigurationType (ディスク構成タイプ) | SQL Server に適用するディスク構成。 | 「追加」 「拡張」 「新着」 |
| ディスクカウント | 仮想マシンのディスク数。 | 整数 (int) |
| 開始デバイスID | 更新する最初のディスクのデバイス ID。 | 整数 (int) |
SQLTempDb設定
| 名前 | 形容 | 価値 |
|---|---|---|
| データファイルカウント | SQL Server tempdb データ ファイルの数 | 整数 (int) |
| データファイルサイズ | SQL Server tempdb データ ファイルのサイズ | 整数 (int) |
| データ増加 | SQL Server tempdb データ ファイルの自動拡張サイズ | 整数 (int) |
| defaultFilePath (デフォルト ファイルパス) | SQL Server の既定のファイル パス | 文字列 |
| logFileSize(ログファイルサイズ) | SQL Server tempdb ログ ファイルのサイズ | 整数 (int) |
| ロググロース | SQL Server tempdb ログ ファイルの自動拡張サイズ | 整数 (int) |
| LUN | ディスクの論理ユニット番号。 | int[] |
| persistFolder (永続フォルダ) | SQL Server tempdb の保存フォルダーの選択 | ブール (bool) |
| persistFolderPath (永続フォルダパス) | SQL Server tempdb の保存フォルダーの場所 | 文字列 |
SqlVirtualMachineProperties の
| 名前 | 形容 | 価値 |
|---|---|---|
| assessment設定 | 評価の設定。 | AssessmentSettings (評価設定) |
| autoBackupSettings (英語) | SQL Server の自動バックアップ設定。 | AutoBackupSettings の |
| autoPatchingSettings (自動パッチ設定) | SQL 仮想マシンに重要なセキュリティ更新プログラムを適用するための自動修正プログラムの設定。 | AutoPatchingSettings (自動パッチ設定) |
| keyVaultCredentialSettings | キー コンテナーの資格情報の設定。 | KeyVaultCredentialSettings の |
| serverConfigurationsManagementSettings | SQL Server の構成管理設定。 | ServerConfigurationsManagement設定 |
| sqlImageOffer | SQL イメージ オファー。 例としては、SQL2016-WS2016、SQL2017-WS2016 などがあります。 | 文字列 |
| sqlImageSku の | SQL Server エディションの種類。 | 「開発者」 「エンタープライズ」 「エクスプレス」 「スタンダード」 「ウェブ」 |
| sqlマネジメント | SQL Server 管理の種類。 | 「フル」 「ライトウェイト」 「ノーエージェント」 |
| sqlServerLicenseType | SQL Server ライセンスの種類。 | 「アハブ」 「DR」 「ペイグ」 |
| sqlVirtualMachineGroupリソースId | この SQL 仮想マシンが属しているか、その一部となる SQL 仮想マシン グループの ARM リソース ID。 | 文字列 |
| storageConfiguration設定 | ストレージ構成設定。 | StorageConfigurationSettings (ストレージ構成設定) |
| virtualMachineリソースId | SQL Marketplace イメージから作成された基になる仮想マシンの ARM リソース ID。 | 文字列 |
| wsfcドメイン資格情報 | SQL 可用性グループの Windows Server フェールオーバー クラスターを設定するためのドメイン資格情報。 | WsfcDomainCredentials の |
| wsfcStaticIp | SQL 可用性グループの Windows Server フェールオーバー クラスターを設定するためのドメイン資格情報。 | 文字列 |
SqlWorkloadTypeUpdateSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| sqlWorkloadType (英語) | SQL Server ワークロードの種類。 | 「DW」 「全般」 「OLTP」 |
StorageConfigurationSettings (ストレージ構成設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| diskConfigurationType (ディスク構成タイプ) | SQL Server に適用するディスク構成。 | 「追加」 「拡張」 「新着」 |
| sqlDataSettings (英語) | SQL Server データ ストレージの設定。 | SQLStorageSettings |
| sqlLogSettings の | SQL Server ログ ストレージの設定。 | SQLStorageSettings |
| sqlSystemDbOnDataDisk | True の場合、DataPool 上の SQL Server SystemDb ストレージ。 | ブール (bool) |
| sqlTempDb設定 | SQL Server TempDb ストレージの設定。 | SQLTempDb設定 |
| ストレージワークロードタイプ | ストレージ ワークロードの種類。 | 「DW」 「全般」 「OLTP」 |
追跡リソースタグ
| 名前 | 形容 | 価値 |
|---|
Wsfcドメイン資格情報
| 名前 | 形容 | 価値 |
|---|---|---|
| clusterBootstrapAccountPassword (英語) | クラスター ブートストラップ アカウントのパスワード。 | 文字列 |
| clusterOperatorAccountPassword の | クラスター オペレーター アカウントのパスワード。 | 文字列 |
| sqlServiceAccountPassword (英語) | SQL サービス アカウントのパスワード。 | 文字列 |
ARM テンプレート リソース定義
sqlVirtualMachines リソースの種類は、次をターゲットとする操作と共にデプロイできます。
- リソースグループ - リソースグループのデプロイコマンドを参照してください。 各APIバージョンの変更プロパティ一覧は 変更ログをご覧ください。
使用例
Azure のクイック スタート テンプレート
このリソースの種類 デプロイする Azure クイック スタート テンプレート 次に示します。
| テンプレート | 形容 |
|---|---|
|
既存の SQL Virtual Machines を使用して SQL Always ON セットアップをデプロイする Azure にデプロイする |
既存の SQL 仮想マシンを使用して SQL Always ON セットアップをデプロイします。 仮想マシンは既に既存のドメインに参加している必要があり、SQL Server のエンタープライズ バージョンを実行している必要があります。 |
| パフォーマンスが最適化されたストレージ設定を使用して SQL Server VM を Azure にデプロイする |
PremiumSSD でパフォーマンスが最適化されたストレージ設定を使用して SQL Server 仮想マシンを作成する |
| UltraSSD での SQL VM パフォーマンス最適化ストレージ設定の Azure |
SQL ログ ファイルに UltraSSD を使用して、パフォーマンスが最適化されたストレージ設定で SQL Server 仮想マシンを作成する |
リソースの形式
Microsoft.SqlVirtualMachine/sqlVirtualMachines リソースを作成するには、次の JSON をテンプレートに追加します。
{
"type": "Microsoft.SqlVirtualMachine/sqlVirtualMachines",
"apiVersion": "2022-02-01-preview",
"name": "string",
"identity": {
"type": "string"
},
"location": "string",
"properties": {
"assessmentSettings": {
"enable": "bool",
"runImmediately": "bool",
"schedule": {
"dayOfWeek": "string",
"enable": "bool",
"monthlyOccurrence": "int",
"startTime": "string",
"weeklyInterval": "int"
}
},
"autoBackupSettings": {
"backupScheduleType": "string",
"backupSystemDbs": "bool",
"daysOfWeek": [ "string" ],
"enable": "bool",
"enableEncryption": "bool",
"fullBackupFrequency": "string",
"fullBackupStartTime": "int",
"fullBackupWindowHours": "int",
"logBackupFrequency": "int",
"password": "string",
"retentionPeriod": "int",
"storageAccessKey": "string",
"storageAccountUrl": "string",
"storageContainerName": "string"
},
"autoPatchingSettings": {
"dayOfWeek": "string",
"enable": "bool",
"maintenanceWindowDuration": "int",
"maintenanceWindowStartingHour": "int"
},
"keyVaultCredentialSettings": {
"azureKeyVaultUrl": "string",
"credentialName": "string",
"enable": "bool",
"servicePrincipalName": "string",
"servicePrincipalSecret": "string"
},
"serverConfigurationsManagementSettings": {
"additionalFeaturesServerConfigurations": {
"isRServicesEnabled": "bool"
},
"sqlConnectivityUpdateSettings": {
"connectivityType": "string",
"port": "int",
"sqlAuthUpdatePassword": "string",
"sqlAuthUpdateUserName": "string"
},
"sqlInstanceSettings": {
"collation": "string",
"isIfiEnabled": "bool",
"isLpimEnabled": "bool",
"isOptimizeForAdHocWorkloadsEnabled": "bool",
"maxDop": "int",
"maxServerMemoryMB": "int",
"minServerMemoryMB": "int"
},
"sqlStorageUpdateSettings": {
"diskConfigurationType": "string",
"diskCount": "int",
"startingDeviceId": "int"
},
"sqlWorkloadTypeUpdateSettings": {
"sqlWorkloadType": "string"
}
},
"sqlImageOffer": "string",
"sqlImageSku": "string",
"sqlManagement": "string",
"sqlServerLicenseType": "string",
"sqlVirtualMachineGroupResourceId": "string",
"storageConfigurationSettings": {
"diskConfigurationType": "string",
"sqlDataSettings": {
"defaultFilePath": "string",
"luns": [ "int" ]
},
"sqlLogSettings": {
"defaultFilePath": "string",
"luns": [ "int" ]
},
"sqlSystemDbOnDataDisk": "bool",
"sqlTempDbSettings": {
"dataFileCount": "int",
"dataFileSize": "int",
"dataGrowth": "int",
"defaultFilePath": "string",
"logFileSize": "int",
"logGrowth": "int",
"luns": [ "int" ],
"persistFolder": "bool",
"persistFolderPath": "string"
},
"storageWorkloadType": "string"
},
"virtualMachineResourceId": "string",
"wsfcDomainCredentials": {
"clusterBootstrapAccountPassword": "string",
"clusterOperatorAccountPassword": "string",
"sqlServiceAccountPassword": "string"
},
"wsfcStaticIp": "string"
},
"tags": {
"{customized property}": "string"
}
}
プロパティ値
Microsoft.SqlVirtualMachine/sqlVirtualMachines
| 名前 | 形容 | 価値 |
|---|---|---|
| apiVersion (英語) | API のバージョン | 「2022-02-01-プレビュー」 |
| ID | サーバーの Azure Active Directory ID。 | リソースアイデンティティ |
| 位置 | リソースの場所。 | string (必須) |
| 名前 | リソース名 | string (必須) |
| プロパティ | リソースのプロパティ。 | SqlVirtualMachineProperties の |
| タグ | リソース タグ | タグ名と値のディクショナリ。 テンプレート の |
| 型 | リソースの種類 | 'Microsoft.SqlVirtualMachine/sqlVirtualMachines' |
追加機能サーバー構成
| 名前 | 形容 | 価値 |
|---|---|---|
| isRServicesEnabled (英語) | R サービス (SQL 2016 以降) を有効または無効にします。 | ブール (bool) |
AssessmentSettings (評価設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| 有効にする | SQL 仮想マシンで評価機能を有効または無効にします。 | ブール (bool) |
| runImmediately(ランリッシュティッシュ) | SQL 仮想マシンで評価を直ちに実行します。 | ブール (bool) |
| 計画 | 評価のスケジュール。 | スケジュール の |
AutoBackupSettings (自動バックアップ設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| backupScheduleType (バックアップスケジュールタイプ) | バックアップ スケジュールの種類。 | 「自動化」 「マニュアル」 |
| backupSystemDbs の | システム データベースを自動バックアップに含めるか、自動バックアップから除外します。 | ブール (bool) |
| daysOfWeek (週の日数) | FullBackupFrequency が [週単位] に設定されている場合のバックアップの曜日。 | 次のいずれかを含む文字列配列: 「フライデー」 「月曜日」 「サタデー」 「サンデー」 「木曜日」 「火曜日」 「水曜日」 |
| 有効にする | SQL 仮想マシンでの自動バックを有効または無効にします。 | ブール (bool) |
| enable暗号化 | SQL 仮想マシンでのバックアップの暗号化を有効または無効にします。 | ブール (bool) |
| fullBackupFrequency | 完全バックアップの頻度。 どちらの場合も、完全バックアップは次のスケジュールされた時間枠の間に開始されます。 | 「毎日」 「毎週」 |
| fullBackupStartTime | 完全バックアップを実行できる特定の日の開始時刻。 0 ~ 23 時間。 | 整数 (int) |
| fullBackupWindowHours (英語) | 完全バックアップを実行できる特定の日の時間枠の期間。 1 ~ 23 時間。 | 整数 (int) |
| logBackupFrequency | ログ バックアップの頻度。 5 ~ 60 分。 | 整数 (int) |
| パスワード | バックアップ時の暗号化のパスワード。 | 文字列 |
| 保持期間 | バックアップの保持期間: 1 ~ 90 日。 | 整数 (int) |
| ストレージアクセスキー | バックアップの保存先となるストレージ アカウント キー。 | 文字列 |
| storageAccountのURL | バックアップの保存先となるストレージ アカウントの URL。 | 文字列 |
| ストレージコンテナ名 | バックアップの保存先となるストレージ コンテナー名。 | 文字列 |
AutoPatchingSettings (自動パッチ設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| dayOfWeekの | パッチを適用する曜日。 | 「毎日」 「フライデー」 「月曜日」 「サタデー」 「サンデー」 「木曜日」 「火曜日」 「水曜日」 |
| 有効にする | SQL 仮想マシンで自動パッチを有効または無効にします。 | ブール (bool) |
| メンテナンスウィンドウ期間 | 修正プログラムの適用期間。 | 整数 (int) |
| maintenanceWindowStartingHour (英語) | 修正プログラムの適用が開始される 1 日の時間。 ローカル VM 時刻。 | 整数 (int) |
KeyVaultCredentialSettings (英語)
| 名前 | 形容 | 価値 |
|---|---|---|
| azureKeyVaultのURL | Azure Key Vault の URL。 | 文字列 |
| クレデンシャル名 | 資格情報の名前。 | 文字列 |
| 有効にする | キー コンテナーの資格情報設定を有効または無効にします。 | ブール (bool) |
| サービスプリンシパル名 | キー コンテナーにアクセスするためのサービス プリンシパル名。 | 文字列 |
| サービスプリンシパルシークレット | キー コンテナーにアクセスするためのサービス プリンシパル名シークレット。 | 文字列 |
リソースアイデンティティ
| 名前 | 形容 | 価値 |
|---|---|---|
| 型 | ID の種類。 リソースの Azure Active Directory プリンシパルを自動的に作成して割り当てるには、これを "SystemAssigned" に設定します。 | 「なし」 'システム割り当て' |
計画
| 名前 | 形容 | 価値 |
|---|---|---|
| dayOfWeekの | 評価を実行する曜日。 | 「フライデー」 「月曜日」 「サタデー」 「サンデー」 「木曜日」 「火曜日」 「水曜日」 |
| 有効にする | SQL 仮想マシンの評価スケジュールを有効または無効にします。 | ブール (bool) |
| 月刊オカレンス | 評価をスケジュールする 1 か月以内の DayOfWeek 日の発生。 1、2、3、4、-1 の値を受け取ります。 月の最後の DayOfWeek 日に -1 を使用する | 整数 (int) |
| 開始時間 | HH:mm 形式の時刻。例えば。17:30 | 文字列 |
| weeklyインターバル | 2 つの評価実行の間にスケジュールする週数。 1 から 6 の値を受け取ります | 整数 (int) |
ServerConfigurationsManagement設定
| 名前 | 形容 | 価値 |
|---|---|---|
| additionalFeaturesサーバー構成 | その他の SQL 機能の設定。 | AdditionalFeaturesServerConfigurations の |
| sqlConnectivityUpdateSettings | SQL 接続の種類の設定。 | SqlConnectivityUpdateSettings |
| sqlInstanceSettings (英語) | SQL インスタンスの設定。 | SQLInstanceSettings (英語) |
| sqlStorageUpdateSettings (英語) | SQL ストレージの更新設定。 | SqlStorageUpdateSettings |
| sqlWorkloadTypeUpdateSettings | SQL ワークロードの種類の設定。 | SqlWorkloadTypeUpdateSettings |
SqlConnectivityUpdateSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| connectivityType (接続タイプ) | SQL Server 接続オプション。 | 「ローカル」 「プライベート」 「パブリック」 |
| ポート | SQL Server ポート。 | 整数 (int) |
| sqlAuthUpdatePassword | SQL Server sysadmin ログイン パスワード。 | 文字列 |
| sqlAuthUpdateUserName (英語) | 作成する SQL Server sysadmin ログイン。 | 文字列 |
SQLInstanceSettings (英語)
| 名前 | 形容 | 価値 |
|---|---|---|
| 照合順序 | SQL Server 照合順序。 | 文字列 |
| isIfiEnabled (英語) | SQL Server IFI。 | ブール (bool) |
| isLpimEnabled (英語) | SQL Server LPIM。 | ブール (bool) |
| isOptimizeForAdHocワークロードEnabled | アドホック ワークロード用の SQL Server Optimize。 | ブール (bool) |
| マックスドップ | SQL Server MAXDOP。 | 整数 (int) |
| 最大サーバーメモリMB | SQL Server の最大メモリ。 | 整数 (int) |
| minServerメモリMB | SQL Server の最小メモリ。 | 整数 (int) |
SQLStorageSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| defaultFilePath (デフォルト ファイルパス) | SQL Server の既定のファイル パス | 文字列 |
| LUN | ディスクの論理ユニット番号。 | int[] |
SqlStorageUpdateSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| diskConfigurationType (ディスク構成タイプ) | SQL Server に適用するディスク構成。 | 「追加」 「拡張」 「新着」 |
| ディスクカウント | 仮想マシンのディスク数。 | 整数 (int) |
| 開始デバイスID | 更新する最初のディスクのデバイス ID。 | 整数 (int) |
SQLTempDb設定
| 名前 | 形容 | 価値 |
|---|---|---|
| データファイルカウント | SQL Server tempdb データ ファイルの数 | 整数 (int) |
| データファイルサイズ | SQL Server tempdb データ ファイルのサイズ | 整数 (int) |
| データ増加 | SQL Server tempdb データ ファイルの自動拡張サイズ | 整数 (int) |
| defaultFilePath (デフォルト ファイルパス) | SQL Server の既定のファイル パス | 文字列 |
| logFileSize(ログファイルサイズ) | SQL Server tempdb ログ ファイルのサイズ | 整数 (int) |
| ロググロース | SQL Server tempdb ログ ファイルの自動拡張サイズ | 整数 (int) |
| LUN | ディスクの論理ユニット番号。 | int[] |
| persistFolder (永続フォルダ) | SQL Server tempdb の保存フォルダーの選択 | ブール (bool) |
| persistFolderPath (永続フォルダパス) | SQL Server tempdb の保存フォルダーの場所 | 文字列 |
SqlVirtualMachineProperties の
| 名前 | 形容 | 価値 |
|---|---|---|
| assessment設定 | 評価の設定。 | AssessmentSettings (評価設定) |
| autoBackupSettings (英語) | SQL Server の自動バックアップ設定。 | AutoBackupSettings の |
| autoPatchingSettings (自動パッチ設定) | SQL 仮想マシンに重要なセキュリティ更新プログラムを適用するための自動修正プログラムの設定。 | AutoPatchingSettings (自動パッチ設定) |
| keyVaultCredentialSettings | キー コンテナーの資格情報の設定。 | KeyVaultCredentialSettings の |
| serverConfigurationsManagementSettings | SQL Server の構成管理設定。 | ServerConfigurationsManagement設定 |
| sqlImageOffer | SQL イメージ オファー。 例としては、SQL2016-WS2016、SQL2017-WS2016 などがあります。 | 文字列 |
| sqlImageSku の | SQL Server エディションの種類。 | 「開発者」 「エンタープライズ」 「エクスプレス」 「スタンダード」 「ウェブ」 |
| sqlマネジメント | SQL Server 管理の種類。 | 「フル」 「ライトウェイト」 「ノーエージェント」 |
| sqlServerLicenseType | SQL Server ライセンスの種類。 | 「アハブ」 「DR」 「ペイグ」 |
| sqlVirtualMachineGroupリソースId | この SQL 仮想マシンが属しているか、その一部となる SQL 仮想マシン グループの ARM リソース ID。 | 文字列 |
| storageConfiguration設定 | ストレージ構成設定。 | StorageConfigurationSettings (ストレージ構成設定) |
| virtualMachineリソースId | SQL Marketplace イメージから作成された基になる仮想マシンの ARM リソース ID。 | 文字列 |
| wsfcドメイン資格情報 | SQL 可用性グループの Windows Server フェールオーバー クラスターを設定するためのドメイン資格情報。 | WsfcDomainCredentials の |
| wsfcStaticIp | SQL 可用性グループの Windows Server フェールオーバー クラスターを設定するためのドメイン資格情報。 | 文字列 |
SqlWorkloadTypeUpdateSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| sqlWorkloadType (英語) | SQL Server ワークロードの種類。 | 「DW」 「全般」 「OLTP」 |
StorageConfigurationSettings (ストレージ構成設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| diskConfigurationType (ディスク構成タイプ) | SQL Server に適用するディスク構成。 | 「追加」 「拡張」 「新着」 |
| sqlDataSettings (英語) | SQL Server データ ストレージの設定。 | SQLStorageSettings |
| sqlLogSettings の | SQL Server ログ ストレージの設定。 | SQLStorageSettings |
| sqlSystemDbOnDataDisk | True の場合、DataPool 上の SQL Server SystemDb ストレージ。 | ブール (bool) |
| sqlTempDb設定 | SQL Server TempDb ストレージの設定。 | SQLTempDb設定 |
| ストレージワークロードタイプ | ストレージ ワークロードの種類。 | 「DW」 「全般」 「OLTP」 |
追跡リソースタグ
| 名前 | 形容 | 価値 |
|---|
Wsfcドメイン資格情報
| 名前 | 形容 | 価値 |
|---|---|---|
| clusterBootstrapAccountPassword (英語) | クラスター ブートストラップ アカウントのパスワード。 | 文字列 |
| clusterOperatorAccountPassword の | クラスター オペレーター アカウントのパスワード。 | 文字列 |
| sqlServiceAccountPassword (英語) | SQL サービス アカウントのパスワード。 | 文字列 |
Terraform (AzAPI プロバイダー) リソース定義
sqlVirtualMachines リソースの種類は、次をターゲットとする操作と共にデプロイできます。
- リソースグループ 各APIバージョンの変更プロパティ一覧については、 変更ログをご覧ください。
使用例
Terraformサンプル
Microsoft SQL 仮想マシンのデプロイの基本的な例。
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 = "westeurope"
}
variable "vm_admin_password" {
type = string
description = "The administrator password for the SQL virtual machine"
sensitive = true
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "virtualNetwork" {
type = "Microsoft.Network/virtualNetworks@2022-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
addressSpace = {
addressPrefixes = [
"10.0.0.0/16",
]
}
}
}
schema_validation_enabled = false
lifecycle {
ignore_changes = [body.properties.subnets]
}
}
resource "azapi_resource" "networkSecurityGroup" {
type = "Microsoft.Network/networkSecurityGroups@2024-05-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
body = {
properties = {
securityRules = [{
name = "MSSQLRule"
properties = {
access = "Allow"
destinationAddressPrefix = "*"
destinationAddressPrefixes = []
destinationPortRange = "1433"
destinationPortRanges = []
direction = "Inbound"
priority = 1001
protocol = "Tcp"
sourceAddressPrefix = "167.220.255.0/25"
sourceAddressPrefixes = []
sourcePortRange = "*"
sourcePortRanges = []
}
}]
}
}
}
resource "azapi_resource" "subnet" {
type = "Microsoft.Network/virtualNetworks/subnets@2022-07-01"
parent_id = azapi_resource.virtualNetwork.id
name = var.resource_name
body = {
properties = {
addressPrefix = "10.0.0.0/24"
networkSecurityGroup = {
id = azapi_resource.networkSecurityGroup.id
}
}
}
}
resource "azapi_resource" "publicIPAddress" {
type = "Microsoft.Network/publicIPAddresses@2024-05-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
body = {
properties = {
ddosSettings = {
protectionMode = "VirtualNetworkInherited"
}
idleTimeoutInMinutes = 4
ipTags = []
publicIPAddressVersion = "IPv4"
publicIPAllocationMethod = "Dynamic"
}
sku = {
name = "Basic"
tier = "Regional"
}
}
}
resource "azapi_resource" "networkInterface" {
type = "Microsoft.Network/networkInterfaces@2024-05-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
body = {
properties = {
disableTcpStateTracking = false
dnsSettings = {
dnsServers = []
}
enableAcceleratedNetworking = false
enableIPForwarding = false
ipConfigurations = [
{
type = "Microsoft.Network/networkInterfaces/ipConfigurations"
name = "testconfiguration1"
properties = {
privateIPAddressVersion = "IPv4"
privateIPAllocationMethod = "Dynamic"
publicIPAddress = {
id = azapi_resource.publicIPAddress.id
}
subnet = {
id = azapi_resource.subnet.id
}
primary = true
privateIPAddress = "10.0.0.4"
}
}
]
nicType = "Standard"
auxiliaryMode = "None"
auxiliarySku = "None"
}
}
}
resource "azapi_resource" "virtualMachine" {
type = "Microsoft.Compute/virtualMachines@2024-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
body = {
properties = {
osProfile = {
adminUsername = "testadmin"
adminPassword = var.vm_admin_password
allowExtensionOperations = true
computerName = "winhost01"
secrets = []
windowsConfiguration = {
timeZone = "Pacific Standard Time"
enableAutomaticUpdates = true
patchSettings = {
patchMode = "AutomaticByOS"
assessmentMode = "ImageDefault"
}
provisionVMAgent = true
}
}
storageProfile = {
dataDisks = []
imageReference = {
offer = "SQL2017-WS2016"
publisher = "MicrosoftSQLServer"
sku = "SQLDEV"
version = "latest"
}
osDisk = {
diskSizeGB = 127
managedDisk = {
storageAccountType = "Premium_LRS"
}
name = "acctvm-250116171212663925OSDisk"
osType = "Windows"
writeAcceleratorEnabled = false
caching = "ReadOnly"
createOption = "FromImage"
deleteOption = "Detach"
}
}
hardwareProfile = {
vmSize = "Standard_F2s"
}
networkProfile = {
networkInterfaces = [
{
properties = {
primary = false
}
id = azapi_resource.networkInterface.id
}
]
}
}
}
}
resource "azapi_resource" "sqlvirtualMachine" {
type = "Microsoft.SqlVirtualMachine/sqlVirtualMachines@2023-10-01"
parent_id = azapi_resource.resourceGroup.id
name = azapi_resource.virtualMachine.name
location = azapi_resource.virtualMachine.location
body = {
properties = {
sqlServerLicenseType = "PAYG"
virtualMachineResourceId = azapi_resource.virtualMachine.id
enableAutomaticUpgrade = true
leastPrivilegeMode = "Enabled"
sqlImageOffer = "SQL2017-WS2016"
sqlImageSku = "Developer"
sqlManagement = "Full"
}
}
}
Microsoft SQL 仮想マシンのデプロイの sqlbestpracticesassessment の例。
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 = "westeurope"
}
variable "admin_password" {
type = string
description = "The administrator password for the virtual machine"
sensitive = true
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "virtualNetwork" {
type = "Microsoft.Network/virtualNetworks@2022-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
addressSpace = {
addressPrefixes = [
"10.0.0.0/16",
]
}
}
}
schema_validation_enabled = false
lifecycle {
ignore_changes = [body.properties.subnets]
}
}
resource "azapi_resource" "networkSecurityGroup" {
type = "Microsoft.Network/networkSecurityGroups@2024-05-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
body = {
properties = {
securityRules = [{
name = "MSSQLRule"
properties = {
access = "Allow"
destinationAddressPrefix = "*"
destinationAddressPrefixes = []
destinationPortRange = "1433"
destinationPortRanges = []
direction = "Inbound"
priority = 1001
protocol = "Tcp"
sourceAddressPrefix = "167.220.255.0/25"
sourceAddressPrefixes = []
sourcePortRange = "*"
sourcePortRanges = []
}
}]
}
}
}
resource "azapi_resource" "subnet" {
type = "Microsoft.Network/virtualNetworks/subnets@2022-07-01"
parent_id = azapi_resource.virtualNetwork.id
name = var.resource_name
body = {
properties = {
addressPrefix = "10.0.0.0/24"
networkSecurityGroup = {
id = azapi_resource.networkSecurityGroup.id
}
}
}
}
resource "azapi_resource" "publicIPAddress" {
type = "Microsoft.Network/publicIPAddresses@2024-05-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
body = {
properties = {
ddosSettings = {
protectionMode = "VirtualNetworkInherited"
}
idleTimeoutInMinutes = 4
ipTags = []
publicIPAddressVersion = "IPv4"
publicIPAllocationMethod = "Dynamic"
}
sku = {
name = "Basic"
tier = "Regional"
}
}
}
resource "azapi_resource" "networkInterface" {
type = "Microsoft.Network/networkInterfaces@2024-05-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
body = {
properties = {
disableTcpStateTracking = false
dnsSettings = {
dnsServers = []
}
enableAcceleratedNetworking = false
enableIPForwarding = false
ipConfigurations = [
{
type = "Microsoft.Network/networkInterfaces/ipConfigurations"
name = "testconfiguration1"
properties = {
privateIPAddressVersion = "IPv4"
privateIPAllocationMethod = "Dynamic"
publicIPAddress = {
id = azapi_resource.publicIPAddress.id
}
subnet = {
id = azapi_resource.subnet.id
}
primary = true
privateIPAddress = "10.0.0.4"
}
}
]
nicType = "Standard"
auxiliaryMode = "None"
auxiliarySku = "None"
}
}
}
resource "azapi_resource" "virtualMachine" {
type = "Microsoft.Compute/virtualMachines@2024-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
body = {
properties = {
osProfile = {
adminUsername = "testadmin"
adminPassword = var.admin_password
allowExtensionOperations = true
computerName = "winhost01"
secrets = []
windowsConfiguration = {
timeZone = "Pacific Standard Time"
enableAutomaticUpdates = true
patchSettings = {
patchMode = "AutomaticByOS"
assessmentMode = "ImageDefault"
}
provisionVMAgent = true
}
}
storageProfile = {
dataDisks = []
imageReference = {
offer = "SQL2017-WS2016"
publisher = "MicrosoftSQLServer"
sku = "SQLDEV"
version = "latest"
}
osDisk = {
diskSizeGB = 127
managedDisk = {
storageAccountType = "Premium_LRS"
}
name = "acctvm-250116171212663925OSDisk"
osType = "Windows"
writeAcceleratorEnabled = false
caching = "ReadOnly"
createOption = "FromImage"
deleteOption = "Detach"
}
}
hardwareProfile = {
vmSize = "Standard_F2s"
}
networkProfile = {
networkInterfaces = [
{
properties = {
primary = false
}
id = azapi_resource.networkInterface.id
}
]
}
}
}
}
resource "azapi_resource" "extension" {
type = "Microsoft.Compute/virtualMachines/extensions@2024-07-01"
parent_id = azapi_resource.virtualMachine.id
name = "AzureMonitorWindowsAgent"
location = "westeurope"
body = {
properties = {
autoUpgradeMinorVersion = true
enableAutomaticUpgrade = true
publisher = "Microsoft.Azure.Monitor"
suppressFailures = false
type = "AzureMonitorWindowsAgent"
typeHandlerVersion = "1.0"
}
}
}
resource "azapi_resource" "workspace" {
type = "Microsoft.OperationalInsights/workspaces@2020-08-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
body = {
properties = {
features = {
disableLocalAuth = false
enableLogAccessUsingOnlyResourcePermissions = true
legacy = 0
searchVersion = 1
}
publicNetworkAccessForIngestion = "Enabled"
publicNetworkAccessForQuery = "Enabled"
retentionInDays = 30
sku = {
name = "PerGB2018"
}
workspaceCapping = {
dailyQuotaGb = -1
}
}
}
}
resource "azapi_resource" "table" {
type = "Microsoft.OperationalInsights/workspaces/tables@2023-09-01"
parent_id = azapi_resource.workspace.id
name = "SqlAssessment_CL"
body = {
properties = {
schema = {
name = "SqlAssessment_CL"
columns = [
{
name = "TimeGenerated"
type = "datetime"
},
{
type = "string"
name = "RawData"
}
]
}
}
}
}
resource "azapi_resource" "dataCollectionEndpoint" {
type = "Microsoft.Insights/dataCollectionEndpoints@2022-06-01"
parent_id = azapi_resource.resourceGroup.id
name = "${var.location}-DCE-1"
location = azapi_resource.resourceGroup.location
body = {
properties = {
networkAcls = {
publicNetworkAccess = "Enabled"
}
}
}
}
resource "azapi_resource" "dataCollectionRule" {
type = "Microsoft.Insights/dataCollectionRules@2022-06-01"
parent_id = azapi_resource.resourceGroup.id
name = "${azapi_resource.workspace.output.properties.customerId}_${azapi_resource.resourceGroup.location}_DCR_1"
location = azapi_resource.resourceGroup.location
body = {
properties = {
streamDeclarations = {
Custom-SqlAssessment_CL = {
columns = [
{
name = "TimeGenerated"
type = "datetime"
},
{
type = "string"
name = "RawData"
}
]
}
}
dataCollectionEndpointId = azapi_resource.dataCollectionEndpoint.id
dataFlows = [
{
outputStream = "Custom-SqlAssessment_CL"
streams = [
"Custom-SqlAssessment_CL"
]
transformKql = "source"
destinations = [
azapi_resource.workspace.name
]
}
]
dataSources = {
logFiles = [
{
filePatterns = [
"C:\\Windows\\System32\\config\\systemprofile\\AppData\\Local\\Microsoft SQL Server IaaS Agent\\Assessment\\*.csv"
]
format = "text"
name = "Custom-SqlAssessment_CL"
settings = {
text = {
recordStartTimestampFormat = "ISO 8601"
}
}
streams = [
"Custom-SqlAssessment_CL"
]
}
]
}
description = ""
destinations = {
logAnalytics = [
{
name = azapi_resource.workspace.name
workspaceResourceId = azapi_resource.workspace.id
}
]
}
}
}
depends_on = [azapi_resource.table]
}
resource "azapi_resource" "dataCollectionRuleAssociation" {
type = "Microsoft.Insights/dataCollectionRuleAssociations@2022-06-01"
parent_id = azapi_resource.virtualMachine.id
name = "${azapi_resource.workspace.output.properties.customerId}_${azapi_resource.resourceGroup.location}_DCRA_1"
body = {
properties = {
dataCollectionRuleId = azapi_resource.dataCollectionRule.id
}
}
}
resource "azapi_resource" "sqlvirtualMachine" {
type = "Microsoft.SqlVirtualMachine/sqlVirtualMachines@2023-10-01"
parent_id = azapi_resource.resourceGroup.id
name = azapi_resource.virtualMachine.name
location = azapi_resource.virtualMachine.location
body = {
properties = {
sqlServerLicenseType = "PAYG"
virtualMachineResourceId = azapi_resource.virtualMachine.id
enableAutomaticUpgrade = true
leastPrivilegeMode = "Enabled"
sqlImageOffer = "SQL2017-WS2016"
sqlImageSku = "Developer"
sqlManagement = "Full"
assessmentSettings = {
enable = true
runImmediately = false
schedule = {
dayOfWeek = "Monday"
enable = true
startTime = "00:00"
weeklyInterval = 1
}
}
}
}
depends_on = [
azapi_resource.dataCollectionRuleAssociation,
azapi_resource.extension,
]
}
リソースの形式
Microsoft.SqlVirtualMachine/sqlVirtualMachines リソースを作成するには、次の Terraform をテンプレートに追加します。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.SqlVirtualMachine/sqlVirtualMachines@2022-02-01-preview"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
assessmentSettings = {
enable = bool
runImmediately = bool
schedule = {
dayOfWeek = "string"
enable = bool
monthlyOccurrence = int
startTime = "string"
weeklyInterval = int
}
}
autoBackupSettings = {
backupScheduleType = "string"
backupSystemDbs = bool
daysOfWeek = [
"string"
]
enable = bool
enableEncryption = bool
fullBackupFrequency = "string"
fullBackupStartTime = int
fullBackupWindowHours = int
logBackupFrequency = int
password = "string"
retentionPeriod = int
storageAccessKey = "string"
storageAccountUrl = "string"
storageContainerName = "string"
}
autoPatchingSettings = {
dayOfWeek = "string"
enable = bool
maintenanceWindowDuration = int
maintenanceWindowStartingHour = int
}
keyVaultCredentialSettings = {
azureKeyVaultUrl = "string"
credentialName = "string"
enable = bool
servicePrincipalName = "string"
servicePrincipalSecret = "string"
}
serverConfigurationsManagementSettings = {
additionalFeaturesServerConfigurations = {
isRServicesEnabled = bool
}
sqlConnectivityUpdateSettings = {
connectivityType = "string"
port = int
sqlAuthUpdatePassword = "string"
sqlAuthUpdateUserName = "string"
}
sqlInstanceSettings = {
collation = "string"
isIfiEnabled = bool
isLpimEnabled = bool
isOptimizeForAdHocWorkloadsEnabled = bool
maxDop = int
maxServerMemoryMB = int
minServerMemoryMB = int
}
sqlStorageUpdateSettings = {
diskConfigurationType = "string"
diskCount = int
startingDeviceId = int
}
sqlWorkloadTypeUpdateSettings = {
sqlWorkloadType = "string"
}
}
sqlImageOffer = "string"
sqlImageSku = "string"
sqlManagement = "string"
sqlServerLicenseType = "string"
sqlVirtualMachineGroupResourceId = "string"
storageConfigurationSettings = {
diskConfigurationType = "string"
sqlDataSettings = {
defaultFilePath = "string"
luns = [
int
]
}
sqlLogSettings = {
defaultFilePath = "string"
luns = [
int
]
}
sqlSystemDbOnDataDisk = bool
sqlTempDbSettings = {
dataFileCount = int
dataFileSize = int
dataGrowth = int
defaultFilePath = "string"
logFileSize = int
logGrowth = int
luns = [
int
]
persistFolder = bool
persistFolderPath = "string"
}
storageWorkloadType = "string"
}
virtualMachineResourceId = "string"
wsfcDomainCredentials = {
clusterBootstrapAccountPassword = "string"
clusterOperatorAccountPassword = "string"
sqlServiceAccountPassword = "string"
}
wsfcStaticIp = "string"
}
}
}
プロパティ値
Microsoft.SqlVirtualMachine/sqlVirtualMachines
| 名前 | 形容 | 価値 |
|---|---|---|
| ID | サーバーの Azure Active Directory ID。 | リソースアイデンティティ |
| 位置 | リソースの場所。 | string (必須) |
| 名前 | リソース名 | string (必須) |
| プロパティ | リソースのプロパティ。 | SqlVirtualMachineProperties の |
| タグ | リソース タグ | タグ名と値のディクショナリ。 |
| 型 | リソースの種類 | "Microsoft.SqlVirtualMachine/sqlVirtualMachines@2022-02-01-preview" (英語) |
追加機能サーバー構成
| 名前 | 形容 | 価値 |
|---|---|---|
| isRServicesEnabled (英語) | R サービス (SQL 2016 以降) を有効または無効にします。 | ブール (bool) |
AssessmentSettings (評価設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| 有効にする | SQL 仮想マシンで評価機能を有効または無効にします。 | ブール (bool) |
| runImmediately(ランリッシュティッシュ) | SQL 仮想マシンで評価を直ちに実行します。 | ブール (bool) |
| 計画 | 評価のスケジュール。 | スケジュール の |
AutoBackupSettings (自動バックアップ設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| backupScheduleType (バックアップスケジュールタイプ) | バックアップ スケジュールの種類。 | 「自動化」 「マニュアル」 |
| backupSystemDbs の | システム データベースを自動バックアップに含めるか、自動バックアップから除外します。 | ブール (bool) |
| daysOfWeek (週の日数) | FullBackupFrequency が [週単位] に設定されている場合のバックアップの曜日。 | 次のいずれかを含む文字列配列: 「フライデー」 「月曜日」 「サタデー」 「サンデー」 「木曜日」 「火曜日」 「水曜日」 |
| 有効にする | SQL 仮想マシンでの自動バックを有効または無効にします。 | ブール (bool) |
| enable暗号化 | SQL 仮想マシンでのバックアップの暗号化を有効または無効にします。 | ブール (bool) |
| fullBackupFrequency | 完全バックアップの頻度。 どちらの場合も、完全バックアップは次のスケジュールされた時間枠の間に開始されます。 | 「毎日」 「毎週」 |
| fullBackupStartTime | 完全バックアップを実行できる特定の日の開始時刻。 0 ~ 23 時間。 | 整数 (int) |
| fullBackupWindowHours (英語) | 完全バックアップを実行できる特定の日の時間枠の期間。 1 ~ 23 時間。 | 整数 (int) |
| logBackupFrequency | ログ バックアップの頻度。 5 ~ 60 分。 | 整数 (int) |
| パスワード | バックアップ時の暗号化のパスワード。 | 文字列 |
| 保持期間 | バックアップの保持期間: 1 ~ 90 日。 | 整数 (int) |
| ストレージアクセスキー | バックアップの保存先となるストレージ アカウント キー。 | 文字列 |
| storageAccountのURL | バックアップの保存先となるストレージ アカウントの URL。 | 文字列 |
| ストレージコンテナ名 | バックアップの保存先となるストレージ コンテナー名。 | 文字列 |
AutoPatchingSettings (自動パッチ設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| dayOfWeekの | パッチを適用する曜日。 | 「毎日」 「フライデー」 「月曜日」 「サタデー」 「サンデー」 「木曜日」 「火曜日」 「水曜日」 |
| 有効にする | SQL 仮想マシンで自動パッチを有効または無効にします。 | ブール (bool) |
| メンテナンスウィンドウ期間 | 修正プログラムの適用期間。 | 整数 (int) |
| maintenanceWindowStartingHour (英語) | 修正プログラムの適用が開始される 1 日の時間。 ローカル VM 時刻。 | 整数 (int) |
KeyVaultCredentialSettings (英語)
| 名前 | 形容 | 価値 |
|---|---|---|
| azureKeyVaultのURL | Azure Key Vault の URL。 | 文字列 |
| クレデンシャル名 | 資格情報の名前。 | 文字列 |
| 有効にする | キー コンテナーの資格情報設定を有効または無効にします。 | ブール (bool) |
| サービスプリンシパル名 | キー コンテナーにアクセスするためのサービス プリンシパル名。 | 文字列 |
| サービスプリンシパルシークレット | キー コンテナーにアクセスするためのサービス プリンシパル名シークレット。 | 文字列 |
リソースアイデンティティ
| 名前 | 形容 | 価値 |
|---|---|---|
| 型 | ID の種類。 リソースの Azure Active Directory プリンシパルを自動的に作成して割り当てるには、これを "SystemAssigned" に設定します。 | 「なし」 'システム割り当て' |
計画
| 名前 | 形容 | 価値 |
|---|---|---|
| dayOfWeekの | 評価を実行する曜日。 | 「フライデー」 「月曜日」 「サタデー」 「サンデー」 「木曜日」 「火曜日」 「水曜日」 |
| 有効にする | SQL 仮想マシンの評価スケジュールを有効または無効にします。 | ブール (bool) |
| 月刊オカレンス | 評価をスケジュールする 1 か月以内の DayOfWeek 日の発生。 1、2、3、4、-1 の値を受け取ります。 月の最後の DayOfWeek 日に -1 を使用する | 整数 (int) |
| 開始時間 | HH:mm 形式の時刻。例えば。17:30 | 文字列 |
| weeklyインターバル | 2 つの評価実行の間にスケジュールする週数。 1 から 6 の値を受け取ります | 整数 (int) |
ServerConfigurationsManagement設定
| 名前 | 形容 | 価値 |
|---|---|---|
| additionalFeaturesサーバー構成 | その他の SQL 機能の設定。 | AdditionalFeaturesServerConfigurations の |
| sqlConnectivityUpdateSettings | SQL 接続の種類の設定。 | SqlConnectivityUpdateSettings |
| sqlInstanceSettings (英語) | SQL インスタンスの設定。 | SQLInstanceSettings (英語) |
| sqlStorageUpdateSettings (英語) | SQL ストレージの更新設定。 | SqlStorageUpdateSettings |
| sqlWorkloadTypeUpdateSettings | SQL ワークロードの種類の設定。 | SqlWorkloadTypeUpdateSettings |
SqlConnectivityUpdateSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| connectivityType (接続タイプ) | SQL Server 接続オプション。 | 「ローカル」 「プライベート」 「パブリック」 |
| ポート | SQL Server ポート。 | 整数 (int) |
| sqlAuthUpdatePassword | SQL Server sysadmin ログイン パスワード。 | 文字列 |
| sqlAuthUpdateUserName (英語) | 作成する SQL Server sysadmin ログイン。 | 文字列 |
SQLInstanceSettings (英語)
| 名前 | 形容 | 価値 |
|---|---|---|
| 照合順序 | SQL Server 照合順序。 | 文字列 |
| isIfiEnabled (英語) | SQL Server IFI。 | ブール (bool) |
| isLpimEnabled (英語) | SQL Server LPIM。 | ブール (bool) |
| isOptimizeForAdHocワークロードEnabled | アドホック ワークロード用の SQL Server Optimize。 | ブール (bool) |
| マックスドップ | SQL Server MAXDOP。 | 整数 (int) |
| 最大サーバーメモリMB | SQL Server の最大メモリ。 | 整数 (int) |
| minServerメモリMB | SQL Server の最小メモリ。 | 整数 (int) |
SQLStorageSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| defaultFilePath (デフォルト ファイルパス) | SQL Server の既定のファイル パス | 文字列 |
| LUN | ディスクの論理ユニット番号。 | int[] |
SqlStorageUpdateSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| diskConfigurationType (ディスク構成タイプ) | SQL Server に適用するディスク構成。 | 「追加」 「拡張」 「新着」 |
| ディスクカウント | 仮想マシンのディスク数。 | 整数 (int) |
| 開始デバイスID | 更新する最初のディスクのデバイス ID。 | 整数 (int) |
SQLTempDb設定
| 名前 | 形容 | 価値 |
|---|---|---|
| データファイルカウント | SQL Server tempdb データ ファイルの数 | 整数 (int) |
| データファイルサイズ | SQL Server tempdb データ ファイルのサイズ | 整数 (int) |
| データ増加 | SQL Server tempdb データ ファイルの自動拡張サイズ | 整数 (int) |
| defaultFilePath (デフォルト ファイルパス) | SQL Server の既定のファイル パス | 文字列 |
| logFileSize(ログファイルサイズ) | SQL Server tempdb ログ ファイルのサイズ | 整数 (int) |
| ロググロース | SQL Server tempdb ログ ファイルの自動拡張サイズ | 整数 (int) |
| LUN | ディスクの論理ユニット番号。 | int[] |
| persistFolder (永続フォルダ) | SQL Server tempdb の保存フォルダーの選択 | ブール (bool) |
| persistFolderPath (永続フォルダパス) | SQL Server tempdb の保存フォルダーの場所 | 文字列 |
SqlVirtualMachineProperties の
| 名前 | 形容 | 価値 |
|---|---|---|
| assessment設定 | 評価の設定。 | AssessmentSettings (評価設定) |
| autoBackupSettings (英語) | SQL Server の自動バックアップ設定。 | AutoBackupSettings の |
| autoPatchingSettings (自動パッチ設定) | SQL 仮想マシンに重要なセキュリティ更新プログラムを適用するための自動修正プログラムの設定。 | AutoPatchingSettings (自動パッチ設定) |
| keyVaultCredentialSettings | キー コンテナーの資格情報の設定。 | KeyVaultCredentialSettings の |
| serverConfigurationsManagementSettings | SQL Server の構成管理設定。 | ServerConfigurationsManagement設定 |
| sqlImageOffer | SQL イメージ オファー。 例としては、SQL2016-WS2016、SQL2017-WS2016 などがあります。 | 文字列 |
| sqlImageSku の | SQL Server エディションの種類。 | 「開発者」 「エンタープライズ」 「エクスプレス」 「スタンダード」 「ウェブ」 |
| sqlマネジメント | SQL Server 管理の種類。 | 「フル」 「ライトウェイト」 「ノーエージェント」 |
| sqlServerLicenseType | SQL Server ライセンスの種類。 | 「アハブ」 「DR」 「ペイグ」 |
| sqlVirtualMachineGroupリソースId | この SQL 仮想マシンが属しているか、その一部となる SQL 仮想マシン グループの ARM リソース ID。 | 文字列 |
| storageConfiguration設定 | ストレージ構成設定。 | StorageConfigurationSettings (ストレージ構成設定) |
| virtualMachineリソースId | SQL Marketplace イメージから作成された基になる仮想マシンの ARM リソース ID。 | 文字列 |
| wsfcドメイン資格情報 | SQL 可用性グループの Windows Server フェールオーバー クラスターを設定するためのドメイン資格情報。 | WsfcDomainCredentials の |
| wsfcStaticIp | SQL 可用性グループの Windows Server フェールオーバー クラスターを設定するためのドメイン資格情報。 | 文字列 |
SqlWorkloadTypeUpdateSettings
| 名前 | 形容 | 価値 |
|---|---|---|
| sqlWorkloadType (英語) | SQL Server ワークロードの種類。 | 「DW」 「全般」 「OLTP」 |
StorageConfigurationSettings (ストレージ構成設定)
| 名前 | 形容 | 価値 |
|---|---|---|
| diskConfigurationType (ディスク構成タイプ) | SQL Server に適用するディスク構成。 | 「追加」 「拡張」 「新着」 |
| sqlDataSettings (英語) | SQL Server データ ストレージの設定。 | SQLStorageSettings |
| sqlLogSettings の | SQL Server ログ ストレージの設定。 | SQLStorageSettings |
| sqlSystemDbOnDataDisk | True の場合、DataPool 上の SQL Server SystemDb ストレージ。 | ブール (bool) |
| sqlTempDb設定 | SQL Server TempDb ストレージの設定。 | SQLTempDb設定 |
| ストレージワークロードタイプ | ストレージ ワークロードの種類。 | 「DW」 「全般」 「OLTP」 |
追跡リソースタグ
| 名前 | 形容 | 価値 |
|---|
Wsfcドメイン資格情報
| 名前 | 形容 | 価値 |
|---|---|---|
| clusterBootstrapAccountPassword (英語) | クラスター ブートストラップ アカウントのパスワード。 | 文字列 |
| clusterOperatorAccountPassword の | クラスター オペレーター アカウントのパスワード。 | 文字列 |
| sqlServiceAccountPassword (英語) | SQL サービス アカウントのパスワード。 | 文字列 |