Cloudflare/ssl
@swamp/cloudflare/sslv2026.07.24.1
01README
Cloudflare ssl infrastructure models
02Release Notes
- Updated: custom_csrs
03Models
@swamp/cloudflare/ssl/certificatesv2026.07.21.1certificates.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| zone_id | string | Cloudflare zone ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| certificate | string | The hostname certificate. |
| private_key | string | The hostname certificate's private key. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn create()
Create a Certificates
fn get(id: string)
Get a Certificates
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Certificates |
fn lookup()
Look up an existing Certificates by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Certificates by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Certificates to import |
fn delete(id: string)
Delete the Certificates
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Certificates |
fn sync(identifier?: string)
Sync Certificates state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Certificates by id (e.g. one discovered by list) |
Resources
state(infinite)— Certificates resource state
@swamp/cloudflare/ssl/client-certificatesv2026.07.21.1client_certificates.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| zone_id | string | Cloudflare zone ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| reactivate? | boolean | |
| csr | string | The Certificate Signing Request (CSR). Must be newline-encoded. |
| validity_days | number | The number of days the Client Certificate will be valid after the issued_on date. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn create()
Create a Client Certificates
fn get(id: string)
Get a Client Certificates
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Client Certificates |
fn lookup()
Look up an existing Client Certificates by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Client Certificates by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Client Certificates to import |
fn update(identifier?: string)
Update Client Certificates attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Client Certificates by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Client Certificates
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Client Certificates |
fn sync(identifier?: string)
Sync Client Certificates state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Client Certificates by id (e.g. one discovered by list) |
Resources
state(infinite)— Client Certificates resource state
@swamp/cloudflare/ssl/custom-certificatesv2026.07.21.1custom_certificates.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| zone_id | string | Cloudflare zone ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| bundle_method? | enum | A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. |
| certificate | string | The zone's SSL certificate or certificate and the intermediate(s). |
| custom_csr_id? | string | The identifier for the Custom CSR that was used. |
| deploy? | enum | The environment to deploy the certificate to, defaults to production. |
| geo_restrictions? | object | Specify the region where your private key can be held locally for optimal TLS performance. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Options allow distribution to only to U.S. data centers, only to E.U. data centers, or only to highest security data centers. Default distribution is to all Cloudflare datacenters, for optimal performance. |
| policy? | string | Specify the policy that determines the region where your private key will be held locally. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Any combination of countries, specified by their two letter country code (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) can be chosen, such as \ |
| private_key? | string | The zone's private key. Not required if custom_csr_id is provided, in which case the private key is retrieved from the CSR record held by Cloudflare. |
| type? | enum | The type 'legacy_custom' enables support for legacy clients which do not include SNI in the TLS handshake. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn create()
Create a Custom Certificates
fn get(id: string)
Get a Custom Certificates
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Custom Certificates |
fn lookup()
Look up an existing Custom Certificates by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Custom Certificates by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Custom Certificates to import |
fn update(identifier?: string)
Update Custom Certificates attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Custom Certificates by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Custom Certificates
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Custom Certificates |
fn sync(identifier?: string)
Sync Custom Certificates state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Custom Certificates by id (e.g. one discovered by list) |
Resources
state(infinite)— Custom Certificates resource state
@swamp/cloudflare/ssl/custom-csrsv2026.07.24.1custom_csrs.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id? | string | Cloudflare account ID (provide account_id or zone_id) |
| zone_id? | string | Cloudflare zone ID (provide account_id or zone_id) |
| common_name | string | The common name (domain) for the CSR. Must be at most 64 characters. |
| country | string | Two-letter ISO 3166-1 alpha-2 country code. |
| description? | string | Optional description for the CSR. |
| key_type? | enum | Key algorithm to use for the CSR. Defaults to rsa2048 if not specified. |
| locality | string | City or locality name. |
| name? | string | Human-readable name for the CSR. |
| organization | string | Organization name. |
| organizational_unit? | string | Organizational unit name. |
| sans | array | Subject Alternative Names for the CSR. At least one SAN is required. |
| state | string | State or province name. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn create()
Create a Custom Csrs
fn get(id: string)
Get a Custom Csrs
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Custom Csrs |
fn lookup()
Look up an existing Custom Csrs by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Custom Csrs by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Custom Csrs to import |
fn delete(id: string)
Delete the Custom Csrs
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Custom Csrs |
fn sync(identifier?: string)
Sync Custom Csrs state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Custom Csrs by id (e.g. one discovered by list) |
Resources
state(infinite)— Custom Csrs resource state
@swamp/cloudflare/ssl/custom-trust-storev2026.07.21.1custom_trust_store.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| zone_id | string | Cloudflare zone ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| certificate | string | The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn create()
Create a Custom Trust Store
fn get(id: string)
Get a Custom Trust Store
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Custom Trust Store |
fn lookup()
Look up an existing Custom Trust Store by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Custom Trust Store by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Custom Trust Store to import |
fn delete(id: string)
Delete the Custom Trust Store
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Custom Trust Store |
fn sync(identifier?: string)
Sync Custom Trust Store state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Custom Trust Store by id (e.g. one discovered by list) |
Resources
state(infinite)— Custom Trust Store resource state
@swamp/cloudflare/ssl/keyless-certificatesv2026.07.21.1keyless_certificates.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| zone_id | string | Cloudflare zone ID |
| enabled? | boolean | Whether or not the Keyless SSL is on or off. |
| host | string | The keyless SSL name. |
| name? | string | The keyless SSL name. |
| port | number | The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server. |
| tunnel? | object | Configuration for using Keyless SSL through a Cloudflare Tunnel. |
| bundle_method? | enum | A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it. |
| certificate | string | The zone's SSL certificate or SSL certificate and intermediate(s). |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn create()
Create a Keyless Certificates
fn get(id: string)
Get a Keyless Certificates
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Keyless Certificates |
fn lookup()
Look up an existing Keyless Certificates by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Keyless Certificates by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Keyless Certificates to import |
fn update(identifier?: string)
Update Keyless Certificates attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Keyless Certificates by id (e.g. one discovered by list) |
fn delete(id: string)
Delete the Keyless Certificates
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Keyless Certificates |
fn sync(identifier?: string)
Sync Keyless Certificates state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Keyless Certificates by id (e.g. one discovered by list) |
Resources
state(infinite)— Keyless Certificates resource state
@swamp/cloudflare/ssl/origin-tls-client-authv2026.07.21.1origin_tls_client_auth.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| zone_id | string | Cloudflare zone ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| certificate | string | The zone's leaf certificate. |
| private_key | string | The zone's private key. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn create()
Create a Origin Tls Client Auth
fn get(id: string)
Get a Origin Tls Client Auth
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Origin Tls Client Auth |
fn lookup()
Look up an existing Origin Tls Client Auth by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Origin Tls Client Auth by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Origin Tls Client Auth to import |
fn delete(id: string)
Delete the Origin Tls Client Auth
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Origin Tls Client Auth |
fn sync(identifier?: string)
Sync Origin Tls Client Auth state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Origin Tls Client Auth by id (e.g. one discovered by list) |
Resources
state(infinite)— Origin Tls Client Auth resource state
04Previous Versions
2026.07.21.1
- Updated: custom_trust_store
- Updated: client_certificates
- Updated: custom_certificates
- Updated: custom_csrs
- Updated: keyless_certificates
- Updated: origin_tls_client_auth
- Updated: certificates
2026.07.18.2
Modified 7 models
2026.06.08.2
- Updated: custom_trust_store
- Updated: client_certificates
- Updated: custom_certificates
- Updated: custom_csrs
- Updated: keyless_certificates
- Updated: origin_tls_client_auth
- Updated: certificates
2026.05.29.1
- Updated: custom_trust_store
- Updated: client_certificates
- Updated: custom_certificates
- Updated: custom_csrs
- Updated: keyless_certificates
- Updated: origin_tls_client_auth
- Updated: certificates
2026.05.22.1
- Added: custom_trust_store
- Added: client_certificates
- Added: custom_certificates
- Added: custom_csrs
- Added: keyless_certificates
- Added: origin_tls_client_auth
- Added: certificates
05Stats
A
100 / 100
Downloads
0
Archive size
31.9 KB
Verified by Swamp
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
06Platforms
07Labels