Azure / Azure/azure-cli-extensions

az logic workflow create/update removes existing parameters

Open
#7,537 2 comments 0 reactions 3 assignees Claimed by @jsntcy View on GitHub
Auto-Assign Azure CLI Team customer-reported Logic App question
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

I am using terraform (azurerm provider) to create Azure Logic App resources. These have configured parameters for API connections that are used within the Logic Apps. I then have a separate repo where the definitions are kept, and use Azure CLI to update them as part of my deployment pipeline.

What I am finding is that whenever I update the Logic Apps via the Azure CLI (az logic workflow create/update), it updates the definition as expected, however it replaces the template object with {}. As the template object state is initially created and managed by terraform, I need this to be retained after the update.

I thought I could just remove the parameters object from JSON definition that is used, but that didn't work... -

```
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {...},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {...}
}
},
////removed the "parameters" object from here
}
```

This may be my lack of understanding, but is there a way to retain this when passing updated definition to retain the parameters?

### Related command

az logic workflow create/update

### Errors

No error, but not expected functionality

### Issue script & Debug output

.

### Expected behavior

parameters is retained after update of definitions

### Environment Summary

azure-cli: 2.56
azure-extensions: 1.1.0

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.