Skip to content

Commit

Permalink
fix(appscaling): fix StepScaling (aws#2522)
Browse files Browse the repository at this point in the history
Add ScalingTargetId and default AdjustmentType.
  • Loading branch information
piradeepk committed May 20, 2019
1 parent 0fb3b69 commit 5a2f146
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ export class StepScalingAction extends cdk.Construct implements cloudwatch.IAlar
constructor(scope: cdk.Construct, id: string, props: StepScalingActionProps) {
super(scope, id);

// Cloudformation requires either the ResourceId, ScalableDimension, and ServiceNamespace
// properties, or the ScalingTargetId property, but not both.
// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html
const resource = new CfnScalingPolicy(this, 'Resource', {
policyName: props.policyName || this.node.uniqueId,
policyType: 'StepScaling',
Expand Down

0 comments on commit 5a2f146

Please sign in to comment.