Skip to content

Commit 1352c0d

Browse files
committed
Make the rules for boot and automation depend on the hooks
1 parent ca1e1c4 commit 1352c0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/aws-stack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ Resources:
12011201
- "EC2 Instance-launch Lifecycle Action"
12021202
detail:
12031203
AutoScalingGroupName: [ !Ref AgentAutoScaleGroup ]
1204-
LifecycleHookName: [ BootHook ]
1204+
LifecycleHookName: [ !Ref BootHook ]
12051205
Targets:
12061206
- Arn: !Sub arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:automation-definition/${BootHookAutomation}:$DEFAULT
12071207
RoleArn: !GetAtt EventBridgeRuleRole.Arn
@@ -1282,7 +1282,7 @@ Resources:
12821282
- "EC2 Instance-terminate Lifecycle Action"
12831283
detail:
12841284
AutoScalingGroupName: [ !Ref AgentAutoScaleGroup ]
1285-
LifecycleHookName: [ ShutdownHook ]
1285+
LifecycleHookName: [ !Ref ShutdownHook ]
12861286
Targets:
12871287
- Arn: !Sub arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:automation-definition/${BootHookAutomation}:$DEFAULT
12881288
RoleArn: !GetAtt EventBridgeRuleRole.Arn

0 commit comments

Comments
 (0)