Created
May 29, 2023 13:59
-
-
Save ItayPodhajcer/52d44bff4b71704b0c80c256c3194e4a to your computer and use it in GitHub Desktop.
terraform-did-web-azure/main.tf#cname-domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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