I have created an Azure Powershell step template. I have added a paramater called ‘ServiceAccount’ that is a type ‘Azure Account’. I have bound the Account under the step tab to the paramater ServiceAccount, however when i try to run it there are no accounts to choose from. If i unbind the account in the step tamplate I can select an account, however I need to run the script across multiple account (dev/production).
Thanks for getting in touch! I’m unable to determine precisely what’s causing this issue, or if it’s a bug (though it seems to work as expected in my testing, but I may be misinterpreting something). Would you be willing to elaborate a bit further and send some screenshots showing the step template and Azure Account variable configurations? This will help me better understand your scenario and give it a test as you have it setup.
I look forward to hearing back and getting to the bottom of this one!
Many thanks for following up and expanding on your setup. Do you have Azure Account variables set up in your project (either as project variables or variables in a set)? These variables will populate the dropdown when viewing it as part of the project’s deployment process, whereas all Azure Accounts in Octopus will be shown when viewing the dropdown as part of the custom step template in the library (as these are global).
We have some additional information about these variables in the following documentation page.
I hope that helps! Let me know if you have any further questions or concerns going forward.
Thanks for following up, and my sincere apologies about the delay in getting back to you. I unfortunately didn’t see your messages come through and only saw as a result of the GitHub issue you linked this thread in.
I’ve been able to reproduce this behavior, and sure enough it’s a bug as it seems to be searching for the variable name instead of the Azure Account name when attempting to deploy. I’ve raised this issue at the following link for you to track.
I was able to work around this by renaming my variable to match the Azure Account ID exactly and then updating the binding in the step template to match this variable name change. You can get the Azure Account ID in the URL when viewing the account in the web portal. The ID is after the /accounts/ in the URL as I’ve highlighted below.
We’ve had recent reports of a bug that is very similar (and maybe has the exact same root cause). I can’t confirm at this stage if it’s an exact match, but it may only require upgrading to 2019.7.0 once it’s shipped as that will include the fix to that bug. You can reference that issue here.
I’m going to attempt to reproduce this once again when 2019.7.0 is available and I’ll let you know the outcome.
I’m very sorry again for the lack of communication on my part, and I’ve bookmarked this thread to ensure it won’t happen again.
Just to let you know I have just upgraded to 2019.7.0 and the issue is still happening. Do you think this will be fixed as a priority? I cant use the work around below as I need to choose the service
account based on environment.
I’m very sorry for the delay in getting back to you on this one. I got your email and just wanted to message here as well in case you see it sooner. Both issues (5674 and 5620) have been given priority and fixes for both of them should be completed in the next couple of days. I’ll message you directly here as soon as we ship a version that includes the bug fixes.
Thanks for following up. I’m sorry about the lack of an update here. Unfortunately this issue hasn’t been fixed yet but we’re still treating it with priority and it’s being worked on this week. I’ll reach out to you directly once we ship the fix for it. My sincere apologies about the wait on this one.
Thanks for following up, and I’m sorry that this has taken longer than we anticipated.The current status of issue #5674 is that there’s currently a PR to fix this that has been approved and passed, so it looks like it’s quite close to being shipped. The issue will be updated with a milestone once it’s been merged. My apologies again about the delay here, and please don’t hesitate to reach out if you have any questions or concerns moving forward.
I can confirm the fix is working. I have installed 7.10 and it now accepts the azure account as a variable. Thanks for the escalations, you have saved me multiple manual steps for a release!