Is it possible to upgrade AzureRM using Octopus Deploy

Hi, I am trying to update AzureRM in one of our deployment targets. Is it possible to Automate it using Octopus Deploy?

Hi Prav, thanks for getting in touch.

There are a couple of ways I can think of to potentially achieve this. You could bundle the PowerShell modules using octo.exe. This would then allow you to copy the files during a custom deployment script. You can enable this as a feature on a deploy package step. The contents of your package can usually be accessed as part of the deployment script using something like the following:

$path = $OctopusParameters["Octopus.Action[$($OctopusParameters["Octopus.Step.Name"])].Output.Package.FilePath"]

This location would have your extracted package so could move the contents to your destination of choice.

Alternatively, running a normal script step on the target may be an option:

Update-Module -Name AzureRM

You may want to refer to Microsoft’s documentation for uninstalling previous versions of the modules.

Once you have your deployment process in place you should be able to create a release and deploy to upgrade the modules just like you would any other.

Please let me know if I have misunderstood anything or if you would like any clarification.