Skip to content

Commit 4b48f2a

Browse files
committed
add
1 parent 552c4f8 commit 4b48f2a

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

tencentcloud/connectivity/client.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,15 @@ func (me *TencentCloudClient) UseVpcClient(iacExtInfo ...IacExtInfo) *vpc.Client
366366
func (me *TencentCloudClient) UseOmitNilClient(module string) *common.Client {
367367
secretId := me.Credential.SecretId
368368
secretKey := me.Credential.SecretKey
369+
token := me.Credential.Token
369370
region := me.Region
370-
credential := common.NewCredential(secretId, secretKey)
371+
var credential common.CredentialIface
372+
if token != "" {
373+
credential = common.NewTokenCredential(secretId, secretKey, token)
374+
} else {
375+
credential = common.NewCredential(secretId, secretKey)
376+
}
377+
371378
cpf := profile.NewClientProfile()
372379
cpf.HttpProfile.Endpoint = fmt.Sprintf("%s.tencentcloudapi.com", module)
373380
cpf.HttpProfile.ReqMethod = "POST"

tencentcloud/services/thpc/resource_tc_thpc_workspaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ resource "tencentcloud_thpc_workspaces" "example" {
6464
disk_type = "CLOUD_HSSD"
6565
}
6666
67-
data_disk {
67+
data_disks {
6868
disk_size = 200
6969
disk_type = "CLOUD_HSSD"
7070
encrypt = false

website/docs/r/thpc_workspaces.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ resource "tencentcloud_thpc_workspaces" "example" {
7575
disk_type = "CLOUD_HSSD"
7676
}
7777
78-
data_disk {
78+
data_disks {
7979
disk_size = 200
8080
disk_type = "CLOUD_HSSD"
8181
encrypt = false

0 commit comments

Comments
 (0)