Skip to content

Commit 1035f96

Browse files
committed
add
1 parent 8fa783a commit 1035f96

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tencentcloud/provider.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -271,13 +271,13 @@ func Provider() *schema.Provider {
271271
Type: schema.TypeString,
272272
Required: true,
273273
DefaultFunc: schema.EnvDefaultFunc(PROVIDER_ASSUME_ROLE_SAML_ASSERTION, nil),
274-
Description: "SAML assertion information encoded in base64. It can be sourced from the `PROVIDER_ASSUME_ROLE_SAML_ASSERTION`.",
274+
Description: "SAML assertion information encoded in base64. It can be sourced from the `TENCENTCLOUD_ASSUME_ROLE_SAML_ASSERTION`.",
275275
},
276276
"principal_arn": {
277277
Type: schema.TypeString,
278278
Required: true,
279279
DefaultFunc: schema.EnvDefaultFunc(PROVIDER_ASSUME_ROLE_PRINCIPAL_ARN, nil),
280-
Description: "Player Access Description Name. It can be sourced from the `PROVIDER_ASSUME_ROLE_PRINCIPAL_ARN`.",
280+
Description: "Player Access Description Name. It can be sourced from the `TENCENTCLOUD_ASSUME_ROLE_PRINCIPAL_ARN`.",
281281
},
282282
"role_arn": {
283283
Type: schema.TypeString,
@@ -323,7 +323,7 @@ func Provider() *schema.Provider {
323323
Type: schema.TypeString,
324324
Required: true,
325325
DefaultFunc: schema.EnvDefaultFunc(PROVIDER_ASSUME_ROLE_WEB_IDENTITY_TOKEN, nil),
326-
Description: "OIDC token issued by IdP. It can be sourced from the `PROVIDER_ASSUME_ROLE_WEB_IDENTITY_TOKEN`.",
326+
Description: "OIDC token issued by IdP. It can be sourced from the `TENCENTCLOUD_ASSUME_ROLE_WEB_IDENTITY_TOKEN`.",
327327
},
328328
"role_arn": {
329329
Type: schema.TypeString,
@@ -2340,12 +2340,12 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
23402340
)
23412341

23422342
// get assume role from credential
2343-
if providerConfig["role-arn"] != nil {
2344-
assumeRoleArn = providerConfig["role-arn"].(string)
2343+
if v, ok := providerConfig["role-arn"].(string); ok && v != "" {
2344+
assumeRoleArn = v
23452345
}
23462346

2347-
if providerConfig["role-session-name"] != nil {
2348-
assumeRoleSessionName = providerConfig["role-session-name"].(string)
2347+
if v, ok := providerConfig["role-session-name"].(string); ok && v != "" {
2348+
assumeRoleSessionName = v
23492349
}
23502350

23512351
if assumeRoleArn != "" && assumeRoleSessionName != "" {

website/docs/index.html.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,11 @@ The nested `assume_role_with_saml` block supports the following:
395395
* `role_arn` - (Required) The ARN of the role to assume. It can also be sourced from the `TENCENTCLOUD_ASSUME_ROLE_ARN` environment variable.
396396
* `session_name` - (Required) The session name to use when making the AssumeRole call. It can also be sourced from the `TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME` environment variable.
397397
* `session_duration` - (Required) The duration of the session when making the AssumeRole call. Its value ranges from 0 to 43200(seconds), and default is 7200 seconds. It can also be sourced from the `TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION` environment variable.
398-
* `saml_assertion` - (Required) SAML assertion information encoded in base64. It can be sourced from the `PROVIDER_ASSUME_ROLE_SAML_ASSERTION`.
399-
* `principal_arn` - (Required) Player Access Description Name. It can be sourced from the `PROVIDER_ASSUME_ROLE_PRINCIPAL_ARN`.
398+
* `saml_assertion` - (Required) SAML assertion information encoded in base64. It can be sourced from the `TENCENTCLOUD_ASSUME_ROLE_SAML_ASSERTION`.
399+
* `principal_arn` - (Required) Player Access Description Name. It can be sourced from the `TENCENTCLOUD_ASSUME_ROLE_PRINCIPAL_ARN`.
400400

401401
The nested `assume_role_with_web_identity` block supports the following:
402402
* `role_arn` - (Required) The ARN of the role to assume. It can also be sourced from the `TENCENTCLOUD_ASSUME_ROLE_ARN` environment variable.
403403
* `session_name` - (Required) The session name to use when making the AssumeRole call. It can also be sourced from the `TENCENTCLOUD_ASSUME_ROLE_SESSION_NAME` environment variable.
404404
* `session_duration` - (Required) The duration of the session when making the AssumeRole call. Its value ranges from 0 to 43200(seconds), and default is 7200 seconds. It can also be sourced from the `TENCENTCLOUD_ASSUME_ROLE_SESSION_DURATION` environment variable.
405-
* `web_identity_token` - (Required) OIDC token issued by IdP. It can be sourced from the `PROVIDER_ASSUME_ROLE_WEB_IDENTITY_TOKEN`.
405+
* `web_identity_token` - (Required) OIDC token issued by IdP. It can be sourced from the `TENCENTCLOUD_ASSUME_ROLE_WEB_IDENTITY_TOKEN`.

0 commit comments

Comments
 (0)