Microsoft.Insights components

Bicep resource definition

The components resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Remarks

For guidance on deploying monitoring solutions, see Create monitoring resources by using Bicep.

Resource format

To create a Microsoft.Insights/components resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Insights/components@2020-02-02' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  kind: 'string'
  etag: 'string'
  properties: {
    Application_Type: 'string'
    DisableIpMasking: bool
    DisableLocalAuth: bool
    Flow_Type: 'Bluefield'
    ForceCustomerStorageForProfiler: bool
    HockeyAppId: 'string'
    ImmediatePurgeDataOn30Days: bool
    IngestionMode: 'string'
    publicNetworkAccessForIngestion: 'string'
    publicNetworkAccessForQuery: 'string'
    Request_Source: 'rest'
    RetentionInDays: int
    SamplingPercentage: json('decimal-as-string')
    WorkspaceResourceId: 'string'
  }
}

Property values

components

Name Description Value
name The resource name string (required)

Character limit: 1-260

Valid characters:
Can't use:
%&\?/ or control characters

Can't end with space or period.
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
kind The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. string (required)
etag Resource etag string
properties Properties that define an Application Insights component resource. ApplicationInsightsComponentProperties

ApplicationInsightsComponentProperties

Name Description Value
Application_Type Type of application being monitored. 'other'
'web' (required)
DisableIpMasking Disable IP masking. bool
DisableLocalAuth Disable Non-AAD based Auth. bool
Flow_Type Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. 'Bluefield'
ForceCustomerStorageForProfiler Force users to create their own storage account for profiler and debugger. bool
HockeyAppId The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp. string
ImmediatePurgeDataOn30Days Purge data immediately after 30 days. bool
IngestionMode Indicates the flow of the ingestion. 'ApplicationInsights'
'ApplicationInsightsWithDiagnosticSettings'
'LogAnalytics'
publicNetworkAccessForIngestion The network access type for accessing Application Insights ingestion. 'Disabled'
'Enabled'
publicNetworkAccessForQuery The network access type for accessing Application Insights query. 'Disabled'
'Enabled'
Request_Source Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'. 'rest'
RetentionInDays Retention period in days. int
SamplingPercentage Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. To specify a decimal value, use the json() function. int or json decimal
WorkspaceResourceId Resource Id of the log analytics workspace which the data will be ingested to. This property is required to create an application with this API version. Applications from older versions will not have this property. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
BrowserBox Azure Edition

Deploy to Azure
This template deploys BrowserBox on an Azure Ubuntu Server 22.04 LTS, Debian 11, or RHEL 8.7 LVM VM.
Java CI/CD using Jenkins and Azure Web Apps

Deploy to Azure
This is a sample for Java CI/CD using Jenkins and Azure Web Apps.
Kentico Xperience

Deploy to Azure
This template facilitates the deployment of resources required to host Kentico Xperience environments in Microsoft Azure.
Simple Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
ILB App Service Environment with Azure Firewall

Deploy to Azure
Resource Manager templates and parameters demonstrating how to deploy App Service environment with Azure Firewall integration
Enterprise Governance-AppService, SQL DB, AD, OMS, Runbooks

Deploy to Azure
Cloud adoption for an Enterprise, small or large, require responsible and efficient governance models to derive value from their cloud deployments. CloudWise (a code-name for the solution), is a composite solution available from Azure Partner QuickStarts, is an adoption enabler for Customers, System Integrators and Partners alike, that delivers a self-serviceable, automated governance and operations solution, focused on Optimizing Your Costs, Improve Your Application(s) Reliability, Reducing Business Risk. The solution highlights the core governance pillars of Visibility and Control.
eShop Website with ILB ASE

Deploy to Azure
An App Service Environment is a Premium service plan option of Azure App Service that provides a fully isolated and dedicated environment for securely running Azure App Service apps at high scale, including Web Apps, Mobile Apps, and API Apps.
Web App with a SQL Database, Azure Cosmos DB, Azure Search

Deploy to Azure
This template provisions a Web App, a SQL Database, Azure Cosmos DB, Azure Search and Application Insights.
Azure Machine Learning Workspace

Deploy to Azure
This template creates a new Azure Machine Learning Workspace, along with an encrypted Storage Account, KeyVault and Applications Insights Logging
Create API Management in Internal VNet with App Gateway

Deploy to Azure
This template demonstrates how to Create a instance of Azure API Management on a private network protected by Azure Application Gateway.
Deploy a simple Azure Spring Apps microservice application

Deploy to Azure
This template deploys a simple Azure Spring Apps microservice application to run on Azure.
Front Door Standard/Premium with Azure Functions origin

Deploy to Azure
This template creates a Front Door Standard/Premium, an Azure Functions app, and configures the function app to validate that traffic has come through the Front Door origin.
Azure Digital Twins with Function and Private Link service

Deploy to Azure
This template creates an Azure Digital Twins service configured with a Virtual Network connected Azure Function that can communicate through a Private Link Endpoint to Digital Twins. It also creates a Private DNS Zone to allow seamless hostname resolution of the Digital Twins Endpoint from the Virtual Network to the Private Endpoint internal subnet IP address. The hostname is stored as a setting to the Azure Function with name 'ADT_ENDPOINT'.
Deploy Application Insight and create alert in it

Deploy to Azure
This template allows you to deploy Application Insight and create alert in it
Create AML workspace with multiple Datasets & Datastores

Deploy to Azure
This template creates Azure Machine Learning workspace with multiple datasets & datastores.
Azure Machine Learning end-to-end secure setup

Deploy to Azure
This set of Bicep templates demonstrates how to set up Azure Machine Learning end-to-end in a secure set up. This reference implementation includes the Workspace, a compute cluster, compute instance and attached private AKS cluster.
Azure Machine Learning end-to-end secure setup (legacy)

Deploy to Azure
This set of Bicep templates demonstrates how to set up Azure Machine Learning end-to-end in a secure set up. This reference implementation includes the Workspace, a compute cluster, compute instance and attached private AKS cluster.
Create an AKS compute target with a Private IP address

Deploy to Azure
This template creates an AKS compute target in given Azure Machine Learning service workspace with a private IP address.
Create an Azure Machine Learning service workspace

Deploy to Azure
This deployment template specifies an Azure Machine Learning workspace, and its associated resources including Azure Key Vault, Azure Storage, Azure Application Insights and Azure Container Registry. This configuration describes the minimal set of resources you require to get started with Azure Machine Learning.
Create an Azure Machine Learning service workspace (CMK)

Deploy to Azure
This deployment template specifies an Azure Machine Learning workspace, and its associated resources including Azure Key Vault, Azure Storage, Azure Application Insights and Azure Container Registry. The example shows how to configure Azure Machine Learning for encryption with a customer-managed encryption key.
Create an Azure Machine Learning service workspace (vnet)

Deploy to Azure
This deployment template specifies an Azure Machine Learning workspace, and its associated resources including Azure Key Vault, Azure Storage, Azure Application Insights and Azure Container Registry. This configuration describes the set of resources you require to get started with Azure Machine Learning in a network isolated set up.
Create an Azure Machine Learning service workspace (legacy)

Deploy to Azure
This deployment template specifies an Azure Machine Learning workspace, and its associated resources including Azure Key Vault, Azure Storage, Azure Application Insights and Azure Container Registry. This configuration describes the set of resources you require to get started with Azure Machine Learning in a network isolated set up.
Create Azure Front Door in front of Azure API Management

Deploy to Azure
This sample demonstrates how to use Azure Front Door as a global load balancer in front of Azure API Management.
App Service Environment with Azure SQL backend

Deploy to Azure
This template creates an App Service Environment with an Azure SQL backend along with private endpoints along with associated resources typically used in an private/isolated environment.
Provision a function app running on an App Service Plan

Deploy to Azure
This template provisions a function app on a dedicated hosting plan, meaning it will be run and billed just like any App Service site.
Provision a function app on a Consumption plan

Deploy to Azure
This template provisions a function app on a Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment. There are other templates available for provisioning on a dedicated hosting plan.
Provision Consumption plan function with a Deployment Slot

Deploy to Azure
This template provisions a function app on a Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment. There are other templates available for provisioning on a dedicated hosting plan.
Azure Function App Hosted on Dedicated Plan

Deploy to Azure
This template provisions a function app on a dedicated hosting plan, meaning it will be run and billed just like any App Service site.
Azure Function App with a Deployment Slot

Deploy to Azure
This template provisions a function app on a Premium plan with production slot and an additional deployment slot.
Azure Function App with Event Hub and Managed Identity

Deploy to Azure
his template provisions an Azure Function app on a Linux Consumption plan, along with an Event Hub, Azure Storage, and Application Insights. The function app is able to use managed identity to connect to the Event Hub and Storage account
Azure Function App Hosted on Linux Consumption Plan

Deploy to Azure
This template provisions a function app on a Linux Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment.
Function App on Linux Consumption Plan with Remote Build

Deploy to Azure
This template provisions a function app on a Linux Consumption plan and perform remote build during code deployment. The app runs on demand and you're billed per execution, with no standing resource committment.
Azure Function App Hosted on Premium Plan

Deploy to Azure
This template provisions a function app on a Premium plan.
Private Function App and private endpoint-secured Storage

Deploy to Azure
This template provisions a function app on a Premium plan that has private endpoints and communicates with Azure Storage over private endpoints.
Create Function App and private endpoint-secured Storage

Deploy to Azure
This template allows you to deploy an Azure Function App that communicates with Azure Storage over private endpoints.
Azure Function App with Virtual Network Integration

Deploy to Azure
This template provisions a function app on a Premium plan with regional virtual network integration enabled to a newly created virtual network.
Azure Function App Hosted on Windows Consumption Plan

Deploy to Azure
This template provisions a function app on a Windows Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment.
Azure Function app and an HTTP-triggered function

Deploy to Azure
This example deploys an Azure Function app and an HTTP-triggered function inline in the template. It also deploys a Key Vault and populates a secret with the function app's host key.
Deploy an AZ enabled Azure Function Premium plan

Deploy to Azure
This template allows you to deploy an Azure Function Premium plan with availability zones support, including an availability zones enabled storage account.
Function App secured by Azure Frontdoor

Deploy to Azure
This template allows you to deploy an azure premium function protected and published by Azure Frontdoor premium. The conenction between Azure Frontdoor and Azure Functions is protected by Azure Private Link.
Deploy an Azure Function Premium plan with vnet integration

Deploy to Azure
This template allows you to deploy an Azure Function Premium plan with regional virtual network integration enabled to a newly created virtual network.
Creates a function app with managed service identity

Deploy to Azure
Creates a function app with managed service identity enabled with Application Insights set up for logs and metrics.
Application Gateway with internal API Management and Web App

Deploy to Azure
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
Web App w/ Application Insights sending to Log Analytics

Deploy to Azure
This template will is to help support the new API versions of microsoft.insights/components. Starting with 2020-02-02-preview WorkspaceID will be required when creating Application Inisghts.This template will deploy the App Service Plan, App Service, Application Insights, Log Analytics Workspace and hook it all together.
Web App with Managed Identity, SQL Server and ΑΙ

Deploy to Azure
Simple example to deploy Azure infrastructure for app + data + managed identity + monitoring
Provision a Web App with a SQL Database

Deploy to Azure
This template provisions a Web App, a SQL Database, AutoScale settings, Alert rules, and App Insights. It configures a connection string in the web app for the database.
Django app

Deploy to Azure
This template allows you to create an App Service for deploying a Django app.
ASP.NET app

Deploy to Azure
This template allows you to create an App Service for deploying a ASP.NET app.

ARM template resource definition

The components resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Remarks

For guidance on deploying monitoring solutions, see Create monitoring resources by using Bicep.

Resource format

To create a Microsoft.Insights/components resource, add the following JSON to your template.

{
  "type": "Microsoft.Insights/components",
  "apiVersion": "2020-02-02",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "kind": "string",
  "etag": "string",
  "properties": {
    "Application_Type": "string",
    "DisableIpMasking": "bool",
    "DisableLocalAuth": "bool",
    "Flow_Type": "Bluefield",
    "ForceCustomerStorageForProfiler": "bool",
    "HockeyAppId": "string",
    "ImmediatePurgeDataOn30Days": "bool",
    "IngestionMode": "string",
    "publicNetworkAccessForIngestion": "string",
    "publicNetworkAccessForQuery": "string",
    "Request_Source": "rest",
    "RetentionInDays": "int",
    "SamplingPercentage": "[json('decimal-as-string')]",
    "WorkspaceResourceId": "string"
  }
}

Property values

components

Name Description Value
type The resource type 'Microsoft.Insights/components'
apiVersion The resource api version '2020-02-02'
name The resource name string (required)

Character limit: 1-260

Valid characters:
Can't use:
%&\?/ or control characters

Can't end with space or period.
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
kind The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. string (required)
etag Resource etag string
properties Properties that define an Application Insights component resource. ApplicationInsightsComponentProperties

ApplicationInsightsComponentProperties

Name Description Value
Application_Type Type of application being monitored. 'other'
'web' (required)
DisableIpMasking Disable IP masking. bool
DisableLocalAuth Disable Non-AAD based Auth. bool
Flow_Type Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. 'Bluefield'
ForceCustomerStorageForProfiler Force users to create their own storage account for profiler and debugger. bool
HockeyAppId The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp. string
ImmediatePurgeDataOn30Days Purge data immediately after 30 days. bool
IngestionMode Indicates the flow of the ingestion. 'ApplicationInsights'
'ApplicationInsightsWithDiagnosticSettings'
'LogAnalytics'
publicNetworkAccessForIngestion The network access type for accessing Application Insights ingestion. 'Disabled'
'Enabled'
publicNetworkAccessForQuery The network access type for accessing Application Insights query. 'Disabled'
'Enabled'
Request_Source Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'. 'rest'
RetentionInDays Retention period in days. int
SamplingPercentage Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. To specify a decimal value, use the json() function. int or json decimal
WorkspaceResourceId Resource Id of the log analytics workspace which the data will be ingested to. This property is required to create an application with this API version. Applications from older versions will not have this property. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
BrowserBox Azure Edition

Deploy to Azure
This template deploys BrowserBox on an Azure Ubuntu Server 22.04 LTS, Debian 11, or RHEL 8.7 LVM VM.
Java CI/CD using Jenkins and Azure Web Apps

Deploy to Azure
This is a sample for Java CI/CD using Jenkins and Azure Web Apps.
Kentico Xperience

Deploy to Azure
This template facilitates the deployment of resources required to host Kentico Xperience environments in Microsoft Azure.
Simple Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
ILB App Service Environment with Azure Firewall

Deploy to Azure
Resource Manager templates and parameters demonstrating how to deploy App Service environment with Azure Firewall integration
Enterprise Governance-AppService, SQL DB, AD, OMS, Runbooks

Deploy to Azure
Cloud adoption for an Enterprise, small or large, require responsible and efficient governance models to derive value from their cloud deployments. CloudWise (a code-name for the solution), is a composite solution available from Azure Partner QuickStarts, is an adoption enabler for Customers, System Integrators and Partners alike, that delivers a self-serviceable, automated governance and operations solution, focused on Optimizing Your Costs, Improve Your Application(s) Reliability, Reducing Business Risk. The solution highlights the core governance pillars of Visibility and Control.
eShop Website with ILB ASE

Deploy to Azure
An App Service Environment is a Premium service plan option of Azure App Service that provides a fully isolated and dedicated environment for securely running Azure App Service apps at high scale, including Web Apps, Mobile Apps, and API Apps.
Web App with a SQL Database, Azure Cosmos DB, Azure Search

Deploy to Azure
This template provisions a Web App, a SQL Database, Azure Cosmos DB, Azure Search and Application Insights.
Azure Machine Learning Workspace

Deploy to Azure
This template creates a new Azure Machine Learning Workspace, along with an encrypted Storage Account, KeyVault and Applications Insights Logging
Create API Management in Internal VNet with App Gateway

Deploy to Azure
This template demonstrates how to Create a instance of Azure API Management on a private network protected by Azure Application Gateway.
Deploy a simple Azure Spring Apps microservice application

Deploy to Azure
This template deploys a simple Azure Spring Apps microservice application to run on Azure.
Front Door Standard/Premium with Azure Functions origin

Deploy to Azure
This template creates a Front Door Standard/Premium, an Azure Functions app, and configures the function app to validate that traffic has come through the Front Door origin.
Azure Digital Twins with Function and Private Link service

Deploy to Azure
This template creates an Azure Digital Twins service configured with a Virtual Network connected Azure Function that can communicate through a Private Link Endpoint to Digital Twins. It also creates a Private DNS Zone to allow seamless hostname resolution of the Digital Twins Endpoint from the Virtual Network to the Private Endpoint internal subnet IP address. The hostname is stored as a setting to the Azure Function with name 'ADT_ENDPOINT'.
Deploy Application Insight and create alert in it

Deploy to Azure
This template allows you to deploy Application Insight and create alert in it
Create AML workspace with multiple Datasets & Datastores

Deploy to Azure
This template creates Azure Machine Learning workspace with multiple datasets & datastores.
Azure Machine Learning end-to-end secure setup

Deploy to Azure
This set of Bicep templates demonstrates how to set up Azure Machine Learning end-to-end in a secure set up. This reference implementation includes the Workspace, a compute cluster, compute instance and attached private AKS cluster.
Azure Machine Learning end-to-end secure setup (legacy)

Deploy to Azure
This set of Bicep templates demonstrates how to set up Azure Machine Learning end-to-end in a secure set up. This reference implementation includes the Workspace, a compute cluster, compute instance and attached private AKS cluster.
Create an AKS compute target with a Private IP address

Deploy to Azure
This template creates an AKS compute target in given Azure Machine Learning service workspace with a private IP address.
Create an Azure Machine Learning service workspace

Deploy to Azure
This deployment template specifies an Azure Machine Learning workspace, and its associated resources including Azure Key Vault, Azure Storage, Azure Application Insights and Azure Container Registry. This configuration describes the minimal set of resources you require to get started with Azure Machine Learning.
Create an Azure Machine Learning service workspace (CMK)

Deploy to Azure
This deployment template specifies an Azure Machine Learning workspace, and its associated resources including Azure Key Vault, Azure Storage, Azure Application Insights and Azure Container Registry. The example shows how to configure Azure Machine Learning for encryption with a customer-managed encryption key.
Create an Azure Machine Learning service workspace (vnet)

Deploy to Azure
This deployment template specifies an Azure Machine Learning workspace, and its associated resources including Azure Key Vault, Azure Storage, Azure Application Insights and Azure Container Registry. This configuration describes the set of resources you require to get started with Azure Machine Learning in a network isolated set up.
Create an Azure Machine Learning service workspace (legacy)

Deploy to Azure
This deployment template specifies an Azure Machine Learning workspace, and its associated resources including Azure Key Vault, Azure Storage, Azure Application Insights and Azure Container Registry. This configuration describes the set of resources you require to get started with Azure Machine Learning in a network isolated set up.
Create Azure Front Door in front of Azure API Management

Deploy to Azure
This sample demonstrates how to use Azure Front Door as a global load balancer in front of Azure API Management.
App Service Environment with Azure SQL backend

Deploy to Azure
This template creates an App Service Environment with an Azure SQL backend along with private endpoints along with associated resources typically used in an private/isolated environment.
Provision a function app running on an App Service Plan

Deploy to Azure
This template provisions a function app on a dedicated hosting plan, meaning it will be run and billed just like any App Service site.
Provision a function app on a Consumption plan

Deploy to Azure
This template provisions a function app on a Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment. There are other templates available for provisioning on a dedicated hosting plan.
Provision Consumption plan function with a Deployment Slot

Deploy to Azure
This template provisions a function app on a Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment. There are other templates available for provisioning on a dedicated hosting plan.
Azure Function App Hosted on Dedicated Plan

Deploy to Azure
This template provisions a function app on a dedicated hosting plan, meaning it will be run and billed just like any App Service site.
Azure Function App with a Deployment Slot

Deploy to Azure
This template provisions a function app on a Premium plan with production slot and an additional deployment slot.
Azure Function App with Event Hub and Managed Identity

Deploy to Azure
his template provisions an Azure Function app on a Linux Consumption plan, along with an Event Hub, Azure Storage, and Application Insights. The function app is able to use managed identity to connect to the Event Hub and Storage account
Azure Function App Hosted on Linux Consumption Plan

Deploy to Azure
This template provisions a function app on a Linux Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment.
Function App on Linux Consumption Plan with Remote Build

Deploy to Azure
This template provisions a function app on a Linux Consumption plan and perform remote build during code deployment. The app runs on demand and you're billed per execution, with no standing resource committment.
Azure Function App Hosted on Premium Plan

Deploy to Azure
This template provisions a function app on a Premium plan.
Private Function App and private endpoint-secured Storage

Deploy to Azure
This template provisions a function app on a Premium plan that has private endpoints and communicates with Azure Storage over private endpoints.
Create Function App and private endpoint-secured Storage

Deploy to Azure
This template allows you to deploy an Azure Function App that communicates with Azure Storage over private endpoints.
Azure Function App with Virtual Network Integration

Deploy to Azure
This template provisions a function app on a Premium plan with regional virtual network integration enabled to a newly created virtual network.
Azure Function App Hosted on Windows Consumption Plan

Deploy to Azure
This template provisions a function app on a Windows Consumption plan, which is a dynamic hosting plan. The app runs on demand and you're billed per execution, with no standing resource committment.
Azure Function app and an HTTP-triggered function

Deploy to Azure
This example deploys an Azure Function app and an HTTP-triggered function inline in the template. It also deploys a Key Vault and populates a secret with the function app's host key.
Deploy an AZ enabled Azure Function Premium plan

Deploy to Azure
This template allows you to deploy an Azure Function Premium plan with availability zones support, including an availability zones enabled storage account.
Function App secured by Azure Frontdoor

Deploy to Azure
This template allows you to deploy an azure premium function protected and published by Azure Frontdoor premium. The conenction between Azure Frontdoor and Azure Functions is protected by Azure Private Link.
Deploy an Azure Function Premium plan with vnet integration

Deploy to Azure
This template allows you to deploy an Azure Function Premium plan with regional virtual network integration enabled to a newly created virtual network.
Creates a function app with managed service identity

Deploy to Azure
Creates a function app with managed service identity enabled with Application Insights set up for logs and metrics.
Application Gateway with internal API Management and Web App

Deploy to Azure
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
Web App w/ Application Insights sending to Log Analytics

Deploy to Azure
This template will is to help support the new API versions of microsoft.insights/components. Starting with 2020-02-02-preview WorkspaceID will be required when creating Application Inisghts.This template will deploy the App Service Plan, App Service, Application Insights, Log Analytics Workspace and hook it all together.
Web App with Managed Identity, SQL Server and ΑΙ

Deploy to Azure
Simple example to deploy Azure infrastructure for app + data + managed identity + monitoring
Provision a Web App with a SQL Database

Deploy to Azure
This template provisions a Web App, a SQL Database, AutoScale settings, Alert rules, and App Insights. It configures a connection string in the web app for the database.
Django app

Deploy to Azure
This template allows you to create an App Service for deploying a Django app.
ASP.NET app

Deploy to Azure
This template allows you to create an App Service for deploying a ASP.NET app.

Terraform (AzAPI provider) resource definition

The components resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Insights/components resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Insights/components@2020-02-02"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      Application_Type = "string"
      DisableIpMasking = bool
      DisableLocalAuth = bool
      Flow_Type = "Bluefield"
      ForceCustomerStorageForProfiler = bool
      HockeyAppId = "string"
      ImmediatePurgeDataOn30Days = bool
      IngestionMode = "string"
      publicNetworkAccessForIngestion = "string"
      publicNetworkAccessForQuery = "string"
      Request_Source = "rest"
      RetentionInDays = int
      SamplingPercentage = "decimal-as-string"
      WorkspaceResourceId = "string"
    }
    kind = "string"
    etag = "string"
  })
}

Property values

components

Name Description Value
type The resource type "Microsoft.Insights/components@2020-02-02"
name The resource name string (required)

Character limit: 1-260

Valid characters:
Can't use:
%&\?/ or control characters

Can't end with space or period.
location Resource location string (required)
parent_id To deploy to a resource group, use the ID of that resource group. string (required)
tags Resource tags Dictionary of tag names and values.
kind The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. string (required)
etag Resource etag string
properties Properties that define an Application Insights component resource. ApplicationInsightsComponentProperties

ApplicationInsightsComponentProperties

Name Description Value
Application_Type Type of application being monitored. "other"
"web" (required)
DisableIpMasking Disable IP masking. bool
DisableLocalAuth Disable Non-AAD based Auth. bool
Flow_Type Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. "Bluefield"
ForceCustomerStorageForProfiler Force users to create their own storage account for profiler and debugger. bool
HockeyAppId The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp. string
ImmediatePurgeDataOn30Days Purge data immediately after 30 days. bool
IngestionMode Indicates the flow of the ingestion. "ApplicationInsights"
"ApplicationInsightsWithDiagnosticSettings"
"LogAnalytics"
publicNetworkAccessForIngestion The network access type for accessing Application Insights ingestion. "Disabled"
"Enabled"
publicNetworkAccessForQuery The network access type for accessing Application Insights query. "Disabled"
"Enabled"
Request_Source Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'. "rest"
RetentionInDays Retention period in days. int
SamplingPercentage Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. Specify a decimal value as a string. int or json decimal
WorkspaceResourceId Resource Id of the log analytics workspace which the data will be ingested to. This property is required to create an application with this API version. Applications from older versions will not have this property. string