From 12107436c266fb8eb0bd0fe47b66daaee4ad4842 Mon Sep 17 00:00:00 2001 From: sondresjolyst Date: Wed, 22 Nov 2023 07:58:58 +0100 Subject: [PATCH] add resource-group to query --- .github/workflows/lock-resources.yml | 9 --------- .github/workflows/scripts/check_resource_lock.sh | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/lock-resources.yml b/.github/workflows/lock-resources.yml index 6edabd818..3300ba550 100644 --- a/.github/workflows/lock-resources.yml +++ b/.github/workflows/lock-resources.yml @@ -4,15 +4,6 @@ on: - cron: '0 18 * * *' workflow_dispatch: - - secrets: - AZURE_CLIENT_ID: - required: true - AZURE_SUBSCRIPTION_ID: - required: true - AZURE_TENANT_ID: - required: true - permissions: id-token: write contents: read diff --git a/.github/workflows/scripts/check_resource_lock.sh b/.github/workflows/scripts/check_resource_lock.sh index 1ab33de50..9233703ac 100755 --- a/.github/workflows/scripts/check_resource_lock.sh +++ b/.github/workflows/scripts/check_resource_lock.sh @@ -37,7 +37,7 @@ SLACK_WEBHOOK_URL="$(az keyvault secret show \ --name "${KV_SECRET_SLACK_WEBHOOK}" \ --subscription "${AZ_SUBSCRIPTION_ID}" | jq -r .value)" -CLUSTERS=$(az aks list --output json | jq '{k8s:[.[] | {name: .name, resourceGroup: .resourceGroup, id: .id}]}') +CLUSTERS=$(az aks list --resource-group "${AZ_RESOURCE_GROUP_CLUSTERS}" --output json | jq '{k8s:[.[] | {name: .name, resourceGroup: .resourceGroup, id: .id}]}') createLock() { local NAME=$1