diff --git a/list-bucket.sh b/list-bucket.sh index 63ba30d..4f6fe38 100755 --- a/list-bucket.sh +++ b/list-bucket.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -euo pipefail + AccessToken=$(gcloud auth print-identity-token) Response=$(aws sts assume-role-with-web-identity --role-arn "${AWS_ROLE_ARN}" --role-session "cloud-guild" --web-identity-token "$AccessToken") export AWS_ACCESS_KEY_ID=$(echo $Response | jq -r .Credentials.AccessKeyId)