Skip to content

Commit

Permalink
[Infrastructure] Add EC2 permissions required by PCUI private deploym…
Browse files Browse the repository at this point in the history
…ent only when private deployment is enabled.
  • Loading branch information
gmarciani committed Dec 12, 2023
1 parent bd68173 commit b082880
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions infrastructure/parallelcluster-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -859,11 +859,6 @@ Resources:
- ec2:DescribeInstanceTypes
- ec2:DescribeSubnets
- ec2:DescribeKeyPairs
- ec2:DescribeNetworkInterfaces
- ec2:CreateNetworkInterface
- ec2:DeleteNetworkInterface
- ec2:DescribeInstances
- ec2:AttachNetworkInterface
Resource:
- '*'
Effect: Allow
Expand All @@ -878,6 +873,27 @@ Resources:
ec2:ResourceTag/parallelcluster:version: "*"
Effect: Allow
Sid: EC2ManagePolicy
- Fn::If:
- IsPrivate
- Action:
- ec2:CreateNetworkInterface
- ec2:DeleteNetworkInterface
- ec2:AttachNetworkInterface
Resource:
- !Sub arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:*
Effect: Allow
Sid: PrivateDeploymentWritePolicy
- !Ref AWS::NoValue
- Fn::If:
- IsPrivate
- Action:
- ec2:DescribeNetworkInterfaces
- ec2:DescribeInstances
Resource:
- '*'
Effect: Allow
Sid: PrivateDeploymentReadPolicy
- !Ref AWS::NoValue

DescribeFsxPolicy:
Type: AWS::IAM::ManagedPolicy
Expand Down

0 comments on commit b082880

Please sign in to comment.