Logic App has no managed identity configured

Use managed identity for supported Logic App Standard connections to reduce workflow-managed secrets.

Description

A Logic App Standard workflow can use a managed identity for connectors and actions that support it.

Potential impact

An exposed connection key can be misused. Revoking a key while a workflow still uses it can interrupt the workflow.

Remediation

Attach a SystemAssigned identity, or use UserAssigned and supply identity_ids. Grant access on the target resource and select managed identity authentication for each supported connection. Run each affected action before revoking the secrets it replaces.

Examples

Both examples still use storage_account_access_key for host storage. Migrate storage authentication separately before retiring that key.

Before

hcl
resource "azurerm_logic_app_standard" "example" {
  name                       = "example-logic-app"
  location                   = azurerm_resource_group.example.location
  resource_group_name        = azurerm_resource_group.example.name
  app_service_plan_id        = azurerm_service_plan.example.id
  storage_account_name       = azurerm_storage_account.example.name
  storage_account_access_key = azurerm_storage_account.example.primary_access_key
}

After

hcl
resource "azurerm_logic_app_standard" "example" {
  name                       = "example-logic-app"
  location                   = azurerm_resource_group.example.location
  resource_group_name        = azurerm_resource_group.example.name
  app_service_plan_id        = azurerm_service_plan.example.id
  storage_account_name       = azurerm_storage_account.example.name
  storage_account_access_key = azurerm_storage_account.example.primary_access_key

  identity {
    type = "SystemAssigned"
  }
}

References