-
Notifications
You must be signed in to change notification settings - Fork 290
Add BuildkiteQueue and AgentsPerInstance tags to Agent Autoscaling groups #1675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BuildkiteQueue and AgentsPerInstance tags to Agent Autoscaling groups #1675
Conversation
amagana-fanduel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
scadu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, @fd-jonathanlinn!
The pipeline failed due to the issue with the template. From cfn-lint templates/*:
E3001 Additional properties are not allowed ('Tags' was unexpected)
templates/aws-stack.yml:2560:5
Moving Tags to the Properties block should fix the issue as now it's placed at the resource level alongside UpdatePolicy and CreationPolicy.
Moving the whole block to line 2553, just under NewInstancesProtectedFromScaleIn should fix it.
|
Looks like now the issue is related to the indentation. I should've mentioned that git diff with the correct indentation: diff --git i/templates/aws-stack.yml w/templates/aws-stack.yml
index d901f4a7..d1e6f815 100644
--- i/templates/aws-stack.yml
+++ w/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 ] |
Description
Adds
BuildkiteQueueandAgentsPerInstancetags to the AgentAutoscaleGroup resource, referencing the parameters of the same name. This makes it a little easier to correlate different resources in tools like Datadog, where you can now rely on a single Template Variable to filter EC2 instances and autoscaling Groups, as well as determining how many actual agents are running.Deliberately set the tags not to propagate to the EC2 instances created by the ASG, as that tagging is handled by the LaunchTemplate.
Template changes validate fine using AWS CLI.
Checklist
Release Notes