Skip to content

feat(monitor): [121832068] add new resource #3115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changelog/3115.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:new-resource
tencentcloud_monitor_tmp_multiple_writes_list
```

```release-note:enhancement
resource/tencentcloud_monitor_tmp_multiple_writes: resource will been deprecated in version v1.81.166
```
1 change: 1 addition & 0 deletions tencentcloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,7 @@ func Provider() *schema.Provider {
"tencentcloud_monitor_tmp_alert_rule": tmp.ResourceTencentCloudMonitorTmpAlertRule(),
"tencentcloud_monitor_tmp_recording_rule": tmp.ResourceTencentCloudMonitorTmpRecordingRule(),
"tencentcloud_monitor_tmp_multiple_writes": tmp.ResourceTencentCloudMonitorTmpMultipleWrites(),
"tencentcloud_monitor_tmp_multiple_writes_list": tmp.ResourceTencentCloudMonitorTmpMultipleWritesList(),
"tencentcloud_monitor_tmp_alert_group": tmp.ResourceTencentCloudMonitorTmpAlertGroup(),
"tencentcloud_monitor_tmp_tke_template": tmp.ResourceTencentCloudMonitorTmpTkeTemplate(),
"tencentcloud_monitor_tmp_tke_template_attachment": tmp.ResourceTencentCloudMonitorTmpTkeTemplateAttachment(),
Expand Down
1 change: 1 addition & 0 deletions tencentcloud/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ Managed Service for Prometheus(TMP)
tencentcloud_monitor_tmp_tke_basic_config
tencentcloud_monitor_tmp_alert_group
tencentcloud_monitor_tmp_multiple_writes
tencentcloud_monitor_tmp_multiple_writes_list

TencentCloud Managed Service for Grafana(TCMG)
Data Source
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Provides a resource to create a monitor monitor_tmp_multiple_writes
Provides a resource to create a monitor multiple writes

~> **NOTE:** For the same instance of prometheus, resource `tencentcloud_monitor_tmp_multiple_writes` and resource `tencentcloud_monitor_tmp_multiple_writes_list` cannot be used simultaneously. Resource `tencentcloud_monitor_tmp_multiple_writes` will been deprecated in version v1.81.166, Please use resource `tencentcloud_monitor_tmp_multiple_writes_list` instead.

~> **NOTE:** When using `<<EOT`, please pay attention to spaces, line breaks, indentation, etc.

Expand All @@ -7,31 +9,33 @@ Provides a resource to create a monitor monitor_tmp_multiple_writes
Example Usage

```hcl
resource "tencentcloud_monitor_tmp_multiple_writes" "monitor_tmp_multiple_writes" {
instance_id = "prom-l9cl1ptk"

remote_writes {
label = null
max_block_size = null
url = "http://172.16.0.111:9090/api/v1/prom/write"
url_relabel_config = trimspace(<<-EOT
# 添加 label
# - target_label: key
# replacement: value
# 丢弃指标
#- source_labels: [__name__]
# regex: kubelet_.+;
# action: drop
EOT
)
resource "tencentcloud_monitor_tmp_multiple_writes" "example" {
instance_id = "prom-l9cl1ptk"

remote_writes {
url = "http://172.16.0.111:9090/api/v1/prom/write"
url_relabel_config = trimspace(<<-EOT
# 添加 label
# - target_label: key
# replacement: value
# 丢弃指标
#- source_labels: [__name__]
# regex: kubelet_.+;
# action: drop
EOT
)
headers {
key = "Key"
value = "Value"
}
}
}
```

Import

monitor monitor_tmp_multiple_writes can be imported using the id, e.g.
monitor multiple writes can be imported using the id, e.g.

```
terraform import tencentcloud_monitor_tmp_multiple_writes.monitor_tmp_multiple_writes prom-l9cl1ptk#http://172.16.0.111:9090/api/v1/prom/write
terraform import tencentcloud_monitor_tmp_multiple_writes.example prom-l9cl1ptk#http://172.16.0.111:9090/api/v1/prom/write
```
Loading
Loading