Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "Security" events for Azure Service Health alerts #11801

Closed
Tailzip opened this issue May 20, 2021 · 2 comments · Fixed by #11802
Closed

Support for "Security" events for Azure Service Health alerts #11801

Tailzip opened this issue May 20, 2021 · 2 comments · Fixed by #11802
Milestone

Comments

@Tailzip
Copy link
Contributor

Tailzip commented May 20, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Add support for Security event type for Azure Service Health alerts.
It is supported in the portal (see docs) and in ARM templates (see example below).

ARM template example
  {
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
      "activityLogAlerts_demo": {
        "defaultValue": "demo",
        "type": "String"
      }
    },
    "variables": {},
    "resources": [
      {
        "type": "microsoft.insights/activityLogAlerts",
        "apiVersion": "2020-10-01",
        "name": "[parameters('activityLogAlerts_demo')]",
        "location": "Global",
        "properties": {
          "scopes": [
            "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
          ],
          "condition": {
            "allOf": [
              {
                "field": "category",
                "equals": "ServiceHealth"
              },
              {
                "anyOf": [
                  {
                    "field": "properties.incidentType",
                    "equals": "Security"
                  }
                ]
              },
              {
                "field": "properties.impactedServices[*].ImpactedRegions[*].RegionName",
                "containsAny": [
                  "Global"
                ]
              }
            ]
          },
          "actions": {
            "actionGroups": []
          },
          "enabled": true
        }
      }
    ]
  }

Currently, service_health configuration block only support the following events : Incident, Maintenance, Informational and ActionRequired (see monitor_activity_log_alert_resource.go file).

New or Affected Resource(s)

  • azurerm_monitor_activity_log_alert

Potential Terraform Configuration

resource "azurerm_monitor_activity_log_alert" "security_health_alert" {
  # ...

  criteria {
    category = "ServiceHealth"
    service_health {
      events    = ["Security"]
      locations = ["Global"]
      services  = []
    }
  }
}

References

@ghost
Copy link

ghost commented May 21, 2021

This has been released in version 2.60.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.60.0"
}
# ... other configuration ...

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants