From 5e61e9f966007b5ce47989c2f266b899c6de2f5a Mon Sep 17 00:00:00 2001 From: Luke Snoddy <37806411+lsnoddy@users.noreply.github.com> Date: Mon, 9 May 2022 23:11:26 -0600 Subject: [PATCH] [Modules] VirtualMachine: Configure boot diagnostics with managed storage account (#1365) * Update to new child-resource structure progress * Progress check-in * Added managed cluster name parameter * Updated readme * Updated readme file * Updated readme * Push updated Readme file(s) * Updated readme * Added test param file * Updated subscriptionId * Added test param file * Removed subscription id * Modified test variables * Modified test variables * Test dependency values * Updated parameters * Removed local files used for testing * Updated readme * Updated readme * Revert "Push updated Readme file(s)" This reverts commit a24964d165c4a93d846a35152439bb8fa7daf628. * Updated readme * Updated both readme files and agentPool paramter name consistency * Push updated Readme file(s) * Updated Api to API to appease linter * Revert "Push updated Readme file(s)" This reverts commit 39ae6ce0822f35f388cb3062ade36208b8d356ef. * Reverted inadvertent readme change * Updated agentPool param description * Push updated Readme file(s) * Revert "Push updated Readme file(s)" This reverts commit c0bd1e19047ec2c7a0b0f0136a7000b51019fa6d. * Nodepools one word per linter error * Push updated Readme file(s) * Updated agentPool parameter name * Updated agentPools parameter name * Revert "Push updated Readme file(s)" This reverts commit c3eb913c2df6aff5e62137ffe375503c7641eea6. * Push updated Readme file(s) * Added parameters for all agentPool properties * Updated name parameter * Added required systemAssignedIdentity param for testing * Added type parameter * Updated containerLogMaxFiles * Updated containerLogMaxFiles * Updated cpuManagerPolicy param * Updated image high and image low threshold params * Updated topologyManagerPolicy param * Updated transparentHugePageDefrag and transparentHugePageEnabled * Updated osType parameter * Updated proximityPlacementGroupID * Updated proximityPlacementGroupId * proximityPlacementGroupId test * Updated parameter default values * Updated nodePublicIpPrefixId param * Updated nodePublicIpPrefixId * Updated string values with null when empty * Ucommented proximiytPlacementGroupId * Added default vm size * Change maxPods default to 10 * Changed maxPods default * Param default mgmt * Update osDiskType default * Set osSKU default * Updated parameters * Updated sourceResourceId parameter default * Updated sourceResourceId * Updated creationData variable * Comment out creationData - test * Updated gpuInstanceProfile * Updated gpu instance profile * Updated osDiskType * Updated sourceResourceId * Updated sourceResourceId * Updated conatinerLog params * Updated containerLogMaxFiles * Updated swapFileSize param * swap file size update * Updated swapFileSize * Updated netCoreSomaxconn * Updated netcoreSomaxconn param * Updated netCoreNetdevMaxBacklog param * Updated netCoreRmemDefault param * Updated netCoreOptmemMax * Updated netCoreWmemDefault param * Updated netCoreWmemMax * Update netCoreWmemMax param * Updated netCoreOptmemMax param * Updated netIpv4TcpMaxSynBacklog param * Updated netIpv4TcpMaxTwBuckets param * Update netIpv4TcpFinTimeout param * Update etIpv4TcpKeepaliveTime param * Updated netIpv4TcpKeepaliveProbes * Updated netIpv4TcpkeepaliveIntvl param * Updated netIpv4NeighDefaultGcThresholds params * Updated netIpv4NeighDefaultGcThresh2 * Updated Sysctl settings * Removed unneccessary properties object * Registry name test * Updated readme files * Updated parameter files for new agentpool format * Updated readme files * Update platform dependencies * Updates * Updated readme * Updated readme * Updated readme * Revert "Update platform dependencies" This reverts commit 55df214975467f0f201a33ab75501a7c667e23bc. * Update * Update * Restore file * Restore file * Test restore * Test revert * Restore file * Updated * Removed agentPool example * Removed extra spaces and changed comparison to not equal * Removed agen pool example * Push updated Readme file(s) * Restored file * Added missing network firewall policies link * Revert "Push updated Readme file(s)" This reverts commit c636da2e4c238287e9863206aef7183cd470f708. * Moved managedCluster reference down to agent pool resource section * Push updated Readme file(s) * Revert "Push updated Readme file(s)" This reverts commit c0aecda3ee4cc8b7514a2de91716947de4d256fa. * Push updated Readme file(s) * Revert "Push updated Readme file(s)" This reverts commit 86d2ba8f640471149ffb10aa16c855a626947441. * Update arm/Microsoft.ContainerService/managedClusters/agentPools/deploy.bicep Co-authored-by: Alexander Sehr * Update arm/Microsoft.ContainerService/managedClusters/agentPools/deploy.bicep Co-authored-by: Alexander Sehr * Update arm/Microsoft.ContainerService/managedClusters/agentPools/deploy.bicep Co-authored-by: Alexander Sehr * Update arm/Microsoft.ContainerService/managedClusters/agentPools/deploy.bicep Co-authored-by: Alexander Sehr * Push updated Readme file(s) * Updated bicepregistryName and namePrefix * Added Proximity Placement Group * default location to WestUS * Changed locations to westus * Update settings and variables * Updated location to EastUS * Updated name prefix * Added new min parameter test file and proximity placement group test to availability set module * Updated route table version to 0.1 * Changed version to 0.1 * Upated main * Update to main * Update to main - stg acct version * Updates to main * Added bootDiagnostics w/managed storage acct * location update * Token update * Update encryption key * Updated encryption key identifier * Reset settings files Co-authored-by: CARMLPipelinePrincipal Co-authored-by: Alexander Sehr --- arm/Microsoft.Compute/virtualMachines/deploy.bicep | 7 +++++-- arm/Microsoft.Compute/virtualMachines/readme.md | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arm/Microsoft.Compute/virtualMachines/deploy.bicep b/arm/Microsoft.Compute/virtualMachines/deploy.bicep index 23c728444e..338690893b 100644 --- a/arm/Microsoft.Compute/virtualMachines/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachines/deploy.bicep @@ -88,7 +88,10 @@ param systemAssignedIdentity bool = false @description('Optional. The ID(s) to assign to the resource.') param userAssignedIdentities object = {} -@description('Optional. Storage account used to store boot diagnostic information. Boot diagnostics will be disabled if no value is provided.') +@description('Optional. Whether boot diagnostics should be enabled on the Virtual Machine. Boot diagnostics will be enabled with a managed storage account if no bootDiagnosticsStorageAccountName value is provided. If bootDiagnostics and bootDiagnosticsStorageAccountName values are not provided, boot diagnostics will be disabled.') +param bootDiagnostics bool = false + +@description('Optional. Custom storage account used to store boot diagnostic information. Boot diagnostics will be enabled with a custom storage account if a value is provided.') param bootDiagnosticStorageAccountName string = '' @description('Optional. Storage account boot diagnostic base URI.') @@ -437,7 +440,7 @@ resource virtualMachine 'Microsoft.Compute/virtualMachines@2021-07-01' = { } diagnosticsProfile: { bootDiagnostics: { - enabled: !empty(bootDiagnosticStorageAccountName) + enabled: !empty(bootDiagnosticStorageAccountName) ? true : bootDiagnostics storageUri: !empty(bootDiagnosticStorageAccountName) ? 'https://${bootDiagnosticStorageAccountName}${bootDiagnosticStorageAccountUri}' : null } } diff --git a/arm/Microsoft.Compute/virtualMachines/readme.md b/arm/Microsoft.Compute/virtualMachines/readme.md index 53fb2b9130..f7fc28fb77 100644 --- a/arm/Microsoft.Compute/virtualMachines/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/readme.md @@ -45,7 +45,8 @@ This module deploys one Virtual Machine with one or multiple nics and optionally | `backupPolicyName` | string | `'DefaultPolicy'` | | 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 | `''` | | Recovery service vault name to add VMs to backup. | | `backupVaultResourceGroup` | string | `[resourceGroup().name]` | | Resource group of the backup recovery service vault. If not provided the current resource group name is considered by default. | -| `bootDiagnosticStorageAccountName` | string | `''` | | Storage account used to store boot diagnostic information. Boot diagnostics will be disabled if no value is provided. | +| `bootDiagnostics` | bool | `False` | | Whether boot diagnostics should be enabled on the Virtual Machine. Boot diagnostics will be enabled with a managed storage account if no bootDiagnosticsStorageAccountName value is provided. If bootDiagnostics and bootDiagnosticsStorageAccountName values are not provided, boot diagnostics will be disabled. | +| `bootDiagnosticStorageAccountName` | string | `''` | | Custom storage account used to store boot diagnostic information. Boot diagnostics will be enabled with a custom storage account if a value is provided. | | `bootDiagnosticStorageAccountUri` | string | `[format('.blob.{0}/', environment().suffixes.storage)]` | | Storage account boot diagnostic base URI. | | `certificatesToBeInstalled` | array | `[]` | | Specifies set of certificates that should be installed onto the virtual machine. | | `configurationProfileAssignments` | array | `[]` | | Any VM configuration profile assignments. |