published on Thursday, Apr 2, 2026 by Pulumi
published on Thursday, Apr 2, 2026 by Pulumi
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleClientCertificate = new cloudflare.ClientCertificate("example_client_certificate", {
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
csr: ` -----BEGIN CERTIFICATE REQUEST-----
MIICY....
-----END CERTIFICATE REQUEST-----
`,
validityDays: 3650,
});
import pulumi
import pulumi_cloudflare as cloudflare
example_client_certificate = cloudflare.ClientCertificate("example_client_certificate",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
csr=""" -----BEGIN CERTIFICATE REQUEST-----
MIICY....
-----END CERTIFICATE REQUEST-----
""",
validity_days=3650)
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewClientCertificate(ctx, "example_client_certificate", &cloudflare.ClientCertificateArgs{
ZoneId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
Csr: pulumi.String(" -----BEGIN CERTIFICATE REQUEST-----\n MIICY....\n -----END CERTIFICATE REQUEST-----\n"),
ValidityDays: pulumi.Int(3650),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleClientCertificate = new Cloudflare.ClientCertificate("example_client_certificate", new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
Csr = @" -----BEGIN CERTIFICATE REQUEST-----
MIICY....
-----END CERTIFICATE REQUEST-----
",
ValidityDays = 3650,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ClientCertificate;
import com.pulumi.cloudflare.ClientCertificateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleClientCertificate = new ClientCertificate("exampleClientCertificate", ClientCertificateArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.csr("""
-----BEGIN CERTIFICATE REQUEST-----
MIICY....
-----END CERTIFICATE REQUEST-----
""")
.validityDays(3650)
.build());
}
}
resources:
exampleClientCertificate:
type: cloudflare:ClientCertificate
name: example_client_certificate
properties:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
csr: |2
-----BEGIN CERTIFICATE REQUEST-----
MIICY....
-----END CERTIFICATE REQUEST-----
validityDays: 3650
Create ClientCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClientCertificate(name: string, args: ClientCertificateArgs, opts?: CustomResourceOptions);@overload
def ClientCertificate(resource_name: str,
args: ClientCertificateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClientCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
csr: Optional[str] = None,
validity_days: Optional[int] = None,
zone_id: Optional[str] = None,
reactivate: Optional[bool] = None)func NewClientCertificate(ctx *Context, name string, args ClientCertificateArgs, opts ...ResourceOption) (*ClientCertificate, error)public ClientCertificate(string name, ClientCertificateArgs args, CustomResourceOptions? opts = null)
public ClientCertificate(String name, ClientCertificateArgs args)
public ClientCertificate(String name, ClientCertificateArgs args, CustomResourceOptions options)
type: cloudflare:ClientCertificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ClientCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ClientCertificateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ClientCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClientCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClientCertificateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var clientCertificateResource = new Cloudflare.Index.ClientCertificate("clientCertificateResource", new()
{
Csr = "string",
ValidityDays = 0,
ZoneId = "string",
Reactivate = false,
});
example, err := cloudflare.NewClientCertificate(ctx, "clientCertificateResource", &cloudflare.ClientCertificateArgs{
Csr: pulumi.String("string"),
ValidityDays: pulumi.Int(0),
ZoneId: pulumi.String("string"),
Reactivate: pulumi.Bool(false),
})
var clientCertificateResource = new ClientCertificate("clientCertificateResource", ClientCertificateArgs.builder()
.csr("string")
.validityDays(0)
.zoneId("string")
.reactivate(false)
.build());
client_certificate_resource = cloudflare.ClientCertificate("clientCertificateResource",
csr="string",
validity_days=0,
zone_id="string",
reactivate=False)
const clientCertificateResource = new cloudflare.ClientCertificate("clientCertificateResource", {
csr: "string",
validityDays: 0,
zoneId: "string",
reactivate: false,
});
type: cloudflare:ClientCertificate
properties:
csr: string
reactivate: false
validityDays: 0
zoneId: string
ClientCertificate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ClientCertificate resource accepts the following input properties:
- Csr string
- The Certificate Signing Request (CSR). Must be newline-encoded.
- Validity
Days int - The number of days the Client Certificate will be valid after the issuedOn date
- Zone
Id string - Identifier.
- Reactivate bool
- Csr string
- The Certificate Signing Request (CSR). Must be newline-encoded.
- Validity
Days int - The number of days the Client Certificate will be valid after the issuedOn date
- Zone
Id string - Identifier.
- Reactivate bool
- csr String
- The Certificate Signing Request (CSR). Must be newline-encoded.
- validity
Days Integer - The number of days the Client Certificate will be valid after the issuedOn date
- zone
Id String - Identifier.
- 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 issuedOn date
- zone
Id string - Identifier.
- reactivate boolean
- csr str
- The Certificate Signing Request (CSR). Must be newline-encoded.
- validity_
days int - The number of days the Client Certificate will be valid after the issuedOn date
- zone_
id str - Identifier.
- reactivate bool
- 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 issuedOn date
- zone
Id String - Identifier.
- reactivate Boolean
Outputs
All input properties are implicitly available as output properties. Additionally, the ClientCertificate resource produces the following output properties:
- Certificate string
- The Client Certificate PEM
-
Client
Certificate Certificate Authority - Certificate Authority used to issue the Client Certificate
- Common
Name string - Common Name of the Client Certificate
- Country string
- Country, provided by the CSR
- Expires
On string - Date that the Client Certificate expires
- Fingerprint
Sha256 string - Unique identifier of the Client Certificate
- Id string
- The provider-assigned unique ID for this managed resource.
- Issued
On string - Date that the Client Certificate was issued by the Certificate Authority
- Location string
- Location, provided by the CSR
- Organization string
- Organization, provided by the CSR
- Organizational
Unit string - Organizational Unit, provided by the CSR
- Serial
Number string - The serial number on the created Client Certificate.
- Signature string
- The type of hash used for the Client Certificate..
- Ski string
- Subject Key Identifier
- State string
- State, provided by the CSR
- Status string
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- Certificate string
- The Client Certificate PEM
-
Client
Certificate Certificate Authority - Certificate Authority used to issue the Client Certificate
- Common
Name string - Common Name of the Client Certificate
- Country string
- Country, provided by the CSR
- Expires
On string - Date that the Client Certificate expires
- Fingerprint
Sha256 string - Unique identifier of the Client Certificate
- Id string
- The provider-assigned unique ID for this managed resource.
- Issued
On string - Date that the Client Certificate was issued by the Certificate Authority
- Location string
- Location, provided by the CSR
- Organization string
- Organization, provided by the CSR
- Organizational
Unit string - Organizational Unit, provided by the CSR
- Serial
Number string - The serial number on the created Client Certificate.
- Signature string
- The type of hash used for the Client Certificate..
- Ski string
- Subject Key Identifier
- State string
- State, provided by the CSR
- Status string
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- certificate String
- The Client Certificate PEM
-
Client
Certificate Certificate Authority - Certificate Authority used to issue the Client Certificate
- common
Name String - Common Name of the Client Certificate
- country String
- Country, provided by the CSR
- expires
On String - Date that the Client Certificate expires
- fingerprint
Sha256 String - Unique identifier of the Client Certificate
- id String
- The provider-assigned unique ID for this managed resource.
- issued
On String - Date that the Client Certificate was issued by the Certificate Authority
- location String
- Location, provided by the CSR
- organization String
- Organization, provided by the CSR
- organizational
Unit String - Organizational Unit, provided by the CSR
- serial
Number String - The serial number on the created Client Certificate.
- signature String
- The type of hash used for the Client Certificate..
- ski String
- Subject Key Identifier
- state String
- State, provided by the CSR
- status String
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- certificate string
- The Client Certificate PEM
-
Client
Certificate Certificate Authority - Certificate Authority used to issue the Client Certificate
- common
Name string - Common Name of the Client Certificate
- country string
- Country, provided by the CSR
- expires
On string - Date that the Client Certificate expires
- fingerprint
Sha256 string - Unique identifier of the Client Certificate
- id string
- The provider-assigned unique ID for this managed resource.
- issued
On string - Date that the Client Certificate was issued by the Certificate Authority
- location string
- Location, provided by the CSR
- organization string
- Organization, provided by the CSR
- organizational
Unit string - Organizational Unit, provided by the CSR
- serial
Number string - The serial number on the created Client Certificate.
- signature string
- The type of hash used for the Client Certificate..
- ski string
- Subject Key Identifier
- state string
- State, provided by the CSR
- status string
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- certificate str
- The Client Certificate PEM
-
Client
Certificate Certificate Authority - Certificate Authority used to issue the Client Certificate
- common_
name str - Common Name of the Client Certificate
- country str
- Country, provided by the CSR
- expires_
on str - Date that the Client Certificate expires
- fingerprint_
sha256 str - Unique identifier of the Client Certificate
- id str
- The provider-assigned unique ID for this managed resource.
- issued_
on str - Date that the Client Certificate was issued by the Certificate Authority
- location str
- Location, provided by the CSR
- organization str
- Organization, provided by the CSR
- organizational_
unit str - Organizational Unit, provided by the CSR
- serial_
number str - The serial number on the created Client Certificate.
- signature str
- The type of hash used for the Client Certificate..
- ski str
- Subject Key Identifier
- state str
- State, provided by the CSR
- status str
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- certificate String
- The Client Certificate PEM
- Property Map
- Certificate Authority used to issue the Client Certificate
- common
Name String - Common Name of the Client Certificate
- country String
- Country, provided by the CSR
- expires
On String - Date that the Client Certificate expires
- fingerprint
Sha256 String - Unique identifier of the Client Certificate
- id String
- The provider-assigned unique ID for this managed resource.
- issued
On String - Date that the Client Certificate was issued by the Certificate Authority
- location String
- Location, provided by the CSR
- organization String
- Organization, provided by the CSR
- organizational
Unit String - Organizational Unit, provided by the CSR
- serial
Number String - The serial number on the created Client Certificate.
- signature String
- The type of hash used for the Client Certificate..
- ski String
- Subject Key Identifier
- state String
- State, provided by the CSR
- status String
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
Look up Existing ClientCertificate Resource
Get an existing ClientCertificate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ClientCertificateState, opts?: CustomResourceOptions): ClientCertificate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
certificate: Optional[str] = None,
certificate_authority: Optional[ClientCertificateCertificateAuthorityArgs] = None,
common_name: Optional[str] = None,
country: Optional[str] = None,
csr: Optional[str] = None,
expires_on: Optional[str] = None,
fingerprint_sha256: Optional[str] = None,
issued_on: Optional[str] = None,
location: Optional[str] = None,
organization: Optional[str] = None,
organizational_unit: Optional[str] = None,
reactivate: Optional[bool] = None,
serial_number: Optional[str] = None,
signature: Optional[str] = None,
ski: Optional[str] = None,
state: Optional[str] = None,
status: Optional[str] = None,
validity_days: Optional[int] = None,
zone_id: Optional[str] = None) -> ClientCertificatefunc GetClientCertificate(ctx *Context, name string, id IDInput, state *ClientCertificateState, opts ...ResourceOption) (*ClientCertificate, error)public static ClientCertificate Get(string name, Input<string> id, ClientCertificateState? state, CustomResourceOptions? opts = null)public static ClientCertificate get(String name, Output<String> id, ClientCertificateState state, CustomResourceOptions options)resources: _: type: cloudflare:ClientCertificate get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Certificate string
- The Client Certificate PEM
-
Client
Certificate Certificate Authority - Certificate Authority used to issue the Client Certificate
- Common
Name string - Common Name of the Client Certificate
- Country string
- Country, provided by the CSR
- Csr string
- The Certificate Signing Request (CSR). Must be newline-encoded.
- Expires
On string - Date that the Client Certificate expires
- Fingerprint
Sha256 string - Unique identifier of the Client Certificate
- Issued
On string - Date that the Client Certificate was issued by the Certificate Authority
- Location string
- Location, provided by the CSR
- Organization string
- Organization, provided by the CSR
- Organizational
Unit string - Organizational Unit, provided by the CSR
- Reactivate bool
- Serial
Number string - The serial number on the created Client Certificate.
- Signature string
- The type of hash used for the Client Certificate..
- Ski string
- Subject Key Identifier
- State string
- State, provided by the CSR
- Status string
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- Validity
Days int - The number of days the Client Certificate will be valid after the issuedOn date
- Zone
Id string - Identifier.
- Certificate string
- The Client Certificate PEM
-
Client
Certificate Certificate Authority Args - Certificate Authority used to issue the Client Certificate
- Common
Name string - Common Name of the Client Certificate
- Country string
- Country, provided by the CSR
- Csr string
- The Certificate Signing Request (CSR). Must be newline-encoded.
- Expires
On string - Date that the Client Certificate expires
- Fingerprint
Sha256 string - Unique identifier of the Client Certificate
- Issued
On string - Date that the Client Certificate was issued by the Certificate Authority
- Location string
- Location, provided by the CSR
- Organization string
- Organization, provided by the CSR
- Organizational
Unit string - Organizational Unit, provided by the CSR
- Reactivate bool
- Serial
Number string - The serial number on the created Client Certificate.
- Signature string
- The type of hash used for the Client Certificate..
- Ski string
- Subject Key Identifier
- State string
- State, provided by the CSR
- Status string
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- Validity
Days int - The number of days the Client Certificate will be valid after the issuedOn date
- Zone
Id string - Identifier.
- certificate String
- The Client Certificate PEM
-
Client
Certificate Certificate Authority - Certificate Authority used to issue the Client Certificate
- common
Name String - Common Name of the Client Certificate
- country String
- Country, provided by the CSR
- csr String
- The Certificate Signing Request (CSR). Must be newline-encoded.
- expires
On String - Date that the Client Certificate expires
- fingerprint
Sha256 String - Unique identifier of the Client Certificate
- issued
On String - Date that the Client Certificate was issued by the Certificate Authority
- location String
- Location, provided by the CSR
- organization String
- Organization, provided by the CSR
- organizational
Unit String - Organizational Unit, provided by the CSR
- reactivate Boolean
- serial
Number String - The serial number on the created Client Certificate.
- signature String
- The type of hash used for the Client Certificate..
- ski String
- Subject Key Identifier
- state String
- State, provided by the CSR
- status String
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- validity
Days Integer - The number of days the Client Certificate will be valid after the issuedOn date
- zone
Id String - Identifier.
- certificate string
- The Client Certificate PEM
-
Client
Certificate Certificate Authority - Certificate Authority used to issue the Client Certificate
- common
Name string - Common Name of the Client Certificate
- country string
- Country, provided by the CSR
- csr string
- The Certificate Signing Request (CSR). Must be newline-encoded.
- expires
On string - Date that the Client Certificate expires
- fingerprint
Sha256 string - Unique identifier of the Client Certificate
- issued
On string - Date that the Client Certificate was issued by the Certificate Authority
- location string
- Location, provided by the CSR
- organization string
- Organization, provided by the CSR
- organizational
Unit string - Organizational Unit, provided by the CSR
- reactivate boolean
- serial
Number string - The serial number on the created Client Certificate.
- signature string
- The type of hash used for the Client Certificate..
- ski string
- Subject Key Identifier
- state string
- State, provided by the CSR
- status string
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- validity
Days number - The number of days the Client Certificate will be valid after the issuedOn date
- zone
Id string - Identifier.
- certificate str
- The Client Certificate PEM
-
Client
Certificate Certificate Authority Args - Certificate Authority used to issue the Client Certificate
- common_
name str - Common Name of the Client Certificate
- country str
- Country, provided by the CSR
- csr str
- The Certificate Signing Request (CSR). Must be newline-encoded.
- expires_
on str - Date that the Client Certificate expires
- fingerprint_
sha256 str - Unique identifier of the Client Certificate
- issued_
on str - Date that the Client Certificate was issued by the Certificate Authority
- location str
- Location, provided by the CSR
- organization str
- Organization, provided by the CSR
- organizational_
unit str - Organizational Unit, provided by the CSR
- reactivate bool
- serial_
number str - The serial number on the created Client Certificate.
- signature str
- The type of hash used for the Client Certificate..
- ski str
- Subject Key Identifier
- state str
- State, provided by the CSR
- status str
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- validity_
days int - The number of days the Client Certificate will be valid after the issuedOn date
- zone_
id str - Identifier.
- certificate String
- The Client Certificate PEM
- Property Map
- Certificate Authority used to issue the Client Certificate
- common
Name String - Common Name of the Client Certificate
- country String
- Country, provided by the CSR
- csr String
- The Certificate Signing Request (CSR). Must be newline-encoded.
- expires
On String - Date that the Client Certificate expires
- fingerprint
Sha256 String - Unique identifier of the Client Certificate
- issued
On String - Date that the Client Certificate was issued by the Certificate Authority
- location String
- Location, provided by the CSR
- organization String
- Organization, provided by the CSR
- organizational
Unit String - Organizational Unit, provided by the CSR
- reactivate Boolean
- serial
Number String - The serial number on the created Client Certificate.
- signature String
- The type of hash used for the Client Certificate..
- ski String
- Subject Key Identifier
- state String
- State, provided by the CSR
- status String
- Client Certificates may be active or revoked, and the pendingreactivation or pendingrevocation represent in-progress asynchronous transitions Available values: "active", "pendingreactivation", "pendingrevocation", "revoked".
- validity
Days Number - The number of days the Client Certificate will be valid after the issuedOn date
- zone
Id String - Identifier.
Supporting Types
ClientCertificateCertificateAuthority, ClientCertificateCertificateAuthorityArgs
Import
$ pulumi import cloudflare:index/clientCertificate:ClientCertificate example '<zone_id>/<client_certificate_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
published on Thursday, Apr 2, 2026 by Pulumi
