@@ -26,19 +26,19 @@ resource "tencentcloud_clb_listener_rule" "rule_basic" {
2626 target_type = "TARGETGROUP"
2727}
2828
29- resource "tencentcloud_clb_targetgroup " "test"{
29+ resource "tencentcloud_clb_target_group " "test"{
3030 target_group_name = "test-target-keep-1"
3131}
3232
3333resource "tencentcloud_clb_target_group_attachment" "group" {
3434 clb_id = tencentcloud_clb_instance.clb_basic.id
3535 listener_id = tencentcloud_clb_listener.listener_basic.id
3636 rule_id = tencentcloud_clb_listener_rule.rule_basic.id
37- targrt_group_id = tencentcloud_clb_targetgroup .test.id
37+ targrt_group_id = tencentcloud_clb_target_group .test.id
3838}
3939
4040data "tencentcloud_clb_target_groups" "target_group_info_id" {
41- target_group_id = tencentcloud_clb_targetgroup .test.id
41+ target_group_id = tencentcloud_clb_target_group .test.id
4242}
4343```
4444*/
@@ -63,17 +63,20 @@ func dataSourceTencentCloudClbTargetGroups() *schema.Resource {
6363 Type : schema .TypeString ,
6464 Optional : true ,
6565 ConflictsWith : []string {"vpc_id" , "target_group_name" },
66+ AtLeastOneOf : []string {"vpc_id" , "target_group_name" },
6667 Description : "ID of Target group. Mutually exclusive with 'vpc_id' and 'target_group_name'. 'target_group_id' is preferred." ,
6768 },
6869 "vpc_id" : {
69- Type : schema .TypeString ,
70- Optional : true ,
71- Description : "Target group VPC ID. Mutually exclusive with 'target_group_id'. 'target_group_id' is preferred." ,
70+ Type : schema .TypeString ,
71+ Optional : true ,
72+ AtLeastOneOf : []string {"target_group_id" , "target_group_name" },
73+ Description : "Target group VPC ID. Mutually exclusive with 'target_group_id'. 'target_group_id' is preferred." ,
7274 },
7375 "target_group_name" : {
74- Type : schema .TypeString ,
75- Optional : true ,
76- Description : "Name of target group. Mutually exclusive with 'target_group_id'. 'target_group_id' is preferred." ,
76+ Type : schema .TypeString ,
77+ Optional : true ,
78+ AtLeastOneOf : []string {"target_group_id" , "vpc_id" },
79+ Description : "Name of target group. Mutually exclusive with 'target_group_id'. 'target_group_id' is preferred." ,
7780 },
7881 "result_output_file" : {
7982 Type : schema .TypeString ,
0 commit comments