For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex CloudApplication Security

Virtual Machines are not backed up using Azure Backup misconfiguration detected in code

Rule Details

Cortex AppSec Rule ID

APPSEC2_AZURE_12

Category - Subcategory

Storage - Backups

Provider

AZURE

Severity

LOW

Framework

Terraform, Terraform Plan

Mapped CSPM/KSPM Rule

b312bd01-fc58-43a3-aa37-d67fe3bd01eb

Impact

Ensure that Azure Backup service is enabled and configured to create server backups for your Microsoft Azure virtual machines (VMs), in order to follow data security best practices and compliance requirements. Azure Backup service is a cost-effective, one-click backup solution, that simplifies virtual machine data recovery in your Azure cloud account. Once Azure Backup service is configured, your virtual machines are backed up according to a precise schedule defined within the appropriate backup policy, then recovery points are created from those backups and stored in the Azure Recovery Services vaults.

How to Fix

Resource: azurerm_backup_protected_vm, azurerm_virtual_machine [source,go]

resource "azurerm_virtual_machine" "example_ok" { name = "${var.prefix}-vm" location = azurerm_resource_group.main.location resource_group_name = azurerm_resource_group.main.name network_interface_ids = [azurerm_network_interface.main.id] vm_size = "Standard_DS1_v2" }

resource "azurerm_backup_protected_vm" "vm_protected_backup" { resource_group_name = azurerm_resource_group.example_ok.name recovery_vault_name = azurerm_recovery_services_vault.example_ok.name source_vm_id = azurerm_virtual_machine.example_ok.id backup_policy_id = azurerm_backup_policy_vm.example_ok.id }

Last updated

Was this helpful?