Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to destroy VM protected items with soft delete enabled #15438

Closed
mpjtaylor opened this issue Feb 15, 2022 · 2 comments
Closed

Unable to destroy VM protected items with soft delete enabled #15438

mpjtaylor opened this issue Feb 15, 2022 · 2 comments

Comments

@mpjtaylor
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform 1.1.4
AzureRm 2.90 or 2.95

Affected Resource(s)

azurerm_backup_protected_vm

Terraform Configuration Files

data "azurerm_backup_policy_vm" "policy" {
  count               = local.backup
  name                = local.vm_backuppolicy
  recovery_vault_name = data.azurerm_recovery_services_vault.vault.name
  resource_group_name = data.azurerm_recovery_services_vault.vault.resource_group_name
  depends_on          = [data.azurerm_recovery_services_vault.vault]
}

resource "azurerm_backup_protected_vm" "backup" {
  count               = local.backup
  recovery_vault_name = data.azurerm_recovery_services_vault.vault.name
  resource_group_name = data.azurerm_recovery_services_vault.vault.resource_group_name
  source_vm_id        = local.virtual_machine_id
  backup_policy_id    = data.azurerm_backup_policy_vm.policy[0].id
}

resource "azurerm_recovery_services_vault" "support" {
  name                = var.vault_name
  location            = var.primary_location
  resource_group_name = var.resource_group_name
  sku                 = var.sku
  soft_delete_enabled = true
}

Debug Output

Error: waiting for Azure Backup protected VM context deadline exceeded

Expected Behaviour

The virtual machine and backup should be removed from the vault

Actual Behaviour

Virtual machine cannot be destroyed, the error
Error: waiting for Azure Backup protected VM context deadline exceeded

Steps to Reproduce

  1. terraform plan
  2. terraform apply

References

* #4276

@tombuildsstuff
Copy link
Contributor

Duplicate of #4276

@tombuildsstuff tombuildsstuff marked this as a duplicate of #4276 Feb 16, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants