File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -799,19 +799,20 @@ function _list_cloudwatch_dashboards() {
799799function _delete_cloudwatch_dashboards() {
800800 local workspace=$1
801801 if [ -z " $workspace " ]; then
802- echo " Error: Workspace substring must be provided. Refusing to delete all dashboards."
802+ echo -e " ${RED} Error: Workspace substring must be provided. Refusing to delete all dashboards.${NC} "
803803 return 1
804804 fi
805805
806806 local dashboards=$( aws cloudwatch list-dashboards --output json)
807807 dashboards=$( echo " $dashboards " | jq -r --arg SUBSTRING " $workspace " ' .DashboardEntries[] | select(.DashboardName | contains($SUBSTRING)) | .DashboardName' )
808808
809- [ -z " $dashboards " ] && echo " No CloudWatch Dashboards found for deletion." && return 0
809+ [ -z " $dashboards " ] && echo -e " ${RED} No CloudWatch Dashboards found for deletion.${NC} " && return 0
810810
811- echo " Deleting the following CloudWatch Dashboards:"
811+ echo -e " ${GREEN} Deleting the following CloudWatch Dashboards:"
812812 for dashboard in $dashboards ; do
813- echo " $dashboard "
813+ echo -e " $dashboard "
814814 done
815+ echo -e " ${NC} "
815816 aws cloudwatch delete-dashboards --dashboard-names $dashboards
816817}
817818
You can’t perform that action at this time.
0 commit comments