@_kjkent Thank you for reaching out to Microsoft Q&A. Sorry to hear about the Q&A platform issues, I have reported/relayed this to our Q&A platform team.
Based on the shared information I have understood that you are trying to add the custom domain to a new static webapp, and it is failing since this domain is already part of another static webapp and also you have tried to deleted that new static web app.
- After the delete operation is successful are you still seeing those resources under the resource group? If yes, have you tried logging into portal from different browser do you observe the same behavior?
- Which method you are using to delete the static web app through Azure CLI bash cmdlets/PowerShell cmdlets or through static web apps Rest API?
custom domain binding operations should take normally around 20 minutes. Overall, TXT record validation and DNS record propagation will affect this amount of time but around 20 minutes should be the expected norm. If the custom domain deletion operation is failing or taking longer than expected, the workaround is to re-try the delete operation until get succeeded using the below PowerShell script.
$name = "<static-webapp>";
$remove_me = "sub.domain.com";
$domains = Get-AzStaticWebAppCustomDomain -ResourceGroupName $rg -Name $name;
$len = $domains.Length;
while($len -eq $domains.Length){
foreach($item in $domains){
if($item.name -eq $remove_me){
$err = Remove-AzStaticWebAppCustomDomain -DomainName $remove_me -Name $name -ResourceGroupName $rg -NoWait;
$domains = Get-AzStaticWebAppCustomDomain -ResourceGroupName $rg -Name $name;
if($domains.Length -gt 0){
Write-Host "$remove_me still exists. Retrying...";
Start-Sleep -s 10;
}
}
}
}
Write-Host "Success!";
If you want to delete the static web app you refer to brtrach-msft answer using azure resource explorer as mentioned in this similar thread Static Web App custom domain does not delete - Microsoft Q&A
Feel free to reach back to me if you have any further questions on this.