I have an IaC deployment implemented as a GitHub action, and I need to move it to Octopus Deploy.
My first azure arm template that creates a resource group. However, the built-in Deploy an Azure Resource Manager template step requires a resource group when I am setting it up. I don't have a resource group; my ARM is creating it.
My deployment will do more than create a resource group. I also have ARMs to create all the resources inside the group. For these, I can't specify the resource group when setting up the process because it is creat as part of the deployment.
On the ARM step, turn on the Custom Deployment Scripts (via the Configure Features button).
In the pre-deploy script add the following script:
Not tested, taken from https://octopus.com/blog/dynamic-infrastructure#the-deployment-process