Feature Request: Resource locks #187
-
Given that we would like to encourage CI/CD, it would be a useful to have some protection on key resources, to discourage them from being deleted by rogue pipelines. Suggest a resource lock may be a good way to achieve this, particularly for storage accounts and key vaults. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Thanks @bricrsa for submitting this feature request. For Key Vaults we are using Purge protection and Soft Delete. That is certainly a better way compared to resource locks. Do you agree? |
Beta Was this translation helpful? Give feedback.
-
Agree that this is best placed for storage accounts and soft delete and purge protection is better for AKV. |
Beta Was this translation helpful? Give feedback.
-
Preventing customers from accidentally deleting their storage accounts is a very good idea, and placing a Description of IssueA
Alternative SolutionsPreventing data loss is obviously very important so we still need a way to help customers secure their data platforms. I have two alternative solutions that protect data without using
Solution for Enterprise-Scale AnalyticsSince Enterprise-Scale Analytics is meant to provide best practice guidance, we should rely heavily on the Storage Account Recovery feature of Azure. While using an immutability policy will work, it feels a little bit like a hack so I would not recommend that we include it as part of the deployment templates. Instead, we can include it in the documentation and make sure that CSA's at Microsoft are aware of this option. |
Beta Was this translation helpful? Give feedback.
Preventing customers from accidentally deleting their storage accounts is a very good idea, and placing a
cannot-delete
lock on the storage accounts seems like a logical way to achieve this. However, these locks have unexpected effects that make it very difficult to use them.Description of Issue
A
cannot-delete
lock does, in fact, prevent a storage account from being deleted. But it also prevents the deletion of the storage account's child ARM resources. These include:cannot-delete
lock, you can still add RBAC assignments to the account. However, you can't remove assignments. This makes it very difficult to properly manage permissions on you…