I have a working project that deploys a web app to Azure. My subscription is already linked and working in Octopus so I know the azure account configuration is fine.
When the step runs, it gives a powershell error that I don’t have a default subscription selected, so my next step was to add the Select-AzureSubscription call before the Stop-AzureWebSite call but I get an error that the subscription does not exist (even though it logs that exact subscription in the log). I’ve tried by both subscription name and id, confirmed both from the azure portal and have had no luck getting it to work.
It’s strange that your deployment works but the PowerShell doesn’t. Would you mind attaching the Octopus task log logs for your attempts?
Do you know if you are using a Service Principal or Management Certificate account? There is a toggle on the accounts page that shows which is being used.
Hi Shane, I think I’m using a Service Principal account. I do not see a toggle on the accounts page but my azure subscription is listed under the heading “Service Principals” so I think that is the right answer.