Skip to content

Commit

Permalink
Make ViaServicePrincipal return same account as base principal
Browse files Browse the repository at this point in the history
  • Loading branch information
pergardebrink committed Dec 17, 2023
1 parent 964a0c9 commit aea48db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/aws-cdk-lib/aws-kms/lib/via-service-principal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class ViaServicePrincipal extends iam.PrincipalBase {
constructor(private readonly serviceName: string, basePrincipal?: iam.IPrincipal) {
super();
this.basePrincipal = basePrincipal ? basePrincipal : new iam.AnyPrincipal();
this.principalAccount = basePrincipal.principalAccount;
}

public addToPrincipalPolicy(_statement: iam.PolicyStatement): iam.AddToPrincipalPolicyResult {
Expand Down

0 comments on commit aea48db

Please sign in to comment.