Azure Resource Group Template with Artefacts


I’m new to Octopus Deploy and I’m trying to set an Azure Resource Group Deployment.

I’ve read this page thoroughly, but i think it is missing some common steps.

To provide some context, I’m using Team City to build and publish a package to Octopus Deploy. The package is a zip of the deployment project’s staged artefacts.

a master template
a nested template
a parameters file
Deploy-AzureResourceGroup.ps1 (customised)
an extra PS script referenced by the above
2 zip files (msdeploy packages) produced by other referenced projects

From what I can tell the “Deploy an Azure Resource Group” step will only work for single template deployment projects.

I’m starting to believe that what I need to do is unpack the zip, then stage it myself, and finally run the “Deploy an Azure Resource Group” step. If that is the case, how do i unzip a package?

If there is a better way of doing this, please let me know.


Hi Owen,

Thanks for getting in touch! You’re right, the Deploy an Azure Resource Group step is one-named-template-file per step. Calamari uses the ResourceManager C# SDK, passing the template, parameters etc:

Based on what I understand from your description, you have a few options to move forwards:

  1. Target your master template, and if it is linked appropriately to the linked template(s) the whole tree should execute as expected, just like if you were using the Azure RM PowerShell cmdlets. There is a gotcha we discovered on this thread - the linked templates must be publicly accessible by the Azure RM deployment engine, which isn’t something we can change on your behalf. I’ve updated our documentation to link to this discussion in case it helps anyone else:

  2. You could add multiple Deploy an Azure Resource Group steps to your process, all using the same package, but targeting different templates.

When you use a Package for your Deploy an Azure Resource Group, Octopus temporarily extracts the package for you into a working folder, and executes the template from that location.

Hope that helps!

Hi Michael

Thanks for your response.

I managed to solve this problem in a very simple manner.

I got rid of the Deploy a Resource Group step and added a Run Azure
PowerShell step which runs Deploy-AzureResourceGroup.ps1. That script
manages the upload process – I just needed to pass in the expected

Hi Owen,

Great! I’m glad to hear you’re up and running. :slight_smile:

Happy Deployments!