From b165fec0ed971fc54c47a746eb15454c8c808eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Reegn?= Date: Thu, 19 Jan 2023 18:38:12 +0100 Subject: [PATCH] Add AWS partitions support to EKS kubernetes cluster names The AWS ARN in govcloud and china looks different to the currently supported one: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/using-govcloud-arns.html https://docs.amazonaws.cn/en_us/aws/latest/userguide/ARNs.html This change introduces support for all possible AWS partitions. --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 85873ffb..ea59a50f 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4520,7 +4520,7 @@ prompt_kubecontext() { text=$cloud_cluster fi # arn:aws:eks:us-east-1:123456789012:cluster/cluster-01 - elif [[ $cluster == (#b)arn:aws:eks:([[:alnum:]-]##):([[:digit:]]##):cluster/(?*) ]]; then + elif [[ $cluster == (#b)arn:aws[[:alnum:]-]#:eks:([[:alnum:]-]##):([[:digit:]]##):cluster/(?*) ]]; then cloud_name=eks cloud_zone=$match[1] cloud_account=$match[2]