我如何通过二头肌将多个工作流程添加到标准逻辑应用程序

问题描述 投票:0回答:1

我正在尝试通过二头肌创建具有多个工作流程的标准逻辑应用程序。我添加了用于创建 AppServicePlan 和logicapp 的二头肌代码。但是找不到二头肌代码来添加多个工作流程。我们需要尝试小型自动化脚本作为工作流程的一部分运行。

这是代码

      resource hosting_plan 'Microsoft.Web/serverfarms@2022-09-01' = {
        name: appservicePlanName
        location: location
        sku: {
          name: skuName
           capacity: skuCapacity
        }
        properties: {
        }
        }

     resource logicApp 'Microsoft.Web/sites@2022-09-01' = {
       name: logicAppName
       location: location
       kind: 'functionapp,workflowapp'
       identity: {
         type: 'SystemAssigned'
         }
      properties: {
      httpsOnly: true
      serverFarmId: hosting_plan.id
      clientAffinityEnabled: true
      siteConfig: {
      remoteDebuggingEnabled: false
      ftpsState: 'Disabled'
      minTlsVersion: '1.2'
      scmIpSecurityRestrictionsDefaultAction: 'Deny'     
      ipSecurityRestrictionsDefaultAction: 'Deny'      
      functionsRuntimeScaleMonitoringEnabled: false
       }
      }
     }

如何通过二头肌代码实现添加多个工作流程。预先感谢

azure-cloud-services azure-bicep azure-logic-app-standard
1个回答
0
投票

通过使用 bicep 将不同工作流压缩到单个 zip 文件中,向标准逻辑应用添加多个工作流。

我同意Thomas关于他通过分享MSdoc链接提到的见解,当您使用多个工作流程时确实可能,因为提到的这种方法参考文档会引导您做同样的事情。

您还可以通过将工作流程压缩到单个文件中来尝试此操作,然后将其上传到存储帐户,并通过获取 SAS 令牌 URL,我们可以访问存储帐户及其内部文件。

主要.二头肌:

param location string = resourceGroup().location
param appservicePlanName string = 'vksbAppServicePlan'
param logicAppName string = 'vksbLogicApp'
param skuName string = 'WS1'
param skuCapacity int = 1


resource hosting_plan 'Microsoft.Web/serverfarms@2022-09-01' = {
  name: appservicePlanName
  location: location
  sku: {
    name: skuName
    capacity: skuCapacity
  }
  properties: {
  }
}


resource logicApp 'Microsoft.Web/sites@2022-09-01' = {
  name: logicAppName
  location: location
  kind: 'functionapp,workflowapp'
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    httpsOnly: true
    serverFarmId: hosting_plan.id
    clientAffinityEnabled: true
    siteConfig: {
      remoteDebuggingEnabled: false
      ftpsState: 'Disabled'
      minTlsVersion: '1.2'
      scmIpSecurityRestrictionsDefaultAction: 'Deny'
      ipSecurityRestrictionsDefaultAction: 'Deny'
      functionsRuntimeScaleMonitoringEnabled: false
    }
  }
}


resource logicAppZipDeploy 'Microsoft.Web/sites/extensions@2022-03-01' = {
  name: '${logicApp.name}/zipdeploy'
  properties: {
    packageUri: 'https://testsamvinayvksb.blob.core.windows.net/samplevk/file.zip?sp=r&st=2024-07-08T08:00:46xxxxxxxxxxxxx:46Z&spr=https&sv=2022-11-02&sr=b&sig=xxxxxxxxxxxxxxxxxxxxxxx'
  }
}

output logicAppEndpoint string = logicApp.properties.defaultHostName

部署成功:

enter image description here

enter image description here

参考:

https://learn.microsoft.com/en-us/azure/logic-apps/quickstart-create-deploy-bicep?tabs=CLI

© www.soinside.com 2019 - 2024. All rights reserved.