@@ -147,6 +147,38 @@ resource "huaweicloud_lts_transfer" "obs_agency" {
147
147
}
148
148
```
149
149
150
+ ### Create a DMS transfer in JSON format
151
+
152
+ ``` hcl
153
+ variable "lts_group_id" {}
154
+ variable "lts_stream_id" {}
155
+ variable "registered_kafka_instance_id" {}
156
+ variable "kafka_topic" {}
157
+
158
+ resource "huaweicloud_lts_transfer" "test" {
159
+ log_group_id = var.lts_group_id
160
+
161
+ log_streams {
162
+ log_stream_id = lts_stream_id
163
+ }
164
+
165
+ log_transfer_info {
166
+ log_transfer_type = "DMS"
167
+ log_transfer_mode = "realTime"
168
+ log_storage_format = "JSON"
169
+ log_transfer_status = "ENABLE"
170
+
171
+ log_transfer_detail {
172
+ kafka_id = var.registered_kafka_instance_id
173
+ kafka_topic = var.kafka_topic
174
+ lts_tags = ["hostName", "collectTime"]
175
+ stream_tags = ["all"]
176
+ struct_fields = ["all"]
177
+ }
178
+ }
179
+ }
180
+ ```
181
+
150
182
## Argument Reference
151
183
152
184
The following arguments are supported:
@@ -293,6 +325,20 @@ The `log_transfer_detail` block supports:
293
325
294
326
-> Before creating a DMS transfer task, register your Kafka instance with Kafka ID and Kafka topic first.
295
327
328
+ * ` lts_tags ` - (Optional, List) Specifies the list of built-in fields and custom tags to be transferred.
329
+ If you want to transfer all built-in and specified fields in the log, you need to set it to ** all** .
330
+
331
+ * ` stream_tags ` - (Optional, List) Specifies the list of stream tag fields to be transferred.
332
+ If you want to transfer all stream tag fields in the log, you need to set it to ** all** .
333
+
334
+ * ` struct_fields ` - (Optional, List) Specifies the list of structured fields to be transferred.
335
+ If you want to transfer all fields in a log in the log, you need to set it to ** all** .
336
+
337
+ -> 1. The ` lts_tags ` , ` stream_tags ` and ` struct_fields ` parameters are valid only for DMS transfer in JSON format.
338
+ At least one of them must be set.
339
+
340
+ * ` invalid_field_value ` - (Optional, String) Specifies the value of the invalid field fill.
341
+
296
342
* ` delivery_tags ` - (Optional, List) The list of tag fields will be delivered when transferring.
297
343
This field must contain the following host information: ** hostIP** , ** hostId** , ** hostName** , ** pathFile** , and ** collectTime** .
298
344
The common fields include ** logStreamName** , ** regionName** , ** logGroupName** , and ** projectId** , which are optional.
@@ -306,6 +352,8 @@ In addition to all arguments above, the following attributes are exported:
306
352
307
353
* ` log_group_name ` - Log group name.
308
354
355
+ * ` created_at ` - The creation time of the log transfer, in RFC3339 format.
356
+
309
357
## Import
310
358
311
359
The LTS transfer task can be imported using the ` id ` , e.g.
0 commit comments