File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed
Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -859,11 +859,6 @@ Resources:
859859 - ec2:DescribeInstanceTypes
860860 - ec2:DescribeSubnets
861861 - ec2:DescribeKeyPairs
862- - ec2:DescribeNetworkInterfaces
863- - ec2:CreateNetworkInterface
864- - ec2:DeleteNetworkInterface
865- - ec2:DescribeInstances
866- - ec2:AttachNetworkInterface
867862 Resource :
868863 - ' *'
869864 Effect : Allow
@@ -878,6 +873,27 @@ Resources:
878873 ec2:ResourceTag/parallelcluster:version : " *"
879874 Effect : Allow
880875 Sid : EC2ManagePolicy
876+ - Fn::If :
877+ - IsPrivate
878+ - Action :
879+ - ec2:CreateNetworkInterface
880+ - ec2:DeleteNetworkInterface
881+ - ec2:AttachNetworkInterface
882+ Resource :
883+ - !Sub arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:*
884+ Effect : Allow
885+ Sid : PrivateDeploymentWritePolicy
886+ - !Ref AWS::NoValue
887+ - Fn::If :
888+ - IsPrivate
889+ - Action :
890+ - ec2:DescribeNetworkInterfaces
891+ - ec2:DescribeInstances
892+ Resource :
893+ - ' *'
894+ Effect : Allow
895+ Sid : PrivateDeploymentReadPolicy
896+ - !Ref AWS::NoValue
881897
882898 DescribeFsxPolicy :
883899 Type : AWS::IAM::ManagedPolicy
You can’t perform that action at this time.
0 commit comments