Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenEarth committed Dec 24, 2024
1 parent bf72baf commit 45ab99d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tencentcloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2482,8 +2482,9 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
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) != "" {
err := genClientWithPodOidc(&tcClient)
if err != nil {
return nil, err
return nil, fmt.Errorf("Get auth from enable pod OIDC failed. Reason: %s", err.Error())
}

needSecret = false
} else {
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")
Expand Down

0 comments on commit 45ab99d

Please sign in to comment.