Skip to content

Commit

Permalink
Move spotPrice to CommonAutoScalingProps
Browse files Browse the repository at this point in the history
  • Loading branch information
SoManyHs committed May 28, 2019
1 parent c321d2d commit 9ed3288
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
16 changes: 8 additions & 8 deletions packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ export interface CommonAutoScalingGroupProps {
* @default - Use subnet setting.
*/
readonly associatePublicIpAddress?: boolean;

/**
* The maximum hourly price (in USD) to be paid for any Spot Instance launched to fulfill the request. Spot Instances are
* launched when the price you specify exceeds the current Spot market price.
*
* @default none
*/
readonly spotPrice?: string;
}

/**
Expand Down Expand Up @@ -183,14 +191,6 @@ export interface AutoScalingGroupProps extends CommonAutoScalingGroupProps {
* @default A role will automatically be created, it can be accessed via the `role` property
*/
readonly role?: iam.IRole;

/**
* The maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot Instances are
* launched when the price you specify exceeds the current Spot market price.
*
* @default none
*/
readonly spotPrice?: string;
}

abstract class AutoScalingGroupBase extends Resource implements IAutoScalingGroup {
Expand Down
8 changes: 0 additions & 8 deletions packages/@aws-cdk/aws-ecs/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,14 +462,6 @@ export interface AddCapacityOptions extends AddAutoScalingGroupCapacityOptions,
* @default - Amazon Linux 1
*/
readonly machineImage?: ec2.IMachineImageSource;

/**
* The maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot Instances are
* launched when the price you specify exceeds the current Spot market price.
*
* @default none
*/
readonly spotPrice?: string;
}

export interface NamespaceOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ecs/test/test.ecs-cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export = {
"allows specifying spot fleet"(test: Test) {
// GIVEN
const stack = new cdk.Stack();
const vpc = new ec2.VpcNetwork(stack, 'MyVpc', {});
const vpc = new ec2.Vpc(stack, 'MyVpc', {});

const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc });
cluster.addCapacity('DefaultAutoScalingGroup', {
Expand Down

0 comments on commit 9ed3288

Please sign in to comment.