Skip to content

Azure Diagnostics Module

Requirements

Name Version
terraform >= 1.0
azurerm >= 3.25.0

Providers

Name Version
azurerm >= 3.25.0

Resources

Name Type
azurerm_monitor_diagnostic_setting.this resource
azurerm_monitor_diagnostic_categories.this data source
azurerm_resources.this data source

Inputs

Name Description Type Default Required
disabled_diag_categories Diagnostic Categories that we want to create a setting for, but set it to disabled instead of not creating a setting at all. In certain cases Terraform and Azure will fight over if the setting shoudl be NULL or Disabled. This lets us set that. set(string) [] no
excluded_diag_categories Diagnostic Categories that we don't want to enable at all. Either because the data isn't valuable, it is a duplicate of another log stream, or other reasons. set(string) [] no
log_analytics_id Id of the Log Analytics Workspace to send diagnostic data string n/a yes
resource_group_to_scan Which resource group should the logs be setup for? string n/a yes
unsupported_diag_resource_types Resource types that don't support diagnostic settings. Certain types are returned by azurerm_monitor_diagnostic_categories, but when you query for which logs it has available it throws an eror. This list skips over those types set(string)
[
"Microsoft.OperationalInsights"
]
no

Outputs

Name Description
resources List of resources to have diagnostics applied