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

Add delete_resources_batches script #896

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vkumbha
Copy link
Contributor

@vkumbha vkumbha commented Jan 10, 2025

$ python3 delete_resources_batches.py --profile punisher  --resource-id  342438312747854   --disable --execute

Testing connection to https://punisher-turbot.cloud.turbot-dev.com ...
Success! Status Code: 200

Disabling discovery policies for resource ID: 342438312747854...
Found 9 policies to update.
Updating policy tmod:@turbot/azure-activedirectory#/policy/types/customDomainCmdb to 'Skip'...
Updating policy tmod:@turbot/azure-activedirectory#/policy/types/clientSecretCmdb to 'Skip'...
Updating policy tmod:@turbot/azure-activedirectory#/policy/types/servicePrincipalCmdb to 'Skip'...
Updating policy tmod:@turbot/azure-activedirectory#/policy/types/applicationCmdb to 'Skip'...
Updating policy tmod:@turbot/azure-activedirectory#/policy/types/groupCmdb to 'Skip'...
Updating policy tmod:@turbot/azure-activedirectory#/policy/types/userCmdb to 'Skip'...
Creating policy tmod:@turbot/azure-activedirectory#/policy/types/directoryCmdb with 'Skip'...
Creating policy tmod:@turbot/azure#/policy/types/managementGroupCmdb with 'Skip'...
Creating policy tmod:@turbot/azure#/policy/types/subscriptionCmdb with 'Skip'...

Fetching descendants for deletion...

Found 1213 resources (including parent) to delete.

Starting resource deletion...
Deleting resource 342505562164080...
Deleting resource 342505574488759...
Deleting resource 342505564868505...
Deleting resource 342505575002991...
Deleting resource 342505562331050...
Deleting resource 342505575531520...
Deleting resource 342505572318395...
Deleting resource 342505567358781...
Deleting resource 342505652234344...
Deleting resource 342505562937455...
Deleting resource 342505564694357...
Deleting resource 342505564052983...
.
.
Cooldown: Waiting 30 seconds before the next batch...
.

@vkumbha vkumbha requested a review from dboeke January 10, 2025 12:55
@vkumbha vkumbha self-assigned this Jan 10, 2025
@rajlearner17 rajlearner17 self-assigned this Jan 23, 2025
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

Successfully merging this pull request may close these issues.

2 participants