Skip to content

Commit

Permalink
fix: Pod Identity cleanup issue when lab not complete (#885)
Browse files Browse the repository at this point in the history
Co-authored-by: erichei <erichei@amazon.com>
Co-authored-by: heinrichse <114415716+heinrichse@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Apr 5, 2024
1 parent 199d125 commit fd7be03
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

POD_ASSOCIATION_ID=$(aws eks list-pod-identity-associations --region $AWS_REGION --cluster-name $EKS_CLUSTER_NAME --service-account carts --namespace carts --output text --query 'associations[0].associationId')

if [ ! -z "$POD_ASSOCIATION_ID" ]; then
if [ "$POD_ASSOCIATION_ID" != "None" ]; then
logmessage "Deleting EKS Pod Identity Association..."

aws eks delete-pod-identity-association --region $AWS_REGION --association-id $POD_ASSOCIATION_ID --cluster-name $EKS_CLUSTER_NAME
Expand Down

0 comments on commit fd7be03

Please sign in to comment.