Skip to content

Commit

Permalink
feat(waf): [120040307] Add new resource (#2946)
Browse files Browse the repository at this point in the history
* add

* add

* add

* add

* add

* add
  • Loading branch information
SevenEarth authored Nov 11, 2024
1 parent 69093bc commit c83d1a7
Show file tree
Hide file tree
Showing 27 changed files with 7,245 additions and 4,081 deletions.
3 changes: 3 additions & 0 deletions .changelog/2946.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
tencentcloud_waf_ip_access_control_v2
```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.860
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1018
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.833
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wedata v1.0.792
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199
github.com/tencentyun/cos-go-sdk-v5 v0.7.42-0.20230629101357-7edd77448a0f
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1036 h1:B3G
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1036/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1038 h1:tB3DLzyQXavvGTI+JUvEcuYh0EtTn1rvh9W6xxFHL38=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1038/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1037 h1:cXerqxVAnEhEryXYgeBVFAJR8zjG2AsPWVnLtqJfkmY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1037/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993 h1:WlPgXldQCxt7qi5Xrc6j6zTrsXWzN5BcOGs7Irq7fwQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993/go.mod h1:Z9U8zNtyuyKhjS0698wqsrG/kLx1TQ5CEixXBwVe7xY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.860 h1:F3esKBIT3HW9+7Gt8cVgf8X06VdGIczpgLBUECzSEzU=
Expand Down Expand Up @@ -1052,6 +1054,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1018 h1:+ATJA5
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.1018/go.mod h1:LmBUb+v6kdY+Jr+VRsU28SF8H5ga7Tqh+wpoVYmSofw=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.833 h1:avaBlZ+Qqv7bfMg/u0jlRsbEBbE18CfqKWbfGc84PLg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.833/go.mod h1:fUWG217b//46Oa3VXxC5mgeYeewVAbF+lc81uET89EM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037 h1:sgHOHqVFcO266dnoh0KJ0CoxrRglRZYKW78iBh41Giw=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.1037/go.mod h1:QM5m6aZ65kaxaES0D44BNKmemn+9WBf5vr3HDDPrh8U=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wedata v1.0.792 h1:NLgKNOIHWa38AmW7dyfI9Jlcp2Kr9VRD94f48pPNmxM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wedata v1.0.792/go.mod h1:Xz6vPV3gHlzPwtEcmWdWO1EUXJDgn2p7UMCXbJiVioQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199 h1:hMBLtiJPnZ9GvA677cTB6ELBR6B68wCR2QY1sNoGQc4=
Expand Down
14 changes: 14 additions & 0 deletions tencentcloud/connectivity/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ type TencentCloudClient struct {
tcssv20201101Conn *tcss.Client
cloudauditv20190319Conn *audit.Client
privatednsv20201028Conn *privatedns.Client
wafv20180125Conn *waf.Client
}

// NewClientProfile returns a new ClientProfile
Expand Down Expand Up @@ -1943,3 +1944,16 @@ func (me *TencentCloudClient) UsePrivatednsV20201028Client() *privatedns.Client

return me.privatednsv20201028Conn
}

// UseWafV20180125Client return WAF client for service
func (me *TencentCloudClient) UseWafV20180125Client() *waf.Client {
if me.wafv20180125Conn != nil {
return me.wafv20180125Conn
}
cpf := me.NewClientProfile(300)
cpf.Language = "zh-CN"
me.wafv20180125Conn, _ = waf.NewClient(me.Credential, me.Region, cpf)
me.wafv20180125Conn.WithHttpTransport(&LogRoundTripper{})

return me.wafv20180125Conn
}
3 changes: 1 addition & 2 deletions tencentcloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,6 @@ func Provider() *schema.Provider {
"tencentcloud_waf_tls_versions": waf.DataSourceTencentCloudWafTlsVersions(),
"tencentcloud_waf_domains": waf.DataSourceTencentCloudWafDomains(),
"tencentcloud_waf_find_domains": waf.DataSourceTencentCloudWafFindDomains(),
"tencentcloud_waf_waf_infos": waf.DataSourceTencentCloudWafWafInfos(),
"tencentcloud_waf_ports": waf.DataSourceTencentCloudWafPorts(),
"tencentcloud_waf_user_domains": waf.DataSourceTencentCloudWafUserDomains(),
"tencentcloud_waf_attack_log_histogram": waf.DataSourceTencentCloudWafAttackLogHistogram(),
Expand Down Expand Up @@ -2095,7 +2094,7 @@ func Provider() *schema.Provider {
"tencentcloud_waf_cc_auto_status": waf.ResourceTencentCloudWafCcAutoStatus(),
"tencentcloud_waf_cc_session": waf.ResourceTencentCloudWafCcSession(),
"tencentcloud_waf_ip_access_control": waf.ResourceTencentCloudWafIpAccessControl(),
"tencentcloud_waf_modify_access_period": waf.ResourceTencentCloudWafModifyAccessPeriod(),
"tencentcloud_waf_ip_access_control_v2": waf.ResourceTencentCloudWafIpAccessControlV2(),
"tencentcloud_wedata_rule_template": wedata.ResourceTencentCloudWedataRuleTemplate(),
"tencentcloud_wedata_datasource": wedata.ResourceTencentCloudWedataDatasource(),
"tencentcloud_wedata_function": wedata.ResourceTencentCloudWedataFunction(),
Expand Down
1 change: 1 addition & 0 deletions tencentcloud/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,7 @@ Web Application Firewall(WAF)
tencentcloud_waf_cc_auto_status
tencentcloud_waf_cc_session
tencentcloud_waf_ip_access_control
tencentcloud_waf_ip_access_control_v2

Wedata
Data Source
Expand Down
286 changes: 0 additions & 286 deletions tencentcloud/services/waf/data_source_tc_waf_waf_infos.go

This file was deleted.

23 changes: 0 additions & 23 deletions tencentcloud/services/waf/data_source_tc_waf_waf_infos.md

This file was deleted.

Loading

0 comments on commit c83d1a7

Please sign in to comment.