# Date: 2020-08-25 16:39:17 +0100 (Tue, 25 Aug 2020)
#
# https://github.com/harisekhon/bash-tools
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help improve or steer this or other code I publish
#
# https://www.linkedin.com/in/harisekhon
#
set -euo pipefail
[ -n "${DEBUG:-}"]&&set -x
srcdir="$(cd"$(dirname "$0")"&&pwd)"
# shellcheck disable=SC1090
. "$srcdir/lib/utils.sh"
# shellcheck disable=SC2034,SC2154
usage_description="
Run a command against each GCP project in the current account
# don't need to capture and replace project in config as done in environment variable now as it's much safer as it's limited to only this script and its child processes
#current_project="$(gcloud config list --format="value(core.project)")"
#if [ -n "$current_project" ]; then
# # want interpolation now not at exit
# # shellcheck disable=SC2064
# trap "gcloud config set project '$current_project'" EXIT