From d0a0c109dad68bf544ff5311be7b586e7ce35b64 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 23 Sep 2025 15:18:37 -0400 Subject: [PATCH] fix: skip attaching role policies if they do not exist The IAM controller is one example where there is no recommended-policy-arn, which causes the `aws iam attach-role-policy` command to fail. --- docs/content/docs/user-docs/irsa.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/content/docs/user-docs/irsa.md b/docs/content/docs/user-docs/irsa.md index 7a13646c2a..76bc72eb9b 100644 --- a/docs/content/docs/user-docs/irsa.md +++ b/docs/content/docs/user-docs/irsa.md @@ -133,6 +133,9 @@ INLINE_POLICY_URL=${BASE_URL}/config/iam/recommended-inline-policy INLINE_POLICY="$(wget -qO- ${INLINE_POLICY_URL})" while IFS= read -r POLICY_ARN; do + if [ -z "$POLICY_ARN" ]; then + continue + fi echo -n "Attaching $POLICY_ARN ... " aws iam attach-role-policy \ --role-name "${ACK_CONTROLLER_IAM_ROLE}" \