Skip to content

Commit 33fb917

Browse files
authored
docs: fix AWS security credentials supplier example (#2162)
1 parent be41d83 commit 33fb917

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.readme-partials.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ body: |-
390390
private readonly region: string
391391
392392
constructor(region: string) {
393-
this.region = options.region;
393+
this.region = region;
394394
}
395395
396396
async getAwsRegion(context: ExternalAccountSupplierContext): Promise<string> {
@@ -419,7 +419,7 @@ body: |-
419419
const clientOptions = {
420420
audience: '//iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$WORKLOAD_POOL_ID/providers/$PROVIDER_ID', // Set the GCP audience.
421421
subject_token_type: 'urn:ietf:params:aws:token-type:aws4_request', // Set the subject token type.
422-
aws_security_credentials_supplier: new AwsSupplier("AWS_REGION") // Set the custom supplier.
422+
aws_security_credentials_supplier: new AwsSupplier("AWS_REGION"), // Set the custom supplier.
423423
service_account_impersonation_url: 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/$EMAIL:generateAccessToken', // Set the service account impersonation url.
424424
}
425425

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ class AwsSupplier implements AwsSecurityCredentialsSupplier {
434434
private readonly region: string
435435

436436
constructor(region: string) {
437-
this.region = options.region;
437+
this.region = region;
438438
}
439439

440440
async getAwsRegion(context: ExternalAccountSupplierContext): Promise<string> {
@@ -463,7 +463,7 @@ class AwsSupplier implements AwsSecurityCredentialsSupplier {
463463
const clientOptions = {
464464
audience: '//iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$WORKLOAD_POOL_ID/providers/$PROVIDER_ID', // Set the GCP audience.
465465
subject_token_type: 'urn:ietf:params:aws:token-type:aws4_request', // Set the subject token type.
466-
aws_security_credentials_supplier: new AwsSupplier("AWS_REGION") // Set the custom supplier.
466+
aws_security_credentials_supplier: new AwsSupplier("AWS_REGION"), // Set the custom supplier.
467467
service_account_impersonation_url: 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/$EMAIL:generateAccessToken', // Set the service account impersonation url.
468468
}
469469

0 commit comments

Comments
 (0)