do_settings
Creates, updates, deletes, gets or lists a do_settings resource.
Overview
| Name | do_settings |
| Type | Resource |
| Id | digitalocean.databases.do_settings |
Fields
The following fields are returned by SELECT queries:
- databases_get_do_settings
A JSON object with a key of do_settings.
| Name | Datatype | Description |
|---|---|---|
service_cnames | array | An 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
databases_get_do_settings | select | database_cluster_uuid | 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. | |
databases_update_do_settings | replace | database_cluster_uuid, do_settings | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
database_cluster_uuid | string (uuid) | A unique identifier for a database cluster. (example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30) |
SELECT examples
- databases_get_do_settings
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
- databases_update_do_settings
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;