azure-rest-api-specs
azure-rest-api-specs copied to clipboard
RecoveryServices Deleting Backup VM not Removing it From the Collection
Hi team,
Opening this issue to discuss the delete
API of the backup protected item (e.g. Azure IaaS VM) of a backup vault in recovery service. Currently, delete
API is not removing the entry. Instead, it changes the property value of protectionState
to ProtectionStopped
.
In Terraform, a resource is usually considered as deleted when the get
api returns 404 NotFound
result, however for this resource after the delete
, the resource still exists. So in Terraform, there needs to be a workaround to check the value of protectionState
to determine if the deletion succeeded (Currently there is no so the delete operation continues waiting for 404 until timeout).
Compared with Azure Key Vault, if a key is soft-deleted, the deleted key is kept in the deleted keys list where a user can recover it, and the get
request returns 404
for the deleted key. This sounds like a more reasonable behavior of delete
api.
Swagger link: https://github.com/Azure/azure-rest-api-specs/blob/321ab887a62bbf2aa2c4099bb5ab4437726fd132/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/bms.json#L1297
Reference issue: https://github.com/hashicorp/terraform-provider-azurerm/issues/4276
@myc2h6o Thank you for reaching out, we are looking into it.
Adding Service team to look into this.
Thanks for the update. The original issue in Terraform AzureRM provider has been resolved by https://github.com/hashicorp/terraform-provider-azurerm/pull/16939. Feel free to close this issue.
@myc2h6o Thanks for the update. We will now proceed with closure of this GitHub issue. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.
@navba-MSFT @myc2h6o looks like the original FR in this PR is still valid/unfixed, however - so shouldn't this remain open until it's fixed?
@navba-MSFT could you help re-open the issue and see if service team consider the original ask a valid feature request?