Skip to content

Commit 034dd16

Browse files
committed
add
1 parent 938d949 commit 034dd16

5 files changed

+90
-29
lines changed

tencentcloud/services/rum/service_tencentcloud_rum.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package rum
22

33
import (
44
"context"
5-
sdkErrors "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
65
"log"
76
"strconv"
87
"time"
98

9+
sdkErrors "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
10+
1011
tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
1112

1213
rum "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/rum/v20210622"

tencentcloud/services/tmp/resource_tc_monitor_tmp_alert_group.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,36 @@ Provides a resource to create a monitor tmp_alert_group
33
Example Usage
44

55
```hcl
6-
resource "tencentcloud_monitor_tmp_alert_group" "tmp_alert_group" {
7-
amp_receivers = [
8-
"notice-om017kc2",
9-
]
10-
group_name = "tf-test"
11-
instance_id = "prom-ip429jis"
6+
variable "availability_zone" {
7+
default = "ap-guangzhou-4"
8+
}
9+
10+
resource "tencentcloud_vpc" "vpc" {
11+
cidr_block = "10.0.0.0/16"
12+
name = "tf_monitor_vpc"
13+
}
14+
15+
resource "tencentcloud_subnet" "subnet" {
16+
vpc_id = tencentcloud_vpc.vpc.id
17+
availability_zone = var.availability_zone
18+
name = "tf_monitor_subnet"
19+
cidr_block = "10.0.1.0/24"
20+
}
21+
22+
resource "tencentcloud_monitor_tmp_instance" "example" {
23+
instance_name = "tf-tmp-instance"
24+
vpc_id = tencentcloud_vpc.vpc.id
25+
subnet_id = tencentcloud_subnet.subnet.id
26+
data_retention_time = 30
27+
zone = var.availability_zone
28+
tags = {
29+
"createdBy" = "terraform"
30+
}
31+
}
32+
33+
resource "tencentcloud_monitor_tmp_alert_group" "example" {
34+
group_name = "tf-example"
35+
instance_id = tencentcloud_monitor_tmp_instance.example.id
1236
repeat_interval = "5m"
1337
1438
custom_receiver {
@@ -31,13 +55,12 @@ resource "tencentcloud_monitor_tmp_alert_group" "tmp_alert_group" {
3155
}
3256
}
3357
}
34-
3558
```
3659

3760
Import
3861

3962
monitor tmp_alert_group can be imported using the id, e.g.
4063

4164
```
42-
terraform import tencentcloud_monitor_tmp_alert_group.tmp_alert_group instance_id#group_id
43-
```
65+
terraform import tencentcloud_monitor_tmp_alert_group.example prom-34qkzwvs#alert-rfkkr6cw
66+
```

website/docs/r/monitor_tmp_alert_group.html.markdown

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,36 @@ Provides a resource to create a monitor tmp_alert_group
1414
## Example Usage
1515

1616
```hcl
17-
resource "tencentcloud_monitor_tmp_alert_group" "tmp_alert_group" {
18-
amp_receivers = [
19-
"notice-om017kc2",
20-
]
21-
group_name = "tf-test"
22-
instance_id = "prom-ip429jis"
17+
variable "availability_zone" {
18+
default = "ap-guangzhou-4"
19+
}
20+
21+
resource "tencentcloud_vpc" "vpc" {
22+
cidr_block = "10.0.0.0/16"
23+
name = "tf_monitor_vpc"
24+
}
25+
26+
resource "tencentcloud_subnet" "subnet" {
27+
vpc_id = tencentcloud_vpc.vpc.id
28+
availability_zone = var.availability_zone
29+
name = "tf_monitor_subnet"
30+
cidr_block = "10.0.1.0/24"
31+
}
32+
33+
resource "tencentcloud_monitor_tmp_instance" "example" {
34+
instance_name = "tf-tmp-instance"
35+
vpc_id = tencentcloud_vpc.vpc.id
36+
subnet_id = tencentcloud_subnet.subnet.id
37+
data_retention_time = 30
38+
zone = var.availability_zone
39+
tags = {
40+
"createdBy" = "terraform"
41+
}
42+
}
43+
44+
resource "tencentcloud_monitor_tmp_alert_group" "example" {
45+
group_name = "tf-example"
46+
instance_id = tencentcloud_monitor_tmp_instance.example.id
2347
repeat_interval = "5m"
2448
2549
custom_receiver {
@@ -90,6 +114,6 @@ In addition to all arguments above, the following attributes are exported:
90114
monitor tmp_alert_group can be imported using the id, e.g.
91115

92116
```
93-
terraform import tencentcloud_monitor_tmp_alert_group.tmp_alert_group instance_id#group_id
117+
terraform import tencentcloud_monitor_tmp_alert_group.example prom-34qkzwvs#alert-rfkkr6cw
94118
```
95119

website/docs/r/rum_project.html.markdown

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,27 @@ Provides a resource to create a rum project
1414
## Example Usage
1515

1616
```hcl
17-
resource "tencentcloud_rum_project" "project" {
18-
name = "projectName"
19-
instance_id = "rum-pasZKEI3RLgakj"
17+
resource "tencentcloud_rum_taw_instance" "example" {
18+
area_id = "1"
19+
charge_type = "1"
20+
data_retention_days = "30"
21+
instance_name = "tf-example"
22+
instance_desc = "desc."
23+
24+
tags = {
25+
createdBy = "terraform"
26+
}
27+
}
28+
29+
resource "tencentcloud_rum_project" "example" {
30+
name = "tf-example"
31+
instance_id = tencentcloud_rum_taw_instance.example.id
2032
rate = "100"
2133
enable_url_group = "0"
2234
type = "web"
23-
repo = ""
35+
repo = "https://github.com/xxx"
2436
url = "iac-tf.com"
25-
desc = "projectDesc-1"
37+
desc = "desc."
2638
}
2739
```
2840

@@ -35,7 +47,7 @@ The following arguments are supported:
3547
* `name` - (Required, String) Name of the created project (required and up to 200 characters).
3648
* `rate` - (Required, String) Project sampling rate (greater than or equal to 0).
3749
* `type` - (Required, String) Project type (valid values: `web`, `mp`, `android`, `ios`, `node`, `hippy`, `weex`, `viola`, `rn`).
38-
* `desc` - (Optional, String) Description of the created project (optional and up to 1,000 characters).
50+
* `desc` - (Optional, String) Description of the created project (optional and up to 1,000 characters).
3951
* `repo` - (Optional, String) Repository address of the project (optional and up to 256 characters).
4052
* `url` - (Optional, String) Webpage address of the project (optional and up to 256 characters).
4153

@@ -44,7 +56,7 @@ The following arguments are supported:
4456
In addition to all arguments above, the following attributes are exported:
4557

4658
* `id` - ID of the resource.
47-
* `create_time` - Creata Time.
59+
* `create_time` - Create Time.
4860
* `creator` - Creator ID.
4961
* `instance_key` - Instance key.
5062
* `instance_name` - Instance name.
@@ -57,6 +69,6 @@ In addition to all arguments above, the following attributes are exported:
5769

5870
rum project can be imported using the id, e.g.
5971
```
60-
$ terraform import tencentcloud_rum_project.project project_id
72+
$ terraform import tencentcloud_rum_project.example 139422
6173
```
6274

website/docs/r/rum_taw_instance.html.markdown

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ Provides a resource to create a rum taw_instance
1414
## Example Usage
1515

1616
```hcl
17-
resource "tencentcloud_rum_taw_instance" "taw_instance" {
17+
resource "tencentcloud_rum_taw_instance" "example" {
1818
area_id = "1"
1919
charge_type = "1"
2020
data_retention_days = "30"
21-
instance_name = "instanceName-1"
21+
instance_name = "tf-example"
22+
instance_desc = "desc."
23+
2224
tags = {
2325
createdBy = "terraform"
2426
}
25-
instance_desc = "instanceDesc-1"
2627
}
2728
```
2829

@@ -53,6 +54,6 @@ In addition to all arguments above, the following attributes are exported:
5354

5455
rum taw_instance can be imported using the id, e.g.
5556
```
56-
$ terraform import tencentcloud_rum_taw_instance.taw_instance tawInstance_id
57+
$ terraform import tencentcloud_rum_taw_instance.example rum-WYsjMaiGOVXBeJ
5758
```
5859

0 commit comments

Comments
 (0)