Open chiranjeevivarma3 opened 1 year ago
@chiranjeevivarma3, thank you for opening this issue, but this appears to be a configuration issue where both of the patterns_to_match
in the azurerm_cdn_frontdoor_route
resources are a wildcard (e.g., /*
)?
The azurerm_cdn_frontdoor_domain_association
resource is named poorly, it is actually a disassociation
resource in reality. This was done to facilitate a single apply
/destroy
within terraform without having conflicts during the destruction of the resources. The association resource, once it has removed the final custom domain that is associated with the route, will enable the link to default domain
, since that is required by Frontdoor for all Frontdoor routes. I believe the only way around this currently is to change the patterns_to_match
in your default domain to be unique.
Hi @WodansSon , A route cannot be reused and can be assigned to only one Origin Group. How can we use same patterns_to_match values across origin groups?
@WodansSon Thanks for responding back.
Based on your comment, what I understand is that it's not a configuration issue; rather, it's a workaround to facilitate the destruction with Terraform. We previously used the same configuration with classic Terraform resources, and it was working fine.
It would be beneficial to have a workaround for a clean destroy since we don't encounter any issues with creation.
I am encountering this same issue however it looks to been any further work on this @WodansSon?
The behavior seems to be transitory in nature as after 2 runs failing the third goes through.
First runs errors:
Error: deleting Front Door Custom Domain Association: (Association Name "fdcd-project-startup-apidev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Front Door Custom Domain: (Custom Domain Name "fdcd-project-startup-apidev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): waiting to update the association with Front Door Route: (Route Name "fdr-cd-project-startup-dev205-cus" / Afd Endpoint Name "fde-hosts" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Code="BadRequest" Message="Hostname: fde-hosts-f5eefnafd8hfhffb.a01.azurefd.net, Path pattern: /*, Protocol: Https cannot be added to Route fdr-cd-project-startup-dev205-cus as this combination already exists in Endpoint fde-hosts-f5eefnafd8hfhffb.a01.azurefd.net, Route fdr-cd-designhub-dev205-cus."
Error: deleting Front Door Custom Domain Association: (Association Name "fdcd-designhubdev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Front Door Custom Domain: (Custom Domain Name "fdcd-designhubdev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): updating the association with Front Door Route: (Route Name "fdr-site-cd-designhub-dev205-cus" / Afd Endpoint Name "fde-clients" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): cdn.RoutesClient#Update: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="The route domains, paths and protocols configuration has a conflict. More information: Hostname: fde-clients-gudwhjgzbqaqacfn.a01.azurefd.net, Path pattern: /*, Protocol: Https cannot be added to Route fdr-site-cd-designhub-dev205-cus as this combination already exists in Endpoint fde-clients-gudwhjgzbqaqacfn.a01.azurefd.net, Route fdr-site-cd-project-startup-dev205-cus.."
Error: deleting Front Door Custom Domain Association: (Association Name "fdcd-permissionsdev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Front Door Custom Domain: (Custom Domain Name "fdcd-permissionsdev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): updating the association with Front Door Route: (Route Name "fdr-site-cd-permissions-dev205-cus" / Afd Endpoint Name "fde-clients" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): cdn.RoutesClient#Update: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="The route domains, paths and protocols configuration has a conflict. More information: Hostname: fde-clients-gudwhjgzbqaqacfn.a01.azurefd.net, Path pattern: /*, Protocol: Https cannot be added to Route fdr-site-cd-permissions-dev205-cus as this combination already exists in Endpoint fde-clients-gudwhjgzbqaqacfn.a01.azurefd.net, Route fdr-site-cd-project-startup-dev205-cus.."
Error: deleting Front Door Custom Domain Association: (Association Name "fdcd-designhub-apidev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Front Door Custom Domain: (Custom Domain Name "fdcd-designhub-apidev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): waiting to update the association with Front Door Route: (Route Name "fdr-cd-designhub-dev205-cus" / Afd Endpoint Name "fde-hosts" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Code="BadRequest" Message="Hostname: fde-hosts-f5eefnafd8hfhffb.a01.azurefd.net, Path pattern: /*, Protocol: Https cannot be added to Route fdr-cd-designhub-dev205-cus as this combination already exists in Endpoint fde-hosts-f5eefnafd8hfhffb.a01.azurefd.net, Route fdr-cd-project-startup-dev205-cus."
second:
Error: deleting Front Door Custom Domain Association: (Association Name "fdcd-designhubdev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Front Door Custom Domain: (Custom Domain Name "fdcd-designhubdev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): waiting to update the association with Front Door Route: (Route Name "fdr-site-cd-designhub-dev205-cus" / Afd Endpoint Name "fde-clients" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Code="BadRequest" Message="Hostname: fde-clients-gudwhjgzbqaqacfn.a01.azurefd.net, Path pattern: /*, Protocol: Https cannot be added to Route fdr-site-cd-designhub-dev205-cus as this combination already exists in Endpoint fde-clients-gudwhjgzbqaqacfn.a01.azurefd.net, Route fdr-site-cd-permissions-dev205-cus."
Error: deleting Front Door Custom Domain Association: (Association Name "fdcd-permissionsdev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Front Door Custom Domain: (Custom Domain Name "fdcd-permissionsdev205-aeiengdev-tools" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): waiting to update the association with Front Door Route: (Route Name "fdr-site-cd-permissions-dev205-cus" / Afd Endpoint Name "fde-clients" / Profile Name "afd-core-cd-dev-cus-f4f8" / Resource Group "rg-core-cd-dev-cus"): Code="BadRequest" Message="Hostname: fde-clients-gudwhjgzbqaqacfn.a01.azurefd.net, Path pattern: /*, Protocol: Https cannot be added to Route fdr-site-cd-permissions-dev205-cus as this combination already exists in Endpoint fde-clients-gudwhjgzbqaqacfn.a01.azurefd.net, Route fdr-site-cd-designhub-dev205-cus."
Third is green.
Is this a order of operations type situation? We cannot use a alternative path pattern for this project.
Same issue here.
Is there an existing issue for this?
Community Note
Terraform Version
1.4.6
AzureRM Provider Version
3.58.0
Affected Resource(s)/Data Source(s)
azurerm_cdn_frontdoor_custom_domain_association
Terraform Configuration Files