certificate
Generated on 18 Nov 2025
from digitalocean.cloud version
v1.2.1
Synopsis
Manage CDN endpoints: create, update, delete, purge cache. View the API documentation at https://docs.digitalocean.com/reference/api/api-reference/#operation/cdn_create_endpoint.
Requirements
- pydo >= 0.1.3
- azure-core >= 1.26.1
Parameters
| Parameter | Choices / Default | Description |
|---|---|---|
certificate_chainstr |
The full PEM-formatted trust chain between the certificate authority’s certificate and your domain’s SSL certificate. | |
client_override_optionsdict |
Client override options (developer use). For example, can be used to override the DigitalOcean API endpoint for an internal test suite. If provided, these options will knock out existing options. | |
dns_nameslist / elements=str |
An array of fully qualified domain names (FQDNs) for which the certificate was issued. A certificate covering all subdomains can be issued using a wildcard (e.g. *.example.com). |
|
leaf_certificatestr |
The contents of a PEM-formatted public SSL certificate. | |
module_override_optionsdict |
Module override options (developer use). Can be used to override module options to support experimental or future options. If provided, these options will knock out existing options. | |
namestr / required |
A unique human-readable name referring to a certificate. To create a certificate from Let’s Encrypt, provide dns_names. To create a custom certificate, provide private_key, leaf_certificate, and optionally certificate_chain. View API documentation at https://docs.digitalocean.com/reference/api/api-reference/#operation/certificates_create. |
|
private_keystr |
The contents of a PEM-formatted private-key corresponding to the SSL certificate. | |
statestr |
Choices:
|
State of the resource, present to create, absent to destroy. |
timeoutint |
Default: 300 |
Polling timeout in seconds. |
tokenstr |
DigitalOcean API token. There are several environment variables which can be used to provide this value. DIGITALOCEAN_ACCESS_TOKEN, DIGITALOCEAN_TOKEN, DO_API_TOKEN, DO_API_KEY, DO_OAUTH_TOKEN and OAUTH_TOKEN |
Examples
- name: Create custom certificate
digitalocean.cloud.certificate:
token: "{{ token }}"
name: custom.example.com
private_key: |
-----BEGIN PRIVATE KEY-----
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDE39Eyyp2QJIp6
IvXELS4L+Wa8dAM4Uk0enV3PJKm2a674Ys0WSle2dzsd1EfpRXMNTt+iPZCyZQIS
...
leaf_certificate: |
-----BEGIN CERTIFICATE-----
MIIF8jCCA9oCCQDHvZvzJneVuzANBgkqhkiG9w0BAQsFADCBujELMAkGA1UEBhMC
VVMxETAPBgNVBAgMCE1pY2hpZ2FuMRQwEgYDVQQHDAtHcmFuZCBCbGFuYzETMBEG
...
- name: Create Let's Encrypt certificate
digitalocean.cloud.certificate:
token: "{{ token }}"
name: letsencrypt.example.com
dns_names:
- letsencrypt.example.comReturn Values
| Key | Returned | Description |
|---|---|---|
certificatedict |
always | Certificate. Sample: |
errordict |
failure | DigitalOcean API error. Sample: |
msgstr |
always | Certificate result information. Sample: |