#!/bin/bash #folder=default #folder=dev #folder=infra #folder=prod folder=staging for instance in `cat instances.$folder`; do echo -ne " $instance \t\t" sa=`yc --profile $folder compute instance get $instance | grep ^service_account_id: | cut -f2 -d:` echo $sa done; unset instance