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

Enable easy cleanup #1

Open
yodobrin opened this issue Jun 13, 2022 · 5 comments
Open

Enable easy cleanup #1

yodobrin opened this issue Jun 13, 2022 · 5 comments

Comments

@yodobrin
Copy link

a cool feature might be to clean up resource by type.

@azurekid
Copy link
Contributor

So what we could do is add the PowerShell command to the workbook to clean-up the resources.
Doing this automated can be a risk and requires extra permissions.

Another option could be to add a FunctionApp and feed it the query from the workbook to clean the orphaned resources. The managed Identity of this function app could be used for authentication to the subscription.

dolevshor pushed a commit that referenced this issue Feb 13, 2024
@francesco1119
Copy link

Removing with a click is to risky.
But maybe we can have the PowerShell code for deleting that resource generated automatically.
This way people might want to:

  • copy/paste the code in Azure CLI and delete the resource by themselves
  • Ideally create an automation that copy/paste the code and execute

@gardnerjr
Copy link

@dolevshor workbooks supports an action in links/action steps called "ARM Action", which shows a confirmation prompt, and the author of the worbook controls what shows up in the confirmation as markdown/etc.

here's an example i have locally in the workbooks test cases:

image

@gardnerjr
Copy link

another option would be: instead of actually DELETING the resources in workbooks, you could have ARM Action that adds specific tag(s) to the resources? like adding a tag to all the resources:

image

then you could use something else (or even azure policy maybe?) to delete things with specific tags in bulk?

@dolevshor
Copy link
Owner

dolevshor commented May 12, 2024

Hi @gardnerjr,

Thanks a lot for the suggestions.
It is definitely a very useful addition to the workbook and it joins to the backlog.

The goal at the end is not just to recognize the orphaned resources, it's to remove those resources safely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants