ekristen / azure-nuke

Remove all resources from an Azure Tenant and it's Subscriptions.
https://ekristen.github.io/azure-nuke/
MIT License
32 stars 7 forks source link

ERRO[0016] the context used must have a deadline attached for polling purposes, but got no deadline #54

Closed andrewfraley closed 5 months ago

andrewfraley commented 5 months ago

I'm seeing the following error when it tries to delete resource groups:

ERRO[0015] the context used must have a deadline attached for polling purposes, but got no deadline
eastus/rg2 - ResourceGroup - myResourceGroup - [Location: "eastus", Name: "myResourceGroup", SubscriptionId: "REDACTED"] - failed

Note I am able to successfully run the following while logged in as the same service principal:

az group create --name myResourceGroup --location eastus
az group delete --name myResourceGroup --yes --no-wait
ekristen commented 5 months ago

Thanks. I haven't had the time to dedicate to testing and I apologize for the issues. I'll try and get to this this week. This should be pretty straightforward fix.

andrewfraley commented 5 months ago

Thanks, it's no problem at all and I'm happy to be the guinea pig. I'm greatly appreciative that this tool exists, otherwise my team would have to write it ourselves :)

ekristen commented 5 months ago

Happy to accept help and pull requests, although I would ask if you want to contribute to let me get this initial rewrite done and then it'll be much easier to contribute and maintain.

ekristen commented 5 months ago

@andrewfraley I did a bunch of work tonight to bring this up to where it should be at right now.

Please get the latest next binary and give it a shot. I did testing of removing a bunch of resources.

I also had to rework a few things around regions/subscriptions and resource groups. I've updated the PR with the details https://github.com/ekristen/azure-nuke/pull/45

ekristen commented 5 months ago

Try this one https://github.com/ekristen/azure-nuke/releases/tag/v1.0.0-next.8

andrewfraley commented 5 months ago

@ekristen thanks, I think there's a new issue where if I don't specify "all" in the regions, it will filter out the resource groups. So for example I have a resource group in eastus and I have eastus in my config.yaml regions list, but the resource groups in eastus all show as filtered. If I add "all" to the region list then it properly wants to delete them.

ekristen commented 5 months ago

I did test that scenario, could have missed something though. Can you share you config with me? Or let me know if you have any additional filters? I'll take a look later today.

ekristen commented 5 months ago

@andrewfraley I missed a rename of a variable reference.

ekristen commented 5 months ago

:tada: This issue has been resolved in version 1.0.0-next.10 :tada:

The release is available on GitHub release :rocket:

andrewfraley commented 5 months ago

@ekristen it's working great now. Thanks!

ekristen commented 5 months ago

Anytime. Any additional feedback is welcome.

ekristen commented 4 months ago

:tada: This issue has been resolved in version 1.0.0-beta.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

ekristen commented 1 month ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: