Skip to content

Commit 0e30fcc

Browse files
authored
chore(logs): fix method name typo (#28416)
Fix typo in method name (`convertArnPrincpalToAccountId` -> `convertArnPrincipalToAccountId`) and another `princpal` typo. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 0b2ba1c commit 0e30fcc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/aws-cdk-lib/aws-iam/lib/principals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ export class CompositePrincipal extends PrincipalBase {
855855

856856
public get policyFragment(): PrincipalPolicyFragment {
857857
// We only have a problem with conditions if we are trying to render composite
858-
// princpals into a single statement (which is when `policyFragment` would get called)
858+
// principals into a single statement (which is when `policyFragment` would get called)
859859
for (const p of this._principals) {
860860
const fragment = p.policyFragment;
861861
if (fragment.conditions && Object.keys(fragment.conditions).length > 0) {

packages/aws-cdk-lib/aws-logs/lib/log-group.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ abstract class LogGroupBase extends Resource implements ILogGroup {
223223
this.policy = new ResourcePolicy(this, 'Policy');
224224
}
225225
this.policy.document.addStatements(statement.copy({
226-
principals: statement.principals.map(p => this.convertArnPrincpalToAccountId(p)),
226+
principals: statement.principals.map(p => this.convertArnPrincipalToAccountId(p)),
227227
}));
228228
return { statementAdded: true, policyDependable: this.policy };
229229
}
230230

231-
private convertArnPrincpalToAccountId(principal: iam.IPrincipal) {
231+
private convertArnPrincipalToAccountId(principal: iam.IPrincipal) {
232232
if (principal.principalAccount) {
233233
// we use ArnPrincipal here because the constructor inserts the argument
234234
// into the template without mutating it, which means that there is no

0 commit comments

Comments
 (0)