Skip to content

Commit 93becd5

Browse files
Add --no-wait to az keyvault purge
1 parent c1ee759 commit 93becd5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

TROUBLESHOOTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ python shared/python/show_soft_deleted_resources.py --purge --yes
264264

265265
# Manual purge
266266
az apim deletedservice purge --service-name <name> --location <location>
267-
az keyvault purge --name <name> --location <location>
267+
az keyvault purge --name <name> --location <location> --no-wait
268268
```
269269

270270
**Best Practices:**

shared/python/infrastructures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ def _cleanup_single_resource(resource: dict) -> tuple[bool, str]:
10541054
purge_cmd = f"az apim deletedservice purge --service-name {resource_name} --location \"{location}\""
10551055
elif resource_type == 'keyvault':
10561056
delete_cmd = f"az keyvault delete -n {resource_name} -g {rg_name}"
1057-
purge_cmd = f"az keyvault purge -n {resource_name} --location \"{location}\""
1057+
purge_cmd = f"az keyvault purge -n {resource_name} --location \"{location}\" --no-wait"
10581058
else:
10591059
return False, f"Unknown resource type: {resource_type}"
10601060

shared/python/show_soft_deleted_resources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def show_deleted_key_vaults(vaults: list):
133133
print(f' Purge Date : {scheduled_purge}')
134134
print(f' Purge Protection : {"🔒 ENABLED" if purge_protection else "❌ Disabled"}')
135135
print(f' Vault ID : {vault_id}')
136-
print(f' Purge AZ CLI : az keyvault purge --name {vault_name} --location "{location}"')
136+
print(f' Purge AZ CLI : az keyvault purge --name {vault_name} --location "{location}" --no-wait')
137137
print()
138138

139139
if protected_vaults:
@@ -142,7 +142,7 @@ def show_deleted_key_vaults(vaults: list):
142142
print()
143143

144144
print('To purge a Key Vault (without purge protection):')
145-
print(' az keyvault purge --name <name> --location <location>')
145+
print(' az keyvault purge --name <name> --location <location> --no-wait')
146146
print()
147147
print('To recover a Key Vault:')
148148
print(' az keyvault recover --name <name>')

0 commit comments

Comments
 (0)