Skip to content

Commit d0d65c0

Browse files
authored
feat(tse): [115706940]support strategy (#2526)
* feat: support strategy * feat: add changelog * fix modify test
1 parent d681712 commit d0d65c0

26 files changed

+4579
-83
lines changed

.changelog/2526.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```release-note:new-resource
2+
tencentcloud_tse_cngw_network
3+
```
4+
5+
```release-note:new-resource
6+
tencentcloud_tse_cngw_strategy
7+
```
8+
9+
```release-note:new-resource
10+
tencentcloud_tse_cngw_strategy_bind_group
11+
```
12+
13+
```release-note:enhancement
14+
resource/tencentcloud_tse_cngw_group: Add `group_id` field to output.
15+
```

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ require (
9393
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.758
9494
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.807
9595
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.0.756
96-
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.804
96+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857
9797
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674
9898
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.860
9999
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.845

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.0.756 h1:89M
10231023
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.0.756/go.mod h1:AJAItBOTaarpDpUF7pNp0tuz2Y6H2oFuMcyKouPs1IE=
10241024
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.804 h1:lYkKswjbdCICDATYfUtT1SrHhSBUcVFxnh0j0tSqhEA=
10251025
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.804/go.mod h1:nE+gtagqpenButXqRAWh1MJBMRFbQchlXK4yCPWbSaQ=
1026+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857 h1:TkJnvSeRSXsRCwOwcwXSvruSK9s/kw8LC3FLeccw+A0=
1027+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857/go.mod h1:CSGh7HSEzUoY09G67XTABi/aqNy3dSLCSuenb1i5x6k=
10261028
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674 h1:VsMV1/vsgVzespG7jUzraZS/AbAUllVQjmtVAlA9W/M=
10271029
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674/go.mod h1:6+MWxaNR4y+spZHYNntulOyj628owTLuWmEFebJOWdA=
10281030
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.860 h1:vW2NgAHK4BfpZP3m92eUEKbIP+nu9bL8mnaM0dBHWM8=

tencentcloud/provider.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,6 +1841,9 @@ func Provider() *schema.Provider {
18411841
"tencentcloud_tse_cngw_certificate": tse.ResourceTencentCloudTseCngwCertificate(),
18421842
"tencentcloud_tse_waf_protection": tse.ResourceTencentCloudTseWafProtection(),
18431843
"tencentcloud_tse_waf_domains": tse.ResourceTencentCloudTseWafDomains(),
1844+
"tencentcloud_tse_cngw_network": tse.ResourceTencentCloudTseCngwNetwork(),
1845+
"tencentcloud_tse_cngw_strategy": tse.ResourceTencentCloudTseCngwStrategy(),
1846+
"tencentcloud_tse_cngw_strategy_bind_group": tse.ResourceTencentCloudTseCngwStrategyBindGroup(),
18441847
"tencentcloud_clickhouse_instance": cdwch.ResourceTencentCloudClickhouseInstance(),
18451848
"tencentcloud_cls_kafka_recharge": cls.ResourceTencentCloudClsKafkaRecharge(),
18461849
"tencentcloud_cls_scheduled_sql": cls.ResourceTencentCloudClsScheduledSql(),

tencentcloud/provider.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,9 @@ Tencent Cloud Service Engine(TSE)
19241924
tencentcloud_tse_cngw_certificate
19251925
tencentcloud_tse_waf_protection
19261926
tencentcloud_tse_waf_domains
1927+
tencentcloud_tse_cngw_network
1928+
tencentcloud_tse_cngw_strategy
1929+
tencentcloud_tse_cngw_strategy_bind_group
19271930

19281931
ClickHouse(CDWCH)
19291932
Data Source

tencentcloud/services/tse/resource_tc_tse_cngw_gateway_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestAccTencentCloudTseCngwGatewayResource_basic(t *testing.T) {
3232
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "description", "terraform test"),
3333
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "enable_cls", "false"),
3434
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "engine_region", "ap-guangzhou"),
35-
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "feature_version", "STANDARD"),
35+
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "feature_version", "PROFESSIONAL"),
3636
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "gateway_version", "2.5.1"),
3737
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "ingress_class_name", "tse-nginx-ingress"),
3838
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "internet_max_bandwidth_out", "0"),
@@ -60,7 +60,7 @@ func TestAccTencentCloudTseCngwGatewayResource_basic(t *testing.T) {
6060
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "description", "terraform test update"),
6161
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "enable_cls", "true"),
6262
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "engine_region", "ap-guangzhou"),
63-
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "feature_version", "STANDARD"),
63+
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "feature_version", "PROFESSIONAL"),
6464
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "gateway_version", "2.5.1"),
6565
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "ingress_class_name", "tse-nginx-ingress"),
6666
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "internet_max_bandwidth_out", "0"),
@@ -153,7 +153,7 @@ resource "tencentcloud_tse_cngw_gateway" "cngw_gateway" {
153153
description = "terraform test"
154154
enable_cls = false
155155
engine_region = "ap-guangzhou"
156-
feature_version = "STANDARD"
156+
feature_version = "PROFESSIONAL"
157157
gateway_version = "2.5.1"
158158
ingress_class_name = "tse-nginx-ingress"
159159
internet_max_bandwidth_out = 0
@@ -183,7 +183,7 @@ resource "tencentcloud_tse_cngw_gateway" "cngw_gateway" {
183183
description = "terraform test update"
184184
enable_cls = true
185185
engine_region = "ap-guangzhou"
186-
feature_version = "STANDARD"
186+
feature_version = "PROFESSIONAL"
187187
gateway_version = "2.5.1"
188188
ingress_class_name = "tse-nginx-ingress"
189189
internet_max_bandwidth_out = 0

tencentcloud/services/tse/resource_tc_tse_cngw_group.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ func ResourceTencentCloudTseCngwGroup() *schema.Resource {
126126
},
127127
},
128128
},
129+
130+
"group_id": {
131+
Computed: true,
132+
Type: schema.TypeString,
133+
Description: "gateway group id.",
134+
},
129135
},
130136
}
131137
}
@@ -262,6 +268,8 @@ func resourceTencentCloudTseCngwGroupRead(d *schema.ResourceData, meta interface
262268
_ = d.Set("gateway_id", cngwGroup.GatewayId)
263269
}
264270

271+
_ = d.Set("group_id", groupId)
272+
265273
if cngwGroup.Name != nil {
266274
_ = d.Set("name", cngwGroup.Name)
267275
}

0 commit comments

Comments
 (0)