Skip to content

Commit

Permalink
use current AWS partition in ARNs (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
udondan committed Feb 3, 2021
1 parent f040d85 commit 84160a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0
2.1.1
4 changes: 2 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 84160a5

Please sign in to comment.