Skip to content

Commit ed366ce

Browse files
authored
feat(ecs): enable fault injection flag (#32598)
### Issue # (if applicable) N/A ### Reason for this change Add a missing property. ### Description of changes Add `enableFaultInjection` property. ### Describe any new or updated permissions being added No ### Description of how you validated changes Add unit test and integ test ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 3606deb commit ed366ce

12 files changed

+736
-9
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.task-definition-enable-fault-injection.js.snapshot/TaskDefinitionEnableFaultInjectionDefaultTestDeployAssert16EB808C.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.task-definition-enable-fault-injection.js.snapshot/TaskDefinitionEnableFaultInjectionDefaultTestDeployAssert16EB808C.template.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.task-definition-enable-fault-injection.js.snapshot/aws-ecs-task-definition-enable-fault-injection.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"Resources": {
3+
"Ec2TaskDefinitionTaskRole0B78BC85": {
4+
"Type": "AWS::IAM::Role",
5+
"Properties": {
6+
"AssumeRolePolicyDocument": {
7+
"Statement": [
8+
{
9+
"Action": "sts:AssumeRole",
10+
"Effect": "Allow",
11+
"Principal": {
12+
"Service": "ecs-tasks.amazonaws.com"
13+
}
14+
}
15+
],
16+
"Version": "2012-10-17"
17+
}
18+
}
19+
},
20+
"Ec2TaskDefinitionB25030BE": {
21+
"Type": "AWS::ECS::TaskDefinition",
22+
"Properties": {
23+
"ContainerDefinitions": [
24+
{
25+
"Essential": true,
26+
"Image": "public.ecr.aws/ecs-sample-image/amazon-ecs-sample:latest",
27+
"Memory": 512,
28+
"Name": "Ec2Container"
29+
}
30+
],
31+
"EnableFaultInjection": true,
32+
"Family": "awsecstaskdefinitionenablefaultinjectionEc2TaskDefinition28DF45DB",
33+
"NetworkMode": "host",
34+
"RequiresCompatibilities": [
35+
"EC2"
36+
],
37+
"TaskRoleArn": {
38+
"Fn::GetAtt": [
39+
"Ec2TaskDefinitionTaskRole0B78BC85",
40+
"Arn"
41+
]
42+
}
43+
}
44+
},
45+
"FargateTaskDefinitionTaskRoleE3C2BCAA": {
46+
"Type": "AWS::IAM::Role",
47+
"Properties": {
48+
"AssumeRolePolicyDocument": {
49+
"Statement": [
50+
{
51+
"Action": "sts:AssumeRole",
52+
"Effect": "Allow",
53+
"Principal": {
54+
"Service": "ecs-tasks.amazonaws.com"
55+
}
56+
}
57+
],
58+
"Version": "2012-10-17"
59+
}
60+
}
61+
},
62+
"FargateTaskDefinition8E3B365E": {
63+
"Type": "AWS::ECS::TaskDefinition",
64+
"Properties": {
65+
"ContainerDefinitions": [
66+
{
67+
"Essential": true,
68+
"Image": "public.ecr.aws/ecs-sample-image/amazon-ecs-sample:latest",
69+
"Memory": 512,
70+
"Name": "FargateContainer"
71+
}
72+
],
73+
"Cpu": "256",
74+
"EnableFaultInjection": true,
75+
"Family": "awsecstaskdefinitionenablefaultinjectionFargateTaskDefinition203B68EF",
76+
"Memory": "512",
77+
"NetworkMode": "awsvpc",
78+
"RequiresCompatibilities": [
79+
"FARGATE"
80+
],
81+
"TaskRoleArn": {
82+
"Fn::GetAtt": [
83+
"FargateTaskDefinitionTaskRoleE3C2BCAA",
84+
"Arn"
85+
]
86+
}
87+
}
88+
}
89+
},
90+
"Parameters": {
91+
"BootstrapVersion": {
92+
"Type": "AWS::SSM::Parameter::Value<String>",
93+
"Default": "/cdk-bootstrap/hnb659fds/version",
94+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
95+
}
96+
},
97+
"Rules": {
98+
"CheckBootstrapVersion": {
99+
"Assertions": [
100+
{
101+
"Assert": {
102+
"Fn::Not": [
103+
{
104+
"Fn::Contains": [
105+
[
106+
"1",
107+
"2",
108+
"3",
109+
"4",
110+
"5"
111+
],
112+
{
113+
"Ref": "BootstrapVersion"
114+
}
115+
]
116+
}
117+
]
118+
},
119+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
120+
}
121+
]
122+
}
123+
}
124+
}

packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.task-definition-enable-fault-injection.js.snapshot/cdk.out

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.task-definition-enable-fault-injection.js.snapshot/integ.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.task-definition-enable-fault-injection.js.snapshot/manifest.json

+134
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)