alicloud_cms_metric_rule_template

Provides a Cloud Monitor Service Metric Rule Template resource.

For information about Cloud Monitor Service Metric Rule Template and how to use it, see What is Metric Rule Template.

Example Usage

Basic Usage

variable "name" {
  default = "tf-example"
}

resource "alicloud_cms_metric_rule_template" "example" {
  metric_rule_template_name = var.name
  alert_templates {
    category    = "ecs"
    metric_name = "cpu_total"
    namespace   = "acs_ecs_dashboard"
    rule_name   = "tf_example"
    escalations {
      critical {
        comparison_operator = "GreaterThanThreshold"
        statistics          = "Average"
        threshold           = "90"
        times               = "3"
      }
    }
  }
}

Argument Reference

The following arguments are supported:

alert_templates

The alert_templates supports the following:

alert_templates-escalations

The escalations supports the following:

alert_templates-escalations-warn

The warn supports the following:

alert_templates-escalations-info

The info supports the following:

alert_templates-escalations-critical

The critical supports the following:

Attributes Reference

The following attributes are exported:

Import

Cloud Monitor Service Metric Rule Template can be imported using the id, e.g.

$ terraform import alicloud_cms_metric_rule_template.example <id>