Skip to content

Commit

Permalink
feat/cfw
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenEarth committed Oct 7, 2023
1 parent cdaa060 commit c34b207
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tencentcloud/resource_tc_cfw_sync_asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func resourceTencentCloudCfwSyncAssetCreate(d *schema.ResourceData, meta interfa
var (
logId = getLogId(contextNil)
request = cfw.NewModifyAssetSyncRequest()
statusRequest = cfw.NewDescribeFwSyncStatusRequest()
statusRequest = cfw.NewDescribeAssetSyncRequest()
)

err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
Expand All @@ -57,16 +57,16 @@ func resourceTencentCloudCfwSyncAssetCreate(d *schema.ResourceData, meta interfa

// wait
err = resource.Retry(writeRetryTimeout, func() *resource.RetryError {
result, e := meta.(*TencentCloudClient).apiV3Conn.UseCfwClient().DescribeFwSyncStatus(statusRequest)
result, e := meta.(*TencentCloudClient).apiV3Conn.UseCfwClient().DescribeAssetSync(statusRequest)
if e != nil {
return retryError(e)
}

if *result.Response.SyncStatus == 0 {
if *result.Response.Status == 2 {
return nil
}

return resource.RetryableError(fmt.Errorf("The fw sync status is %d.", *result.Response.SyncStatus))
return resource.RetryableError(fmt.Errorf("The fw sync asset status is %d.", *result.Response.Status))
})

if err != nil {
Expand Down

0 comments on commit c34b207

Please sign in to comment.