certificate
Generated on 27 Jun 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_chain str |
The full PEM-formatted trust chain between the certificate authority’s certificate and your domain’s SSL certificate. | |
client_override_options dict |
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_names list / 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_certificate str |
The contents of a PEM-formatted public SSL certificate. | |
module_override_options dict |
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. | |
name str / 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_key str |
The contents of a PEM-formatted private-key corresponding to the SSL certificate. | |
state str |
Choices:
|
State of the resource, present to create, absent to destroy. |
timeout int |
Default: 300 |
Polling timeout in seconds. |
token str |
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.com
Return Values
Key | Returned | Description |
---|---|---|
certificate dict |
always | Certificate. Sample:
|
error dict |
failure | DigitalOcean API error. Sample:
|
msg str |
always | Certificate result information. Sample:
|