A community member has associated this post with a similar question:
Remove azure fileshare with RSV backup enabled via terraform gives error of share or snapshots may have active leases

Only moderators can edit this content.

Not able to remove fileshare with backup enabled via terraform in one region only

Po Cin Teo 5 Reputation points
2024-10-08T04:11:51.85+00:00

I have two recovery service vaults in two different regions, south east asia and west europe.

But I only get this error message when using terraform to destroy the azure fileshare that has snapshot inside for SEA only. I did the same testing for fileshare in west europe, no error at all.

deleting File Share "seashare" (Account "Account \"myseafileshare\" (IsEdgeZone false / ZoneName \"\" / Subdomain Type \"file\" / DomainSuffix \"core.windows.net\")"): executing request: unexpected status 

Both using the same azurerm provider 3.116.0 and I created both RSV using same terraform configuration except location. Both RSV have the soft delete enabled on these properties : Enable soft delete for cloud workloads, Enable soft delete and security settings for hybrid workloads.

I am able to terraform destroy the seashare after I turn off the Enable soft delete for cloud workloads, Enable soft delete and security settings for hybrid workloads and manually delete the snapshot for the seashare.

I checked the lease on the file as well. REST file lease: State -> Available , Lock -> Unlocked

Any idea on why the behaviour could be different when they are having same RSV setting / azure fileshare setting except location?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,833 questions
{count} votes