certificate_packs
Creates, updates, deletes, gets or lists a certificate_packs resource.
Overview
| Name | certificate_packs |
| Type | Resource |
| Id | cloudflare.ssl.certificate_packs |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get Certificate Pack response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
certificate_authority | string | Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions see this page for more details. (google, lets_encrypt, ssl_com) (example: lets_encrypt) |
certificates | array | Array of certificates in this pack. |
cloudflare_branding | boolean | Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true. |
dcv_delegation_records | array | DCV Delegation records for domain validation. |
hosts | array | Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty. (x-stainless-collection-type: set, x-stainless-terraform-configurability: computed_optional) |
primary_certificate | string | Identifier of the primary certificate in a pack. (example: 7e7b8deba8538af625850b7b2530034c) |
status | string | Status of certificate pack. (initializing, pending_validation, deleted, pending_issuance, pending_deployment, pending_deletion, pending_expiration, expired, active, initializing_timed_out, validation_timed_out, issuance_timed_out, deployment_timed_out, deletion_timed_out, pending_cleanup, staging_deployment, staging_active, deactivating, inactive, backup_issued, holding_deployment) (example: initializing) |
type | string | Type of certificate pack. (mh_custom, managed_hostname, sni_custom, universal, advanced, total_tls, keyless, legacy_custom) (example: universal) |
validation_errors | array | Domain validation errors that have been received by the certificate authority (CA). |
validation_method | string | Validation Method selected for the order. (txt, http, email) (example: txt) |
validation_records | array | Certificates' validation records. |
validity_days | integer | Validity Days selected for the order. (14, 30, 90, 365) |
List Certificate Packs response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
certificate_authority | string | Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions see this page for more details. (google, lets_encrypt, ssl_com) (example: lets_encrypt) |
certificates | array | Array of certificates in this pack. |
cloudflare_branding | boolean | Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true. |
dcv_delegation_records | array | DCV Delegation records for domain validation. |
hosts | array | Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty. (x-stainless-collection-type: set, x-stainless-terraform-configurability: computed_optional) |
primary_certificate | string | Identifier of the primary certificate in a pack. (example: 7e7b8deba8538af625850b7b2530034c) |
status | string | Status of certificate pack. (initializing, pending_validation, deleted, pending_issuance, pending_deployment, pending_deletion, pending_expiration, expired, active, initializing_timed_out, validation_timed_out, issuance_timed_out, deployment_timed_out, deletion_timed_out, pending_cleanup, staging_deployment, staging_active, deactivating, inactive, backup_issued, holding_deployment) (example: initializing) |
type | string | Type of certificate pack. (mh_custom, managed_hostname, sni_custom, universal, advanced, total_tls, keyless, legacy_custom) (example: universal) |
validation_errors | array | Domain validation errors that have been received by the certificate authority (CA). |
validation_method | string | Validation Method selected for the order. (txt, http, email) (example: txt) |
validation_records | array | Certificates' validation records. |
validity_days | integer | Validity Days selected for the order. (14, 30, 90, 365) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | certificate_pack_id, zone_id | For a given zone, get a certificate pack. | |
list | select | zone_id | page, per_page, status, deploy | For a given zone, list all active certificate packs. |
create | insert | zone_id, type, hosts, validation_method, validity_days, certificate_authority | For a given zone, order an advanced certificate pack. | |
edit | update | certificate_pack_id, zone_id | For a given zone, restart validation or add cloudflare branding for an advanced certificate pack. The former is only a validation operation for a Certificate Pack in a validation_timed_out status. | |
delete | delete | certificate_pack_id, zone_id | For a given zone, delete an advanced certificate pack. |
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 |
|---|---|---|
certificate_pack_id | string | |
zone_id | string | The Cloudflare zone ID. |
deploy | string | |
page | number | |
per_page | number | |
status | string |
SELECT examples
- get
- list
For a given zone, get a certificate pack.
SELECT
id,
certificate_authority,
certificates,
cloudflare_branding,
dcv_delegation_records,
hosts,
primary_certificate,
status,
type,
validation_errors,
validation_method,
validation_records,
validity_days
FROM cloudflare.ssl.certificate_packs
WHERE certificate_pack_id = '{{ certificate_pack_id }}' -- required
AND zone_id = '{{ zone_id }}' -- required
;
For a given zone, list all active certificate packs.
SELECT
id,
certificate_authority,
certificates,
cloudflare_branding,
dcv_delegation_records,
hosts,
primary_certificate,
status,
type,
validation_errors,
validation_method,
validation_records,
validity_days
FROM cloudflare.ssl.certificate_packs
WHERE zone_id = '{{ zone_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND status = '{{ status }}'
AND deploy = '{{ deploy }}'
;
INSERT examples
- create
- Manifest
For a given zone, order an advanced certificate pack.
INSERT INTO cloudflare.ssl.certificate_packs (
certificate_authority,
cloudflare_branding,
hosts,
type,
validation_method,
validity_days,
zone_id
)
SELECT
'{{ certificate_authority }}' /* required */,
{{ cloudflare_branding }},
'{{ hosts }}' /* required */,
'{{ type }}' /* required */,
'{{ validation_method }}' /* required */,
{{ validity_days }} /* required */,
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: certificate_packs
props:
- name: zone_id
value: "{{ zone_id }}"
description: Required parameter for the certificate_packs resource.
- name: certificate_authority
value: "{{ certificate_authority }}"
description: |
Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities)
valid_values: ['google', 'lets_encrypt', 'ssl_com']
- name: cloudflare_branding
value: {{ cloudflare_branding }}
description: |
Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.
- name: hosts
value:
- "{{ hosts }}"
description: |
Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty.
- name: type
value: "{{ type }}"
description: |
Type of certificate pack.
valid_values: ['advanced']
- name: validation_method
value: "{{ validation_method }}"
description: |
Validation Method selected for the order.
valid_values: ['txt', 'http', 'email']
- name: validity_days
value: {{ validity_days }}
description: |
Validity Days selected for the order.
valid_values: ['14', '30', '90', '365']
UPDATE examples
- edit
For a given zone, restart validation or add cloudflare branding for an advanced certificate pack. The former is only a validation operation for a Certificate Pack in a validation_timed_out status.
UPDATE cloudflare.ssl.certificate_packs
SET
cloudflare_branding = {{ cloudflare_branding }}
WHERE
certificate_pack_id = '{{ certificate_pack_id }}' --required
AND zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
For a given zone, delete an advanced certificate pack.
DELETE FROM cloudflare.ssl.certificate_packs
WHERE certificate_pack_id = '{{ certificate_pack_id }}' --required
AND zone_id = '{{ zone_id }}' --required
;