Skip to content

fix(provider): [121324945] Update provider auth #3039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add
  • Loading branch information
SevenEarth committed Dec 24, 2024
commit 45ab99d7aed3879ecdb3f5780713cb5f90be91ff
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
Loading