diagnostics-integration

Create Terraform diagnostics.tf files configuring Azure Monitor diagnostic settings for multiple destinations.

7|5|Updated Jan 22, 2025
One-click install
npx skills add https://github.com/aztfmodnew/terraform-azurerm-caf --skill diagnostics-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnostics-integration
Source: https://github.com/aztfmodnew/terraform-azurerm-caf/tree/main/.github/skills/diagnostics-integration
Command: npx skills add https://github.com/aztfmodnew/terraform-azurerm-caf --skill diagnostics-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of integrating Azure Monitor diagnostic settings into Terraform modules, ensuring comprehensive logging and monitoring for Azure resources.

Core Features & Use Cases

  • Automated Diagnostics Setup: Adds diagnostics.tf and necessary variables to modules.
  • Multi-Destination Support: Configures logging to Log Analytics, Storage Accounts, and Event Hubs.
  • Use Case: When deploying a new Azure Storage Account using Terraform, this Skill can be invoked to automatically configure diagnostic logs to be sent to a Log Analytics workspace for real-time analysis and alerting.

Quick Start

Add diagnostic settings to the managed_redis module.

Frequently Asked Questions about diagnostics-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Azure Monitor diagnostic settings to a Terraform module?

Adding Azure Monitor diagnostic settings to a Terraform module involves generating a diagnostics.tf file and defining diagnostic variables to configure log categories and metrics.

Can I send Azure diagnostic logs to multiple destinations like Log Analytics and Event Hubs?

Yes, you can configure diagnostic logs to route to multiple destinations simultaneously, including Log Analytics workspaces, Storage Accounts, and Event Hubs for comprehensive monitoring.

Does this diagnostics configuration support service-specific log categories and retention policies in Terraform?

Yes, it automates the configuration of service-specific log categories, metrics, and retention policies based on the unique requirements of the Azure resources being monitored.

What is the best way to automate logging configuration for Azure resources deployed with Terraform?

Automating logging configuration for Azure resources in Terraform is best done by integrating diagnostic settings directly into modules, using a dedicated diagnostics.tf file to manage destinations and retention.

Do I need to manually specify log categories when configuring Azure Monitor diagnostics in Terraform?

No, manual specification of log categories is unnecessary because the configuration automatically sets up log categories and metrics based on the specific Azure service requirements.