From e75eede04ad69e4fbcdb225d51c5c4c2fa72234d Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 21 Feb 2022 21:41:18 +0100 Subject: [PATCH 1/7] test availabilityZone set to 0 --- .../virtualMachines/deploy.bicep | 9 +++------ .../virtualMachines/readme.md | 18 ++++++++---------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/arm/Microsoft.Compute/virtualMachines/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/deploy.bicep index 26b909b241..bc1e4a69d2 100644 --- a/arm/Microsoft.Compute/virtualMachines/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/deploy.bicep @@ -95,17 +95,15 @@ param proximityPlacementGroupName string = '' @description('Optional. Resource name of an availability set. Cannot be used in combination with availability zone nor scale set.') param availabilitySetName string = '' -@description('Optional. Creates an availability zone and adds the VMs to it. Cannot be used in combination with availability set nor scale set.') -param useAvailabilityZone bool = false - @description('Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then the automatic algorithm will be used to give every VM in a different zone (up to three zones). Cannot be used in combination with availability set nor scale set.') @allowed([ + -1 0 1 2 3 ]) -param availabilityZone int = 0 +param availabilityZone int = -1 // External resources @description('Required. Configures NICs and PIPs.') @@ -350,7 +348,7 @@ resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-07-01' = { location: location identity: identity tags: tags - zones: useAvailabilityZone ? array(availabilityZone) : null + zones: 0 plan: !empty(plan) ? plan : null properties: { hardwareProfile: { @@ -363,7 +361,6 @@ resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-07-01' = { secureBootEnabled: secureBootEnabled vTpmEnabled: vTpmEnabled } : null - } storageProfile: { imageReference: imageReference diff --git a/arm/Microsoft.Compute/virtualMachines/readme.md b/arm/Microsoft.Compute/virtualMachines/readme.md index 5e17e8f74d..ffda3df3c9 100644 --- a/arm/Microsoft.Compute/virtualMachines/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/readme.md @@ -36,7 +36,7 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `configurationProfileAssignments` | array | `[]` | | Optional. Any VM configuration profile assignments | | `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | `customData` | string | | | Optional. Custom data associated to the VM, this value will be automatically converted into base64 to account for the expected VM format. | -| `dataDisks` | array | `[]` | | Optional. Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.| +| `dataDisks` | array | `[]` | | Optional. Specifies the data disks. For security reasons, it is recommended to specify DiskEncryptionSet into the dataDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs. | | `dedicatedHostId` | string | | | Optional. Specifies resource ID about the dedicated host that the virtual machine resides in. | | `diagnosticEventHubAuthorizationRuleId` | string | | | Optional. Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. | | `diagnosticEventHubName` | string | | | Optional. Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. | @@ -49,7 +49,6 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `enableServerSideEncryption` | bool | | | Optional. Specifies if Windows VM disks should be encrypted with Server-side encryption + Customer managed Key. | | `encryptionAtHost` | bool | `True` | | Optional. This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs. | | `extensionAntiMalwareConfig` | object | `{object}` | | Optional. The configuration for the [Anti Malware] extension. Must at least contain the ["enabled": true] property to be executed | -| `extensionAntiMalwareConfig` | object | `{object}` | | Optional. The configuration for the [Anti Malware] extension. Must at least contain the ["enabled": true] property to be executed | | `extensionCustomScriptConfig` | object | `{object}` | | Optional. The configuration for the [Custom Script] extension. Must at least contain the ["enabled": true] property to be executed | | `extensionDependencyAgentConfig` | object | `{object}` | | Optional. The configuration for the [Dependency Agent] extension. Must at least contain the ["enabled": true] property to be executed | | `extensionDiskEncryptionConfig` | object | `{object}` | | Optional. The configuration for the [Disk Encryption] extension. Must at least contain the ["enabled": true] property to be executed | @@ -63,12 +62,12 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `location` | string | `[resourceGroup().location]` | | Optional. Location for all resources. | | `lock` | string | `NotSpecified` | `[CanNotDelete, NotSpecified, ReadOnly]` | Optional. Specify the type of lock. | | `maxPriceForLowPriorityVm` | string | | | Optional. Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars. | -| `monitoringWorkspaceId` | string | | | Optional. Resource ID of the monitoring log analytics workspace. Must be set when extensionMonitoringAgentConfig is set to true.| +| `monitoringWorkspaceId` | string | | | Optional. Resource ID of the monitoring log analytics workspace. Must be set when extensionMonitoringAgentConfig is set to true. | | `name` | string | `[take(toLower(uniqueString(resourceGroup().name)), 10)]` | | Optional. The name of the virtual machine to be created. You should use a unique prefix to reduce name collisions in Active Directory. If no value is provided, a 10 character long unique string will be generated based on the Resource Group's name. | | `nicConfigurations` | array | | | Required. Configures NICs and PIPs. | | `nicMetricsToEnable` | array | `[AllMetrics]` | `[AllMetrics]` | Optional. The name of metrics that will be streamed. | -| `osDisk` | object | | | Required. Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs.| -| `osType` | string | | `[Windows, Linux]` | Required. The chosen OS type| +| `osDisk` | object | | | Required. Specifies the OS disk. For security reasons, it is recommended to specify DiskEncryptionSet into the osDisk object. Restrictions: DiskEncryptionSet cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs. | +| `osType` | string | | `[Windows, Linux]` | Required. The chosen OS type | | `pipLogsToEnable` | array | `[DDoSProtectionNotifications, DDoSMitigationFlowLogs, DDoSMitigationReports]` | `[DDoSProtectionNotifications, DDoSMitigationFlowLogs, DDoSMitigationReports]` | Optional. The name of logs that will be streamed. | | `pipMetricsToEnable` | array | `[AllMetrics]` | `[AllMetrics]` | Optional. The name of metrics that will be streamed. | | `plan` | object | `{object}` | | Optional. Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. | @@ -77,18 +76,17 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `publicKeys` | array | `[]` | | Optional. The list of SSH public keys used to authenticate with linux based VMs | | `roleAssignments` | array | `[]` | | Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11' | | `sasTokenValidityLength` | string | `PT8H` | | Optional. SAS token validity length to use to download files from storage accounts. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours. | -| `securityType` | string | | `TrustedLaunch` | Optional. Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. | -| `secureBootEnabled` | bool | `False` | | Optional. Specifies whether secure boot should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. | +| `secureBootEnabled` | bool | | | Optional. Specifies whether secure boot should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. | +| `securityType` | string | | | Optional. Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. | | `systemAssignedIdentity` | bool | | | Optional. Enables system assigned managed identity on the resource. | | `tags` | object | `{object}` | | Optional. Tags of the resource. | -| `timeZone` | string | | | Optional. Specifies the time zone of the virtual machine. e.g. 'Pacific Standard Time'. Possible values can be 'TimeZoneInfo.id' value from time zones returned by TimeZoneInfo.GetSystemTimeZones. | +| `timeZone` | string | | | Optional. Specifies the time zone of the virtual machine. e.g. 'Pacific Standard Time'. Possible values can be TimeZoneInfo.id value from time zones returned by TimeZoneInfo.GetSystemTimeZones. | | `ultraSSDEnabled` | bool | | | Optional. The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. | -| `useAvailabilityZone` | bool | | | Optional. Creates an availability zone and adds the VMs to it. Cannot be used in combination with availability set nor scale set. | | `userAssignedIdentities` | object | `{object}` | | Optional. The ID(s) to assign to the resource. | | `vmComputerNamesTransformation` | string | `none` | | Optional. Specifies whether the computer names should be transformed. The transformation is performed on all computer names. Available transformations are 'none' (Default), 'uppercase' and 'lowercase'. | | `vmPriority` | string | `Regular` | `[Regular, Low, Spot]` | Optional. Specifies the priority for the virtual machine. | | `vmSize` | string | `Standard_D2s_v3` | | Optional. Specifies the size for the VMs | -| `vTpmEnabled` | bool | `False` | | Optional. Specifies whether vTPM should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. | +| `vTpmEnabled` | bool | | | Optional. Specifies whether vTPM should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. | | `winRM` | object | `{object}` | | Optional. Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object. | ### Parameter Usage: `imageReference` From ed572d7a610cafd304539a422ae3da82687a8cb8 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 21 Feb 2022 21:48:25 +0100 Subject: [PATCH 2/7] retest with 0 array --- arm/Microsoft.Compute/virtualMachines/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Compute/virtualMachines/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/deploy.bicep index bc1e4a69d2..3aa35f6ce4 100644 --- a/arm/Microsoft.Compute/virtualMachines/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/deploy.bicep @@ -348,7 +348,7 @@ resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-07-01' = { location: location identity: identity tags: tags - zones: 0 + zones: array(0) plan: !empty(plan) ? plan : null properties: { hardwareProfile: { From eb22934d22c0d0c24fd1571936dcd222c04713ba Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 21 Feb 2022 22:09:21 +0100 Subject: [PATCH 3/7] change vm availabilityZone desc --- arm/Microsoft.Compute/virtualMachines/deploy.bicep | 7 +++---- arm/Microsoft.Compute/virtualMachines/readme.md | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arm/Microsoft.Compute/virtualMachines/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/deploy.bicep index 3aa35f6ce4..171fb0ba70 100644 --- a/arm/Microsoft.Compute/virtualMachines/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/deploy.bicep @@ -95,15 +95,14 @@ param proximityPlacementGroupName string = '' @description('Optional. Resource name of an availability set. Cannot be used in combination with availability zone nor scale set.') param availabilitySetName string = '' -@description('Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then the automatic algorithm will be used to give every VM in a different zone (up to three zones). Cannot be used in combination with availability set nor scale set.') +@description('Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set.') @allowed([ - -1 0 1 2 3 ]) -param availabilityZone int = -1 +param availabilityZone int = 0 // External resources @description('Required. Configures NICs and PIPs.') @@ -348,7 +347,7 @@ resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-07-01' = { location: location identity: identity tags: tags - zones: array(0) + zones: availabilityZone != 0 ? array(availabilityZone) : null plan: !empty(plan) ? plan : null properties: { hardwareProfile: { diff --git a/arm/Microsoft.Compute/virtualMachines/readme.md b/arm/Microsoft.Compute/virtualMachines/readme.md index ffda3df3c9..35abcdce9b 100644 --- a/arm/Microsoft.Compute/virtualMachines/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/readme.md @@ -25,7 +25,7 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `adminUsername` | secureString | | | Required. Administrator username | | `allowExtensionOperations` | bool | `True` | | Optional. Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine. | | `availabilitySetName` | string | | | Optional. Resource name of an availability set. Cannot be used in combination with availability zone nor scale set. | -| `availabilityZone` | int | | `[0, 1, 2, 3]` | Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then the automatic algorithm will be used to give every VM in a different zone (up to three zones). Cannot be used in combination with availability set nor scale set. | +| `availabilityZone` | int | | `[0, 1, 2, 3]` | Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set. | | `backupPolicyName` | string | `DefaultPolicy` | | Optional. Backup policy the VMs should be using for backup. If not provided, it will use the DefaultPolicy from the backup recovery service vault. | | `backupVaultName` | string | | | Optional. Recovery service vault name to add VMs to backup. | | `backupVaultResourceGroup` | string | `[resourceGroup().name]` | | Optional. Resource group of the backup recovery service vault. If not provided the current resource group name is considered by default. | From 7a75f18f93e2a53514c0289114dde88eb6ce9129 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 21 Feb 2022 22:43:55 +0100 Subject: [PATCH 4/7] Added testing for Availability Zones --- .../virtualMachines/.parameters/linux.parameters.json | 4 +++- .../virtualMachines/.parameters/windows.parameters.json | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arm/Microsoft.Compute/virtualMachines/.parameters/linux.parameters.json b/arm/Microsoft.Compute/virtualMachines/.parameters/linux.parameters.json index e028956107..6746a22b78 100644 --- a/arm/Microsoft.Compute/virtualMachines/.parameters/linux.parameters.json +++ b/arm/Microsoft.Compute/virtualMachines/.parameters/linux.parameters.json @@ -19,6 +19,9 @@ "encryptionAtHost": { "value": false }, + "availabilityZone": { + "value": 1 + }, "imageReference": { "value": { "publisher": "Canonical", @@ -37,7 +40,6 @@ } } }, - "adminUsername": { "value": "localAdminUser" }, diff --git a/arm/Microsoft.Compute/virtualMachines/.parameters/windows.parameters.json b/arm/Microsoft.Compute/virtualMachines/.parameters/windows.parameters.json index 89f3564251..ba7024125f 100644 --- a/arm/Microsoft.Compute/virtualMachines/.parameters/windows.parameters.json +++ b/arm/Microsoft.Compute/virtualMachines/.parameters/windows.parameters.json @@ -26,12 +26,12 @@ "diskSizeGB": "128", "managedDisk": { "storageAccountType": "Premium_LRS" - } - } }, - + "availabilityZone": { + "value": 2 + }, "adminUsername": { "value": "localAdminUser" }, From c38732ba6e5fce002f33d695eee836b9eb504309 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 21 Feb 2022 23:18:13 +0100 Subject: [PATCH 5/7] Update param to be of range --- arm/Microsoft.Compute/virtualMachines/deploy.bicep | 8 ++------ arm/Microsoft.Compute/virtualMachines/readme.md | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arm/Microsoft.Compute/virtualMachines/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/deploy.bicep index 171fb0ba70..0e1be79256 100644 --- a/arm/Microsoft.Compute/virtualMachines/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/deploy.bicep @@ -96,12 +96,8 @@ param proximityPlacementGroupName string = '' param availabilitySetName string = '' @description('Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set.') -@allowed([ - 0 - 1 - 2 - 3 -]) +@minValue(0) +@maxValue(3) param availabilityZone int = 0 // External resources diff --git a/arm/Microsoft.Compute/virtualMachines/readme.md b/arm/Microsoft.Compute/virtualMachines/readme.md index 35abcdce9b..d86378adb4 100644 --- a/arm/Microsoft.Compute/virtualMachines/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/readme.md @@ -25,7 +25,7 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `adminUsername` | secureString | | | Required. Administrator username | | `allowExtensionOperations` | bool | `True` | | Optional. Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine. | | `availabilitySetName` | string | | | Optional. Resource name of an availability set. Cannot be used in combination with availability zone nor scale set. | -| `availabilityZone` | int | | `[0, 1, 2, 3]` | Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set. | +| `availabilityZone` | int | | | Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set. | | `backupPolicyName` | string | `DefaultPolicy` | | Optional. Backup policy the VMs should be using for backup. If not provided, it will use the DefaultPolicy from the backup recovery service vault. | | `backupVaultName` | string | | | Optional. Recovery service vault name to add VMs to backup. | | `backupVaultResourceGroup` | string | `[resourceGroup().name]` | | Optional. Resource group of the backup recovery service vault. If not provided the current resource group name is considered by default. | From eda71aa5106fea4674a891df831c987df6806cc0 Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 22 Feb 2022 11:06:27 +0100 Subject: [PATCH 6/7] Revert decorator and readme to use allowed values rather than range --- arm/Microsoft.Compute/virtualMachines/deploy.bicep | 8 ++++++-- arm/Microsoft.Compute/virtualMachines/readme.md | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arm/Microsoft.Compute/virtualMachines/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/deploy.bicep index 0e1be79256..171fb0ba70 100644 --- a/arm/Microsoft.Compute/virtualMachines/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/deploy.bicep @@ -96,8 +96,12 @@ param proximityPlacementGroupName string = '' param availabilitySetName string = '' @description('Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set.') -@minValue(0) -@maxValue(3) +@allowed([ + 0 + 1 + 2 + 3 +]) param availabilityZone int = 0 // External resources diff --git a/arm/Microsoft.Compute/virtualMachines/readme.md b/arm/Microsoft.Compute/virtualMachines/readme.md index d86378adb4..35abcdce9b 100644 --- a/arm/Microsoft.Compute/virtualMachines/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/readme.md @@ -25,7 +25,7 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `adminUsername` | secureString | | | Required. Administrator username | | `allowExtensionOperations` | bool | `True` | | Optional. Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine. | | `availabilitySetName` | string | | | Optional. Resource name of an availability set. Cannot be used in combination with availability zone nor scale set. | -| `availabilityZone` | int | | | Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set. | +| `availabilityZone` | int | | `[0, 1, 2, 3]` | Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set. | | `backupPolicyName` | string | `DefaultPolicy` | | Optional. Backup policy the VMs should be using for backup. If not provided, it will use the DefaultPolicy from the backup recovery service vault. | | `backupVaultName` | string | | | Optional. Recovery service vault name to add VMs to backup. | | `backupVaultResourceGroup` | string | `[resourceGroup().name]` | | Optional. Resource group of the backup recovery service vault. If not provided the current resource group name is considered by default. | From 98a9caadb56ed0e830c83c329f2efafea08d2618 Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 22 Feb 2022 22:57:26 +0100 Subject: [PATCH 7/7] Fix script + add back default --- arm/Microsoft.Compute/virtualMachines/readme.md | 16 ++++++++-------- utilities/tools/Set-ModuleReadMe.ps1 | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arm/Microsoft.Compute/virtualMachines/readme.md b/arm/Microsoft.Compute/virtualMachines/readme.md index 35abcdce9b..2ce07bb9f0 100644 --- a/arm/Microsoft.Compute/virtualMachines/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/readme.md @@ -25,7 +25,7 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `adminUsername` | secureString | | | Required. Administrator username | | `allowExtensionOperations` | bool | `True` | | Optional. Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine. | | `availabilitySetName` | string | | | Optional. Resource name of an availability set. Cannot be used in combination with availability zone nor scale set. | -| `availabilityZone` | int | | `[0, 1, 2, 3]` | Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set. | +| `availabilityZone` | int | `0` | `[0, 1, 2, 3]` | Optional. If set to 1, 2 or 3, the availability zone for all VMs is hardcoded to that value. If zero, then availability zones is not used. Cannot be used in combination with availability set nor scale set. | | `backupPolicyName` | string | `DefaultPolicy` | | Optional. Backup policy the VMs should be using for backup. If not provided, it will use the DefaultPolicy from the backup recovery service vault. | | `backupVaultName` | string | | | Optional. Recovery service vault name to add VMs to backup. | | `backupVaultResourceGroup` | string | `[resourceGroup().name]` | | Optional. Resource group of the backup recovery service vault. If not provided the current resource group name is considered by default. | @@ -43,10 +43,10 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `diagnosticLogsRetentionInDays` | int | `365` | | Optional. Specifies the number of days that logs will be kept for; a value of 0 will retain data indefinitely. | | `diagnosticStorageAccountId` | string | | | Optional. Resource ID of the diagnostic storage account. | | `diagnosticWorkspaceId` | string | | | Optional. Resource ID of the diagnostic log analytics workspace. | -| `disablePasswordAuthentication` | bool | | | Optional. Specifies whether password authentication should be disabled. | +| `disablePasswordAuthentication` | bool | `False` | | Optional. Specifies whether password authentication should be disabled. | | `enableAutomaticUpdates` | bool | `True` | | Optional. Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. | -| `enableEvictionPolicy` | bool | | | Optional. Specifies the eviction policy for the low priority virtual machine. Will result in 'Deallocate' eviction policy. | -| `enableServerSideEncryption` | bool | | | Optional. Specifies if Windows VM disks should be encrypted with Server-side encryption + Customer managed Key. | +| `enableEvictionPolicy` | bool | `False` | | Optional. Specifies the eviction policy for the low priority virtual machine. Will result in 'Deallocate' eviction policy. | +| `enableServerSideEncryption` | bool | `False` | | Optional. Specifies if Windows VM disks should be encrypted with Server-side encryption + Customer managed Key. | | `encryptionAtHost` | bool | `True` | | Optional. This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself. For security reasons, it is recommended to set encryptionAtHost to True. Restrictions: Cannot be enabled if Azure Disk Encryption (guest-VM encryption using bitlocker/DM-Crypt) is enabled on your VMs. | | `extensionAntiMalwareConfig` | object | `{object}` | | Optional. The configuration for the [Anti Malware] extension. Must at least contain the ["enabled": true] property to be executed | | `extensionCustomScriptConfig` | object | `{object}` | | Optional. The configuration for the [Custom Script] extension. Must at least contain the ["enabled": true] property to be executed | @@ -76,17 +76,17 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `publicKeys` | array | `[]` | | Optional. The list of SSH public keys used to authenticate with linux based VMs | | `roleAssignments` | array | `[]` | | Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11' | | `sasTokenValidityLength` | string | `PT8H` | | Optional. SAS token validity length to use to download files from storage accounts. Usage: 'PT8H' - valid for 8 hours; 'P5D' - valid for 5 days; 'P1Y' - valid for 1 year. When not provided, the SAS token will be valid for 8 hours. | -| `secureBootEnabled` | bool | | | Optional. Specifies whether secure boot should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. | +| `secureBootEnabled` | bool | `False` | | Optional. Specifies whether secure boot should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. | | `securityType` | string | | | Optional. Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings. | -| `systemAssignedIdentity` | bool | | | Optional. Enables system assigned managed identity on the resource. | +| `systemAssignedIdentity` | bool | `False` | | Optional. Enables system assigned managed identity on the resource. | | `tags` | object | `{object}` | | Optional. Tags of the resource. | | `timeZone` | string | | | Optional. Specifies the time zone of the virtual machine. e.g. 'Pacific Standard Time'. Possible values can be TimeZoneInfo.id value from time zones returned by TimeZoneInfo.GetSystemTimeZones. | -| `ultraSSDEnabled` | bool | | | Optional. The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. | +| `ultraSSDEnabled` | bool | `False` | | Optional. The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. | | `userAssignedIdentities` | object | `{object}` | | Optional. The ID(s) to assign to the resource. | | `vmComputerNamesTransformation` | string | `none` | | Optional. Specifies whether the computer names should be transformed. The transformation is performed on all computer names. Available transformations are 'none' (Default), 'uppercase' and 'lowercase'. | | `vmPriority` | string | `Regular` | `[Regular, Low, Spot]` | Optional. Specifies the priority for the virtual machine. | | `vmSize` | string | `Standard_D2s_v3` | | Optional. Specifies the size for the VMs | -| `vTpmEnabled` | bool | | | Optional. Specifies whether vTPM should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. | +| `vTpmEnabled` | bool | `False` | | Optional. Specifies whether vTPM should be enabled on the virtual machine. This parameter is part of the UefiSettings. SecurityType should be set to TrustedLaunch to enable UefiSettings. | | `winRM` | object | `{object}` | | Optional. Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. - WinRMConfiguration object. | ### Parameter Usage: `imageReference` diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index 6e4fd03ef3..4f65bcbc1b 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -176,7 +176,7 @@ function Set-ParametersSection { $defaultValue = ($param.defaultValue -is [array]) ? ('[{0}]' -f ($param.defaultValue -join ', ')) : (($param.defaultValue -is [hashtable]) ? '{object}' : $param.defaultValue) $allowed = ($param.allowedValues -is [array]) ? ('[{0}]' -f ($param.allowedValues -join ', ')) : (($param.allowedValues -is [hashtable]) ? '{object}' : $param.allowedValues) $description = $param.metadata.description - $SectionContent += ('| `{0}` | {1} | {2} | {3} | {4} |' -f $paramName, $type, (($defaultValue) ? "``$defaultValue``" : ''), (($allowed) ? "``$allowed``" : ''), $description) + $SectionContent += ('| `{0}` | {1} | {2} | {3} | {4} |' -f $paramName, $type, (![string]::IsNullOrEmpty($defaultValue) ? "``$defaultValue``" : ''), (($allowed) ? "``$allowed``" : ''), $description) } # Build result