We have a Terraform deployment pipeline that creates new resource group with few resources for each pull request. It was working fine for more than half a year now, but today it fails during adding app services to app service plan with the reason of app name being invalid. The name consists of prefix (that is fixed and has 5 letters), two random words, and service name, separated with hyphen. As an example: "test2-ideal-stingray-backend" or "test2-ideal-stingray-frontend", etc. As mentioned this worked just fine and we put extra care to not violate any naming constrains, but today it fails with following error "Site names only allow alphanumeric characters and hyphens, cannot start or end in a hyphen, and must be less than 64 chars.".
I'm confused and unable to solve this. I've ran Terraform with debug log and this is a direct response from Azure API call to https://management.azure.com/subscriptions/xxx-xxx/providers/Microsoft.Web/checknameavailability?api-version=2021-02-01