Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The workspaces/dataSources resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Usage Examples
Bicep Samples
A basic example of deploying Log Analytics (formally Operational Insights) DataSource.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource workspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
name: resourceName
location: location
properties: {
features: {
disableLocalAuth: false
enableLogAccessUsingOnlyResourcePermissions: true
}
publicNetworkAccessForIngestion: 'Enabled'
publicNetworkAccessForQuery: 'Enabled'
retentionInDays: 30
sku: {
name: 'PerGB2018'
}
workspaceCapping: {
dailyQuotaGb: -1
}
}
}
resource dataSource 'Microsoft.OperationalInsights/workspaces/dataSources@2020-08-01' = {
name: resourceName
parent: workspace
kind: 'WindowsPerformanceCounter'
properties: {
counterName: 'CPU'
instanceName: '*'
intervalSeconds: 10
objectName: 'CPU'
}
}
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
| Module | Description |
|---|---|
| Log Analytics Workspace - Data Source | AVM Child Module for Log Analytics Workspace - Data Source |
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
| Bicep File | Description |
|---|---|
| Log Analytics workspace with solutions and data sources | Deploys a Log Analytics workspace with specified solutions and data sources |
| Use Azure Firewall as a DNS Proxy in a Hub & Spoke topology | This sample show how to deploy a hub-spoke topology in Azure using the Azure Firewall. The hub virtual network acts as a central point of connectivity to many spoke virtual networks that are connected to hub virtual network via virtual network peering. |
Resource format
To create a Microsoft.OperationalInsights/workspaces/dataSources resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.OperationalInsights/workspaces/dataSources@2025-07-01' = {
parent: resourceSymbolicName
etag: 'string'
kind: 'string'
name: 'string'
properties: any(...)
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.OperationalInsights/workspaces/dataSources
| Name | Description | Value |
|---|---|---|
| etag | The ETag of the data source. | string |
| kind | The kind of the DataSource. | 'ApplicationInsights' 'AzureActivityLog' 'AzureAuditLog' 'ChangeTrackingContentLocation' 'ChangeTrackingCustomPath' 'ChangeTrackingDataTypeConfiguration' 'ChangeTrackingDefaultRegistry' 'ChangeTrackingLinuxPath' 'ChangeTrackingPath' 'ChangeTrackingRegistry' 'ChangeTrackingServices' 'CustomLog' 'CustomLogCollection' 'DnsAnalytics' 'GenericDataSource' 'IISLogs' 'ImportComputerGroup' 'Itsm' 'LinuxChangeTrackingPath' 'LinuxPerformanceCollection' 'LinuxPerformanceObject' 'LinuxSyslog' 'LinuxSyslogCollection' 'NetworkMonitoring' 'Office365' 'SecurityCenterSecurityWindowsBaselineConfiguration' 'SecurityEventCollectionConfiguration' 'SecurityInsightsSecurityEventCollectionConfiguration' 'SecurityWindowsBaselineConfiguration' 'SqlDataClassification' 'WindowsEvent' 'WindowsPerformanceCounter' 'WindowsTelemetry' (required) |
| name | The resource name | string (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: workspaces |
| properties | The data source properties in raw json format, each kind of data source have it's own schema. | any (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
DataSourceTags
| Name | Description | Value |
|---|
ARM template resource definition
The workspaces/dataSources resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands For a list of changed properties in each API version, see change log.
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Deploy Solace PubSub+ message broker onto Azure Linux VM(s) |
This template allows you to deploy either a standalone Solace PubSub+ message broker or a three node High Availability cluster of Solace PubSub+ message brokers onto Azure Linux VM(s). |
| Log Analytics workspace with solutions and data sources |
Deploys a Log Analytics workspace with specified solutions and data sources |
| Use Azure Firewall as a DNS Proxy in a Hub & Spoke topology |
This sample show how to deploy a hub-spoke topology in Azure using the Azure Firewall. The hub virtual network acts as a central point of connectivity to many spoke virtual networks that are connected to hub virtual network via virtual network peering. |
Resource format
To create a Microsoft.OperationalInsights/workspaces/dataSources resource, add the following JSON to your template.
{
"type": "Microsoft.OperationalInsights/workspaces/dataSources",
"apiVersion": "2025-07-01",
"name": "string",
"etag": "string",
"kind": "string",
"properties": {},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.OperationalInsights/workspaces/dataSources
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2025-07-01' |
| etag | The ETag of the data source. | string |
| kind | The kind of the DataSource. | 'ApplicationInsights' 'AzureActivityLog' 'AzureAuditLog' 'ChangeTrackingContentLocation' 'ChangeTrackingCustomPath' 'ChangeTrackingDataTypeConfiguration' 'ChangeTrackingDefaultRegistry' 'ChangeTrackingLinuxPath' 'ChangeTrackingPath' 'ChangeTrackingRegistry' 'ChangeTrackingServices' 'CustomLog' 'CustomLogCollection' 'DnsAnalytics' 'GenericDataSource' 'IISLogs' 'ImportComputerGroup' 'Itsm' 'LinuxChangeTrackingPath' 'LinuxPerformanceCollection' 'LinuxPerformanceObject' 'LinuxSyslog' 'LinuxSyslogCollection' 'NetworkMonitoring' 'Office365' 'SecurityCenterSecurityWindowsBaselineConfiguration' 'SecurityEventCollectionConfiguration' 'SecurityInsightsSecurityEventCollectionConfiguration' 'SecurityWindowsBaselineConfiguration' 'SqlDataClassification' 'WindowsEvent' 'WindowsPerformanceCounter' 'WindowsTelemetry' (required) |
| name | The resource name | string (required) |
| properties | The data source properties in raw json format, each kind of data source have it's own schema. | any (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.OperationalInsights/workspaces/dataSources' |
DataSourceTags
| Name | Description | Value |
|---|
Terraform (AzAPI provider) resource definition
The workspaces/dataSources resource type can be deployed with operations that target:
- Resource groups For a list of changed properties in each API version, see change log.
Usage Examples
Terraform Samples
A basic example of deploying Log Analytics (formally Operational Insights) DataSource.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "workspace" {
type = "Microsoft.OperationalInsights/workspaces@2022-10-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
features = {
disableLocalAuth = false
enableLogAccessUsingOnlyResourcePermissions = true
}
publicNetworkAccessForIngestion = "Enabled"
publicNetworkAccessForQuery = "Enabled"
retentionInDays = 30
sku = {
name = "PerGB2018"
}
workspaceCapping = {
dailyQuotaGb = -1
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "dataSource" {
type = "Microsoft.OperationalInsights/workspaces/dataSources@2020-08-01"
parent_id = azapi_resource.workspace.id
name = var.resource_name
body = {
kind = "WindowsPerformanceCounter"
properties = {
counterName = "CPU"
instanceName = "*"
intervalSeconds = 10
objectName = "CPU"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Resource format
To create a Microsoft.OperationalInsights/workspaces/dataSources resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.OperationalInsights/workspaces/dataSources@2025-07-01"
name = "string"
parent_id = "string"
tags = {
{customized property} = "string"
}
body = {
etag = "string"
kind = "string"
properties = ?
}
}
Property Values
Microsoft.OperationalInsights/workspaces/dataSources
| Name | Description | Value |
|---|---|---|
| etag | The ETag of the data source. | string |
| kind | The kind of the DataSource. | 'ApplicationInsights' 'AzureActivityLog' 'AzureAuditLog' 'ChangeTrackingContentLocation' 'ChangeTrackingCustomPath' 'ChangeTrackingDataTypeConfiguration' 'ChangeTrackingDefaultRegistry' 'ChangeTrackingLinuxPath' 'ChangeTrackingPath' 'ChangeTrackingRegistry' 'ChangeTrackingServices' 'CustomLog' 'CustomLogCollection' 'DnsAnalytics' 'GenericDataSource' 'IISLogs' 'ImportComputerGroup' 'Itsm' 'LinuxChangeTrackingPath' 'LinuxPerformanceCollection' 'LinuxPerformanceObject' 'LinuxSyslog' 'LinuxSyslogCollection' 'NetworkMonitoring' 'Office365' 'SecurityCenterSecurityWindowsBaselineConfiguration' 'SecurityEventCollectionConfiguration' 'SecurityInsightsSecurityEventCollectionConfiguration' 'SecurityWindowsBaselineConfiguration' 'SqlDataClassification' 'WindowsEvent' 'WindowsPerformanceCounter' 'WindowsTelemetry' (required) |
| name | The resource name | string (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: workspaces |
| properties | The data source properties in raw json format, each kind of data source have it's own schema. | any (required) |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.OperationalInsights/workspaces/dataSources@2025-07-01" |
DataSourceTags
| Name | Description | Value |
|---|