forked from aws-ia/cfn-abi-crowdstrike-fcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathssm-setup-stackset.yml
33 lines (31 loc) · 1.05 KB
/
ssm-setup-stackset.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
Parameters:
AutomationAssumeRole:
Type: String
Description: 'Name of the IAM role to create'
PermissionsBoundary:
Type: String
Description: The name of the policy used to set the permissions boundary for IAM roles.
Default: ''
Conditions:
SetPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundary, '' ] ]
Resources:
SSMAutomationRole:
Type: 'AWS::IAM::Role'
Properties:
RoleName: !Ref AutomationAssumeRole
PermissionsBoundary:
Fn::If:
- SetPermissionsBoundary
- !Sub 'arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${PermissionsBoundary}'
- Ref: AWS::NoValue
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: 'Allow'
Principal:
Service: 'ssm.amazonaws.com'
Action: 'sts:AssumeRole'
ManagedPolicyArns:
- !Sub 'arn:${AWS::Partition}:iam::aws:policy/service-role/AmazonSSMAutomationRole'
- !Sub 'arn:${AWS::Partition}:iam::aws:policy/SecretsManagerReadWrite'