0

In multi-tenant logic apps we can easily define in the arm template deploy the initial state of it easialy.

for example

"InitialState": {
  "value": "Disabled"
},

In the case of single-tenant logic app, there is a separation of concerns between the resource of the logic app and its workflows.

In my case, i created one single-tenant logic app manually in the portal.

And now the only thing i want is to do, is an automatic deploy of the workflows using azure devops pipelines.

In the workflow.json of each workflow i searched and didn't find a way to set the initial state of the workflow as disabled.

Does anyone know a way of doing that?

Nmaster88
  • 1,405
  • 2
  • 23
  • 65

1 Answers1

2

Within a single-tenant or Standard Logic App instance you can set the state of a specific workflow by setting that state via a configuration setting in the app settings of the app service.

This app setting does require a specific structure though, see below snippet.

{
  name: 'Workflows.${workflowName}.FlowState'
  value: 'Disabled'
}

Updating a specific app setting in a web app can be done using PowerShell for example. See documentation.

  • Thanks for the answer. If i go to the resource directly in configuration and create that setting it works! But yes, since i want to use a pipeline i will try with a powershell script – Nmaster88 Nov 19 '21 at 09:23
  • Btw, where could we get documentation about this? – Nmaster88 Nov 19 '21 at 09:31
  • I've uploaded a PowerShell-script which can be used to upsert an app setting in the app service, which you can find here: https://github.com/mbraekman/Powershell/blob/master/Azure/AppService-UpdateAppSetting.ps1 – Maxim Braekman Nov 19 '21 at 14:29
  • The documentation related to which app settings are supported can be found here: https://learn.microsoft.com/en-us/azure/logic-apps/edit-app-settings-host-settings – Maxim Braekman Nov 19 '21 at 14:31