Skip to main content

do_settings

Creates, updates, deletes, gets or lists a do_settings resource.

Overview

Namedo_settings
TypeResource
Iddigitalocean.databases.do_settings

Fields

The following fields are returned by SELECT queries:

A JSON object with a key of do_settings.

NameDatatypeDescription
service_cnamesarrayAn array of custom CNAMEs for the database cluster. Each CNAME must be a valid RFC 1123 hostname (e.g., "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253 characters.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
databases_get_do_settingsselectdatabase_cluster_uuidTo retrieve the DigitalOcean-specific settings for a database cluster, send a GET request to /v2/databases/$DATABASE_ID/do_settings.
The response will include the current service_cnames configuration.
databases_update_do_settingsreplacedatabase_cluster_uuid, do_settingsTo update the DigitalOcean-specific settings for a database cluster, send a PUT request to /v2/databases/$DATABASE_ID/do_settings.
Currently, the only supported setting is service_cnames, which allows you to specify custom DNS names (CNAMEs) to be included in the TLS certificate Subject Alternative Names (SANs) for the database cluster nodes. This enables TLS verification when connecting via a custom hostname.
After updating, the database nodes will be replaced to apply the new certificate. This process is performed as a rolling replacement and does not cause downtime.
To clear all custom CNAMEs, send an empty array or omit the field.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
database_cluster_uuidstring (uuid)A unique identifier for a database cluster. (example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30)

SELECT examples

To retrieve the DigitalOcean-specific settings for a database cluster, send a GET request to /v2/databases/$DATABASE_ID/do_settings.
The response will include the current service_cnames configuration.

SELECT
service_cnames
FROM digitalocean.databases.do_settings
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}' -- required
;

REPLACE examples

To update the DigitalOcean-specific settings for a database cluster, send a PUT request to /v2/databases/$DATABASE_ID/do_settings.
Currently, the only supported setting is service_cnames, which allows you to specify custom DNS names (CNAMEs) to be included in the TLS certificate Subject Alternative Names (SANs) for the database cluster nodes. This enables TLS verification when connecting via a custom hostname.
After updating, the database nodes will be replaced to apply the new certificate. This process is performed as a rolling replacement and does not cause downtime.
To clear all custom CNAMEs, send an empty array or omit the field.

REPLACE digitalocean.databases.do_settings
SET
do_settings = '{{ do_settings }}'
WHERE
database_cluster_uuid = '{{ database_cluster_uuid }}' --required
AND do_settings = '{{ do_settings }}' --required;