hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.51k stars 4.59k forks source link

Support for azurerm_monitor_action_rule_action_group suppression #12807

Closed MattGarner-N closed 2 years ago

MattGarner-N commented 3 years ago

Community Note

Description

Support Alert Suppression functionality within Azure Action Rules.

New or Affected Resource(s)

Potential Terraform Configuration

resource "azurerm_monitor_action_rule_action_group" "example" {
  name                = "example-amar"
  resource_group_name = azurerm_resource_group.example.name
  action_group_id     = azurerm_monitor_action_group.example.id

  type = "Suppression"

  suppression_config {
    recurrence_type = "Daily"
    schedule = {
      start_date = "12/09/2018"
      end_date = "12/18/2018"
      start_time = "06:00:00"
      end_time = "14:00:00"
    }
  }

  scope {
    type         = "ResourceGroup"
    resource_ids = [azurerm_resource_group.example.id]
  }

  tags = {
    foo = "bar"
  }
}

References

Action Rule REST API showing Suppression:

https://docs.microsoft.com/en-us/rest/api/monitor/alertsmanagement/action-rules/create-update#actionrule

More info here:

https://docs.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-action-rules?tabs=portal

teowa commented 2 years ago

There is another resource support Action Rules suppression, see azurerm_monitor_action_rule_suppression.

mybayern1974 commented 2 years ago

@MattGarner-N , could you please check whether what teowa provided above could address your feature request?

mybayern1974 commented 2 years ago

@MattGarner-N , I'm closing this issue by assuming this feature request has been supported per teowa's comments above, or feel free to suggest to reopen this issue if you found this feature is still not supported yet.

github-actions[bot] commented 2 years ago

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.