Skip to content
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

Update ecs typescript examples to v0.36.1 #65

Merged
merged 1 commit into from
Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions typescript/ecs/cluster/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import autoscaling = require('@aws-cdk/aws-autoscaling');
import ec2 = require('@aws-cdk/aws-ec2');
import { InstanceType } from '@aws-cdk/aws-ec2';
import ecs = require('@aws-cdk/aws-ecs');
import cdk = require('@aws-cdk/cdk');
import cdk = require('@aws-cdk/core');

class ECSCluster extends cdk.Stack {
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
Expand All @@ -13,7 +13,7 @@ class ECSCluster extends cdk.Stack {
const asg = new autoscaling.AutoScalingGroup(this, 'MyFleet', {
instanceType: new InstanceType("t2.xlarge"),
machineImage: new ecs.EcsOptimizedAmi(),
updateType: autoscaling.UpdateType.ReplacingUpdate,
updateType: autoscaling.UpdateType.REPLACING_UPDATE,
desiredCapacity: 3,
vpc
});
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/cluster/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"dependencies": {
"@aws-cdk/aws-ec2": "*",
"@aws-cdk/aws-ecs": "*",
"@aws-cdk/cdk": "*"
"@aws-cdk/core": "*"
}
}
2 changes: 1 addition & 1 deletion typescript/ecs/ecs-load-balanced-service/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ec2 = require('@aws-cdk/aws-ec2');
import ecs = require('@aws-cdk/aws-ecs');
import ecs_patterns = require('@aws-cdk/aws-ecs-patterns');
import cdk = require('@aws-cdk/cdk');
import cdk = require('@aws-cdk/core');

class BonjourECS extends cdk.Stack {
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/ecs-load-balanced-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
"@aws-cdk/aws-ec2": "*",
"@aws-cdk/aws-ecs": "*",
"@aws-cdk/aws-ecs-patterns": "*",
"@aws-cdk/cdk": "*"
"@aws-cdk/core": "*"
}
}
8 changes: 4 additions & 4 deletions typescript/ecs/ecs-service-with-advanced-alb-config/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ecs = require('@aws-cdk/aws-ecs');
import ec2 = require('@aws-cdk/aws-ec2');
import elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2');
import cdk = require('@aws-cdk/cdk');
import cdk = require('@aws-cdk/core');

const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-ecs-integ-ecs');
Expand All @@ -24,7 +24,7 @@ const container = taskDefinition.addContainer('web', {
container.addPortMappings({
containerPort: 80,
hostPort: 8080,
protocol: ecs.Protocol.Tcp
protocol: ecs.Protocol.TCP
});

// Create Service
Expand All @@ -46,9 +46,9 @@ listener.addTargets('ECS', {
targets: [service],
// include health check (default is none)
healthCheck: {
intervalSecs: 60,
interval: cdk.Duration.seconds(60),
path: "/health",
timeoutSeconds: 5,
timeout: cdk.Duration.seconds(5),
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
"@aws-cdk/aws-ec2": "*",
"@aws-cdk/aws-ecs": "*",
"@aws-cdk/aws-elasticloadbalancingv2": "*",
"@aws-cdk/cdk": "*"
"@aws-cdk/core": "*"
}
}
6 changes: 2 additions & 4 deletions typescript/ecs/ecs-service-with-logging/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ec2 = require('@aws-cdk/aws-ec2');
import ecs = require('@aws-cdk/aws-ecs');
import cdk = require('@aws-cdk/cdk');
import cdk = require('@aws-cdk/core');

class WillkommenECS extends cdk.Stack {
constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
Expand All @@ -13,9 +13,7 @@ class WillkommenECS extends cdk.Stack {
});

// create a task definition with CloudWatch Logs
const logging = new ecs.AwsLogDriver(this, "AppLogging", {
streamPrefix: "myapp",
})
const logging = new ecs.AwsLogDriver({ streamPrefix: "myapp" })

const taskDef = new ecs.Ec2TaskDefinition(this, "MyTaskDefinition");
taskDef.addContainer("AppContainer", {
Expand Down
Loading