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

Feature: Add Microsoft.Authorization/locks; Lock resources #3756

Open
mehighlow opened this issue Feb 2, 2024 · 3 comments
Open

Feature: Add Microsoft.Authorization/locks; Lock resources #3756

mehighlow opened this issue Feb 2, 2024 · 3 comments
Labels
new-feature new-resource Requests for new supported resources
Milestone

Comments

@mehighlow
Copy link
Contributor

mehighlow commented Feb 2, 2024

Add implementation to lock resources to prevent them from being destroyed in the Azure Portal while ASO keeps managing them.

Lock your resources to protect your infrastructure

Let's say I want to minimize any chance of my resources being deleted while I manage them with ASO. From the ASO side, I have an option to set serviceoperator.azure.com/reconcile-policy: detach-on-delete to prevent accidental deletes of K8s objects from being reconciled with Azure. However, those resources can still be deleted from the Azure Portal. It would be great to use ASO to have an option to set a lock to prevent them from being deleted from the Azure Portal.

There are 2 types of locks:

  1. Read-only, which can be projected to serviceoperator.azure.com/reconcile-policy: skip
  2. Delete - this feature request.

The way I propose implementing delete lock is through an annotation like serviceoperator.azure.com/reconcile-policy: lock-delete, which can be used only in combination with serviceoperator.azure.com/reconcile-policy: detach-on-delete, unless you consider combining them together into a single annotation like serviceoperator.azure.com/reconcile-policy: locked-detach-on-delete

@matthchr
Copy link
Member

matthchr commented Mar 4, 2024

This seems like a reasonable ask.

@matthchr matthchr added this to the v2.10.0 milestone Aug 26, 2024
@matthchr
Copy link
Member

Put in to 2.10 for design and discussion.

@theunrepentantgeek theunrepentantgeek modified the milestones: v2.10.0, v2.11.0 Oct 14, 2024
@matthchr matthchr modified the milestones: v2.11.0, v2.12.0 Oct 28, 2024
@theunrepentantgeek theunrepentantgeek modified the milestones: v2.12.0, v2.13.0 Nov 18, 2024
@theunrepentantgeek
Copy link
Member

At least part of the solution will involve importing Microsoft.Authorization/locks.

When the locks are in place, even ASO will be blocked from updates - which means natural drift might come into play. At the very least, ASO needs to know not to PUT a resource that's been locked, though it might be better if we couple this with #2811 (Resource should do a Diff with Azure)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature new-resource Requests for new supported resources
Projects
Development

No branches or pull requests

3 participants