Skip to content

Latest commit

Β 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CI License: MIT PRs Welcome Maintained Terraform

Azure Service Alerting Overlay Terraform Module

Changelog MIT License TF Registry

This Overlay terraform module can create Azure Service Alerts and Azure Monitor Alerts with an Action Group for notifications destination to be used in a SCCA compliant Network.

SCCA Compliance

This module can be SCCA compliant and can be used in a SCCA compliant Network. Enable SCCA compliant network rules to make it SCCA compliant.

For more information, please read the SCCA documentation.

Contributing

If you want to contribute to this repository, feel free to to contribute to our Terraform module.

More details are available in the CONTRIBUTING.md file.

Resources Used

Usage

module "mod_service_alerts" {
  source = "POps-Rox/tf-az-overlays-service-alerts/azurerm"
  version = "0.1.0"

  # Resource Group
  existing_resource_group_name = azurerm_resource_group.rg.name
  location                     = azurerm_resource_group.rg.location
  org_name                     = var.org_name
  environment                  = var.environment
  deploy_environment           = var.deploy_environment
  workload_name                = var.workload_name

  action_group_short_name = "Alerting"

  action_group_webhooks = {
    PagerDuty = "https://events.pagerduty.com/integration/{integration-UID}/enqueue"
    Slack     = "https://hooks.slack.com/services/{azerty}/XXXXXXXXXXXXXXx/{hook-key}"
  }

  # Service Alerts
  service_alerts = [
    {
      name = "Service Alert 1"
      description = "Service Alert 1 Description"
      severity = "Sev1"
      enabled = true
      scopes = [
        "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/virtualMachines/vm-00000000-0000-0000-0000-000000000000"
      ]
      conditions = [
        {
          field = "Status"
          operator = "Equals"
          values = ["Unavailable"]
        }
      ]
      actions = [
        {
          action_group_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-00000000-0000-0000-0000-000000000000/providers/microsoft.insights/actionGroups/ag-00000000-0000-0000-0000-000000000000"
        }
      ]
    }
  ]

  # Activity Log Alerts
  activity_log_alerts = [
    {
      name = "Activity Log Alert 1"
      description = "Activity Log Alert 1 Description"
      enabled = true
      scopes = [
        "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/virtualMachines/vm-00000000-0000-0000-0000-000000000000"
      ]
      conditions = [
        {
          field = "category"
          operator = "Equals"
          values = ["Administrative"]
        }
      ]
      actions = [
        {
          action_group_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-00000000-0000-0000-0000-000000000000/providers/microsoft.insights/actionGroups/ag-00000000-0000-0000-0000-000000000000"
        }
        ]
    }
    ]
}
    

About

πŸ”” Terraform overlay for Azure Monitor service health alerts

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages