We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a71ce68 + bdc8eaf commit 3d9a8b1Copy full SHA for 3d9a8b1
scripts/kubernetes_context.sh
@@ -17,7 +17,7 @@ current_cluster=$(kubectl config view --minify --output 'jsonpath={.contexts[?(@
17
current_namespace=$(kubectl config view --minify --output 'jsonpath={.contexts[?(@.name=="'$current_context'")].context.namespace}'; echo)
18
19
current_account_id=""
20
-if [[ "$current_cluster" =~ ^arn:aws:eks:[a-z0-9\-]*:[0-9]*:cluster/[a-z0-9\-]*$ ]]; then
+if [[ "$current_cluster" =~ ^arn:(aws|aws-[a-z\-]*-gov):eks:[a-z0-9\-]*:[0-9]*:cluster/[a-z0-9\-]*$ ]]; then
21
if [ "$extract_account" = "true" ]; then
22
current_account_id=$(echo "$current_cluster" | cut -d':' -f5)
23
fi
0 commit comments