Skip to content

Commit 320ed24

Browse files
committed
update monitor
1 parent 3436c0e commit 320ed24

File tree

4 files changed

+77
-1
lines changed

4 files changed

+77
-1
lines changed

tencentcloud/provider.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ Monitor
426426
tencentcloud_monitor_alarm_policy
427427
tencentcloud_monitor_tmp_instance
428428
tencentcloud_monitor_tmp_cvm_agent
429+
tencentcloud_monitor_tmp_alert_rule
429430
tencentcloud_monitor_tmp_recording_rule
430431
tencentcloud_monitor_tmp_tke_template
431432

tencentcloud/resource_tc_monitor_tmp_alert_rule.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ monitor tmpAlertRule can be imported using the id, e.g.
2929
$ terraform import tencentcloud_monitor_tmp_alert_rule.tmpAlertRule instanceId#Rule_id
3030
```
3131
*/
32-
3332
package tencentcloud
3433

3534
import (
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
subcategory: "Monitor"
3+
layout: "tencentcloud"
4+
page_title: "TencentCloud: tencentcloud_monitor_tmp_alert_rule"
5+
sidebar_current: "docs-tencentcloud-resource-monitor_tmp_alert_rule"
6+
description: |-
7+
Provides a resource to create a monitor tmpAlertRule
8+
---
9+
10+
# tencentcloud_monitor_tmp_alert_rule
11+
12+
Provides a resource to create a monitor tmpAlertRule
13+
14+
## Example Usage
15+
16+
```hcl
17+
resource "tencentcloud_monitor_tmp_alert_rule" "tmpAlertRule" {
18+
instance_id = "prom-c89b3b3u"
19+
rule_name = "test123"
20+
expr = "up{service=\"rig-prometheus-agent\"}>0"
21+
receivers = ["notice-l9ziyxw6"]
22+
rule_state = 2
23+
duration = "4m"
24+
labels {
25+
key = "hello1"
26+
value = "world1"
27+
}
28+
annotations {
29+
key = "hello2"
30+
value = "world2"
31+
}
32+
}
33+
```
34+
35+
## Argument Reference
36+
37+
The following arguments are supported:
38+
39+
* `expr` - (Required) Rule expression.
40+
* `instance_id` - (Required) Instance id.
41+
* `receivers` - (Required) Alarm notification template id list.
42+
* `rule_name` - (Required) Rule name.
43+
* `annotations` - (Optional) Rule alarm duration.
44+
* `duration` - (Optional) Rule alarm duration.
45+
* `labels` - (Optional) Rule alarm duration.
46+
* `rule_state` - (Optional) Rule state code.
47+
* `type` - (Optional) Alarm Policy Template Classification.
48+
49+
The `annotations` object supports the following:
50+
51+
* `key` - (Required) key.
52+
* `value` - (Required) value.
53+
54+
The `labels` object supports the following:
55+
56+
* `key` - (Required) key.
57+
* `value` - (Required) value.
58+
59+
## Attributes Reference
60+
61+
In addition to all arguments above, the following attributes are exported:
62+
63+
* `id` - ID of the resource.
64+
65+
66+
67+
## Import
68+
69+
monitor tmpAlertRule can be imported using the id, e.g.
70+
```
71+
$ terraform import tencentcloud_monitor_tmp_alert_rule.tmpAlertRule instanceId#Rule_id
72+
```
73+

website/tencentcloud.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,9 @@
11241124
<li>
11251125
<a href="/docs/providers/tencentcloud/r/monitor_policy_group.html">tencentcloud_monitor_policy_group</a>
11261126
</li>
1127+
<li>
1128+
<a href="/docs/providers/tencentcloud/r/monitor_tmp_alert_rule.html">tencentcloud_monitor_tmp_alert_rule</a>
1129+
</li>
11271130
<li>
11281131
<a href="/docs/providers/tencentcloud/r/monitor_tmp_cvm_agent.html">tencentcloud_monitor_tmp_cvm_agent</a>
11291132
</li>

0 commit comments

Comments
 (0)