@@ -308,6 +308,11 @@ Parameters:
308
308
Description : Optional - A name for the IAM Role attached to the Instance Profile
309
309
Default : " "
310
310
311
+ InstanceRolePermissionsBoundaryARN :
312
+ Type : String
313
+ Description : The ARN of the policy used to set the permissions boundary for the role.
314
+ Default : " "
315
+
311
316
InstanceOperatingSystem :
312
317
Type : String
313
318
Description : The operating system to run on the instances
@@ -445,6 +450,9 @@ Conditions:
445
450
SetInstanceRoleName :
446
451
!Not [ !Equals [ !Ref InstanceRoleName, "" ] ]
447
452
453
+ SetInstanceRolePermissionsBoundaryARN :
454
+ !Not [ !Equals [ !Ref InstanceRolePermissionsBoundaryARN, "" ] ]
455
+
448
456
UseSpecifiedSecretsBucket :
449
457
!Not [ !Equals [ !Ref SecretsBucket, "" ] ]
450
458
@@ -656,6 +664,7 @@ Resources:
656
664
Type : AWS::IAM::Role
657
665
Properties :
658
666
RoleName : !If [ SetInstanceRoleName, !Ref InstanceRoleName, !Sub "${AWS::StackName}-Role" ]
667
+ PermissionsBoundary : !If [ SetInstanceRolePermissionsBoundaryARN, !Ref InstanceRolePermissionsBoundaryARN, !Ref "AWS::NoValue" ]
659
668
ManagedPolicyArns : !If
660
669
- HasManagedPolicies
661
670
# Support multiple policies to attach by merging the values together and splitting on ','
@@ -1019,6 +1028,7 @@ Resources:
1019
1028
AsgProcessSuspenderRole :
1020
1029
Type : AWS::IAM::Role
1021
1030
Properties :
1031
+ PermissionsBoundary : !If [ SetInstanceRolePermissionsBoundaryARN, !Ref InstanceRolePermissionsBoundaryARN, !Ref "AWS::NoValue" ]
1022
1032
AssumeRolePolicyDocument :
1023
1033
Version : 2012-10-17
1024
1034
Statement :
@@ -1095,6 +1105,7 @@ Resources:
1095
1105
Type : AWS::IAM::Role
1096
1106
Condition : HasVariableSize
1097
1107
Properties :
1108
+ PermissionsBoundary : !If [ SetInstanceRolePermissionsBoundaryARN, !Ref InstanceRolePermissionsBoundaryARN, !Ref "AWS::NoValue" ]
1098
1109
Path : " /"
1099
1110
AssumeRolePolicyDocument :
1100
1111
Version : ' 2012-10-17'
0 commit comments