# License: see accompanying Hari Sekhon LICENSE file
#
@ -14,21 +16,39 @@
#
set -euo pipefail
[ -n "${debug:-}" ] && set -x
#srcdir="$(dirname "${bash_source[0]}")"
[ -n "${DEBUG:-}" ] && set -x
srcdir="$(dirname "${BASH_SOURCE[0]}")"
# XXX: Edit
# XXX: Edit - crucial to set to the right environment, the rest of the inferred settings below depend on this
export AWS_PROFILE="default"
# XXX: Edit
export AWS_DEFAULT_REGION="eu-west-2"
AWS_ACCOUNT="$(aws sts get-caller-identity --query Account --output text || aws configure get sso_account_id || :)"
export AWS_ACCOUNT
AWS_DEFAULT_REGION="$(aws configure get region || :)" # use region configured in profile by default
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION:-eu-west-2}" # XXX: Edit default fallback region
export AWS_DEFAULT_REGION
export AWS_DEFAULT_OUTPUT=json
# XXX: Edit
export EKS_CONTEXT="MYCONTEXT"
export EKS_CLUSTER="mycluster"
# If EKS_CLUSTER isn't set and there is only one EKS cluster in this account and region, then use it - smart, but slower, prefer setting it explicitly for speed