Open alexs77 opened 2 years ago
The service team has different restriction about profile sku
+ cdn_managed_https
combinations. In this case, Standard_Verizon
cdn profile should support HTTPS custom domain, it appears you should tune the settings inside the cdn_managed_https
a bit, e.g., set certificate_type
to Dedicated
(this works for Standard_Microsoft
iirc).
Dedicated
doesn't work either βΉ
# module.cdn[0].module.cd_verizon["urihandler"].azurerm_cdn_endpoint_custom_domain.app_services[0] will be created
+ resource "azurerm_cdn_endpoint_custom_domain" "app_services" {
+ cdn_endpoint_id = "/subscriptions/β¦/resourceGroups/../providers/Microsoft.Cdn/profiles/β¦/endpoints/β¦"
+ host_name = "β¦"
+ id = (known after apply)
+ name = "β¦"
+ cdn_managed_https {
+ certificate_type = "Dedicated"
+ protocol_type = "ServerNameIndication"
+ tls_version = "TLS12"
}
}
β¦
β·
β Error: sending enable request: cdn.CustomDomainsClient#EnableCustomHTTPS: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="That action isnβt allowed in this profile."
β
β with module.cdn[0].module.cd_verizon["urihandler"].azurerm_cdn_endpoint_custom_domain.app_services[0],
β on modules/cdn/modules/cd/main.tf line 21, in resource "azurerm_cdn_endpoint_custom_domain" "app_services":
β 21: resource "azurerm_cdn_endpoint_custom_domain" "app_services" {
β
β΅
After testing a bit, it turns out that for Standard_Verizon
, the cdn_managed_https
block should be as below:
cdn_managed_https {
certificate_type = "Shared"
protocol_type = "IPBased"
tls_version = "None"
}
Note that the tls_version = "None"
is not available for now, until #15756 is merged.
@magodo
It must be protocol_type = "IPBased"
? SNI won't work?
You can have a try, but above config is what Portal actually uses for the Standard_Verizon
. That said, different sku
only supports some combination of the https profile settings.
In addition to @magodo's block, I found that I also needed to do:
lifecycle {
ignore_changes = [
cdn_managed_https
]
}
Community Note
Terraform (and AzureRM Provider) Version
Terraform v1.1.7 on linux_amd64
Affected Resource(s)
azurerm_cdn_endpoint_custom_domain
Terraform Configuration Files
Debug Output
Panic Output
Expected Behaviour
Actual Behaviour
terraform plan
shows:terraform apply
then fails:Steps to Reproduce
terraform apply
Important Factoids
This is a Standard_Verizon CDN. Setting up a Standard_Akamai CDN also doesn't work β https://github.com/hashicorp/terraform-provider-azurerm/issues/15704
References
15704