---
title: Certificate Authorities
---

[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**

# Certificate Authorities

#### Certificate AuthoritiesHostname Associations

#### resource cloudflare\_certificate\_authorities\_hostname\_associations

##### required Expand Collapse

zone\_id: String

Identifier.

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

##### optional Expand Collapse

mtls\_certificate\_id?: String

The UUID for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls\_certificate\_id is given, the hostnames will be associated to your active Cloudflare Managed CA.

[Link to this property](<#(resource)%20certificate_authorities.hostname_associations%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20mtls_certificate_id>)

hostnames?: List\[String]

[Link to this property](<#(resource)%20certificate_authorities.hostname_associations%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20hostnames>)

##### computed Expand Collapse

id: String

Identifier.

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

### cloudflare\_certificate\_authorities\_hostname\_associations

Terraform

HTTPTypeScriptPythonGoTerraform

```
resource "cloudflare_certificate_authorities_hostname_associations" "example_certificate_authorities_hostname_associations" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  hostnames = ["api.example.com"]
  mtls_certificate_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
```

#### data cloudflare\_certificate\_authorities\_hostname\_associations

##### required Expand Collapse

zone\_id: String

Identifier.

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

##### optional Expand Collapse

mtls\_certificate\_id?: String

The UUID to match against for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls\_certificate\_id is given, the results will be the hostnames associated to your active Cloudflare Managed CA.

[Link to this property](<#(resource)%20certificate_authorities.hostname_associations%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20mtls_certificate_id>)

##### computed Expand Collapse

id: String

Identifier.

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

hostnames: List\[String]

[Link to this property](<#(resource)%20certificate_authorities.hostname_associations%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20hostnames>)

### cloudflare\_certificate\_authorities\_hostname\_associations

Terraform

HTTPTypeScriptPythonGoTerraform

```
data "cloudflare_certificate_authorities_hostname_associations" "example_certificate_authorities_hostname_associations" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  mtls_certificate_id = "b2134436-2555-4acf-be5b-26c48136575e"
}
```