@@ -299,6 +299,11 @@ Parameters:
299
299
Description : Optional - A name for the IAM Role attached to the Instance Profile
300
300
Default : " "
301
301
302
+ InstanceRolePermissionsBoundaryARN :
303
+ Type : String
304
+ Description : The ARN of the policy used to set the permissions boundary for the role.
305
+ Default : " "
306
+
302
307
InstanceOperatingSystem :
303
308
Type : String
304
309
Description : The operating system to run on the instances
@@ -436,6 +441,9 @@ Conditions:
436
441
SetInstanceRoleName :
437
442
!Not [ !Equals [ !Ref InstanceRoleName, "" ] ]
438
443
444
+ SetInstanceRolePermissionsBoundaryARN :
445
+ !Not [ !Equals [ !Ref InstanceRolePermissionsBoundaryARN, "" ] ]
446
+
439
447
UseSpecifiedSecretsBucket :
440
448
!Not [ !Equals [ !Ref SecretsBucket, "" ] ]
441
449
@@ -635,6 +643,7 @@ Resources:
635
643
Type : AWS::IAM::Role
636
644
Properties :
637
645
RoleName : !If [ SetInstanceRoleName, !Ref InstanceRoleName, !Sub "${AWS::StackName}-Role" ]
646
+ PermissionsBoundary : !If [ SetInstanceRolePermissionsBoundaryARN, !Ref InstanceRolePermissionsBoundaryARN ]
638
647
ManagedPolicyArns : !If
639
648
- HasManagedPolicies
640
649
# Support multiple policies to attach by merging the values together and splitting on ','
@@ -975,6 +984,7 @@ Resources:
975
984
AsgProcessSuspenderRole :
976
985
Type : AWS::IAM::Role
977
986
Properties :
987
+ PermissionsBoundary : !If [ SetInstanceRolePermissionsBoundaryARN, !Ref InstanceRolePermissionsBoundaryARN ]
978
988
AssumeRolePolicyDocument :
979
989
Version : 2012-10-17
980
990
Statement :
@@ -1051,6 +1061,7 @@ Resources:
1051
1061
Type : AWS::IAM::Role
1052
1062
Condition : HasVariableSize
1053
1063
Properties :
1064
+ PermissionsBoundary : !If [ SetInstanceRolePermissionsBoundaryARN, !Ref InstanceRolePermissionsBoundaryARN ]
1054
1065
Path : " /"
1055
1066
AssumeRolePolicyDocument :
1056
1067
Version : ' 2012-10-17'
0 commit comments