Skip to content

Commit f089130

Browse files
author
mikatong
committed
update
1 parent 17d9b86 commit f089130

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tencentcloud/provider.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2307,7 +2307,10 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
23072307

23082308
if v, ok := d.GetOkExists("enable_pod_oidc"); ok && v.(bool) {
23092309
if os.Getenv(POD_OIDC_TKE_REGION) != "" && os.Getenv(POD_OIDC_TKE_WEB_IDENTITY_TOKEN_FILE) != "" && os.Getenv(POD_OIDC_TKE_PROVIDER_ID) != "" && os.Getenv(POD_OIDC_TKE_ROLE_ARN) != "" {
2310-
_ = genClientWithPodOidc(&tcClient)
2310+
err := genClientWithPodOidc(&tcClient)
2311+
if err != nil {
2312+
return nil, err
2313+
}
23112314
needSecret = false
23122315
} else {
23132316
return nil, fmt.Errorf("Can not get `TKE_REGION`, `TKE_WEB_IDENTITY_TOKEN_FILE`, `TKE_PROVIDER_ID`, `TKE_ROLE_ARN`. Must config serviceAccountName for pod.\n")
@@ -2514,6 +2517,7 @@ func genClientWithPodOidc(tcClient *TencentCloudClient) error {
25142517
if err != nil {
25152518
return err
25162519
}
2520+
25172521
tcClient.apiV3Conn.Credential = sdkcommon.NewTokenCredential(
25182522
assumeResp.GetSecretId(),
25192523
assumeResp.GetSecretKey(),

0 commit comments

Comments
 (0)