Skip to content
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

feat(tse): [115706940]support strategy #2526

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
11 changes: 11 additions & 0 deletions .changelog/2526.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```release-note:new-resource
tencentcloud_tse_cngw_network
```

```release-note:new-resource
tencentcloud_tse_cngw_strategy
```

```release-note:new-resource
tencentcloud_tse_cngw_strategy_bind_group
```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.758
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.807
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.0.756
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.804
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.845
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.0.756 h1:89M
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.0.756/go.mod h1:AJAItBOTaarpDpUF7pNp0tuz2Y6H2oFuMcyKouPs1IE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.804 h1:lYkKswjbdCICDATYfUtT1SrHhSBUcVFxnh0j0tSqhEA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.804/go.mod h1:nE+gtagqpenButXqRAWh1MJBMRFbQchlXK4yCPWbSaQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857 h1:TkJnvSeRSXsRCwOwcwXSvruSK9s/kw8LC3FLeccw+A0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857/go.mod h1:CSGh7HSEzUoY09G67XTABi/aqNy3dSLCSuenb1i5x6k=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674 h1:VsMV1/vsgVzespG7jUzraZS/AbAUllVQjmtVAlA9W/M=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674/go.mod h1:6+MWxaNR4y+spZHYNntulOyj628owTLuWmEFebJOWdA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 h1:6Yt74l4pA5QtzhwMNIEUt0spXdSBKH744DDqTHJOCP0=
Expand Down
3 changes: 3 additions & 0 deletions tencentcloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1838,6 +1838,9 @@ func Provider() *schema.Provider {
"tencentcloud_tse_cngw_certificate": tse.ResourceTencentCloudTseCngwCertificate(),
"tencentcloud_tse_waf_protection": tse.ResourceTencentCloudTseWafProtection(),
"tencentcloud_tse_waf_domains": tse.ResourceTencentCloudTseWafDomains(),
"tencentcloud_tse_cngw_network": tse.ResourceTencentCloudTseCngwNetwork(),
"tencentcloud_tse_cngw_strategy": tse.ResourceTencentCloudTseCngwStrategy(),
"tencentcloud_tse_cngw_strategy_bind_group": tse.ResourceTencentCloudTseCngwStrategyBindGroup(),
"tencentcloud_clickhouse_instance": cdwch.ResourceTencentCloudClickhouseInstance(),
"tencentcloud_cls_kafka_recharge": cls.ResourceTencentCloudClsKafkaRecharge(),
"tencentcloud_cls_scheduled_sql": cls.ResourceTencentCloudClsScheduledSql(),
Expand Down
3 changes: 3 additions & 0 deletions tencentcloud/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,9 @@ Tencent Cloud Service Engine(TSE)
tencentcloud_tse_cngw_certificate
tencentcloud_tse_waf_protection
tencentcloud_tse_waf_domains
tencentcloud_tse_cngw_network
tencentcloud_tse_cngw_strategy
tencentcloud_tse_cngw_strategy_bind_group

ClickHouse(CDWCH)
Data Source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestAccTencentCloudTseCngwGatewayResource_basic(t *testing.T) {
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "description", "terraform test"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "enable_cls", "false"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "engine_region", "ap-guangzhou"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "feature_version", "STANDARD"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "feature_version", "PROFESSIONAL"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "gateway_version", "2.5.1"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "ingress_class_name", "tse-nginx-ingress"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "internet_max_bandwidth_out", "0"),
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestAccTencentCloudTseCngwGatewayResource_basic(t *testing.T) {
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "description", "terraform test update"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "enable_cls", "true"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "engine_region", "ap-guangzhou"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "feature_version", "STANDARD"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "feature_version", "PROFESSIONAL"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "gateway_version", "2.5.1"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "ingress_class_name", "tse-nginx-ingress"),
resource.TestCheckResourceAttr("tencentcloud_tse_cngw_gateway.cngw_gateway", "internet_max_bandwidth_out", "0"),
Expand Down Expand Up @@ -153,7 +153,7 @@ resource "tencentcloud_tse_cngw_gateway" "cngw_gateway" {
description = "terraform test"
enable_cls = false
engine_region = "ap-guangzhou"
feature_version = "STANDARD"
feature_version = "PROFESSIONAL"
gateway_version = "2.5.1"
ingress_class_name = "tse-nginx-ingress"
internet_max_bandwidth_out = 0
Expand Down Expand Up @@ -183,7 +183,7 @@ resource "tencentcloud_tse_cngw_gateway" "cngw_gateway" {
description = "terraform test update"
enable_cls = true
engine_region = "ap-guangzhou"
feature_version = "STANDARD"
feature_version = "PROFESSIONAL"
gateway_version = "2.5.1"
ingress_class_name = "tse-nginx-ingress"
internet_max_bandwidth_out = 0
Expand Down
8 changes: 8 additions & 0 deletions tencentcloud/services/tse/resource_tc_tse_cngw_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ func ResourceTencentCloudTseCngwGroup() *schema.Resource {
},
},
},

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个变更貌似 changelog 中没有体现

"group_id": {
Computed: true,
Type: schema.TypeString,
Description: "gateway group id.",
},
},
}
}
Expand Down Expand Up @@ -262,6 +268,8 @@ func resourceTencentCloudTseCngwGroupRead(d *schema.ResourceData, meta interface
_ = d.Set("gateway_id", cngwGroup.GatewayId)
}

_ = d.Set("group_id", groupId)

if cngwGroup.Name != nil {
_ = d.Set("name", cngwGroup.Name)
}
Expand Down
Loading
Loading