Skip to content

Commit

Permalink
Merge pull request #151 from andskli/fix/spot-permissions
Browse files Browse the repository at this point in the history
fix: update IAM policy to match the latest version for Karpenter v0.33.0
  • Loading branch information
andskli authored Dec 19, 2023
2 parents 9691d66 + 4843ff4 commit 36cffb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ export class Karpenter extends Construct {
resources: [
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}::image/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}::snapshot/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:spot-instances-request/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:security-group/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:subnet/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:launch-template/*`,
Expand All @@ -502,6 +501,7 @@ export class Karpenter extends Construct {
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:volume/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:network-interface/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:launch-template/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:spot-instances-request/*`,
],
actions: [
'ec2:RunInstances',
Expand Down Expand Up @@ -534,6 +534,7 @@ export class Karpenter extends Construct {
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:volume/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:network-interface/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:launch-template/*`,
`arn:${Aws.PARTITION}:ec2:${Aws.REGION}:*:spot-instances-request/*`,
],
actions: ['ec2:CreateTags'],
conditions: {
Expand Down

0 comments on commit 36cffb5

Please sign in to comment.