Skip to main content

Database

Database

Defines the high-level declarative intent for a managed database instance.

This manifest currently targets PostgreSQL clusters, translating into primary instances, read-pool instances, and associated IAM access controls.

PropertyTypeDescription
apiVersionstring
kindstring
metadatamap
specSpecUser-defined configuration for the database cluster.

Spec

Defines the user-provided configuration for the database cluster. Instructs the execution engine on sizing, tuning, and protection policies.

PropertyTypeDescription
descriptionstringThis description is optional but will drastically improve the understand of the AI assistant about the structural elements of the organization
cpuCountint64The number of vCPUs to allocate to each instance in the database cluster. This value is passed directly to the machine sizing constraints for both primary and read pool instances.
clusterSizeint64The total number of instances in the cluster. A size of 1 means a single primary instance with no read replicas. This controls the creation of read pool instances by spawning secondary nodes when the size is greater than 1.
configurationConfigurationAdvanced configuration options for the database instance. These fields govern engine execution flags and tuning settings mapped to the underlying managed instances.
backupConfigBackupConfigDefines the automated backup policy for the database cluster. These fields configure the automated backup schedules, retention periods, and windows.

BackupConfig

Defines the automated backup policies. Configures the underlying cluster to enforce snapshot schedules and retention rules.

PropertyTypeDescription
enabledboolIf true, automated backups will be enabled for the database cluster.
timeBasedRetentionSecint64The number of seconds to retain backups. Only one of time_based_retention_sec or quantity_based_retention can be set.
quantityBasedRetentionint64The number of backups to retain. Only one of time_based_retention_sec or quantity_based_retention can be set.
windowDurationstringThe duration of the backup window, in a format like 3600s.
daysOfWeeklist of stringA list of days of the week when backups are allowed to occur (e.g., MONDAY, WEDNESDAY).
hoursint64The hour of the day (in UTC) when the backup window starts.
minutesint64The minute of the hour when the backup window starts.

Configuration

Advanced PostgreSQL configuration parameters. Translates into the custom database flags mapped on the underlying compute instances to tune query performance.

PropertyTypeDescription
maxConnectionsint64The maximum number of concurrent connections allowed to the database.
autoExplainboolIf true, enables the auto_explain PostgreSQL module to log execution plans of slow queries.
googleColumnarEngineboolIf true, enables the AlloyDB columnar engine for accelerating analytical queries.
googleDbAdvisorboolIf true, enables the AlloyDB Index Advisor to provide recommendations for improving query performance.