You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-sources/monitor_alert_definition.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,17 +41,26 @@ In addition to all arguments above, the following attributes are exported:
41
41
*[`rule_criteria`](#rule_criteria) - The criteria expression for the alert.
42
42
*[`trigger_conditions`](#trigger_conditions) - The conditions that need to be met to send a notification for the alert.
43
43
*`description` - A description for the alert definition.
44
-
*`entity_ids` - A list of entity IDs to associate with the alert definition.
45
44
*`status` - The status of the alert definition.
46
45
*`type` - The type of alert. This can be either user for an alert specific to the current user, or system for one that applies to all users on your account.
47
-
*`has_more_resources` - Whether there are additional entity_ids associated with the alert for which the user doesn't have at least read-only access.
48
46
*`created` - The date and time the alert definition was created.
49
47
*`updated` - The date and time the alert definition was last updated.
50
48
*`created_by` - For a user alert definition, this is the user on your account that created it. For a system alert definition, this is returned as system.
51
49
*`updated_by` - For a user alert definition, this is the user on your account that last updated it. For a system alert definition, this is returned as system. If it hasn't been updated, this value is the same as created_by.
52
50
*`class` - "The plan type for the Managed Database cluster, either shared or dedicated. This only applies to a system alert for a service_type of dbaas (Managed Databases). For user alerts for dbaas, this is returned as null.",
51
+
*`scope` - The scope of the alert definition. Possible values: `account`, `entity`, `region`.
52
+
*`regions` - The regions the alert definition applies to. Only used for region-scoped alerts.
53
+
*[`entities`](#entities) - Entity metadata for the alert definition.
53
54
*[`alert_channels`](#alert_channels) - A list of alert channel objects associated with the alert definition.
54
55
56
+
### entities
57
+
58
+
The following attributes are exported in the `entities` block:
59
+
60
+
*`url` - The URL to list entities associated with the alert definition.
61
+
*`count` - The number of entities associated with the alert definition.
62
+
*`has_more_resources` - Whether there are additional entities associated with the alert.
63
+
55
64
### rule_criteria
56
65
57
66
The following arguments are supported in the `rule_criteria` specification block:
Retrieves entities associated with a Monitor Alert Definition.
5
+
---
6
+
7
+
# linode\_monitor\_alert\_definition\_entities
8
+
9
+
Retrieves the entities associated with a specific Monitor Alert Definition.
10
+
For more information, see the [Linode APIv4 docs](TODO). (**Note: v4beta only.**)
11
+
12
+
## Example Usage
13
+
14
+
Retrieve entities for a specific alert definition:
15
+
16
+
```terraform
17
+
data "linode_monitor_alert_definition_entities" "test" {
18
+
service_type = "dbaas"
19
+
alert_id = 123
20
+
}
21
+
```
22
+
23
+
Retrieve entities filtered by type:
24
+
25
+
```terraform
26
+
data "linode_monitor_alert_definition_entities" "test" {
27
+
service_type = "dbaas"
28
+
alert_id = 123
29
+
30
+
filter {
31
+
name = "type"
32
+
values = ["dbaas"]
33
+
}
34
+
}
35
+
```
36
+
37
+
## Argument Reference
38
+
39
+
The following arguments are supported:
40
+
41
+
*`service_type` - (Required) The service type for the alert definition (e.g., `dbaas`).
42
+
43
+
*`alert_id` - (Required) The unique identifier for the alert definition.
44
+
45
+
*[`filter`](#filter) - (Optional) A set of filters used to select entities that meet certain requirements.
46
+
47
+
### Filter
48
+
49
+
*`name` - (Required) The name of the field to filter by. See the [Filterable Fields section](#filterable-fields) for a complete list of filterable fields.
50
+
51
+
*`values` - (Required) A list of values for the filter to allow. These values should all be in string form.
52
+
53
+
*`match_by` - (Optional) The method to match the field by. (`exact`, `regex`, `substring`; default `exact`)
54
+
55
+
## Attributes Reference
56
+
57
+
Each entity will be stored in the `entities` attribute and will export the following attributes:
Copy file name to clipboardExpand all lines: docs/data-sources/monitor_alert_definitions.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,17 +61,26 @@ Each alert definition will be stored in the `alert_definitions` attribute and wi
61
61
*[`rule_criteria`](#rule_criteria) - The criteria expression for the alert.
62
62
*[`trigger_conditions`](#trigger_conditions) - The conditions that need to be met to send a notification for the alert.
63
63
*`description` - A description for the alert definition.
64
-
*`entity_ids` - A list of entity IDs to associate with the alert definition.
65
64
*`status` - The status of the alert definition.
66
65
*`type` - The type of alert. This can be either user for an alert specific to the current user, or system for one that applies to all users on your account.
67
-
*`has_more_resources` - Whether there are additional entity_ids associated with the alert for which the user doesn't have at least read-only access.
68
66
*`created` - The date and time the alert definition was created.
69
67
*`updated` - The date and time the alert definition was last updated.
70
68
*`created_by` - For a user alert definition, this is the user on your account that created it. For a system alert definition, this is returned as system.
71
69
*`updated_by` - For a user alert definition, this is the user on your account that last updated it. For a system alert definition, this is returned as system. If it hasn't been updated, this value is the same as created_by.
72
70
*`class` - "The plan type for the Managed Database cluster, either shared or dedicated. This only applies to a system alert for a service_type of dbaas (Managed Databases). For user alerts for dbaas, this is returned as null.",
71
+
*`scope` - The scope of the alert definition. Possible values: `account`, `entity`, `region`.
72
+
*`regions` - The regions the alert definition applies to. Only used for region-scoped alerts.
73
+
*[`entities`](#entities) - Entity metadata for the alert definition.
73
74
*[`alert_channels`](#alert_channels) - A list of alert channel objects associated with the alert definition.
74
75
76
+
### entities
77
+
78
+
The following attributes are exported in the `entities` block:
79
+
80
+
*`url` - The URL to list entities associated with the alert definition.
81
+
*`count` - The number of entities associated with the alert definition.
82
+
*`has_more_resources` - Whether there are additional entities associated with the alert.
83
+
75
84
### rule_criteria
76
85
77
86
The following arguments are supported in the `rule_criteria` specification block:
Copy file name to clipboardExpand all lines: docs/resources/monitor_alert_definition.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,8 @@ The following arguments are supported:
62
62
*`description` - (Optional) A description for the alert definition.
63
63
*`entity_ids` - (Optional) A list of entity IDs to associate with the alert definition.
64
64
*`status` - (Optional) The status of the alert definition.
65
+
*`scope` - (Optional) The scope of the alert definition. Allowed values: `account`, `entity`, `region`. Defaults to `entity`.
66
+
*`regions` - (Optional) The regions the alert definition applies to. Only used for region-scoped alerts.
65
67
*`wait_for` - (Optional) Whether to wait for the alert definition to be ready before completing the resource creation.
66
68
67
69
### rule_criteria
@@ -106,14 +108,22 @@ In addition to all arguments above, the following attributes are exported:
106
108
107
109
*`id` - The unique identifier assigned to the alert definition.
108
110
*`type` - The type of alert. This can be either user for an alert specific to the current user, or system for one that applies to all users on your account.
109
-
*`has_more_resources` - Whether there are additional entity_ids associated with the alert for which the user doesn't have at least read-only access.
110
111
*`created` - The date and time the alert definition was created.
111
112
*`updated` - The date and time the alert definition was last updated.
112
113
*`created_by` - For a user alert definition, this is the user on your account that created it. For a system alert definition, this is returned as system.
113
114
*`updated_by` - For a user alert definition, this is the user on your account that last updated it. For a system alert definition, this is returned as system. If it hasn't been updated, this value is the same as created_by.
114
115
*`class` - "The plan type for the Managed Database cluster, either shared or dedicated. This only applies to a system alert for a service_type of dbaas (Managed Databases). For user alerts for dbaas, this is returned as null.",
116
+
*[`entities`](#entities) - Entity metadata for the alert definition.
115
117
*[`alert_channels`](#alert_channels) - A list of alert channel objects associated with the alert definition.
116
118
119
+
### entities
120
+
121
+
The following attributes are exported in the `entities` block:
122
+
123
+
*`url` - The URL to list entities associated with the alert definition.
124
+
*`count` - The number of entities associated with the alert definition.
125
+
*`has_more_resources` - Whether there are additional entities associated with the alert.
126
+
117
127
### alert_channels
118
128
119
129
The following attributes are exported in each `alert_channels` block:
0 commit comments