Skip to content

Instantly share code, notes, and snippets.

@ItayPodhajcer
Created May 29, 2023 13:59
Show Gist options
  • Save ItayPodhajcer/52d44bff4b71704b0c80c256c3194e4a to your computer and use it in GitHub Desktop.
Save ItayPodhajcer/52d44bff4b71704b0c80c256c3194e4a to your computer and use it in GitHub Desktop.
terraform-did-web-azure/main.tf#cname-domain
resource "cloudflare_record" "this" {
zone_id = data.cloudflare_zones.this.zones[0].id
name = var.subdomain
value = azurerm_cdn_endpoint.this.fqdn
type = "CNAME"
ttl = 1
proxied = false
}
resource "azurerm_cdn_endpoint_custom_domain" "this" {
name = "endpoint-doain-${var.deployment_name}-${var.location}"
cdn_endpoint_id = azurerm_cdn_endpoint.this.id
host_name = cloudflare_record.this.hostname
cdn_managed_https {
certificate_type = "Dedicated"
protocol_type = "ServerNameIndication"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment