Skip to content

Commit

Permalink
Change name to servicePrincipal
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorRobertson committed Feb 3, 2024
1 parent 370c193 commit b21a0be
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,13 @@ export class RotationSchedule extends Resource {
),
);
}
const grantee = new iam.ServicePrincipal('secretsmanager.amazonaws.com', {
const servicePrincipal = new iam.ServicePrincipal('secretsmanager.amazonaws.com', {
conditions: {
StringEquals: { 'aws:SourceAccount': Aws.ACCOUNT_ID },
},
});
const grant = props.rotationLambda.grantInvoke(grantee);

const grant = props.rotationLambda.grantInvoke(servicePrincipal);
grant.applyBefore(this);

props.rotationLambda.addToRolePolicy(
Expand Down

0 comments on commit b21a0be

Please sign in to comment.