06/17/2022, 7:43 AM
I've created some Customresources and trying to have one of them depending on another one using dependsOn, but the first resource is not being created before the second one.
const myfirstcustomresource= new FirstFunction(functionname, { resourcegroupname: MyResourceGroupName });
const mysecondresource = new Getkeys("keyresource", { resourcegroupname: MyResourceGroupName, keysname: functionname}, { dependsOn: [myfirstcustomresource] })
The deployment tries to create the second resource before the first one is created: Error: invocation of azure-native:web:listWebAppHostKeys returned an error: request failed /subscriptions/xxxxx/resourceGroups/<resourcegroupname>/providers/Microsoft.Web/sites/<functionname>/host/default/listkeys: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Web/sites/<functionname>' under resource group <resourcegroupname> was not found. Any good ideas what could be causing this?