Skip to content

AccessCertificate

Source: src/Cloudflare/Access/Certificate.ts

A Cloudflare Zero Trust Access mTLS certificate. Uploads a CA certificate that Access uses to validate client certificates presented to protected applications on the associated hostnames.

The certificate body is immutable — changing the PEM replaces the resource. The name and associated hostnames converge in place.

Upload a CA certificate

const ca = yield* Cloudflare.AccessCertificate("ClientCa", {
certificate: CA_PEM, // -----BEGIN CERTIFICATE----- ...
});

Certificate with associated hostnames

const ca = yield* Cloudflare.AccessCertificate("ClientCa", {
name: "corp-client-ca",
certificate: CA_PEM,
associatedHostnames: ["app.example.com"],
});
const ca = yield* Cloudflare.AccessCertificate("ClientCa", {
certificate: CA_PEM,
associatedHostnames: ["app.example.com", "admin.example.com"],
});