gcloud-compute
Google Compute Engine resource management
TLDR
SYNOPSIS
gcloud compute resource command [options]
DESCRIPTION
gcloud compute is the command-line interface for Google Compute Engine, Google's Infrastructure-as-a-Service offering. It provides complete control over virtual machines, persistent disks, networks, load balancers, and other infrastructure primitives.The instances subcommand handles VM lifecycle operations including creation with customizable machine types, starting and stopping instances, and deletion. Network resources like VPCs, subnets, firewall rules, and routes are managed through their respective subcommands.Special convenience features include built-in SSH access via gcloud compute ssh, which automatically manages SSH keys and connection details, and gcloud compute scp for secure file transfers. The command group supports advanced features like custom images, snapshots, instance groups, and managed instance groups for autoscaling. All operations respect zones and regions, which must be specified either per-command or via configuration defaults.
PARAMETERS
--zone ZONE
Compute zone for the resource (e.g. us-central1-a).--region REGION
Compute region for regional resources.--project PROJECT
Google Cloud project ID to target.--format FORMAT
Output format (json, yaml, table, value).--filter EXPR
Filter results by expression.--help
Display help information.
SUBCOMMANDS
instances CMD
VM instance lifecycle (create, list, start, stop, delete, describe).disks CMD
Persistent disk operations.images CMD
Manage custom and public VM images.snapshots CMD
Create and manage disk snapshots.networks CMD
VPC networks, subnets and peering.firewall-rules CMD
Manage VPC firewall rules.ssh INSTANCE
SSH into an instance (automatically manages keys).scp SRC DEST
Copy files to or from an instance over SSH.
CAVEATS
Resources incur costs. Zone selection affects availability. Some operations take time.
HISTORY
gcloud compute is part of the Google Cloud SDK for managing Compute Engine, Google's Infrastructure-as-a-Service offering for running virtual machines.
SEE ALSO
gcloud(1), gcloud-container(1)
