Skip to content

feat: add GCP Cloud SQL database components#5275

Merged
forestileao merged 9 commits into
superplanehq:mainfrom
WashingtonKK:feat/gcp-cloudsql-database
Jun 12, 2026
Merged

feat: add GCP Cloud SQL database components#5275
forestileao merged 9 commits into
superplanehq:mainfrom
WashingtonKK:feat/gcp-cloudsql-database

Conversation

@WashingtonKK

@WashingtonKK WashingtonKK commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Closes #5325

Summary

Add create / get / delete database actions for Cloud SQL, managing logical databases inside an existing Cloud SQL instance:

  • gcp.cloudsql.createDatabase — create a database in an instance (waits for the async operation to finish), emitting the created database's details.
  • gcp.cloudsql.getDatabase — fetch a database's name/instance/charset/ collation/selfLink.
  • gcp.cloudsql.deleteDatabase — delete a database (waits for the operation), emitting a deletion confirmation.

Requires roles/cloudsql.admin (or cloudsql.editor) and the Cloud SQL Admin API enabled.

Demo Video

Add create / get / delete database actions for Cloud SQL, managing logical
databases inside an existing Cloud SQL instance:

- gcp.cloudsql.createDatabase — create a database in an instance (waits for
  the async operation to finish), emitting the created database's details.
- gcp.cloudsql.getDatabase — fetch a database's name/instance/charset/
  collation/selfLink.
- gcp.cloudsql.deleteDatabase — delete a database (waits for the operation),
  emitting a deletion confirmation.

The instance and database fields are integration-resource dropdowns (the
database dropdown is scoped to the selected instance). Calls the Cloud SQL
Admin API on sqladmin.googleapis.com via a package-local Client interface,
wired into the gcp integration (client factory, Actions, ListResources, IAM
note). Adds frontend mappers, unit tests, example outputs, and regenerated
component docs.

Requires roles/cloudsql.admin (or cloudsql.editor) and the Cloud SQL Admin
API enabled.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@superplanehq-integration

Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

@superplane-gh-integration-9000

Copy link
Copy Markdown

OSS Guard found dependency licenses that are not permitted for this project.

Project license (from repository): Apache-2.0

Permitted dependency licenses: MIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,Unlicense,CC0-1.0,CC-BY-4.0,Zlib,MPL-2.0,OpenSSL,BlueOak-1.0.0

Reason: One or more dependencies use licenses that are not compatible with the project license.

osv-scanner report:

@csstools/color-helpers 5.1.0 (npm) - MIT-0
argparse 2.0.1 (npm) - Python-2.0
csv 3.3.5 (RubyGems) - Ruby, BSD-2-Clause
elkjs 0.10.0 (npm) - EPL-2.0
khroma 2.1.0 (npm) - UNKNOWN
posthog-js 1.368.2 (npm) - non-standard
stdlib 1.26.2 (Go) - UNKNOWN

Add approved exceptions in your repository's osv-scanner.toml.

Add the official Google Cloud 'Cloud SQL' product icon (gcp.cloudsql.svg,
same official 24px icon set as the other gcp.* icons) and point the create/
get/delete database node mappers at it instead of the generic GCP icon.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@superplane-gh-integration-9000

Copy link
Copy Markdown

OSS Guard found dependency licenses that are not permitted for this project.

Project license (from repository): Apache-2.0

Permitted dependency licenses: MIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,Unlicense,CC0-1.0,CC-BY-4.0,Zlib,MPL-2.0,OpenSSL,BlueOak-1.0.0

Reason: One or more dependencies use licenses that are not compatible with the project license.

osv-scanner report:

@csstools/color-helpers 5.1.0 (npm) - MIT-0
argparse 2.0.1 (npm) - Python-2.0
csv 3.3.5 (RubyGems) - Ruby, BSD-2-Clause
elkjs 0.10.0 (npm) - EPL-2.0
khroma 2.1.0 (npm) - UNKNOWN
posthog-js 1.368.2 (npm) - non-standard
stdlib 1.26.2 (Go) - UNKNOWN

Add approved exceptions in your repository's osv-scanner.toml.

Comment thread pkg/integrations/gcp/cloudsql/common.go Outdated
- Frontend: hide unresolved expression values ({{ ... }}) and blanks from
  the node's metadata chips, matching the convention used by the other GCP
  mappers (event_helpers, image_helpers, monitoring, static_ip).
- Move the shared DatabaseNodeMetadata type to common.go (it is used by the
  create/get/delete actions), improving package cohesion.
- Add a props/metadata frontend test covering the chips and the expression
  guard.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@superplane-gh-integration-9000

Copy link
Copy Markdown

OSS Guard found dependency licenses that are not permitted for this project.

Project license (from repository): Apache-2.0

Permitted dependency licenses: MIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,Unlicense,CC0-1.0,CC-BY-4.0,Zlib,MPL-2.0,OpenSSL,BlueOak-1.0.0

Reason: One or more dependencies use licenses that are not compatible with the project license.

osv-scanner report:

@csstools/color-helpers 5.1.0 (npm) - MIT-0
argparse 2.0.1 (npm) - Python-2.0
csv 3.3.5 (RubyGems) - Ruby, BSD-2-Clause
elkjs 0.10.0 (npm) - EPL-2.0
khroma 2.1.0 (npm) - UNKNOWN
posthog-js 1.368.2 (npm) - non-standard
stdlib 1.26.2 (Go) - UNKNOWN

Add approved exceptions in your repository's osv-scanner.toml.

ListInstances issued a single instances.list request and ignored
nextPageToken, so projects with more instances than one page (500 by
default) had later instances omitted from the picker. Follow pageToken
until the response has no nextPageToken. Adds a pagination test.

(databases.list is not paginated, so it is left as-is.)

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@superplane-gh-integration-9000

Copy link
Copy Markdown

OSS Guard found dependency licenses that are not permitted for this project.

Project license (from repository): Apache-2.0

Permitted dependency licenses: MIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,Unlicense,CC0-1.0,CC-BY-4.0,Zlib,MPL-2.0,OpenSSL,BlueOak-1.0.0

Reason: One or more dependencies use licenses that are not compatible with the project license.

osv-scanner report:

@csstools/color-helpers 5.1.0 (npm) - MIT-0
argparse 2.0.1 (npm) - Python-2.0
csv 3.3.5 (RubyGems) - Ruby, BSD-2-Clause
elkjs 0.10.0 (npm) - EPL-2.0
khroma 2.1.0 (npm) - UNKNOWN
posthog-js 1.368.2 (npm) - non-standard
stdlib 1.26.2 (Go) - UNKNOWN

Add approved exceptions in your repository's osv-scanner.toml.

getHeaderIconSrc looked up APP_LOGO_MAP.gcp["cloudsql"], which had no
entry, so the create/get/delete database components fell back to the base
GCP icon in the component list and header. Map gcp.cloudsql.* to the
official Cloud SQL icon (the canvas node already used it via the mapper).

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@superplane-gh-integration-9000

Copy link
Copy Markdown

OSS Guard found dependency licenses that are not permitted for this project.

Project license (from repository): Apache-2.0

Permitted dependency licenses: MIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,Unlicense,CC0-1.0,CC-BY-4.0,Zlib,MPL-2.0,OpenSSL,BlueOak-1.0.0

Reason: One or more dependencies use licenses that are not compatible with the project license.

osv-scanner report:

@csstools/color-helpers 5.1.0 (npm) - MIT-0
argparse 2.0.1 (npm) - Python-2.0
csv 3.3.5 (RubyGems) - Ruby, BSD-2-Clause
elkjs 0.10.0 (npm) - EPL-2.0
khroma 2.1.0 (npm) - UNKNOWN
posthog-js 1.368.2 (npm) - non-standard
stdlib 1.26.2 (Go) - UNKNOWN

Add approved exceptions in your repository's osv-scanner.toml.

Match the console's create-database dialog by letting workflows set the
character set and collation for a new logical database. Both fields are
optional and omitted from the request when blank, so the database
engine's defaults apply as before. The Cloud SQL Database resource has
no labels field, so instance-level labels remain the only labeling
option.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@superplane-gh-integration-9000

Copy link
Copy Markdown

OSS Guard found dependency licenses that are not permitted for this project.

Project license (from repository): Apache-2.0

Permitted dependency licenses: MIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,Unlicense,CC0-1.0,CC-BY-4.0,Zlib,MPL-2.0,OpenSSL,BlueOak-1.0.0

Reason: One or more dependencies use licenses that are not compatible with the project license.

osv-scanner report:

@csstools/color-helpers 5.1.0 (npm) - MIT-0
argparse 2.0.1 (npm) - Python-2.0
csv 3.3.5 (RubyGems) - Ruby, BSD-2-Clause
elkjs 0.10.0 (npm) - EPL-2.0
khroma 2.1.0 (npm) - UNKNOWN
posthog-js 1.368.2 (npm) - non-standard
stdlib 1.26.2 (Go) - UNKNOWN

Add approved exceptions in your repository's osv-scanner.toml.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a1c45c8. Configure here.

Comment thread pkg/integrations/gcp/cloudsql/common.go
Replace the shared "completed" success state with per-action registries
so the node badge reflects what the component did: Create Database shows
CREATED, Get Database shows FETCHED, and Delete Database shows DELETED,
matching the per-action labels used by other integrations.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@superplane-gh-integration-9000

Copy link
Copy Markdown

OSS Guard found dependency licenses that are not permitted for this project.

Project license (from repository): Apache-2.0

Permitted dependency licenses: MIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,Unlicense,CC0-1.0,CC-BY-4.0,Zlib,MPL-2.0,OpenSSL,BlueOak-1.0.0

Reason: One or more dependencies use licenses that are not compatible with the project license.

osv-scanner report:

@csstools/color-helpers 5.1.0 (npm) - MIT-0
argparse 2.0.1 (npm) - Python-2.0
csv 3.3.5 (RubyGems) - Ruby, BSD-2-Clause
elkjs 0.10.0 (npm) - EPL-2.0
khroma 2.1.0 (npm) - UNKNOWN
posthog-js 1.368.2 (npm) - non-standard
stdlib 1.26.2 (Go) - UNKNOWN

Add approved exceptions in your repository's osv-scanner.toml.

This reverts commit a1c45c8.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@superplane-gh-integration-9000

Copy link
Copy Markdown

OSS Guard found dependency licenses that are not permitted for this project.

Project license (from repository): Apache-2.0

Permitted dependency licenses: MIT,Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,0BSD,Unlicense,CC0-1.0,CC-BY-4.0,Zlib,MPL-2.0,OpenSSL,BlueOak-1.0.0

Reason: One or more dependencies use licenses that are not compatible with the project license.

osv-scanner report:

@csstools/color-helpers 5.1.0 (npm) - MIT-0
argparse 2.0.1 (npm) - Python-2.0
csv 3.3.5 (RubyGems) - Ruby, BSD-2-Clause
elkjs 0.10.0 (npm) - EPL-2.0
khroma 2.1.0 (npm) - UNKNOWN
posthog-js 1.368.2 (npm) - non-standard
stdlib 1.26.2 (Go) - UNKNOWN

Add approved exceptions in your repository's osv-scanner.toml.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@forestileao forestileao merged commit 8e6885b into superplanehq:main Jun 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GCP] add cloud sql database create, get and delete components

2 participants