-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ecs): add support for Fargate PV1.4 ephemeral storage
- Loading branch information
Showing
7 changed files
with
151 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
packages/@aws-cdk/aws-ecs/test/fargate/integ.ephemeral-storage.expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"Resources": { | ||
"TaskDefTaskRole1EDB4A67": { | ||
"Type": "AWS::IAM::Role", | ||
"Properties": { | ||
"AssumeRolePolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": "sts:AssumeRole", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "ecs-tasks.amazonaws.com" | ||
} | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
} | ||
} | ||
}, | ||
"TaskDef54694570": { | ||
"Type": "AWS::ECS::TaskDefinition", | ||
"Properties": { | ||
"ContainerDefinitions": [ | ||
{ | ||
"Essential": true, | ||
"Image": "amazon/amazon-ecs-sample", | ||
"Name": "web" | ||
} | ||
], | ||
"Cpu": "256", | ||
"EphemeralStorage": { | ||
"SizeInGiB": 100 | ||
}, | ||
"Family": "awsecsephemeralstorageTaskDef7E6908C5", | ||
"Memory": "512", | ||
"NetworkMode": "awsvpc", | ||
"RequiresCompatibilities": [ | ||
"FARGATE" | ||
], | ||
"TaskRoleArn": { | ||
"Fn::GetAtt": [ | ||
"TaskDefTaskRole1EDB4A67", | ||
"Arn" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/@aws-cdk/aws-ecs/test/fargate/integ.ephemeral-storage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import * as cdk from '@aws-cdk/core'; | ||
import * as ecs from '../../lib'; | ||
|
||
const app = new cdk.App(); | ||
const stack = new cdk.Stack(app, 'aws-ecs-ephemeral-storage'); | ||
|
||
const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef', { | ||
ephemeralStorageGiB: 100, | ||
}); | ||
|
||
taskDefinition.addContainer('web', { | ||
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), | ||
}); | ||
|
||
app.synth(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters