gcloud-info
Display information about Google Cloud SDK installation
TLDR
Display gcloud environment information
Check network connectivity and hidden properties
Print the contents of the most recent log file
SYNOPSIS
gcloud info [GLOBAL_FLAGS]
PARAMETERS
GLOBAL_FLAGS
The gcloud info command primarily uses global flags that apply to all gcloud commands. These flags control aspects like output formatting, verbosity, and interactive behavior. Common examples include:
--format=FORMAT
Sets the output format for the command result (e.g., json, yaml, table, text). Useful for parsing information programmatically.
--log-http
Prints all HTTP traffic to stderr, which can be useful for debugging network issues.
--verbosity=LEVEL
Sets the output verbosity (e.g., debug, info, warning, error, critical, none). Higher verbosity levels provide more detailed diagnostic output.
--quiet
Suppresses interactive prompts and messages, useful for scripting.
DESCRIPTION
The gcloud info command is a utility within the Google Cloud SDK that provides a comprehensive overview of your current gcloud environment and SDK installation. It's an invaluable tool for troubleshooting, verifying configurations, and understanding the state of your development setup.
It displays crucial details such as the active gcloud configuration, the currently authenticated account, the default project, zone, and region. Furthermore, it lists installed SDK components, their versions, and paths to important directories (like the SDK root, configuration directory, and logs). This command helps users quickly diagnose issues related to incorrect configurations, missing components, or outdated SDK versions, making it a first stop for debugging gcloud command failures.
CAVEATS
Requires the Google Cloud SDK to be installed and accessible in the system's PATH. The information displayed is reflective of the currently active gcloud configuration and components, which might not be global if multiple configurations exist or if the SDK is installed in different locations.
Some information, like component update status, requires an internet connection to check against Google Cloud repositories.
USAGE FOR TROUBLESHOOTING
gcloud info is often the first command to run when experiencing issues with other gcloud commands. It helps identify:
Incorrectly set default project, zone, or region.
Outdated or missing SDK components.
Issues with the active user account or permissions (though gcloud auth list provides more detail).
Problems with SDK installation paths or environment variables.
HISTORY
The gcloud info command has been a fundamental part of the Google Cloud SDK since its early days. As the SDK evolved, its purpose remained consistent: to provide a centralized diagnostic output for the user's local gcloud environment. It has been continuously maintained and updated to reflect changes in SDK structure, component management, and configuration mechanisms, ensuring it remains relevant for troubleshooting the ever-expanding set of gcloud commands and services.
SEE ALSO
gcloud components update(1), gcloud config list(1), gcloud auth list(1), gcloud topics configurations(1)