Skip to content

Commit 42d6860

Browse files
committed
Move the automation role
1 parent 9700a02 commit 42d6860

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

templates/aws-stack.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,16 +1119,6 @@ Resources:
11191119
ScaleOutForWaitingJobs: !Ref ScaleOutForWaitingJobs
11201120
DisableScaleIn: "false"
11211121

1122-
BootHook:
1123-
Type: AWS::AutoScaling::LifecycleHook
1124-
Properties:
1125-
AutoScalingGroupName: !Ref AgentAutoScaleGroup
1126-
LifecycleHookName: BootHook
1127-
LifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
1128-
# We give instances five minutes to respond to this hook else we abandon
1129-
# them
1130-
HeartbeatTimeout: 300
1131-
11321122
AutomationRole:
11331123
Type: AWS::IAM::Role
11341124
Properties:
@@ -1157,6 +1147,16 @@ Resources:
11571147
Action: autoscaling:CompleteLifecycleAction
11581148
Resource: !Sub arn:${AWS::Partition}:autoscaling:${AWS::Region}:${AWS::AccountId}:autoScalingGroup:*:autoScalingGroupName/${AWS::StackName}-AgentAutoScaleGroup-*
11591149

1150+
BootHook:
1151+
Type: AWS::AutoScaling::LifecycleHook
1152+
Properties:
1153+
AutoScalingGroupName: !Ref AgentAutoScaleGroup
1154+
LifecycleHookName: BootHook
1155+
LifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
1156+
# We give instances five minutes to respond to this hook else we abandon
1157+
# them
1158+
HeartbeatTimeout: 300
1159+
11601160
BootHookAutomation:
11611161
Type: AWS::SSM::Document
11621162
Properties:

0 commit comments

Comments
 (0)