From 23a075f6fe97d06b9b822744b0d63dfa5fba96b9 Mon Sep 17 00:00:00 2001 From: Jonny Linn Date: Fri, 21 Nov 2025 14:23:28 +0000 Subject: [PATCH 1/4] Add BuildkiteQueue tag to ASG, don't propagate on EC2 launch --- templates/aws-stack.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/aws-stack.yml b/templates/aws-stack.yml index 9716a0dd6..5c1d0e2f2 100644 --- a/templates/aws-stack.yml +++ b/templates/aws-stack.yml @@ -2557,6 +2557,10 @@ Resources: UpdatePolicy: AutoScalingReplacingUpdate: WillReplace: true + Tags: + - Key: BuildkiteQueue + PropagateAtLaunch: false + Value: !Ref BuildkiteQueue ScheduledScaleUpAction: Condition: EnableScheduledScaling From d2a5de6bbef728a2da4c6bd8cb8275f6418015f4 Mon Sep 17 00:00:00 2001 From: Jonny Linn Date: Fri, 21 Nov 2025 14:57:09 +0000 Subject: [PATCH 2/4] Also add AgentsPerInstance as a tag --- templates/aws-stack.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/aws-stack.yml b/templates/aws-stack.yml index 5c1d0e2f2..ed562f495 100644 --- a/templates/aws-stack.yml +++ b/templates/aws-stack.yml @@ -2561,6 +2561,9 @@ Resources: - Key: BuildkiteQueue PropagateAtLaunch: false Value: !Ref BuildkiteQueue + - Key: AgentsPerInstance + PropagateAtLaunch: false + Value: !Ref AgentsPerInstance ScheduledScaleUpAction: Condition: EnableScheduledScaling From 7371fe6d6ea22475db770f83c9d3438ebbd7963b Mon Sep 17 00:00:00 2001 From: Jonny Linn Date: Mon, 24 Nov 2025 15:01:34 +0000 Subject: [PATCH 3/4] Fix location of Tags block --- templates/aws-stack.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/aws-stack.yml b/templates/aws-stack.yml index ed562f495..d901f4a7f 100644 --- a/templates/aws-stack.yml +++ b/templates/aws-stack.yml @@ -2550,6 +2550,13 @@ Resources: - OldestLaunchConfiguration - ClosestToNextInstanceHour NewInstancesProtectedFromScaleIn: !Ref InstanceScaleInProtection + Tags: + - Key: BuildkiteQueue + PropagateAtLaunch: false + Value: !Ref BuildkiteQueue + - Key: AgentsPerInstance + PropagateAtLaunch: false + Value: !Ref AgentsPerInstance CreationPolicy: ResourceSignal: Timeout: !If [ UseDefaultInstanceCreationTimeout, !If [ UseWindowsAgents, PT10M, PT5M ], !Ref InstanceCreationTimeout ] @@ -2557,13 +2564,6 @@ Resources: UpdatePolicy: AutoScalingReplacingUpdate: WillReplace: true - Tags: - - Key: BuildkiteQueue - PropagateAtLaunch: false - Value: !Ref BuildkiteQueue - - Key: AgentsPerInstance - PropagateAtLaunch: false - Value: !Ref AgentsPerInstance ScheduledScaleUpAction: Condition: EnableScheduledScaling From a65950e47f4a49d38f8febe84aa2fa7691961b62 Mon Sep 17 00:00:00 2001 From: Jonny Linn Date: Mon, 24 Nov 2025 15:27:06 +0000 Subject: [PATCH 4/4] Indentation --- templates/aws-stack.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/aws-stack.yml b/templates/aws-stack.yml index d901f4a7f..d1e6f815c 100644 --- a/templates/aws-stack.yml +++ b/templates/aws-stack.yml @@ -2550,13 +2550,13 @@ Resources: - OldestLaunchConfiguration - ClosestToNextInstanceHour NewInstancesProtectedFromScaleIn: !Ref InstanceScaleInProtection - Tags: - - Key: BuildkiteQueue - PropagateAtLaunch: false - Value: !Ref BuildkiteQueue - - Key: AgentsPerInstance - PropagateAtLaunch: false - Value: !Ref AgentsPerInstance + Tags: + - Key: BuildkiteQueue + PropagateAtLaunch: false + Value: !Ref BuildkiteQueue + - Key: AgentsPerInstance + PropagateAtLaunch: false + Value: !Ref AgentsPerInstance CreationPolicy: ResourceSignal: Timeout: !If [ UseDefaultInstanceCreationTimeout, !If [ UseWindowsAgents, PT10M, PT5M ], !Ref InstanceCreationTimeout ]