Use this data source to get information about a specific ruleset that you can use for managing and grouping event rules.
Rulesets and Event Rules will end-of-life soon. We highly recommend that you migrate to Event Orchestration as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, REST APIs and Terraform support, advanced conditions, and rule nesting.
data "pagerduty_ruleset" "example" {
name = "My Ruleset"
}
resource "pagerduty_ruleset_rule" "foo" {
ruleset = data.pagerduty_ruleset.example.id
position = 0
disabled = "false"
conditions {
operator = "and"
subconditions {
operator = "contains"
parameter {
value = "disk space"
path = "payload.summary"
}
}
subconditions {
operator = "contains"
parameter {
value = "db"
path = "payload.source"
}
}
}
actions {
route {
value = "P5DTL0K"
}
}
}
data "pagerduty_ruleset" "default_global" {
name = "Default Global"
}
The following arguments are supported:
name
- (Required) The name of the ruleset to find in the PagerDuty API.id
- The ID of the found ruleset.name
- The name of the found ruleset.routing_keys
- Routing keys routed to this ruleset.