Skip to content

Commit 3ba3130

Browse files
committed
new workflow to delete resources
1 parent 78c4c24 commit 3ba3130

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Delete AKS Resources
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
RESOURCE_GROUP: rg-pvt-aks-h100
8+
LOCATION: eastus2
9+
10+
jobs:
11+
delete:
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
id-token: write
16+
contents: read
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Log in to Azure with federated identity (User Assigned Managed Identity)
23+
uses: azure/login@v2
24+
with:
25+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
26+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
27+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
28+
29+
- name: Delete Resource Group and all associated resources
30+
run: |
31+
echo "Deleting resource group: ${{ env.RESOURCE_GROUP }} in ${{ env.LOCATION }}"
32+
az group delete --name "${{ env.RESOURCE_GROUP }}" --yes --no-wait

0 commit comments

Comments
 (0)