az logic workflow update cmd without --definition option removes parameters property in Logic App code
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62
**Describe the bug**
After executing following cmd, parameters property including API connection resource id in Logic App code would be removed.
*---*
az logic workflow update --resource-group "{Resource Group}" --name "{Workflow Name}" --state "{Enabled or Disabled}"
*---*
**To Reproduce**
I reproduced via latest az logic app module.
My Repro
- Cmd
az logic workflow update --resource-group "logicapps" --name "array" --state "Enabled"
- Code before executing the cmd

{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Get_blob_content_(V2)": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['azureblob_2']['connectionId']"
}
},
"method": "get",
"path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/files/@{encodeURIComponent(encodeURIComponent('JTJmdGVzdCUyZmFhYS50eHQ='))}/content",
"queries": {
"inferContentType": true
}
},
"metadata": {
"JTJmdGVzdCUyZmFhYS50eHQ=": "/test/aaa.txt"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"Recurrence": {
"evaluatedRecurrence": {
"frequency": "Month",
"interval": 3
},
"recurrence": {
"frequency": "Month",
"interval": 3
},
"type": "Recurrence"
}
}
},
"parameters": {
"$connections": {
"value": {
"azureblob_2": {
"connectionId": "/subscriptions/subscriptionId/resourceGroups/logicapps/providers/Microsoft.Web/connections/azureblob-5",
"connectionName": "azureblob-5",
"id": "/subscriptions/subscriptionId/providers/Microsoft.Web/locations/japaneast/managedApis/azureblob"
}
}
}
}
}
- Code after executing the cmd

{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Get_blob_content_(V2)": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['azureblob_2']['connectionId']"
}
},
"method": "get",
"path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/files/@{encodeURIComponent(encodeURIComponent('JTJmdGVzdCUyZmFhYS50eHQ='))}/content",
"queries": {
"inferContentType": true
}
},
"metadata": {
"JTJmdGVzdCUyZmFhYS50eHQ=": "/test/aaa.txt"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"Recurrence": {
"evaluatedRecurrence": {
"frequency": "Month",
"interval": 3
},
"recurrence": {
"frequency": "Month",
"interval": 3
},
"type": "Recurrence"
}
}
},
"parameters": {}
}
**Expected behavior**
There expected to be no change parameters property in Logic App code.
**Environment summary**
All Consumption Logic App has API connection.
**Additional context**
The parameters property has data of API connection.
This impact is very large.
Contributor guide
Assessment
This issue has not been assessed yet.