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

[main] Add Alert Processing Rule to Suppress Resolved Alerts #113

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -------------------------------------------------------------------------------------
#
# Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). All Rights Reserved.
#
# This software is the property of WSO2 LLC. and its suppliers, if any.
# Dissemination of any information or reproduction of any material contained
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly.
# You may not alter or remove any copyright or other notice from copies of this content.
#
# --------------------------------------------------------------------------------------

resource "azurerm_monitor_alert_processing_rule_suppression" "monitor_alert_processing_rule_suppression" {
name = join("-", ["apr", var.monitor_alert_processing_rule_suppression_name])
resource_group_name = var.resource_group_name
description = var.description
scopes = var.scopes
enabled = var.enabled
tags = var.tags

condition {
monitor_condition {
operator = var.operator
values = var.values
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -------------------------------------------------------------------------------------
#
# Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). All Rights Reserved.
#
# This software is the property of WSO2 LLC. and its suppliers, if any.
# Dissemination of any information or reproduction of any material contained
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly.
# You may not alter or remove any copyright or other notice from copies of this content.
#
# --------------------------------------------------------------------------------------

variable "resource_group_name" {
description = "Name of the Resource Group"
type = string
}

variable "monitor_alert_processing_rule_suppression_name" {
description = "Name of the Monitor Alert Processing Rule Suppression"
type = string
}

variable "tags" {
description = "Tags for the Resource"
type = map(string)
}

variable "scopes" {
description = "The scopes to apply the suppression to"
type = list(string)
}

variable "description" {
description = "Description of the Monitor Alert Processing Rule Suppression"
type = string
}

variable "enabled" {
description = "Is the Monitor Alert Processing Rule Suppression Enabled?"
type = bool
default = true
}

variable "operator" {
description = "Operator for the Monitor Alert Processing Rule Suppression"
type = string
default = "Equals"
}

variable "values" {
description = "Values for the Monitor Alert Processing Rule Suppression"
type = list(string)
default = ["Resolved"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -------------------------------------------------------------------------------------
#
# Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). All Rights Reserved.
#
# This software is the property of WSO2 LLC. and its suppliers, if any.
# Dissemination of any information or reproduction of any material contained
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly.
# You may not alter or remove any copyright or other notice from copies of this content.
#
# --------------------------------------------------------------------------------------

terraform {
required_version = ">= 0.13"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.52.0"
}
}
}
Loading