Skip to content

Commit

Permalink
sample codes
Browse files Browse the repository at this point in the history
sample codes
  • Loading branch information
go-to-k committed Aug 28, 2024
1 parent 66a3db5 commit af0dc1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef', {});
taskDefinition.addContainer('Container', {
image: ecs.ContainerImage.fromRegistry('public.ecr.aws/ecs-sample-image/amazon-ecs-sample:latest'),
enableRestartPolicy: true,
restartIgnoredExitCodes: [1, 2, 3],
restartIgnoredExitCodes: [0, 127],
restartAttemptPeriod: cdk.Duration.seconds(360),
});

Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-ecs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ declare const taskDefinition: ecs.TaskDefinition;
taskDefinition.addContainer('container', {
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
enableRestartPolicy: true,
restartIgnoredExitCodes: [1, 2, 3],
restartIgnoredExitCodes: [0, 127],
restartAttemptPeriod: cdk.Duration.seconds(360),
});
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,7 @@ describe('container definition', () => {
image: ecs.ContainerImage.fromRegistry('/aws/aws-example-app'),
taskDefinition,
enableRestartPolicy: true,
restartIgnoredExitCodes: [1, 2, 3],
restartIgnoredExitCodes: [0, 127],
restartAttemptPeriod: cdk.Duration.seconds(360),
});

Expand All @@ -2781,7 +2781,7 @@ describe('container definition', () => {
Name: 'Container',
RestartPolicy: {
Enabled: true,
IgnoredExitCodes: [1, 2, 3],
IgnoredExitCodes: [0, 127],
RestartAttemptPeriod: 360,
},
},
Expand All @@ -2799,7 +2799,7 @@ describe('container definition', () => {
image: ecs.ContainerImage.fromRegistry('/aws/aws-example-app'),
taskDefinition,
enableRestartPolicy: false,
restartIgnoredExitCodes: [1, 2, 3],
restartIgnoredExitCodes: [0, 127],
restartAttemptPeriod: cdk.Duration.seconds(360),
});

Expand All @@ -2824,7 +2824,7 @@ describe('container definition', () => {
new ecs.ContainerDefinition(stack, 'Container', {
image: ecs.ContainerImage.fromRegistry('/aws/aws-example-app'),
taskDefinition,
restartIgnoredExitCodes: [1, 2, 3],
restartIgnoredExitCodes: [0, 127],
restartAttemptPeriod: cdk.Duration.seconds(360),
});

Expand Down

0 comments on commit af0dc1b

Please sign in to comment.