prehistoric-nail-50687
12/07/2020, 10:13 AMWebAppHostNameBinding
from azure-nextgen
to add new domains to a WebApp
. This works fine, as long as I only have one domain to add, but if I add multiple domains, then it does not work, because the previous WebAppHostNameBinding
must be finished before I can add a new one. I currently have this:
const subdomains = ["aa", "bb", "cc"];
for (var subd of subdomains) {
var nameBinding = newHostNameBinding(subd, app.name, "<http://topdomain.com|topdomain.com>");
}
function newHostNameBinding(subdomain: string, appName: Input<string>, topdomain: string) {
return new nextgen.WebAppHostNameBinding(
`${environment}-web-host-name-binding-${subdomain}`,
{
name: appName,
resourceGroupName: resourceGroup.name,
hostName: `${subdomain}.${topdomain}`,
},
{ parent: app }
);
}
Ho can I ensure the calls to create a WebAppHostNameBinding
are finished on the Azure site before creating the next one?
The error I currently get is this:
Cannot modify this site because another operation is in progress. Details: Id: 79e4dbe5-ae0e-44a2-9006-13b3e85e4e23, OperationName: Update, CreatedTime: 12/7/2020 9:53:20 AM, RequestId: d371a3b1-9503-4635-8289-2477a33ac7aa, EntityType: 3