Skip to content

Commit ec5a6f8

Browse files
authored
docs: add example (#1236)
Co-authored-by: arunma <arunma@tencent.com>
1 parent cab8d0b commit ec5a6f8

16 files changed

+150
-15
lines changed

tencentcloud/resource_tc_monitor_tmp_exporter_integration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ resource "tencentcloud_monitor_tmp_exporter_integration" "tmpExporterIntegration
1111
kube_type = 1
1212
cluster_id = "cls-bmuaukfu"
1313
}
14-
14+
```
1515
*/
1616
package tencentcloud
1717

tencentcloud/resource_tc_monitor_tmp_tke_alert_policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ resource "tencentcloud_monitor_tmp_tke_alert_policy" "tmpAlertPolicy" {
3434
}
3535
}
3636
}
37-
37+
```
3838
*/
3939
package tencentcloud
4040

tencentcloud/resource_tc_monitor_tmp_tke_cluster_agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resource "tencentcloud_monitor_tmp_tke_cluster_agent" "tmpClusterAgent" {
1515
enable_external = false
1616
}
1717
}
18-
18+
```
1919
*/
2020
package tencentcloud
2121

tencentcloud/resource_tc_monitor_tmp_tke_config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ resource "tencentcloud_monitor_tmp_tke_config" "foo" {
2525
config = "apiVersion: monitoring.coreos.com/v1\nkind: PodMonitor\nmetadata:\n name: pod-monitor-001\n namespace: mynamespace\n"
2626
}
2727
}
28+
29+
```
2830
*/
2931
package tencentcloud
3032

tencentcloud/resource_tc_monitor_tmp_tke_global_notification.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource "tencentcloud_monitor_tmp_tke_global_notification" "tmpGlobalNotificati
2727
phone_arrive_notice = false
2828
}
2929
}
30-
30+
```
3131
*/
3232
package tencentcloud
3333

tencentcloud/resource_tc_monitor_tmp_tke_record_rule_yaml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ resource "resourceTencentCloudMonitorTmpTkeRecordRuleYaml" "foo" {
2222
record: 'apiserver_request:burnrate1d'
2323
EOT
2424
}
25-
25+
```
2626
*/
2727
package tencentcloud
2828

tencentcloud/resource_tc_monitor_tmp_tke_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resource "tencentcloud_monitor_tmp_tke_template" "template" {
1515
}
1616
}
1717
}
18-
18+
```
1919
*/
2020
package tencentcloud
2121

tencentcloud/resource_tc_monitor_tmp_tke_template_attachment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resource "tencentcloud_monitor_tmp_tke_template_attachment" "temp_attachment" {
1313
instance_id = "prom-xxx"
1414
}
1515
}
16-
16+
```
1717
*/
1818
package tencentcloud
1919

website/docs/r/monitor_tmp_exporter_integration.html.markdown

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ Provides a resource to create a monitor tmpExporterIntegration
1313

1414
## Example Usage
1515

16-
16+
```hcl
17+
resource "tencentcloud_monitor_tmp_exporter_integration" "tmpExporterIntegration" {
18+
instance_id = "prom-dko9d0nu"
19+
kind = "blackbox-exporter"
20+
content = "{\"name\":\"test\",\"kind\":\"blackbox-exporter\",\"spec\":{\"instanceSpec\":{\"module\":\"http_get\",\"urls\":[\"xx\"]}}}"
21+
kube_type = 1
22+
cluster_id = "cls-bmuaukfu"
23+
}
24+
```
1725

1826
## Argument Reference
1927

website/docs/r/monitor_tmp_tke_alert_policy.html.markdown

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,37 @@ Provides a resource to create a tke tmpAlertPolicy
1313

1414
## Example Usage
1515

16-
16+
```hcl
17+
resource "tencentcloud_monitor_tmp_tke_alert_policy" "tmpAlertPolicy" {
18+
instance_id = "xxxxx"
19+
alert_rule {
20+
name = "xxx"
21+
rules {
22+
name = "xx"
23+
rule = "xx"
24+
template = "xx"
25+
for = "xx"
26+
labels {
27+
name = "xx"
28+
value = "xx"
29+
}
30+
annotations {
31+
name = "xx"
32+
value = "xx"
33+
}
34+
}
35+
notification {
36+
type = "xx"
37+
enabled = true
38+
alert_manager {
39+
url = "xx"
40+
cluster_id = "xx"
41+
cluster_type = "xx"
42+
}
43+
}
44+
}
45+
}
46+
```
1747

1848
## Argument Reference
1949

0 commit comments

Comments
 (0)