
Google Cloud CreateDatabase
CertifiedCreate a Spanner database
Google Cloud CreateDatabase
Certified
Create a Spanner database
Creates a Spanner database with optional DDL statements.
yaml
type: io.kestra.plugin.gcp.spanner.CreateDatabaseExamples
Create a Spanner database with a table
yaml
id: spanner_create_database
namespace: company.team
tasks:
- id: create_db
type: io.kestra.plugin.gcp.spanner.CreateDatabase
projectId: "{{ secret('GCP_PROJECT_ID') }}"
instanceId: my-instance
databaseId: my-database
extraDdl:
- |
CREATE TABLE users (
id INT64 NOT NULL,
name STRING(256),
age INT64
) PRIMARY KEY (id)
Properties
databaseId *Requiredstring
The Spanner database ID
instanceId *Requiredstring
The Spanner instance ID
projectId *Requiredstring
The GCP project ID
emulatorHost string
Spanner emulator host (host: port), for local testing only
When set, the task connects to a local Spanner emulator instead of the real Spanner service.
extraDdl array
SubTypestring
Optional list of DDL statements to run upon creation
impersonatedServiceAccount string
The GCP service account to impersonate
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
scopes array
SubTypestring
The GCP scopes to be used
serviceAccount string
The GCP service account
Outputs
database string
The database name