Skip to content

Commit a3e7e98

Browse files
added ec2 profile
1 parent 0b475a4 commit a3e7e98

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

aws_sra_examples/solutions/patch_mgmt/patch_mgmt_org/templates/sra-patch_mgmt-configuration-role.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ Parameters:
7474
Default: sra-patch-mgmt-org
7575
Description: The SRA solution name. The default value is the folder name of the solution
7676
Type: String
77+
pPatchMgrEC2ProfileRoleName:
78+
Default: patch-mgr-ec2-profile
79+
Description: An EC2 profile that can be used if having problems with the Default Host Configuration setting.
80+
Type: String
7781

7882
Resources:
7983
rConfigurationRole:
@@ -265,3 +269,31 @@ Resources:
265269
Tags:
266270
- Key: sra-solution
267271
Value: !Ref pSRASolutionName
272+
273+
rPatchMgrEC2ProfileRoleName:
274+
Type: AWS::IAM::Role
275+
Metadata:
276+
cfn_nag:
277+
rules_to_suppress:
278+
- id: F3
279+
reason: Actions require * in permissions policy
280+
- id: W11
281+
reason: Actions require * in resource
282+
- id: W28
283+
reason: Explicit role name provided
284+
Properties:
285+
RoleName: !Ref pPatchMgrEC2ProfileRoleName
286+
AssumeRolePolicyDocument:
287+
Version: 2012-10-17
288+
Statement:
289+
- Action: sts:AssumeRole
290+
Effect: Allow
291+
Principal:
292+
Service:
293+
- ec2.amazonaws.com
294+
Path: "/service-role/"
295+
ManagedPolicyArns:
296+
- !Sub arn:${AWS::Partition}:iam::${AWS::Partition}:policy/AmazonSSMManagedInstanceCore
297+
Tags:
298+
- Key: sra-solution
299+
Value: !Ref pSRASolutionName

0 commit comments

Comments
 (0)