cloudflare_certificate_pack (Resource)

Provides a Cloudflare Certificate Pack resource that is used to provision managed TLS certificates.

Example Usage

# Advanced certificate manager for DigiCert
resource "cloudflare_certificate_pack" "example" {
  zone_id               = "0da42c8d2132a9ddaf714f9e7c920711"
  type                  = "advanced"
  hosts                 = ["example.com", "sub.example.com"]
  validation_method     = "txt"
  validity_days         = 30
  certificate_authority = "digicert"
  cloudflare_branding   = false
}

# Advanced certificate manager for Let's Encrypt
resource "cloudflare_certificate_pack" "example" {
  zone_id                = "0da42c8d2132a9ddaf714f9e7c920711"
  type                   = "advanced"
  hosts                  = ["example.com", "*.example.com"]
  validation_method      = "http"
  validity_days          = 90
  certificate_authority  = "lets_encrypt"
  cloudflare_branding    = false
  wait_for_active_status = true
}

Schema

Required

Optional

Read-Only

Nested Schema for validation_records

Optional:

Nested Schema for validation_errors

Read-Only:

Import

Import is supported using the following syntax:

$ terraform import cloudflare_certificate_pack.example <zone_id>/<certificate_pack_id>

While supported, importing isn't recommended and it is advised to replace the certificate entirely instead.