azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

the azure dev support mentiones i cant trigger/start logic apps with azure cli on dictionary parameters

Open rifaterdemsahin opened this issue 5 years ago • 9 comments

if that is true why they are here and documented here? https://docs.microsoft.com/en-us/cli/azure/logicapp?view=azure-cli-latest#az_logicapp_start

If the logic apps can't be used in automation with parameters why do they exist in the first place ?

this trigger to take in a dictionary parameter to start image

### This is regarding the ticket you have raised with Microsoft - 2109170050000932


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

rifaterdemsahin avatar Oct 19 '21 14:10 rifaterdemsahin

I need this start with a dictionary parameter to work from my dockercontainer image

rifaterdemsahin avatar Oct 19 '21 14:10 rifaterdemsahin

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-logicapps-team.

Issue Details

if that is true why they are here and documented here? https://docs.microsoft.com/en-us/cli/azure/logicapp?view=azure-cli-latest#az_logicapp_start

If the logic apps cant be used in automation why do they exist in the first place ?

### This is regarding the ticket you have raised with Microsoft - 2109170050000932


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Author: rifaterdemsahin
Assignees: -
Labels:

Service Attention, Logic App, customer-reported

Milestone: -

ghost avatar Oct 19 '21 14:10 ghost

route to service team

yonzhan avatar Oct 19 '21 14:10 yonzhan

The commands starting with az logicapp are used for Logic App Standard SKU offering only. az logicapp start starts the logic app site. This doesn't trigger the workflows in it. To trigger a workflow, we need workflow level commands which are not released yet.

From the screenshot, it looks like you are using the LogicApp Consumption SKU. For that these are the commands you can use- https://docs.microsoft.com/en-us/cli/azure/logic?view=azure-cli-latest

DevArjun23 avatar Oct 19 '21 16:10 DevArjun23

So if I move on to the standard one can I trigger the logic apps with a dictionary parameter ? Or right now they are still now released so logic apps can not be used for automation ?

rifaterdemsahin avatar Oct 20 '21 12:10 rifaterdemsahin

In LogicApps standard, we don't have workflow level commands yet. So to trigger a workflow with custom payload(dictionary parameter) won't be possible from logicapp CLI extension.

I have not tried this but other workaround I can think of, is if you get the call back URL for your workflow trigger from portal, then you can use ARM client to make requests to trigger the workflow from CLI. They also accept payload for your dictionary paramter. https://github.com/projectkudu/ARMClient

Currently, we are working on adding CLI command to get the call back URL, so soon in the next couple versions you can get the callback URL from CLI and call it using armclient.

DevArjun23 avatar Oct 20 '21 17:10 DevArjun23

@rifaterdemsahin , for logic app consumption may be you can copy the trigger request from the portal as powershell and use it in your automation , does this solve your problem

image

mbarqawi avatar Oct 21 '21 08:10 mbarqawi

The issue is I wanna have a secure call using the logic apps CLI and use it from Azure DevOps. I don't wanna declare multiple service connections in Azure DevOps use the az commands trigger and get the results back.

Using an HTTP calls creates another security black hole. Does project kudu ARMClient overcome this ? https://github.com/projectkudu/ARMClient

I need to integrate this with Azure DevOps Yaml pipelines.

Step 1: Declare resources in the YAML pipelines in Azure

  • All arm templates in their folders and files Step 2: Trigger a logic app
  • To create a service principal pass parameters and use a function in the logic app
  • To create an Azure resource with the arm template from the git Step 3A: Use the state machine in the logic app to create the resources
  • If there are existing resources use the logic in logic apps
  • Encapsulate the resource creating to workflow to be able to monitor and main with ease Step 3B: Use the cascading nature of logic apps and pass the references to each other for resources. Step 4 : Run docker based build agents pipelines that integrate to YAML to run long-running tasks.

rifaterdemsahin avatar Oct 21 '21 15:10 rifaterdemsahin

I understand, so your ask for logicapp CLI extension is of a command to trigger a workflow with custom payload(like a dictionary). As of latest version, we do not have a command for that.

only workaround I can think of is to get the callback URI from portal or from ARM client, and then call it again using ARM client. What are your security concerns with ARMClient?

DevArjun23 avatar Nov 05 '21 23:11 DevArjun23