I want to automate mapping a custom domain for my web app's deployment slots(not the production slot). I have achieved this through the Azure Portal with this guide, but I can't get it to work through the AZ CLI. It appears that in the cli, only through for the production slot is possible to achieve mapping a custom domain. This is the command to do it for the production slot but I can not see an option for other slots on the same web app. Also whatever I try on the webapp-name
parameter to try and reference the slot(as supposingly is a separate web app) doesn't work(it keeps giving me app not found errors
):
az webapp config hostname add --webapp-name <app_slot_name> --resource-group <rg> --hostname <cname_that_already_exists>