Skip to content

Instantly share code, notes, and snippets.

@jsimonweb
jsimonweb / start-stop-cloud-sql-instance.go
Last active April 22, 2021 18:24
Google Cloud Function triggered by Pub/Sub message to start or stop a Cloud SQL instance
// Package p contains a Pub/Sub Cloud Function.
package p
import (
"context"
"encoding/json"
"log"
"golang.org/x/oauth2/google"
sqladmin "google.golang.org/api/sqladmin/v1beta4"
@jsimonweb
jsimonweb / cloud-function-export-cloud-sql-db.go
Last active April 18, 2021 22:46
Google Cloud Function triggered by Pub/Sub message to export Cloud SQL database
// Package p contains a Pub/Sub Cloud Function.
package p
import (
"context"
"encoding/json"
"fmt"
"log"
"time"
@jsimonweb
jsimonweb / README.md
Last active March 6, 2023 18:27
Getting Started with Google Cloud SQL - Scripts used for the demonstration video.