VERSION:1.0.0
Published over 3 years ago by @cto.ai
cto.ai/
cloudsql

CTO Banner

CloudSQL Op

An Op that facilitates the management of CloudSQL instances in GCP (Google Cloud Platform).

Requirements

Ops Platform

Running this op requires you to have access to the Ops Platform. Please review the documentation for detailed instructions on how to install the Ops CLI and/or Ops Slack application.

GCP Credentials

A GCP Service Account is required to use this Op. The following predefined roles are required for all of the features in this Op to function as expected:

  • Cloud SQL Admin
  • Cloud SQL Viewer

Please refer to this URL for instructions on how to create a service account with the above mentioned permissions. Once created, you will need to also generate a private key for the respective service account and download it to your computer (JSON). When ready, run the following command to save the credentials as a secret in your Ops team, replacing with the full path to your credentials JSON file:

ops secrets:set -k GOOGLE_APPLICATION_CREDENTIALS -v "$(cat <key_file> | tr -d '\n')"

Usage

CLI

ops run cloudsql

Slack

/ops run cloudsql

Features

  • List all existing CloudSQL instances
  • Provision new public CloudSQL instances
  • Delete existing CloudSQL instances
  • Clone existing CloudSQL instances

CloudSQL Op Walkthrough - Watch video

CloudSQL Op Walkthrough - Watch video

Local Development / Running from Source

1. Clone the repo:

git clone <git url>

2. Navigate into the directory and install dependencies:

cd cloudsql

3. Run the Op from your current working directory with:

ops run . --build

Contributing

See the Contributing Docs for more information

Contributors


Min Sohng


Ruxandra Fediuc

License

MIT