diff --git a/.changelog/2546.txt b/.changelog/2546.txt new file mode 100644 index 0000000000..79aa2e9bc6 --- /dev/null +++ b/.changelog/2546.txt @@ -0,0 +1,3 @@ +```release-note:bug +datasource/tencentcloud_tcmq_topic: fix `topic_list.topic_id` value +``` diff --git a/tencentcloud/services/tcmq/data_source_tc_tcmq_topic.go b/tencentcloud/services/tcmq/data_source_tc_tcmq_topic.go index 7e3eb84cf7..44409f0a95 100644 --- a/tencentcloud/services/tcmq/data_source_tc_tcmq_topic.go +++ b/tencentcloud/services/tcmq/data_source_tc_tcmq_topic.go @@ -260,8 +260,8 @@ func dataSourceTencentCloudTcmqTopicRead(d *schema.ResourceData, meta interface{ for _, topic := range topicList { topicNames = append(topicNames, *topic.TopicName) topicItem := make(map[string]interface{}) - if topic.TenantId != nil { - topicItem["topic_id"] = *topic.TenantId + if topic.TopicId != nil { + topicItem["topic_id"] = *topic.TopicId } if topic.TopicName != nil { topicItem["topic_name"] = *topic.TopicName