File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
tests/tekton-resources/tasks/teardown Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,13 @@ spec:
53
53
if [ "$PIA_ROLE_EXISTS" == "$PIA_ROLE_NAME" ]; then
54
54
# Detach all attached managed policies
55
55
aws iam list-attached-role-policies --role-name "$PIA_ROLE_NAME" \
56
- --query 'AttachedPolicies[*].PolicyArn' --output text | while read -r policy_arn; do
56
+ --query 'AttachedPolicies[*].PolicyArn' --output json | jq -r '.[]' | while read -r policy_arn; do
57
57
echo "Detaching managed policy: $policy_arn"
58
58
aws iam detach-role-policy --role-name "$PIA_ROLE_NAME" --policy-arn "$policy_arn"
59
59
done
60
60
# Delete all inline policies
61
61
aws iam list-role-policies --role-name "$PIA_ROLE_NAME" \
62
- --query 'PolicyNames' --output text | while read -r policy_name; do
62
+ --query 'PolicyNames' --output json | jq -r '.[]' | while read -r policy_name; do
63
63
echo "Deleting inline policy: $policy_name"
64
64
aws iam delete-role-policy --role-name "$PIA_ROLE_NAME" --policy-name "$policy_name"
65
65
done
You can’t perform that action at this time.
0 commit comments