/
aws-ssm-patchmanager-v1.yaml
46 lines (43 loc) · 1.09 KB
/
aws-ssm-patchmanager-v1.yaml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
AWSTemplateFormatVersion: '2010-09-09'
Description: 'AWS-RunPatchBaseline'
# ---------------------------------------------------------------------------------------------------------
# CloudFormation Template 1 of 2 - Patch Manager association
#
#
# @kmmahaj
##
## License:
## This code is made available under the MIT-0 license. See the LICENSE file.
# ------------------------------------------------------------...............................................
Outputs:
StackArn:
Value:
Ref: AWS::StackId
Conditions:
ShouldEnablePatching:
Fn::Equals:
- Ref: EnableWeeklyPatching
- 'True'
PatchWeekly:
Type: AWS::SSM::Association
Properties:
Name: AWS-RunPatchBaseline
ScheduleExpression: rate(7 days)
AssociationName:
Fn::Sub: "${AWS::AccountId}-PatchWeekly"
Parameters:
Operation:
- Install
- Scan
Targets:
- Values:
- "*"
Key: InstanceIds
Parameters:
EnableWeeklyPatching:
Default: 'True'
Type: String
Description: True or False
AllowedValues:
- 'True'
- 'False'