Skip to content

Commit

Permalink
update secret in test
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinZZ committed Mar 14, 2024
1 parent 29edc2b commit efa6690
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/aws-cdk-lib/aws-kms/test/key.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ describe('key policies', () => {

test('cross region key with iam role grant', () => {
const app = new cdk.App();
const stack = new cdk.Stack(app, 'test-stack', { env: { account: '123412341234', region: 'us-west-2' } });
const stack = new cdk.Stack(app, 'test-stack', { env: { account: '000000000000', region: 'us-west-2' } });
const key = kms.Key.fromKeyArn(
stack,
'Key',
'arn:aws:kms:eu-north-1:123412341234:key/e3ab59e5-3dc3-4bc4-9c3f-c790231d2287',
'arn:aws:kms:eu-north-1:000000000000:key/e3ab59e5-3dc3-4bc4-9c3f-c790231d2287',
);

const roleStack = new cdk.Stack(app, 'RoleStack', {
env: { account: '123412341234', region: 'eu-north-1' },
env: { account: '000000000000', region: 'eu-north-1' },
});
const role = new iam.Role(roleStack, 'Role', {
assumedBy: new iam.AccountPrincipal('123412341234'),
assumedBy: new iam.AccountPrincipal('000000000000'),
});
key.grantEncryptDecrypt(role);

Expand All @@ -103,7 +103,7 @@ describe('key policies', () => {
Statement: [
{
Effect: 'Allow',
Resource: 'arn:aws:kms:eu-north-1:123412341234:key/e3ab59e5-3dc3-4bc4-9c3f-c790231d2287',
Resource: 'arn:aws:kms:eu-north-1:000000000000:key/e3ab59e5-3dc3-4bc4-9c3f-c790231d2287',
},
],
Version: '2012-10-17',
Expand Down

0 comments on commit efa6690

Please sign in to comment.