Articles in this section
Category / Section

Upgrading AppInsights on ForgeFusion 1.0.*

Published:
All ForgeFusion versions 1.0.x have a known bug whereby, the deployment pipeline fails to deploy AppInsights to Datacenters other than west Europe.

This is due to Version 7.0 of CloudExtend (The infrastructure ForgeFusion runs on) running on older Azure APIs

##[error]At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.
##[error]Details:
##[error]BadRequest: Region doesn't support Classic resource mode for Application Insights resources. Please use Workspace-based mode.
##[error]Check out the troubleshooting guide to see if your issue is addressed: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting
##[error]Task failed while creating or updating the template deployment.

The error you're encountering typically arises when deploying an Application Insights resource in Azure using an ARM template, and the specified region does not support the classic resource mode for Application Insights. Instead, it supports only the Workspace-based mode. Here’s how you can resolve this:

Steps to Resolve

  1. Switch to Workspace-based Mode: Modify your ARM template to create an Application Insights resource in Workspace-based mode instead of Classic mode.

  2. Update Your ARM Template: Here’s an example of how to define an Application Insights resource in Workspace-based mode within an ARM template:

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.Insights/components",
      "apiVersion": "2020-02-02-preview",
      "name": "[parameters('appInsightsName')]",
      "location": "[parameters('location')]",
      "kind": "web",
      "properties": {
        "Application_Type": "web",
        "WorkspaceResourceId": "[parameters('workspaceResourceId')]"
      }
    }
  ],
  "parameters": {
    "appInsightsName": {
      "type": "string"
    },
    "location": {
      "type": "string"
    },
    "workspaceResourceId": {
      "type": "string",
      "defaultValue": "[resourceId('Microsoft.OperationalInsights/workspaces', 'myWorkspace')]"
    }
  }
}
  • Replace 'myWorkspace' with the actual name of your Log Analytics Workspace.
  • Ensure you have a Log Analytics Workspace created or create one in the same ARM template if it doesn't exist.
  1. Verify Region Compatibility: Ensure that the region you are deploying to supports Workspace-based Application Insights. Not all regions may support this, so it’s important to confirm this from Azure documentation or the Azure portal.

  2. Check Deployment Script/Tool: If you’re using a deployment script or tool, make sure it reflects these changes.

Additional Troubleshooting

If you continue to face issues, consider the following:

  • Review Deployment Operations: Use the Azure portal or Azure CLI to review the deployment operations and logs for more detailed error messages.

  • Update Azure CLI or PowerShell Modules: Ensure you are using the latest version of Azure CLI or PowerShell modules.

  • Check Azure Service Health: Sometimes deployment issues may arise due to service outages or regional issues. Check the Azure Service Health for any ongoing issues.

Example Command for ARM Template Deployment

az deployment group create \
  --resource-group <YourResourceGroupName> \
  --template-file <PathToYourTemplateFile> \
  --parameters @<PathToYourParametersFile>

Replace <YourResourceGroupName>, <PathToYourTemplateFile>, and <PathToYourParametersFile> with your specific values.

By making these adjustments, you should be able to successfully deploy your Application Insights resource in the supported Workspace-based mode.

Access denied
Access denied