Skip to main content

astroctl_cloud_gcp_connect

astroctl cloud gcp connect

Link your GCP project to AstroPulse

Synopsis

Grant AstroPulse access to your GCP project to create and manage GKE clusters.

Generates a setup script and opens Google Cloud Shell in your browser. Run the script there — it creates the required IAM service account and permissions. Cloud Shell uses your browser's active Google account, so make sure that account has access to the target project.

Use --local to save the script and run it yourself with a local gcloud install.

If --project-number is not provided, astroctl looks it up with local gcloud. When provided, astroctl verifies it locally when possible; the setup script always checks it matches --project-id before making any changes. Find your project number: GCP Console > IAM & Admin > Settings > Project number Or run: gcloud projects describe PROJECT_ID --format='value(projectNumber)'

Find your project ID: GCP Console > IAM & Admin > Settings

astroctl cloud gcp connect [flags]

Examples

# Connect GCP project (opens Cloud Shell in browser)
astroctl cloud gcp connect --project-id my-project --region us-central1 --cluster-name prod

# Connect with an explicit project number
astroctl cloud gcp connect --project-id my-project --project-number 123456789012 --region us-central1 --cluster-name prod

# Save the setup script locally and run it in another terminal with gcloud access
astroctl cloud gcp connect --project-id my-project --region us-central1 --cluster-name prod --local

# Save script under a custom filename
astroctl cloud gcp connect --project-id my-project --region us-central1 --cluster-name prod --output setup.sh

Options

--cluster-name string Cluster name for this connection (required)
--duration string Credential duration (e.g., 30m, 1h) (default "1h")
--force-update Force reconfiguration even if already set up
-h, --help help for connect
--level string Cloud access level: read or manage (default: manage) (default "manage")
--local Save setup script for local gcloud access and wait while you run it in another terminal
-o, --output string Custom filename for the setup script (default: astro-gcp-setup-<cluster-name>.sh)
--project-id string GCP project ID (required)
--project-number string GCP project number (optional; looked up with local gcloud if omitted)
--region string GCP region (e.g., us-central1) (required)

SEE ALSO