OctopusUseBundledAzureModules not working 2018.7.1

With the new release of Octopus we noticed one of our projects stopped working.

I have been testing this to see what the issue is and I believe it boils down to the following variable not working anymore for Azure Powershell steps: OctopusUseBundledAzureModules = false

Our step makes a call to Get-AzureRmWebApp which for us returns a count of 200+ WebApps in our azure subscription.

After upgrading to 2018.7.1 the count comes back as 1. This is because a well documented issue with Get-AzureRmWebApp and versions of AzureRM.Websites prior to 5.0 returning a type that is not enumerable.

So with all of that said even though we adda the var OctopusUseBundledAzureModules to our project Octopus still seems to be using the older bundled version of the AzureRm tools.

The work around is for me to go into the Octopus Deploy Server and remove all of the AzureRM.* folders from:
C:\Octopus\OctopusServer\Tools\Octopus.Dependencies.AzureCmdlets\5.7.0\Powershell

I also still have OctopusUseBundledAzureModules = false

Hi Colin,

Thanks for getting in touch and thanks for reporting this issue.

We looked at some recent code changes to make this support both the old (Octopus.Action.Azure.UseBundledAzurePowerShellModules) and new (OctopusUseBundledAzureModules) version of the bundled modules variable, and we just found the bug.

We have created a GitHub issue here that you can track to be notified when a fix is available. We’ve marked this as a priority and will get this fixed asap.

Sorry for the inconvenience.

Cheers
Mark