Reputation: 803
We recently added a deletion lock to our Cosmos DB Account and we know it's working because it blocked a container deletion from a Terraform change. We have another ASP.Net Core service using the latest .Net Confluent Client that deletes and recreates a container as a quick way to delete all the documents in the container. Surprisingly, the lock is NOT preventing the container deletion using SDK's call to container.DeleteContainerAsync.
Any insight as to why the Cosmos DB deletion lock isn't preventing the container deletion from the SDK?
Upvotes: 1
Views: 811
Reputation: 136126
Any insight as to why the Cosmos DB deletion lock isn't preventing the container deletion from the SDK?
This is because the Terraform operation (which essentially translates into a resource manager operation) is a control plane
operation which honors locking of resources whereas the operation performed by the SDK is a data plane
operation that does not honor resource locking. In fact, a data plane operation is not even aware of any resource locking.
Upvotes: 1