---
title: Custom Csrs
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/terraform)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Custom Csrs

#### resource cloudflare\_custom\_csr

##### required Expand Collapse

common\_name: String

The common name (domain) for the CSR. Must be at most 64 characters.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20common_name>)

country: String

Two-letter ISO 3166-1 alpha-2 country code.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20country>)

locality: String

City or locality name.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20locality>)

organization: String

Organization name.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20organization>)

state: String

State or province name.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20state>)

sans: List\[String]

Subject Alternative Names for the CSR. At least one SAN is required.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20sans>)

##### optional Expand Collapse

account\_id?: String

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20account_id>)

zone\_id?: String

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20zone_id>)

description?: String

Optional description for the CSR.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20description>)

name?: String

Human-readable name for the CSR.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20name>)

organizational\_unit?: String

Organizational unit name.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20organizational_unit>)

key\_type?: String

Key algorithm to use for the CSR. Defaults to rsa2048 if not specified.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20key_type>)

##### computed Expand Collapse

id: String

Custom CSR identifier tag.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20id>)

account\_tag: String

Account identifier associated with this CSR.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20account_tag>)

created\_at: Time

When the CSR was created.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20created_at>)

csr: String

The PEM-encoded Certificate Signing Request.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20csr>)

### cloudflare\_custom\_csr

Terraform

HTTPTypeScriptPythonGoTerraform

```
resource "cloudflare_custom_csr" "example_custom_csr" {
  common_name = "example.com"
  country = "US"
  locality = "San Francisco"
  organization = "Cloudflare, Inc."
  sans = ["example.com", "www.example.com"]
  state = "California"
  zone_id = "zone_id"
  description = "CSR for example.com wildcard"
  key_type = "rsa2048"
  name = "My Custom CSR"
  organizational_unit = "Engineering"
}
```

#### data cloudflare\_custom\_csr

##### optional Expand Collapse

custom\_csr\_id?: String

Custom CSR identifier tag.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20custom_csr_id>)

account\_id?: String

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20account_id>)

zone\_id?: String

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20zone_id>)

<details>

<summary>

filter?: Attributes

</summary>

direction?: String

The direction to sort by.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20filter%20%3E%20(attribute)%20direction">Link to this property</a>

order?: String

The field to sort the returned custom CSRs by.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20filter%20%3E%20(attribute)%20order">Link to this property</a>

</details>

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20filter>)

##### computed Expand Collapse

id: String

Custom CSR identifier tag.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20id>)

account\_tag: String

Account identifier associated with this CSR.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20account_tag>)

common\_name: String

The common name (domain) for the CSR.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20common_name>)

country: String

Two-letter ISO 3166-1 alpha-2 country code.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20country>)

created\_at: Time

When the CSR was created.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20created_at>)

csr: String

The PEM-encoded Certificate Signing Request.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20csr>)

description: String

Optional description for the CSR.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20description>)

key\_type: String

The key algorithm used to generate the CSR.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20key_type>)

locality: String

City or locality name.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20locality>)

name: String

Human-readable name for the CSR.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20name>)

organization: String

Organization name.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20organization>)

organizational\_unit: String

Organizational unit name.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20organizational_unit>)

state: String

State or province name.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20state>)

sans: List\[String]

Subject Alternative Names included in the CSR.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20sans>)

### cloudflare\_custom\_csr

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_custom_csr" "example_custom_csr" {
  custom_csr_id = "7b163417-1d2b-4c84-a38a-2fb7a0cd7752"
  account_id = "account_id"
  zone_id = "zone_id"
}
```

#### data cloudflare\_custom\_csrs

##### optional Expand Collapse

account\_id?: String

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20account_id>)

zone\_id?: String

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20zone_id>)

direction?: String

The direction to sort by.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20direction>)

order?: String

The field to sort the returned custom CSRs by.

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20order>)

max\_items?: Int64

Max items to fetch, default: 1000

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20max_items>)

##### computed Expand Collapse

<details>

<summary>

result: List\[Attributes]

The items returned by the data source

</summary>

id: String

Custom CSR identifier tag.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20id">Link to this property</a>

created\_at: Time

When the CSR was created.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20created_at">Link to this property</a>

key\_type: String

The key algorithm used to generate the CSR.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20key_type">Link to this property</a>

account\_tag: String

Account identifier associated with this CSR.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20account_tag">Link to this property</a>

common\_name: String

The common name (domain) for the CSR.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20common_name">Link to this property</a>

country: String

Two-letter ISO 3166-1 alpha-2 country code.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20country">Link to this property</a>

csr: String

The PEM-encoded Certificate Signing Request.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20csr">Link to this property</a>

description: String

Optional description for the CSR.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20description">Link to this property</a>

locality: String

City or locality name.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20locality">Link to this property</a>

name: String

Human-readable name for the CSR.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20name">Link to this property</a>

organization: String

Organization name.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20organization">Link to this property</a>

organizational\_unit: String

Organizational unit name.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20organizational_unit">Link to this property</a>

sans: List\[String]

Subject Alternative Names included in the CSR.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20sans">Link to this property</a>

state: String

State or province name.

<a href="#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20state">Link to this property</a>

</details>

[Link to this property](<#(resource)%20custom_csrs%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result>)

### cloudflare\_custom\_csrs

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_custom_csrs" "example_custom_csrs" {
  account_id = "account_id"
  zone_id = "zone_id"
}
```