File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -400,7 +400,12 @@ for enabled in $initEnabledList; do
400400done
401401
402402# 8. Check the task role permissions
403- taskRoleArn=$( echo " ${taskDefJson} " | jq -r " .taskDefinition.taskRoleArn" )
403+ overriddenTaskRole=true
404+ taskRoleArn=$( echo " ${describedTaskJson} " | jq -r " .tasks[0].overrides.taskRoleArn" )
405+ if [[ " x${taskRoleArn} " = " xnull" ]]; then
406+ overriddenTaskRole=false
407+ taskRoleArn=$( echo " ${taskDefJson} " | jq -r " .taskDefinition.taskRoleArn" )
408+ fi
404409
405410hasRole=true
406411isEC2Role=false
@@ -436,7 +441,11 @@ else
436441 else
437442 printf " ${COLOR_DEFAULT} Task Role Permissions | "
438443 fi
439- printf " ${taskRoleArn} \n"
444+ printf " ${taskRoleArn} "
445+ if [[ " x${overriddenTaskRole} " = " xtrue" ]]; then
446+ printf " (Overridden)"
447+ fi
448+ printf " \n"
440449 # # Required Permissions
441450 # ## SSM
442451 ssm=" ssmmessages:"
You can’t perform that action at this time.
0 commit comments