We are having a strange “Could not find Azure Website” issue with a deploy an “Azure App template” process step. When we investigated the issue by going through source code, we noticed it is not able to retrieve the resource group name belong to the app.
Would like to share an update that the issue was found with the new versions of the Octopus that we updated to from 2018.2.1 and the older version seems working fine.
We tried removing resource group name from the template step and we started having exactly the same issue as discussed in the thread, as per link below:
Unfortunately when we switched to the new Azure libraries, the call you mentioned there webSiteClient.WebApps.List() is a bit flakey and some customers have reported that the resource groups do not come back in that call (the same error you’ve experienced).
We’ve created a GitHub issue here that you can track to be notified when a fix is available.
So far we’ve been unable to reproduce this, but we’re going to investigate retry-logic to try and make this more robust. If this fails to return resource groups every time, we’ll have to raise an issue with Azure and see if this is something they can help with.