Skip to content

azurerm_backup_protected_vm not being exported (Backup Items from an Azure Recovery Service Vault) #607

@edsonestrella

Description

@edsonestrella

I am working with Azure Recovery Service Vault and I found the backup items are not being exported by the aztfexport process. Those resources are not in the aztfexportSkippedResources, so it seems those resource types are being ignored.

I was able to add into the terraform project/state by importing it with the next sentences:

import {
  id = "/subscriptions/xxxx03xx-4xx0-4xxb-9xxx-XXXXXcbdxxxxx/resourceGroups/rg-XXXXX-scus-Prod/providers/Microsoft.RecoveryServices/vaults/rv-XXXXXXX-scus-Prod-01/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;maz-wss-rg-01;vm-XXXXXXX/protectedItems/VM;iaasvmcontainerv2;maz-wss-rg-01;vm-XXXXXX"
  to = azurerm_backup_protected_vm.pvm-11
}
resource "azurerm_backup_protected_vm" "pvm-11" {
  resource_group_name = azurerm_resource_group.res-0.name
  recovery_vault_name = azurerm_recovery_services_vault.res-1.name
  source_vm_id        = "/subscriptions/xxxx03xx-4xx0-4xxb-9xxx-XXXXXcbdxxxxx/resourceGroups/xxxz-xx-rg-01/providers/Microsoft.Compute/virtualMachines/vm-XXXXXX"
  backup_policy_id    = azurerm_backup_policy_vm.res-5.id
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions