Skip to content

libre-devops/terraform-azurerm-logic-app-workflow

Repository files navigation

resource "azurerm_logic_app_workflow" "workflows" {
  for_each = { for app in var.logic_app_workflows : app.name => app }

  location                           = each.value.location
  name                               = each.value.name
  resource_group_name                = each.value.rg_name
  tags                               = each.value.tags
  integration_service_environment_id = each.value.integration_service_environment_id
  logic_app_integration_account_id   = each.value.logic_app_integration_account_id
  enabled                            = each.value.enabled
  workflow_parameters                = each.value.workflow_parameters
  workflow_version                   = each.value.workflow_version
  parameters                         = each.value.parameters


  dynamic "identity" {
    for_each = each.value.identity_type == "SystemAssigned" ? [each.value.identity_type] : []
    content {
      type = each.value.identity_type
    }
  }

  dynamic "identity" {
    for_each = each.value.identity_type == "UserAssigned" ? [each.value.identity_type] : []
    content {
      type         = each.value.identity_type
      identity_ids = length(try(each.value.identity_ids, [])) > 0 ? each.value.identity_ids : []
    }
  }

  dynamic "access_control" {
    for_each = each.value.access_control != null ? [each.value.access_control] : []
    content {
      dynamic "action" {
        for_each = access_control.value.action != null ? [access_control.value.action] : []
        content {
          allowed_caller_ip_address_range = action.value.allowed_caller_ip_address_range
        }
      }

      dynamic "content" {
        for_each = access_control.value.content != null ? [access_control.value.content] : []
        content {
          allowed_caller_ip_address_range = content.value.allowed_caller_ip_address_range
        }
      }

      dynamic "trigger" {
        for_each = access_control.value.trigger != null ? [access_control.value.trigger] : []
        content {
          allowed_caller_ip_address_range = trigger.value.allowed_caller_ip_address_range

          dynamic "open_authentication_policy" {
            for_each = trigger.value.open_authentication_policy != null ? [trigger.value.open_authentication_policy] : []
            content {
              name = open_authentication_policy.value.name

              dynamic "claim" {
                for_each = open_authentication_policy.value.claim != null ? [open_authentication_policy.value.claim] : []
                content {
                  name  = claim.value.name
                  value = claim.value.value
                }
              }
            }
          }
        }
      }

      dynamic "workflow_management" {
        for_each = access_control.value.workflow_management != null ? [access_control.value.workflow_management] : []
        content {
          allowed_caller_ip_address_range = workflow_management.value.allowed_caller_ip_address_range
        }
      }
    }
  }
}

Requirements

No requirements.

Providers

Name Version
azurerm n/a

Modules

No modules.

Resources

Name Type
azurerm_logic_app_workflow.workflows resource

Inputs

Name Description Type Default Required
logic_app_workflows The list of object settings for logic app workflows
list(object({
name = string
rg_name = string
location = string
tags = map(string)
enabled = optional(bool, true)
integration_service_environment_id = optional(string)
logic_app_integration_account_id = optional(string)
identity_type = optional(string)
identity_ids = optional(list(string))
workflow_schema = optional(string)
workflow_parameters = optional(map(string))
workflow_version = optional(string, "1.0.0.0")
parameters = optional(map(string))
access_control = optional(object({
action = optional(object({
allowed_caller_ip_address_range = list(string)
}))
content = optional(object({
allowed_caller_ip_address_range = list(string)
}))
trigger = optional(object({
allowed_caller_ip_address_range = list(string)
open_authentication_policy = optional(object({
name = string
claim = optional(object({
name = string
value = string
}))
}))
}))
workflow_management = optional(object({
allowed_caller_ip_address_range = list(string)
}))
}))
}))
n/a yes

Outputs

Name Description
logic_app_workflow_access_endpoints The Access Endpoints for the Logic App Workflows.
logic_app_workflow_connector_endpoint_ip_addresses The list of access endpoint IP addresses of connector.
logic_app_workflow_connector_outbound_ip_addresses The list of outgoing IP addresses of connector.
logic_app_workflow_endpoint_ip_addresses The list of access endpoint IP addresses of workflow.
logic_app_workflow_identity The identities for the Logic App Workflows.
logic_app_workflow_ids The Logic App Workflow IDs.
logic_app_workflow_names The Logic App Workflow names
logic_app_workflow_outbound_ip_addresses The list of outgoing IP addresses of workflow.
logic_app_workflow_principal_ids The Principal IDs for the Service Principal associated with the Managed Service Identity of this Logic App Workflow.
logic_app_workflow_rg_names The Logic App Workflow resource group names
logic_app_workflow_tags The Logic App Workflow resource group names
logic_app_workflow_tenant_ids The Tenant IDs for the Service Principal associated with the Managed Service Identity of this Logic App Workflow.

About

A module used to deploy a logic app workflow

Resources

License

Stars

Watchers

Forks

Packages

No packages published