Pipeline: 8.2 Ensure Virtual Machines are utilizing Managed Disks
Description
Migrate blob-based VHDs to Managed Disks on Virtual Machines to exploit the default features of this configuration. The features include: 1) Default Disk Encryption. 2) Resilience, as Microsoft will managed the disk storage and move around if underlying hardware goes faulty. 3) Reduction of costs over storage accounts.
Managed disks are by default encrypted on the underlying hardware, so no additional encryption is required for basic protection. It is available if additional encryption is required. Managed disks are by design more resilient that storage accounts.
For ARM-deployed Virtual Machines, Azure Adviser will at some point recommend moving VHDs to managed disks both from a security and cost management perspective.
Remediation
From Azure Portal
- Using the search feature, go to
Virtual Machines
. - Select the virtual machine you would like to convert.
- Select
Disks
in the menu for the VM. - At the top select
Migrate to managed disks
. - You may follow the prompts to convert the disk and finish by selecting
Migrate
to start the process.
NOTE VMs will be stopped and restarted after migration is complete.
From PowerShell
Stop-AzVM -ResourceGroupName $rgName -Name $vmName -ForceConvertTo-AzVMManagedDisk -ResourceGroupName $rgName -VMName $vmNameStart-AzVM -ResourceGroupName $rgName -Name $vmName
Default Value
Managed disks or are an option upon the creation of VMs.
Run the pipeline
To run this pipeline from your terminal:
flowpipe pipeline run azure_cis.pipeline.cis_v300_8_2
Use this pipeline
To call this pipeline from your pipeline, use a step:
step "pipeline" "step_name" { pipeline = azure_cis.pipeline.cis_v300_8_2 }
Params
Name | Type | Required | Description | Default |
---|---|---|---|---|
database | connection.steampipe | Yes | Database connection string. | connection.steampipe.default |
notifier | notifier | Yes | The name of the notifier to use for sending notification messages. | notifier.default |
notification_level | string | Yes | The verbosity level of notification messages to send. Valid options are 'verbose', 'info', 'error'. | info |
Outputs
This pipeline has no outputs.