From 39f5fd62d3b6a0bbdd67b9c4ba6d4617606b20ba Mon Sep 17 00:00:00 2001 From: Vlad Rusu Date: Thu, 9 Jul 2026 14:25:16 +1200 Subject: [PATCH] feat: only allow tf-dev and tf-prod cluster Filter out any cluster that does not match the official naming convention tf-dev-* and tf-prod-* --- .github/workflows/reusable-gatekeeper.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-gatekeeper.yml b/.github/workflows/reusable-gatekeeper.yml index 6d12117..8a3ad70 100644 --- a/.github/workflows/reusable-gatekeeper.yml +++ b/.github/workflows/reusable-gatekeeper.yml @@ -102,7 +102,7 @@ jobs: CLUSTER_JSON=$(aws eks list-clusters \ --region "${{ inputs.aws-region }}" \ --query "clusters" \ - --output json | jq -c '.') + --output json | jq -c '[.[] | select(. | match("^tf-dev-"))]') echo "matrix=${CLUSTER_JSON}" >> $GITHUB_OUTPUT enumerate-prod-clusters: @@ -126,7 +126,7 @@ jobs: CLUSTER_JSON=$(aws eks list-clusters \ --region "${{ inputs.aws-region }}" \ --query "clusters" \ - --output json | jq -c '.') + --output json | jq -c '[.[] | select(. | match("^tf-prod-"))]') echo "matrix=${CLUSTER_JSON}" >> $GITHUB_OUTPUT gatekeeper-enforce-dev: