SSL
SSLCertificate Packs
resource cloudflare_certificate_pack
required
cloudflare_certificate_pack
resource "cloudflare_certificate_pack" "example_certificate_pack" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
certificate_authority = "lets_encrypt"
hosts = ["example.com", "*.example.com", "www.example.com"]
type = "advanced"
validation_method = "txt"
validity_days = 14
cloudflare_branding = false
}
data cloudflare_certificate_pack
computed
Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.
cloudflare_certificate_pack
data "cloudflare_certificate_pack" "example_certificate_pack" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
certificate_pack_id = "023e105f4ecef8ad9ca31a8372d0c353"
}
data cloudflare_certificate_packs
optional
cloudflare_certificate_packs
data "cloudflare_certificate_packs" "example_certificate_packs" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
deploy = "staging"
status = "all"
}
SSLUniversalSettings
resource cloudflare_universal_ssl_setting
optional
Disabling Universal SSL removes any currently active Universal SSL certificates for your zone from the edge and prevents any future Universal SSL certificates from being ordered. If there are no advanced certificates or custom certificates uploaded for the domain, visitors will be unable to access the domain over HTTPS.
By disabling Universal SSL, you understand that the following Cloudflare settings and preferences will result in visitors being unable to visit your domain unless you have uploaded a custom certificate or purchased an advanced certificate.
- HSTS
- Always Use HTTPS
- Opportunistic Encryption
- Onion Routing
- Any Page Rules redirecting traffic to HTTPS
Similarly, any HTTP redirect to HTTPS at the origin while the Cloudflare proxy is enabled will result in users being unable to visit your site without a valid certificate at Cloudflare's edge.
If you do not have a valid custom or advanced certificate at Cloudflare's edge and are unsure if any of the above Cloudflare settings are enabled, or if any HTTP redirects exist at your origin, we advise leaving Universal SSL enabled for your domain.
cloudflare_universal_ssl_setting
resource "cloudflare_universal_ssl_setting" "example_universal_ssl_setting" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
enabled = true
}
data cloudflare_universal_ssl_setting
computed
Disabling Universal SSL removes any currently active Universal SSL certificates for your zone from the edge and prevents any future Universal SSL certificates from being ordered. If there are no advanced certificates or custom certificates uploaded for the domain, visitors will be unable to access the domain over HTTPS.
By disabling Universal SSL, you understand that the following Cloudflare settings and preferences will result in visitors being unable to visit your domain unless you have uploaded a custom certificate or purchased an advanced certificate.
- HSTS
- Always Use HTTPS
- Opportunistic Encryption
- Onion Routing
- Any Page Rules redirecting traffic to HTTPS
Similarly, any HTTP redirect to HTTPS at the origin while the Cloudflare proxy is enabled will result in users being unable to visit your site without a valid certificate at Cloudflare's edge.
If you do not have a valid custom or advanced certificate at Cloudflare's edge and are unsure if any of the above Cloudflare settings are enabled, or if any HTTP redirects exist at your origin, we advise leaving Universal SSL enabled for your domain.
cloudflare_universal_ssl_setting
data "cloudflare_universal_ssl_setting" "example_universal_ssl_setting" {
zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}