This script is designed to recursively list all folders within a specified Google Cloud Organization. It utilizes the gcloud
command-line tool to fetch and display the folder hierarchy.
Before running this script, ensure that you have the following prerequisites installed:
- Google Cloud SDK
- Bash shell (usually pre-installed on Linux and macOS)
Before using the script, you need to authenticate with Google Cloud and set your project:
gcloud auth login
gcloud config set project YOUR_PROJECT_ID
Replace YOUR_PROJECT_ID
with your actual Google Cloud project ID.
- Open the script in a text editor.
- Replace
YOUR_ORG_ID
with your actual Google Cloud Organization ID in the script. - Run the script in your terminal:
Ensure that the script has execute permissions. If not, run./list_folders.sh
chmod +x list_folders.sh
to make it executable.