如何使用 Terraform 部署 azure logic app 标准工作流程

how use Terrafrom to deploy azure logic app standard's workflows

我可以使用 terraform 部署逻辑应用程序标准,但是我无法在逻辑应用程序标准内部署或导入工作流。任何帮助将不胜感激

谢谢

I can deploy logic App standard using terraform however i am unable to deploy or import the workflows inside logic App standard

如果您在部署工作流时遇到问题,您可以尝试的解决方法之一是为工作流编写 ARM 模板并部署 ARM 模板以在逻辑应用中配置工作流。

// Create an instance of logic app and configure the tags
resource "azurerm_logic_app_workflow" "logicapp" {
  location            = "westeurope"
  resource_group_name = var.shared_env.rg.name
  tags                = var.shared_env.tags
}

// Deploy the ARM template to configure the workflow in the Logic App
data "template_file" "workflow" {
  template = file(local.arm_file_path)
}

// Deploy the ARM template workflow
resource "azurerm_template_deployment" "workflow" {
  depends_on = [azurerm_logic_app_workflow.logicapp]

  resource_group_name = var.shared_env.rg.name
  parameters = merge({
    "workflowName" = var.workflow_name,
    "location"     = "westeurope"
  }, var.parameters)

  template_body = data.template_file.workflow.template
}

如果您尝试从 terraform 部署操作,这里有一个 example 您可以参考。

参考资料:

  1. azurerm_logic_app_standard
  2. Deploying a LogicApp with Terraform