Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5719fd7

Browse files
committedFeb 26, 2025·
add
1 parent 87442f1 commit 5719fd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎tencentcloud/provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2406,7 +2406,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
24062406
envPrincipalArn := os.Getenv(PROVIDER_ASSUME_ROLE_PRINCIPAL_ARN)
24072407
// get assume role with web identity from env
24082408
envWebIdentityToken := os.Getenv(PROVIDER_ASSUME_ROLE_WEB_IDENTITY_TOKEN)
2409-
assumeRoleProviderId := os.Getenv(PROVIDER_ASSUME_ROLE_PROVIDER_ID)
2409+
envProviderId := os.Getenv(PROVIDER_ASSUME_ROLE_PROVIDER_ID)
24102410

24112411
if envSamlAssertion == "" && envPrincipalArn == "" && envWebIdentityToken == "" {
24122412
// use assume role
@@ -2426,7 +2426,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
24262426
needSecret = false
24272427
} else if envWebIdentityToken != "" {
24282428
// use assume role with oidc
2429-
err = genClientWithOidcSTS(&tcClient, envRoleArn, envSessionName, assumeRoleSessionDuration, envWebIdentityToken, assumeRoleProviderId)
2429+
err = genClientWithOidcSTS(&tcClient, envRoleArn, envSessionName, assumeRoleSessionDuration, envWebIdentityToken, envProviderId)
24302430
if err != nil {
24312431
return nil, fmt.Errorf("Get auth from assume role with OIDC by env failed. Reason: %s", err.Error())
24322432
}

0 commit comments

Comments
 (0)
Please sign in to comment.