Skip to content

azure-appsvc-ad-enabled

When App Service needs to access other managed resources, it should do so by using a managed identity provided by the Azure Active Directory. This provides you with a centralized means of authorizing resource requests without the need to manage individual secrets.

Examples

Insecure Example

resource "azurerm_app_service" "example" {
  name                = "example-app-service"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  app_service_plan_id = azurerm_app_service_plan.example.id
}

Secure Example

resource "azurerm_app_service" "example" {
  name                = "example-app-service"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  app_service_plan_id = azurerm_app_service_plan.example.id

  identity {
    type = "SystemAssigned"
  }
}

More information