AutoScaling Attachment
Attach a TargetGroup to an AutoScalingGroup.
Sample code
exports.createResources = () => [
{
type: "AutoScalingGroup",
group: "AutoScaling",
name: "asg-ng-1",
readOnly: true,
properties: ({}) => ({
MinSize: 1,
MaxSize: 1,
DesiredCapacity: 1,
HealthCheckGracePeriod: 15,
}),
dependencies: () => ({
subnets: ["SubnetPublicUSEAST1D", "SubnetPublicUSEAST1F"],
launchTemplate: "lt-ec2-micro",
}),
},
{
type: "AutoScalingAttachment",
group: "AutoScaling",
dependencies: () => ({
autoScalingGroup: "asg-ng-1",
targetGroup: "target-group-rest",
}),
},
];
Dependencies
Full Examples
List
The autoscaling attachments can be filtered with the AutoScalingAttachment type:
gc l -t AutoScalingAttachment
Listing resources on 1 provider: aws
✓ aws
✓ Initialising
✓ Listing 16/16
┌────────────────────────────────────────────────────────────────────────────────┐
│ 2 AutoScaling::AutoScalingAttachment from aws │
├────────────────────────────────────────────────────────────────────────────────┤
│ name: autoscaling-attachment::ag::target-group-rest │
│ managedByUs: Yes │
│ live: │
│ TargetGroupARN: arn:aws:elasticloadbalancing:us-east-1:840541460064:targetg… │
│ AutoScalingGroupName: ag │
│ AutoScalingGroupARN: arn:aws:autoscaling:us-east-1:840541460064:autoScaling… │
│ │
├────────────────────────────────────────────────────────────────────────────────┤
│ name: autoscaling-attachment::ag::target-group-web │
│ managedByUs: Yes │
│ live: │
│ TargetGroupARN: arn:aws:elasticloadbalancing:us-east-1:840541460064:targetg… │
│ AutoScalingGroupName: ag │
│ AutoScalingGroupARN: arn:aws:autoscaling:us-east-1:840541460064:autoScaling… │
│ │
└────────────────────────────────────────────────────────────────────────────────┘
List Summary:
Provider: aws
┌───────────────────────────────────────────────────────────────────────────────┐
│ aws │
├────────────────────────────────────┬──────────────────────────────────────────┤
│ AutoScaling::AutoScalingAttachment │ autoscaling-attachment::ag::target-grou… │
│ │ autoscaling-attachment::ag::target-grou… │
└────────────────────────────────────┴──────────────────────────────────────────┘
2 resources, 1 type, 1 provider
Command "gc l -t AutoScalingAttachment" executed in 6s