Skip to content

Commit

Permalink
feat/csip
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenEarth committed Feb 29, 2024
1 parent 2a90aea commit 73e94ca
Show file tree
Hide file tree
Showing 17 changed files with 8,868 additions and 1,160 deletions.
4 changes: 2 additions & 2 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.860
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.860
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.865
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 @@ -109,7 +109,7 @@ 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/csip v1.0.857
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.865
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dasb v1.0.798
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/oceanus v1.0.831
github.com/wI2L/jsondiff v0.3.0
Expand Down
35 changes: 8 additions & 27 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/bi v1.0.770 h1:5FWt9F+a
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/bi v1.0.770/go.mod h1:zuWcAJVIXbHbOR7i6SKK0wNlvPLt5Su4ijOZGMJbUi8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/bi v1.0.824 h1:DVKvZ6h+qd7tadUrCjVAkCCmE3TsbK2ZmwGd3AJcpWc=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/bi v1.0.824/go.mod h1:DvBpDX/qdJG4KKLeULmRvhAjPYiw8za0HeTSu2y/lFw=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/billing v1.0.856 h1:zJBb69FBBNZko4PbDScqj9wogPatzNYEXAJ862IBoMQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/billing v1.0.856/go.mod h1:P+VGibeVh8pW4N85x9ee0xzXsZoT9jzjHYD8GaAiyG4=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cam v1.0.760 h1:Ky9dRsTL2HXKWUrTFpQFZWQ1TrM+o+P35kczR7thalo=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cam v1.0.760/go.mod h1:AAfdrxknvUedvigxbbzKQLxN+1EG5NPbytpiqmfuFvU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cat v1.0.760 h1:oGY4IigfIw0iQKh3/cOY29KBeEeFbvJft69e0beyfdI=
Expand Down Expand Up @@ -957,26 +959,18 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.845 h1:fiiV
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.845/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.847 h1:ITZmxAWfbr5yikJ4T30yVYMW3jpa/oTmNbPnw/h1Vq0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.847/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
<<<<<<< HEAD
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.853/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/csip v1.0.853 h1:Ofgedv4BWvDYX1Ff/5H2wYShan8mC1OtaHQJq+rG0pE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.853/go.mod h1:iDYmWmDEfR74RzWU5kO1UWFsWu/c0pMtEtnoWRMvaJQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.857 h1:ANnIsWqF7OjfH0Bvnnj3zniFs/7JAhHKaRQTJo1pIiA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.857/go.mod h1:d+OvJbz/yKr64+Scu00s/PoHtmnJBaOcFLom79zJ0jg=
=======
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.853 h1:TNYjF1jDLLNTirAkq7zRT9iF9xC2ZjgwpXsVSEBQvgQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.853/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.859 h1:XXpytsYJilIk/koSWmpEcDZBILNqeEUprU9L5gqbA00=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.859/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.860 h1:d5/YwGX6b5YgFU/0thsbs5aBp4aJJXBi7JyU1JHAaw0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.860/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
>>>>>>> a6d6e64b16cba30913e59a9b3cebe666e209c4b4
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.865 h1:LcUqBlKC4j15LhT303yQDX/XxyHG4haEQqbHgZZA4SY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.865/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.857 h1:ANnIsWqF7OjfH0Bvnnj3zniFs/7JAhHKaRQTJo1pIiA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.857/go.mod h1:d+OvJbz/yKr64+Scu00s/PoHtmnJBaOcFLom79zJ0jg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.865 h1:dzSh3m/nF2grL3S4ozJIkBFQyjJP4CyZaKYoUuHpF5U=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.865/go.mod h1:TgZLmuExb7FrQKjPJP86klj37/l2O1l7h0feFO1/TjY=
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 @@ -1017,31 +1011,18 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.777 h1:8nSy6G
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.777/go.mod h1:Nsd3yEpXQqXrWbN3mJbrk+A2KcdxHVW5xIRFAyIvlAE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mariadb v1.0.672 h1:sR3MyM9RBw1PNRdWoBrtK+2M9Qbb0i6DfQSrvZ4/4os=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mariadb v1.0.672/go.mod h1:o3rBKhtfIJfw4BG22M0CQVLQAc0WqIsbyRI/EW52Ka0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.651 h1:Ohb58H6gIlTcd73CF+goUlEdNJ2CYkYUHTYxV/M4UL4=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.651/go.mod h1:HLqsSgUnwgkE+XecQajekinjz1B7S+1U1J66puH4jpQ=
<<<<<<< HEAD
=======
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.828 h1:ck4fIo8e7HlMQmIh77r8rbUjZCiCuO4DJ7KYAjHQ/Ws=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.828/go.mod h1:pnGYJR0EUzVMjcGdecYwsU+UUKrrHBM8kDgJHAwCOK4=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.839 h1:eRIkvwwyw7Guh3Ayr3J5tKSWfNX9WQBQ5zzNpBYoBHQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.839/go.mod h1:4OoBA087NHVdyeRJFy/SML7kIJmt54DtNkNlJWZp8oE=
>>>>>>> a6d6e64b16cba30913e59a9b3cebe666e209c4b4
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.844 h1:ZR7FSnv4k1j0BpJHg6JDbJ6YJ2YfLhX2xVIUcuweKm4=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.844/go.mod h1:a7PfDWl0B3QV+g99asQHumDNScEEMl+7lkXP0KXt8Xg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps v1.0.777 h1:SoH/KkqkEUw8iDmQDZCw5Saf319Ceyt3v8Vqodo8DiY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps v1.0.777/go.mod h1:sBmwqD3GkczHFiArdYpHPp9QriIbzNtO99DueYVyGwE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps v1.0.853 h1:abGpWsAtEuF2QIYKm2m9/hv9OqyHwWNLsd5+67z86BE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps v1.0.853/go.mod h1:xIprIT+IW+3Fj05GCWmgvxJOhICqFGoW4Ef77cDD2JQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/oceanus v1.0.831 h1:oyazF5wgAgoinGo/SDGfUReE3JFxqcpI6/pstWhK7yE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/oceanus v1.0.831/go.mod h1:2WuTlTnKCnZoa6l0JxY9GNfo0UG6nU7AEsljF8rMMsM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.770 h1:Ksu947uY/fafnlILemfMuyKqL/RxHh9dfVowWX8paeQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.770/go.mod h1:Ew8jug2Kq03q9Kkjzov7IMYgugGLEw3FGYPofuRqzKw=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.856 h1:W1FLC178fBj5HigbNkAUIBGPPTit20RVycuXQ6u2lSg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.856/go.mod h1:Ln9igPci1mCEe4gzekGpMMn/x9im6XlDh2bqvWnUMDo=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.814 h1:1XlGrQHRBJv419m64yWRNRWVUTvqBi3Go4ahndnZz9w=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.814/go.mod h1:ch9ZDGEWZXIpzOffmFMgCDKX5uL6x2NLJBiSG94WWEE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.815 h1:zuOoiF957eIqonXgMW1qtsMnlYGIrgTSMM+yk+OHuWE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.815/go.mod h1:OdeqTfzG3sujkAUJySJQU9rXu+1P8JT/8AnX14aQyRI=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.859 h1:VrE3qzwzWB5mV/ejTJuwZbqZ/CNYLoc8X+uFbWEEOnY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.859/go.mod h1:FeOl14rPWpNEu6r4bPEsTNHIB9qaRTg0dRhxhRwQ5Hw=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.762 h1:rZDKucVVtTnmnbZFDyh6t47dHswkb2oSuOxOHTTkygA=
Expand Down
9 changes: 0 additions & 9 deletions tencentcloud/connectivity/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ import (
"strconv"
"time"

<<<<<<< HEAD
billing "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/billing/v20180709"
csip "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip/v20221121"

=======
>>>>>>> a6d6e64b16cba30913e59a9b3cebe666e209c4b4
dasb "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dasb/v20191018"

oceanus "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/oceanus/v20190422"
Expand Down Expand Up @@ -205,11 +202,8 @@ type TencentCloudClient struct {
trocketConn *trocket.Client
biConn *bi.Client
cdwpgConn *cdwpg.Client
<<<<<<< HEAD
csipConn *csip.Client
billingConn *billing.Client
=======
>>>>>>> a6d6e64b16cba30913e59a9b3cebe666e209c4b4
//internal version: replace client begin, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
//internal version: replace client end, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
}
Expand Down Expand Up @@ -1387,7 +1381,6 @@ func (me *TencentCloudClient) UseCdwpgClient() *cdwpg.Client {
return me.cdwpgConn
}

<<<<<<< HEAD
// UseBillingClient returns billing client for service
func (me *TencentCloudClient) UseBillingClient() *billing.Client {
if me.billingConn != nil {
Expand Down Expand Up @@ -1416,8 +1409,6 @@ func (me *TencentCloudClient) UseCsipClient() *csip.Client {
return me.csipConn
}

=======
>>>>>>> a6d6e64b16cba30913e59a9b3cebe666e209c4b4
//internal version: replace useClient begin, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.
//internal version: replace useClient end, please do not modify this annotation and refrain from inserting any code between the beginning and end lines of the annotation.

Expand Down
6 changes: 1 addition & 5 deletions tencentcloud/services/csip/resource_tc_csip_risk_center.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func resourceTencentCloudCsipRiskCenterCreate(d *schema.ResourceData, meta inter
},
}

err = resource.Retry(tccommon.ReadRetryTimeout*60, func() *resource.RetryError {
err = resource.Retry(tccommon.ReadRetryTimeout*120, func() *resource.RetryError {
result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseCsipClient().DescribeScanTaskList(waitRequest)
if e != nil {
return tccommon.RetryError(e)
Expand Down Expand Up @@ -554,10 +554,6 @@ func resourceTencentCloudCsipRiskCenterUpdate(d *schema.ResourceData, meta inter
}
}

if v, ok := d.GetOkExists("scan_plan_type"); ok {
request.ScanPlanType = helper.IntInt64(v.(int))
}

if v, ok := d.GetOk("assets"); ok {
for _, item := range v.([]interface{}) {
dMap := item.(map[string]interface{})
Expand Down
2 changes: 2 additions & 0 deletions tencentcloud/services/csip/resource_tc_csip_risk_center.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
~> **NOTE:** Currently, only tasks with a physical examination time of no more than 6 hours are supported.

Provides a resource to create a csip risk_center

Example Usage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package csip
package csip_test

import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"

tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
)

Expand All @@ -22,10 +23,10 @@ func TestAccTencentCloudCsipRiskCenterResource_basic(t *testing.T) {
resource.TestCheckResourceAttrSet("tencentcloud_csip_risk_center.example", "id"),
resource.TestCheckResourceAttr("tencentcloud_csip_risk_center.example", "task_name", "tf_example"),
resource.TestCheckResourceAttrSet("tencentcloud_csip_risk_center.example", "scan_asset_type"),
resource.TestCheckResourceAttrSet("tencentcloud_csip_risk_center.example", "scan_item"),
resource.TestCheckResourceAttr("tencentcloud_csip_risk_center.example", "scan_plan_type", "46 51 16 */1 * * *"),
resource.TestCheckResourceAttrSet("tencentcloud_csip_risk_center.example", "scan_item.#"),
resource.TestCheckResourceAttr("tencentcloud_csip_risk_center.example", "scan_plan_content", "46 51 16 */1 * * *"),
resource.TestCheckResourceAttrSet("tencentcloud_csip_risk_center.example", "task_mode"),
resource.TestCheckResourceAttrSet("tencentcloud_csip_risk_center.example", "assets"),
resource.TestCheckResourceAttrSet("tencentcloud_csip_risk_center.example", "assets.#"),
),
},
},
Expand Down
Loading

0 comments on commit 73e94ca

Please sign in to comment.