逻辑应用标准自动化跨环境工作流参考
我已使用 Arm 模板通过 Azure Devops Pipeline 自动部署逻辑应用标准。
我有另一个管道,它使用 Azure Devops zip 部署任务 来部署工作流(按照 Microsoft 文档的建议)。
我当前的困境是当我有调用其他工作流程的工作流程时。 当我跨不同逻辑应用标准实例部署 zip 文件时,引用的工作流 URL 始终相同。
如何以非硬编码且在部署中动态更改的方式引用/调用工作流程?我可以使用 workflow() 引用其他工作流程吗?
由于访问键是工作流的属性而不是逻辑应用程序标准,我无法将其设置为要在工作流内使用的应用程序设置或参数。
关于如何绕过这个问题有什么想法吗?
I have automated the deployment of a logic app standard via Azure Devops Pipeline using an arm template.
I have another pipeline that uses the Azure Devops zip deployment task to deploy the workflows (as recommended by Microsoft documentation).
My current struggle is when I have workflows that call other workflows.
When I deploy the zip file across different logic app standard instances the workflow url referenced is always the same.
How can I reference/call the workflow in a way that is not hardcoded and dynamically changes in the deploy? Can I use workflow() to reference other workflows?
As the access key is a property of the workflow and not the logic app standard I'm not able to set it as an app setting or parameter to be consumed inside the workflow.
Any ideas on how to bypass this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最终做了以下事情。
我已经创建了密钥库机密。在这些密钥保管库机密中,我存储包含授权机密的工作流程 URL。
由于我创建了指向密钥保管库秘密名称而不是硬编码 URL 的其他工作流,逻辑应用在运行时将查询密钥保管库,从我想要进行身份验证的工作流中检索 URL 并将其用作输入。由于它已经包含签名,因此可以正确进行身份验证。
这可能是一种解决方法,但这是我能够在此操作中取得成功的唯一方法。
对于那些和我有同样问题的人,步骤如下:
获取 keyvault 机密
然后使用该机密作为输入来调用 url。
秘密作为 URL 的输入
当我准备好部署工作流程时。我导出它们并将代码放在 Azure Devops 上。
然后在构建管道中我使用以下任务
您可以在此处找到该脚本的详细信息 Get-WorkflowUrlSignature.ps1
我希望这可以帮助其他人自动化该过程。如果您有更简单的方法或查询访问密钥或 url sig,请告诉我。
What I ended up doing was the following.
I have created key vault secrets. In those key vault secrets I store the workflow url containing the authorization secret.
As I've created the other workflows pointing to the key vault secret name instead of a hardcoded url the logic app at run time will query the key vault, retrieve the url from the workflow i want to authenticate to and use it as input. As it already contains the signature it authenticates correctly.
It's probably a workaround but it was the only way I was able to achieve success in this operation.
For those with the same problem as me here are the steps:
Get keyvault secret
Then it calls the url using the secret as input.
Secret as input for the url
When I have my workflows ready to deploy. I export them and put the code on Azure Devops.
Then in a build pipeline I use the following tasks
You can find the details for the script here Get-WorkflowUrlSignature.ps1
I hope this helps other people automate the process. Please let me know if you have an easier way to do it or to query the access key or url sig.