1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getCustomCsr
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi

    Accepted Permissions

    • Account: SSL and Certificates Read
    • Account: SSL and Certificates Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleCustomCsr = cloudflare.getCustomCsr({
        customCsrId: "7b163417-1d2b-4c84-a38a-2fb7a0cd7752",
        accountId: "account_id",
        zoneId: "zone_id",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_custom_csr = cloudflare.get_custom_csr(custom_csr_id="7b163417-1d2b-4c84-a38a-2fb7a0cd7752",
        account_id="account_id",
        zone_id="zone_id")
    
    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.GetCustomCsr(ctx, &cloudflare.LookupCustomCsrArgs{
    			CustomCsrId: "7b163417-1d2b-4c84-a38a-2fb7a0cd7752",
    			AccountId:   pulumi.StringRef("account_id"),
    			ZoneId:      pulumi.StringRef("zone_id"),
    		}, nil)
    		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 exampleCustomCsr = Cloudflare.GetCustomCsr.Invoke(new()
        {
            CustomCsrId = "7b163417-1d2b-4c84-a38a-2fb7a0cd7752",
            AccountId = "account_id",
            ZoneId = "zone_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetCustomCsrArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            final var exampleCustomCsr = CloudflareFunctions.getCustomCsr(GetCustomCsrArgs.builder()
                .customCsrId("7b163417-1d2b-4c84-a38a-2fb7a0cd7752")
                .accountId("account_id")
                .zoneId("zone_id")
                .build());
    
        }
    }
    
    variables:
      exampleCustomCsr:
        fn::invoke:
          function: cloudflare:getCustomCsr
          arguments:
            customCsrId: 7b163417-1d2b-4c84-a38a-2fb7a0cd7752
            accountId: account_id
            zoneId: zone_id
    
    pulumi {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    data "cloudflare_getcustomcsr" "exampleCustomCsr" {
      custom_csr_id = "7b163417-1d2b-4c84-a38a-2fb7a0cd7752"
      account_id    = "account_id"
      zone_id       = "zone_id"
    }
    

    Using getCustomCsr

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCustomCsr(args: GetCustomCsrArgs, opts?: InvokeOptions): Promise<GetCustomCsrResult>
    function getCustomCsrOutput(args: GetCustomCsrOutputArgs, opts?: InvokeOptions): Output<GetCustomCsrResult>
    def get_custom_csr(account_id: Optional[str] = None,
                       custom_csr_id: Optional[str] = None,
                       zone_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetCustomCsrResult
    def get_custom_csr_output(account_id: pulumi.Input[Optional[str]] = None,
                       custom_csr_id: pulumi.Input[Optional[str]] = None,
                       zone_id: pulumi.Input[Optional[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetCustomCsrResult]
    func LookupCustomCsr(ctx *Context, args *LookupCustomCsrArgs, opts ...InvokeOption) (*LookupCustomCsrResult, error)
    func LookupCustomCsrOutput(ctx *Context, args *LookupCustomCsrOutputArgs, opts ...InvokeOption) LookupCustomCsrResultOutput

    > Note: This function is named LookupCustomCsr in the Go SDK.

    public static class GetCustomCsr 
    {
        public static Task<GetCustomCsrResult> InvokeAsync(GetCustomCsrArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomCsrResult> Invoke(GetCustomCsrInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCustomCsrResult> getCustomCsr(GetCustomCsrArgs args, InvokeOptions options)
    public static Output<GetCustomCsrResult> getCustomCsr(GetCustomCsrArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getCustomCsr:getCustomCsr
      arguments:
        # arguments dictionary
    data "cloudflare_get_custom_csr" "name" {
        # arguments
    }

    The following arguments are supported:

    CustomCsrId string
    Custom CSR identifier tag.
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    CustomCsrId string
    Custom CSR identifier tag.
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    custom_csr_id string
    Custom CSR identifier tag.
    account_id string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zone_id string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    customCsrId String
    Custom CSR identifier tag.
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    customCsrId string
    Custom CSR identifier tag.
    accountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    custom_csr_id str
    Custom CSR identifier tag.
    account_id str
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zone_id str
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    customCsrId String
    Custom CSR identifier tag.
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

    getCustomCsr Result

    The following output properties are available:

    AccountTag string
    Account identifier associated with this CSR.
    CommonName string
    The common name (domain) for the CSR.
    Country string
    Two-letter ISO 3166-1 alpha-2 country code.
    CreatedAt string
    When the CSR was created.
    Csr string
    The PEM-encoded Certificate Signing Request.
    CustomCsrId string
    Custom CSR identifier tag.
    Description string
    Optional description for the CSR.
    Id string
    Custom CSR identifier tag.
    KeyType string
    The key algorithm used to generate the CSR. Available values: "rsa2048", "p256v1".
    Locality string
    City or locality name.
    Name string
    Human-readable name for the CSR.
    Organization string
    Organization name.
    OrganizationalUnit string
    Organizational unit name.
    Sans List<string>
    Subject Alternative Names included in the CSR.
    State string
    State or province name.
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    AccountTag string
    Account identifier associated with this CSR.
    CommonName string
    The common name (domain) for the CSR.
    Country string
    Two-letter ISO 3166-1 alpha-2 country code.
    CreatedAt string
    When the CSR was created.
    Csr string
    The PEM-encoded Certificate Signing Request.
    CustomCsrId string
    Custom CSR identifier tag.
    Description string
    Optional description for the CSR.
    Id string
    Custom CSR identifier tag.
    KeyType string
    The key algorithm used to generate the CSR. Available values: "rsa2048", "p256v1".
    Locality string
    City or locality name.
    Name string
    Human-readable name for the CSR.
    Organization string
    Organization name.
    OrganizationalUnit string
    Organizational unit name.
    Sans []string
    Subject Alternative Names included in the CSR.
    State string
    State or province name.
    AccountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    ZoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    account_tag string
    Account identifier associated with this CSR.
    common_name string
    The common name (domain) for the CSR.
    country string
    Two-letter ISO 3166-1 alpha-2 country code.
    created_at string
    When the CSR was created.
    csr string
    The PEM-encoded Certificate Signing Request.
    custom_csr_id string
    Custom CSR identifier tag.
    description string
    Optional description for the CSR.
    id string
    Custom CSR identifier tag.
    key_type string
    The key algorithm used to generate the CSR. Available values: "rsa2048", "p256v1".
    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 list(string)
    Subject Alternative Names included in the CSR.
    state string
    State or province name.
    account_id string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zone_id string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    accountTag String
    Account identifier associated with this CSR.
    commonName String
    The common name (domain) for the CSR.
    country String
    Two-letter ISO 3166-1 alpha-2 country code.
    createdAt String
    When the CSR was created.
    csr String
    The PEM-encoded Certificate Signing Request.
    customCsrId String
    Custom CSR identifier tag.
    description String
    Optional description for the CSR.
    id String
    Custom CSR identifier tag.
    keyType String
    The key algorithm used to generate the CSR. Available values: "rsa2048", "p256v1".
    locality String
    City or locality name.
    name String
    Human-readable name for the CSR.
    organization String
    Organization name.
    organizationalUnit String
    Organizational unit name.
    sans List<String>
    Subject Alternative Names included in the CSR.
    state String
    State or province name.
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    accountTag string
    Account identifier associated with this CSR.
    commonName string
    The common name (domain) for the CSR.
    country string
    Two-letter ISO 3166-1 alpha-2 country code.
    createdAt string
    When the CSR was created.
    csr string
    The PEM-encoded Certificate Signing Request.
    customCsrId string
    Custom CSR identifier tag.
    description string
    Optional description for the CSR.
    id string
    Custom CSR identifier tag.
    keyType string
    The key algorithm used to generate the CSR. Available values: "rsa2048", "p256v1".
    locality string
    City or locality name.
    name string
    Human-readable name for the CSR.
    organization string
    Organization name.
    organizationalUnit string
    Organizational unit name.
    sans string[]
    Subject Alternative Names included in the CSR.
    state string
    State or province name.
    accountId string
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId string
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    account_tag str
    Account identifier associated with this CSR.
    common_name str
    The common name (domain) for the CSR.
    country str
    Two-letter ISO 3166-1 alpha-2 country code.
    created_at str
    When the CSR was created.
    csr str
    The PEM-encoded Certificate Signing Request.
    custom_csr_id str
    Custom CSR identifier tag.
    description str
    Optional description for the CSR.
    id str
    Custom CSR identifier tag.
    key_type str
    The key algorithm used to generate the CSR. Available values: "rsa2048", "p256v1".
    locality str
    City or locality name.
    name str
    Human-readable name for the CSR.
    organization str
    Organization name.
    organizational_unit str
    Organizational unit name.
    sans Sequence[str]
    Subject Alternative Names included in the CSR.
    state str
    State or province name.
    account_id str
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zone_id str
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
    accountTag String
    Account identifier associated with this CSR.
    commonName String
    The common name (domain) for the CSR.
    country String
    Two-letter ISO 3166-1 alpha-2 country code.
    createdAt String
    When the CSR was created.
    csr String
    The PEM-encoded Certificate Signing Request.
    customCsrId String
    Custom CSR identifier tag.
    description String
    Optional description for the CSR.
    id String
    Custom CSR identifier tag.
    keyType String
    The key algorithm used to generate the CSR. Available values: "rsa2048", "p256v1".
    locality String
    City or locality name.
    name String
    Human-readable name for the CSR.
    organization String
    Organization name.
    organizationalUnit String
    Organizational unit name.
    sans List<String>
    Subject Alternative Names included in the CSR.
    state String
    State or province name.
    accountId String
    The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
    zoneId String
    The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.18.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial