Skip to content

Commit

Permalink
test: Fix cleanup of drift vpc elements (#4810)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored Oct 12, 2023
1 parent 2fce593 commit fa0abbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/e2e/cleanup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ runs:
for name in $(aws iam list-instance-profiles --query "InstanceProfiles[*].{Name:InstanceProfileName}" --output text); do
tags=$(aws iam list-instance-profile-tags --instance-profile-name $name --output json || true)
if [[ $(echo $tags | jq -r '.Tags[] | select(.Key == "testing/cluster") | .Value') == "${{ inputs.cluster_name }}" ]]; then
echo "Deleting instance profile '$name'..."
roleName=$(aws iam get-instance-profile --instance-profile-name $name --query "InstanceProfile.Roles[*].{Name:RoleName}" --output text)
aws iam remove-role-from-instance-profile --instance-profile-name $name --role-name $roleName
aws iam delete-instance-profile --instance-profile-name $name
break
fi
done
- name: delete-cluster
Expand Down

0 comments on commit fa0abbc

Please sign in to comment.