Skip to content

Github action which will start a Google Cloud SQL Proxy as Docker container.

License

Notifications You must be signed in to change notification settings

wagnerpereira/gce-cloudsql-proxy-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Google Cloud SQL Proxy

Github action which will start a Google Cloud SQL Proxy.

Prerequisites

Set up the following resources manually in the Cloud Console or use a tool like Terraform.

Github Action Inputs

Variable Description
creds Automatically exported as a short-lived Service Account JSON Key
instance Required Cloud SQL connection name
port Listen on port, default 5432
version Cloud SQL Proxy version, default latest

Example Usage

jobs:
  job_id:
    # ...

    # Add "id-token" with the intended permissions.
    permissions:
      contents: 'read'
      id-token: 'write'

    steps:
    - uses: 'actions/checkout@v3'

    - id: 'auth'
      name: 'Authenticate to Google Cloud'
      uses: 'google-github-actions/auth@v0'
      with:
        workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
        service_account: '[email protected]'

    - uses: wagnerpereira/gce-cloudsql-proxy-action@v2
      with:
        instance: my-project:us-central1:instance-1

About

Github action which will start a Google Cloud SQL Proxy as Docker container.

Resources

License

Stars

Watchers

Forks

Packages

No packages published