Hello @James McLaren ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you are looking for Azure Bicep or PowerShell example codes to create an Azure Front Door with an endpoint and a route associated to a custom domain.
You can find all the ARM or Bicep quickstart templates to deploy Azure Front Door in the below doc:
Below doc has the ARM and Bicep templates that creates a Front Door configuration with a single backend, onboards a custom domain, and then secures the custom domain with a Front Door-managed certificate.
You can check the main.bicep file.
We don't have a full PowerShell tutorial for Azure Front Door custom domain but it is available with Azure CLI, if you are interested. Below is the doc for reference:
https://learn.microsoft.com/en-us/azure/frontdoor/scripts/custom-domain
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.