Google Cloud
  • 10 Apr 2024
  • 1 Minute to read
  • Contributors
  • Dark

Google Cloud

  • Dark

Article Summary

The Google Cloud command line interface, or gcloud CLI, allows you to create and manage Google Cloud resources and services directly on the command line. With this component of the Cloud CLI extension, you can interact with Google Cloud directly from LimaCharlie.

This extension makes use of Google Cloud's native CLI tool, which can be found here.


The following example stops the specified GCP compute instance.

- action: extension request
  extension action: run
  extension name: ext-cloud-cli
  extension request:
    cloud: '{{ "gcloud" }}' 
      - compute
      - instances
      - stop
      - '{{ .routing.hostname }}'
    credentials: '{{ "hive://secret/secret-name" }}'


To utilize Google Cloud CLI capabilities, you will need:

  • A GCP service account JSON key. More information on service account keys can be found here.

  • Create a secret in the secrets manager in the following format:

        "type": "",
        "project_id": "",
        "private_key_id": "",
        "private_key": "",
        "client_email": "",
        "client_id": "",
        "auth_uri": "",
        "token_uri": "",
        "auth_provider_x509_cert_url": "",
        "client_x509_cert_url": "",
        "universe_domain": ""

Was this article helpful?

What's Next