Database
Database
Declares a managed database instance and its logical databases.
Set one engine, AlloyDB (PostgreSQL) or Cloud Spanner, in the engine oneof. Applications reference the logical databases by name.
| Property | Type | Description |
|---|---|---|
| apiVersion | string | API schema version. Must be lowops.manifests.v1. |
| kind | string | Resource kind. Must be Database. |
| metadata | map | The engine reads the reserved keys name and project to resolve this manifest and its parent Project. |
| spec | Spec | Desired configuration. See Spec. |
Spec
User-authored database configuration.
The engine, its size and the logical databases to create.
| Property | Type | Description |
|---|---|---|
| description | string | Optional free text. The engine copies it to auxiliary resources. AI assistants use it as context. |
| databases | list of DatabaseDefinition | Logical databases to create. Applications reference them by name in accessControl.database.schema. See DatabaseDefinition. |
| alloydb | AlloyDBConfig | AlloyDB (PostgreSQL) engine configuration. See AlloyDBConfig. |
| spanner | SpannerConfig | Cloud Spanner engine configuration. See SpannerConfig. |
AlloyDBConfig
AlloyDB (PostgreSQL) engine configuration.
It provisions an AlloyDB cluster with Private Service Connect, a primary instance, optional read-pool instances, and the databases, roles and grants.
| Property | Type | Description |
|---|---|---|
| cpuCount | int64 | vCPUs for each primary and read-pool instance. Must be at least 1. |
| clusterSize | int64 | Total instances in the cluster. Must be at least 1. A value of 1 means one primary and no read replicas. Values above 1 add that many read-pool instances. |
| configuration | Configuration | Advanced PostgreSQL tuning. NOT YET IMPLEMENTED. The engine ignores it. See Configuration. |
| backupConfig | BackupConfig | Automated backup policy. The engine validates and normalizes it but does not yet provision it. See BackupConfig. |
BackupConfig
Automated backup policy for the AlloyDB cluster.
PARTIALLY IMPLEMENTED. The engine validates these fields but does not yet provision a backup policy.
| Property | Type | Description |
|---|---|---|
| enabled | bool | If true, validation requires one retention strategy and checks the window ranges. It only gates validation, because the engine does not yet provision the policy. |
| timeBasedRetentionSec | int64 | Seconds to retain automated backups. Mutually exclusive with quantity_based_retention. Set one of the two if enabled is true. |
| quantityBasedRetention | int64 | Number of automated backups to retain. Mutually exclusive with time_based_retention_sec. Set one of the two if enabled is true. |
| windowDuration | string | NOT YET IMPLEMENTED. The engine ignores this field. It will bound the daily backup window, for example 3600s. |
| daysOfWeek | list of string | Weekdays on which backups can run, for example MONDAY. Default: ["SUNDAY"]. The engine does not use it yet. |
| hours | int64 | Start hour of the backup window (0-23, UTC). If you enable backups, validation checks the range. |
| minutes | int64 | Start minute of the backup window (0-59). If you enable backups, validation checks the range. |
Configuration
Advanced PostgreSQL tuning parameters.
NOT YET IMPLEMENTED. The engine ignores these fields. They will set AlloyDB database flags.
| Property | Type | Description |
|---|---|---|
| maxConnections | int64 | Will set the PostgreSQL max_connections flag. Must be at least 1000. |
| autoExplain | bool | If true, will enable auto_explain to log plans of slow queries. |
| googleColumnarEngine | bool | If true, will enable the AlloyDB columnar engine. |
| googleDbAdvisor | bool | If true, will enable the AlloyDB Index Advisor. |
DatabaseDefinition
A logical database to provision on the instance.
Applications reference it by name in accessControl.database.schema. AlloyDB creates a PostgreSQL database with read/write group roles. Spanner creates a Spanner database.
| Property | Type | Description |
|---|---|---|
| name | string | Database name, for example team_1. Required. For Spanner: 2-30 characters, lowercase letters, digits, - or _, and a letter first. |
| extensions | list of string | PostgreSQL extensions to enable, for example uuid-ossp. AlloyDB only: validation rejects extensions on Spanner databases. |
SpannerConfig
Cloud Spanner engine configuration.
It provisions a regional Spanner instance with fixed capacity or autoscaling, and IAM-based access. It needs no VPC or proxy.
| Property | Type | Description |
|---|---|---|
| processingUnits | int64 | Fixed capacity in processing units (PU), from 100 to 9999, in multiples of 100. Mutually exclusive with autoscaling. If you set neither, the default is 100 PU. |
| autoscaling | bool | If true, Spanner manages the capacity and the engine ignores processing_units. Mutually exclusive with fixed capacity below 1000 PU. |
| region | string | GCP region of the instance, for example us-east1. If omitted, it comes from the parent Project. The instance config is regional-{region}. |
| edition | string | Spanner edition: STANDARD, ENTERPRISE or ENTERPRISE_PLUS. Default: STANDARD. Validation rejects any other value. |