1
votes

I'm creating a pair of Azure API Management instances on different regions (primary and secondary), both on Consumption tier. These are fronted by a Traffic Manager that gives priority to the primary region, but fails over to the secondary region when primary becomes unavailable. I use a custom domain name, whose CNAME I've set up to point to the traffic manager. I'm able to create the custom domain proxy/gateway endpoint in the primary API Management instance. However, when trying to do the same for the secondary API Management instance, I get the following error:

A CNAME record pointing from <custom-domain> to <secondary-apim-instance>.azure-api.net was not found.

I've found that I'm able to create this endpoint if I disable the Traffic Manager endpoint for the primary region, thus causing all requests to go to the secondary region. However, this is not desirable, since it cannot be cleanly defined in ARM templates, and requires me to incur downtime on both regions if I need to make changes to either API Management instance (e.g. change certificate).

Is there a way of suppressing or defeating this CNAME check from Azure?

2

2 Answers

1
votes

This is not supported at the moment. You'll have to use dedicated APIM SKU that does not have CNAME validation.

1
votes

I'm in a similar scenario.

Differences

  • using a AWVERIFY TXT record to verify the domain rather than a CNAME. Can't find any documentation about whether this is a supported use case or not - but this is what you would do for the same scenario using azurewebsites see here.
  • using weighted traffic manager (as pay the same for consumption)

At deployment time I originally wanted to disable the endpoint (and then deploy to underlying infra) but found disabling meant couldnt resolve CNAME, next step was to change the traffic manager to be weighted and then change the weight at deployment time to reduce weight till complete. Not 100% full proof but better than lost requests.

I'm getting partial success after adding these weights to the Traffic Manager to manage deployment downtime In that it seems the order that they are setup is important. TM / TXT Record / APIM.

Be great if a member of the team could clear this up or provide an alternative other than pay lots of $ up to premium.