Skip to content

Commit

Permalink
feat: support strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmkn committed Feb 7, 2024
1 parent f58687b commit 5e3e6a5
Show file tree
Hide file tree
Showing 26 changed files with 4,564 additions and 87 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.847
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.544
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.711
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.856
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.857
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.624
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.692
Expand Down 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 All @@ -107,10 +107,10 @@ require (

require (
github.com/hashicorp/go-uuid v1.0.3
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/billing v1.0.856
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdwpg v1.0.772
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dasb v1.0.798
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/oceanus v1.0.831
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/billing v1.0.856
github.com/wI2L/jsondiff v0.3.0
k8s.io/apimachinery v0.22.4
)
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.847 h1:ITZm
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.847/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.856 h1:4PaaKxPjh0dmRzzz0CRZSZlbvzQIPcg4TE1Ibz0Cdlk=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.856/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.857 h1:6TxCHz3zSG67cLDDu8w3TkFm/FwiyiAWBhcidGXWH/0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.857/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.624 h1:nEZqsoqt1pEoaP9JjkHQy3/H00suCfzlHW1qOm2nYD8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.624/go.mod h1:+TXSVyeKwt1IhZRqKPbTREteBcP+K07Q846/ilNzLWA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 h1:2egy69SP/wPsmnfozcQVZ6tUY6F6N/TpEe/7xtXrc/8=
Expand Down Expand Up @@ -1058,6 +1060,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 @@ -1917,6 +1917,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 {
},
},
},

"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

0 comments on commit 5e3e6a5

Please sign in to comment.