I am unable to run the “Azure Key Vault - Retrieve Secrets” step from my docker image worker it fails telling me that it can’t find PowerShell.
Note that the same docker image/worker combination is used to run other PowerShell Key Vault commands so I think this is linked to how this step is being executed. My gut thinks this is because the image is a nanoserver image (Tag:windows-nanoserver-1809) i.e. PowerShell core. There is no option on this step to set the PowerShell version as a core version as I had to do with the Script Steps.
Summary
- Docker Image works fine with native PowerShell scripts
- “Azure Key Vault - Retrieve Secrets” step can’t access PowerShell on the image
I think there needs to be a similar way to configure the PowerShell context than the Script steps (Configure Features > PowerShell edition).
It is extremely frustrating to have different requirements and capabilities over the same problem area, not being able to re-use images for the same purpose points to a missing feature in this step config. Can you please point me to the correct use of the step or push to get this added (If my hunch is correct).
I expect my best solution now is to manually write the scripts and push the cert into an output variable but I have no idea how Octopus have done that, if this is required, can you please share the PowerShell commands to retrieve the certificate and push it into a sensitive output variable from the Azure Key store (How this step is doing it in the background) so that I can make sure it is compatible with downstream Octopus tasks.
Thanks!