Skip to content

Commit

Permalink
grabs aws account no, region & k8s cluster name automatically (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahadarsh authored Sep 25, 2024
1 parent 0649353 commit 27217d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/aws/eks-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ prompt_with_default() {
echo "${user_input:-$default_value}"
}

CLUSTER_NAME=$(prompt_with_default "Enter cluster name" "")
REGION=$(prompt_with_default "Enter AWS region" "us-east-1")
AWS_ACCOUNT_ID=$(prompt_with_default "AWS account ID" "")
CLUSTER_NAME=$(kubectl config current-context | awk -F'/' '{print $NF}')
REGION=$(kubectl config current-context | awk -F':' '{print $4}')
AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)

## Enable IAM OIDC Provider
eksctl utils associate-iam-oidc-provider --cluster $CLUSTER_NAME --region $REGION --approve
Expand Down

0 comments on commit 27217d9

Please sign in to comment.