Skip to content

Commit

Permalink
fixup! docs(cloudfront): deprecate fromOriginAccessIdentityName
Browse files Browse the repository at this point in the history
  • Loading branch information
dbartholomae committed Jun 18, 2022
1 parent 5948f8c commit eaf082c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/@aws-cdk/aws-cloudfront/test/oai.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ describe('Origin Access Identity', () => {
});
});

testDeprecated('Builds ARN of CloudFront user for fromOriginAccessIdentityName', () => {
const stack = new cdk.Stack();

const oai = OriginAccessIdentity.fromOriginAccessIdentityName(stack, 'OAI', 'OAITest');

expect(oai.grantPrincipal.policyFragment.principalJson.AWS[0]).toMatch(/:iam::cloudfront:user\/CloudFront Origin Access Identity OAITest$/);
});

test('Builds ARN of CloudFront user for fromOriginAccessIdentityId', () => {
const stack = new cdk.Stack();

Expand Down

0 comments on commit eaf082c

Please sign in to comment.