Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Resources = {
TaskingManagerASG: {
DependsOn: 'TaskingManagerLaunchConfiguration',
Type: 'AWS::AutoScaling::AutoScalingGroup',
Properties: {
AutoScalingGroupName: cf.stackName,
Cooldown: 300,
MinSize: 1,
DesiredCapacity: 1,
MaxSize: 1,
HealthCheckGracePeriod: 300,
LaunchConfigurationName: cf.ref('TaskingManagerLaunchConfiguration'),
TargetGroupARNs: [ cf.ref('TaskingManagerTargetGroup') ],
HealthCheckType: 'EC2',
AvailabilityZones: cf.getAzs(cf.region)
},
UpdatePolicy: {
AutoScalingRollingUpdate: {
PauseTime: 'PT60M',
WaitOnResourceSignals: true
}
}
},
TaskingManagerScaleUp: {
Type: "AWS::AutoScaling::ScalingPolicy",
Properties: {
AutoScalingGroupName: cf.ref('TaskingManagerASG'),
PolicyType: 'TargetTrackingScaling',
TargetTrackingConfiguration: {
TargetValue: 85,
PredefinedMetricSpecification: {
const Resources = {
VisualizeChangeASG: {
DependsOn: "VisualizeChangeLaunchConfiguration",
Type: "AWS::AutoScaling::AutoScalingGroup",
Properties: {
AutoScalingGroupName: cf.stackName,
Cooldown: 300,
MinSize: 1,
DesiredCapacity: 1,
MaxSize: 1,
HealthCheckGracePeriod: 300,
LaunchConfigurationName: cf.ref("VisualizeChangeLaunchConfiguration"),
TargetGroupARNs: [cf.ref("VisualizeChangeTargetGroup")],
HealthCheckType: "EC2",
AvailabilityZones: cf.getAzs(cf.region)
}
},
VisualizeChangeScaleUp: {
Type: "AWS::AutoScaling::ScalingPolicy",
Properties: {
AutoScalingGroupName: cf.ref("VisualizeChangeASG"),
PolicyType: "TargetTrackingScaling",
TargetTrackingConfiguration: {
TargetValue: 85,
PredefinedMetricSpecification: {
PredefinedMetricType: "ASGAverageCPUUtilization"
}
},
Cooldown: 300
}
},