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

az logicapp create command not working

Open Chandrb opened this issue 4 years ago • 22 comments

Describe the bug I am trying to create a logic app workflow on a Logic App standard plan and it is giving me error.

Steps to reproduce the issue I ran the below command (with the Logic app standard plan: chanmylogcapp and storage: chanmystgacct8 in the same resource group). az logicapp create -g mygroup --subscription sub-83 -p chanmylogcapp -n chanlogcapp1 -s chanmystgacct8

Error Message The command failed with an unexpected error. Here is the traceback: 'NoneType' object has no attribute 'reserved' Traceback (most recent call last): File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke cmd_result = self.invocation.execute(args) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 658, in execute raise ex File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 721, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 713, in _run_job return cmd_copy.exception_handler(ex) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/commands.py", line 38, in _ex_handler raise ex File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 692, in _run_job result = cmd_copy(params) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 328, in call return self.handler(*args, **kwargs) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(**command_args) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/logicapp/custom.py", line 99, in create_logicapp is_linux = plan_info.reserved AttributeError: 'NoneType' object has no attribute 'reserved'

Expected behavior I expect the command to create a workflow in the logicapp standard plan.

Chandrb avatar Feb 14 '22 08:02 Chandrb

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

Issue Details

Describe the bug I am trying to create a logic app workflow on a Logic App standard plan and it is giving me error.

Steps to reproduce the issue I ran the below command (with the Logic app standard plan: chanmylogcapp and storage: chanmystgacct8 in the same resource group). az logicapp create -g mygroup --subscription sub-83 -p chanmylogcapp -n chanlogcapp1 -s chanmystgacct8

Error Message The command failed with an unexpected error. Here is the traceback: 'NoneType' object has no attribute 'reserved' Traceback (most recent call last): File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke cmd_result = self.invocation.execute(args) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 658, in execute raise ex File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 721, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 713, in _run_job return cmd_copy.exception_handler(ex) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/commands.py", line 38, in _ex_handler raise ex File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 692, in _run_job result = cmd_copy(params) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 328, in call return self.handler(*args, **kwargs) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(**command_args) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/logicapp/custom.py", line 99, in create_logicapp is_linux = plan_info.reserved AttributeError: 'NoneType' object has no attribute 'reserved'

Expected behavior I expect the command to create a workflow in the logicapp standard plan.

Author: Chandrb
Assignees: -
Labels:

Service Attention, Logic App, customer-reported

Milestone: -

ghost avatar Feb 14 '22 09:02 ghost

route to CXP team

yonzhan avatar Feb 14 '22 09:02 yonzhan

@Chandrb You are using wrong cmdlet and if you want to create a logic app workflow then you need to use az logic workflow create as described here. The command you are using creates a new logic app and you are getting this error as you are not passing correct values against --plan of -p. You need to pass the App service plan name under which you want your logic app to reside. Please check the documentation over here. Thanks

SaurabhSharma-MSFT avatar Feb 15 '22 01:02 SaurabhSharma-MSFT

Thanks @SaurabhSharma-MSFT. I have a quick question in that case, how do i create the workflow in the logic app standard plan by giving plan name to the az workflow create command and not the consumption mode.

Chandrb avatar Feb 15 '22 07:02 Chandrb

@Chandrb You cannot pass the plan information while creating a workflow as the plan name is required while creating the logic app itself.

SaurabhSharma-MSFT avatar Feb 15 '22 20:02 SaurabhSharma-MSFT

@SaurabhSharma-MSFT, Here, @Chandrb is working with logic app standard and not consumption. commands starting with az logic are for consumption and commands starting with az logicapp are for standard.

@Chandrb, can you confirm the plan that you are using is either Workflow standard plan (WS1, WS2, or WS3) or ASEv3 because we only support these two types of plans for Logicapp standard. Moreover, the command you have used will create a logicapp standard and not add workflows to it. We currently do not have commands for CRUD operations on workflows. You can use zip deploy if you have workflows to deploy.

Here are some links to Microsoft docs for you-

  • https://docs.microsoft.com/en-us/azure/logic-apps/set-up-devops-deployment-single-tenant-azure-logic-apps?tabs=azure-cli#install-azure-logic-apps-standard-extension-for-azure-cli
  • https://docs.microsoft.com/en-us/azure/logic-apps/azure-arc-enabled-logic-apps-create-deploy-workflows?tabs=azure-cli

DevArjun23 avatar Feb 15 '22 21:02 DevArjun23

Thanks @archidda , @SaurabhSharma-MSFT, Thanks for your support. Here is what I understood from the above note.

  1. Use az cli to deploy/create App service plan of WS1 or equivalent plan.
  2. use az logicapp create command to create logic app on to the above plan.
  3. use az logicapp deployment command to do zip deploy the workflow as we dont have the direct commands for CRUD operations of the workflows. If the above steps are good and I tried deployment (az logicapp deployment) command and get the below error. 'deployment' is misspelled or not recognized by the system.

My az version is given below: { "azure-cli": "2.33.1", "azure-cli-core": "2.33.1", "azure-cli-telemetry": "1.0.6", "extensions": { "aks-preview": "0.5.53", "application-insights": "0.1.14", "log-analytics": "0.2.2" } }

Chandrb avatar Feb 16 '22 17:02 Chandrb

@Chandrb Looks like you have not installed the logicapp extension. Please run this command to install

az extension add --yes --source "https://aka.ms/logicapp-latest-py2.py3-none-any.whl"

DevArjun23 avatar Feb 16 '22 17:02 DevArjun23

Thanks @archidda, @SaurabhSharma-MSFT and it worked.

Chandrb avatar Feb 17 '22 08:02 Chandrb

Happy to help :)

DevArjun23 avatar Feb 17 '22 16:02 DevArjun23

getting this error az: 'logicapp' is not in the 'az' command group. I try this az extension add --yes --source "https://aka.ms/logicapp-latest-py2.py3-none-any.whl" but still have the issue

Rajuvimal avatar Mar 26 '22 04:03 Rajuvimal

@Rajuvimal can you create a new issue to track it separately? Also provide output of az version

DevArjun23 avatar Mar 28 '22 17:03 DevArjun23

@archidda can you please help me too identify that who are not using mfa in azure by listing with azure cli command

Rajuvimal avatar Mar 29 '22 08:03 Rajuvimal

provide output of az version

DevArjun23 avatar Mar 29 '22 14:03 DevArjun23

@archidda when i use " az ad group list ' get an error Insufficient privileges to complete the operation.

Rajuvimal avatar Mar 29 '22 15:03 Rajuvimal

Can you try opening your command prompt as Administrator? Please initiate a new issue to track your case separately.

DevArjun23 avatar Mar 29 '22 15:03 DevArjun23

@archidda im ubuntu terminal in Windows

Rajuvimal avatar Mar 29 '22 15:03 Rajuvimal

how to manual upgrade az cli my current version is 2.0.81

Rajuvimal avatar Mar 29 '22 15:03 Rajuvimal

You are a few versions behind. Please upgrade to latest by using either this command az upgrade or download the executable from the official source - https://docs.microsoft.com/en-us/cli/azure/install-azure-cli

DevArjun23 avatar Mar 29 '22 15:03 DevArjun23

The underlying Active Directory Graph API will be replaced by Microsoft Graph API in a future version of Azure CLI. Please carefully review all breaking changes introduced during this migration: https://docs.microsoft.com/cli/azure/microsoft-graph-migration

Rajuvimal avatar Mar 29 '22 16:03 Rajuvimal