I'm not aware of the way of turning off or configuring the daily cap for an Application Insights resource natively through a Bicep template property. While the Microsoft.Insights/components resource exists, it does not offer a direct property for managing the daily volume cap.
For modern workspace-based Application Insights, you can manage the ingestion limit at the linked Log Analytics Workspace level. To ensure there is no active cap on the workspace, set the dailyQuotaGb property to -1 within the workspaceCapping block of the Microsoft.OperationalInsights/workspaces resource. By default, Log Analytics does not enable a daily cap unless explicitly configured.
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = {
name: 'my-workspace'
location: resourceGroup().location
properties: {
workspaceCapping: {
dailyQuotaGb: -1
}
}
}
If you need to manage the cap for a specific Application Insights component or want to ensure the component-level cap is disabled, use a PowerShell script. The Set-AzApplicationInsightsDailyCap command can be used in a deployment script or CI/CD pipeline to automate this.
Set-AzApplicationInsightsDailyCap -ResourceGroupName "my-rg" -Name "my-app-insights" -DailyCapGB 1000 -DisableNotificationWhenHitCap
For workspace-based resources, be aware that the effective limit is the lower of the two caps if both are set on the Application Insights resource and the Log Analytics Workspace. If the cap is reached at either level, data ingestion will stop until the next reset period. '
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin