From 84160a5e63c08dfd009197ef22ed577546847dfb Mon Sep 17 00:00:00 2001 From: Daniel Schroeder Date: Wed, 3 Feb 2021 12:02:19 +0100 Subject: [PATCH] use current AWS partition in ARNs (#25) --- README.md | 2 +- VERSION | 2 +- lib/index.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 317b3353..8b9aa5f6 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,6 @@ const keyPair = new KeyPair(this, 'A-Key-Pair', { [npm]: https://www.npmjs.com/package/cdk-ec2-key-pair [PyPI]: https://pypi.org/project/cdk-ec2-key-pair/ [NuGet]: https://www.nuget.org/packages/CDK.EC2.KeyPair/ - [docs]: https://awscdk.io/packages/cdk-ec2-key-pair@2.1.0 + [docs]: https://awscdk.io/packages/cdk-ec2-key-pair@2.1.1 [source]: https://github.com/udondan/cdk-ec2-key-pair [license]: https://github.com/udondan/cdk-ec2-key-pair/blob/master/LICENSE diff --git a/VERSION b/VERSION index 7ec1d6db..3e3c2f1e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.0 +2.1.1 diff --git a/lib/index.ts b/lib/index.ts index c0be171c..7a39c457 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -236,14 +236,14 @@ export class KeyPair extends cdk.Construct implements cdk.ITaggable { .allow() .toCreateKeyPair() .toCreateTags() - .onKeyPair('*') + .onKeyPair('*', undefined, undefined, stack.partition) .ifAwsRequestTag(createdByTag, ID), new statement.Ec2() // allow delete/update, only if createdByTag is set .allow() .toDeleteKeyPair() .toCreateTags() .toDeleteTags() - .onKeyPair('*') + .onKeyPair('*', undefined, undefined, stack.partition) .ifResourceTag(createdByTag, ID), new statement.Secretsmanager() // generally allow to list secrets. we need this to check if a secret exists before attempting to delete it .allow()