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

feat(ecs): add port mappings to containers with props #13262

Merged
merged 6 commits into from
Feb 26, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: add integ test usage of portMappings prop
misterjoshua committed Feb 25, 2021

Verified

This commit was signed with the committer’s verified signature.
gsherwood Greg Sherwood
commit fd39858bdbf6e717c85e9de5abce4eda91e390b8
11 changes: 5 additions & 6 deletions packages/@aws-cdk/aws-ecs/test/fargate/integ.lb-awsvpc-nw.ts
Original file line number Diff line number Diff line change
@@ -15,13 +15,12 @@ const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef', {
cpu: 512,
});

const container = taskDefinition.addContainer('web', {
taskDefinition.addContainer('web', {
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
});

container.addPortMappings({
containerPort: 80,
protocol: ecs.Protocol.TCP,
portMappings: [{
containerPort: 80,
protocol: ecs.Protocol.TCP,
}],
});

const service = new ecs.FargateService(stack, 'Service', {