Spanner provisioning

From GoogleCloudPlatform/cloud-solutions · View interactive version

Spanner provisioning is an AI agent skill from the GitHub repository GoogleCloudPlatform/cloud-solutions. Guidelines and rules for provisioning Google Cloud Spanner instances, including selecting the correct edition (Enterprise vs Standard) and compute capacity based on schema features (e.g., graphs and vector search) and environment purpose.

How to use this skill

Skill file

Spanner Instance Provisioning Guidelines

<!--

Disabling markdownlint MD029 to provide explicit ordering to avoid

confusing the LLM.

-->

<!-- markdownlint-disable MD029 -->

Use this skill when provisioning, configuring, or updating a Cloud Spanner

instance in this repository.

1. Edition Selection Rules

Spanner features are associated with specific database editions. To optimize

costs while ensuring functionality:

features such as:

in the DDL.

CREATE VECTOR INDEX in the DDL.

do not use graph traversal or vector search.

2. Compute Capacity Rules

Compute capacity (processing units) must be chosen based on the environment's

purpose:

minimize cloud expenditures.

(equivalent to 1 node) or higher as required by workload demands, unless

autoscaling is configured.

3. Idempotency and Schema Application

When applying DDL schemas to an existing Spanner database:

CREATE TABLE, CREATE PROPERTY GRAPH, or CREATE VECTOR INDEX) will return

errors if the object already exists.

objects (e.g., node tables) already exist in the database.

table name is present) to determine if the schema has been initialized.

creation DDL statements.

as ALTER TABLE) rather than running the full creation script.

database before applying the full schema.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.