@@ -60,164 +60,6 @@ Object {
6060 Object {
6161 " Action" : Array [
6262 " ecs:RegisterTaskDefinition" ,
63- " ecs:DescribeTaskDefinition" ,
64- " ecs:DeregisterTaskDefinition" ,
65- ],
66- " Effect" : " Allow" ,
67- " Resource" : " *" ,
68- },
69- Object {
70- " Action" : " iam:PassRole" ,
71- " Effect" : " Allow" ,
72- " Resource" : Object {
73- " Fn::GetAtt" : Array [
74- " DummyTaskDefinitionExecutionRole715DBD43" ,
75- " Arn" ,
76- ],
77- },
78- },
79- ],
80- " Version" : " 2012-10-17" ,
81- },
82- " PolicyName" : " DummyTaskDefinitionCustomResourcePolicyB5660701" ,
83- " Roles" : Array [
84- Object {
85- " Ref" : " AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" ,
86- },
87- ],
88- },
89- " Type" : " AWS::IAM::Policy" ,
90- } ,
91- "DummyTaskDefinitionE3D9D432": Object {
92- " DeletionPolicy" : " Delete" ,
93- " DependsOn" : Array [
94- " DummyTaskDefinitionCustomResourcePolicyB5660701" ,
95- ],
96- " Properties" : Object {
97- " Create" : Object {
98- " Fn::Join" : Array [
99- " " ,
100- Array [
101- " {\\ " service \\" :\\ " ECS \\" ,\\ " action \\" :\\ " registerTaskDefinition \\" ,\\ " parameters \\" :{\\ " requiresCompatibilities \\" :[\\ " FARGATE \\" ],\\ " family \\" :\\ " c86e1e5d419d3c124c7e40411b7e7805f91621e162 \\" ,\\ " executionRoleArn \\" :\\ " " ,
102- Object {
103- " Fn::GetAtt" : Array [
104- " DummyTaskDefinitionExecutionRole715DBD43" ,
105- " Arn" ,
106- ],
107- },
108- " \\ " ,\\" networkMode\\ " :\\" awsvpc\\ " ,\\" cpu\\ " :\\" 256\\ " ,\\" memory\\ " :\\" 512\\ " ,\\" containerDefinitions\\ " :[{\\" name\\ " :\\" sample-website\\ " ,\\" image\\ " :\\" image\\ " ,\\" portMappings\\ " :[{\\" hostPort\\ " :80 ,\\" protocol\\ " :\\" tcp\\ " ,\\" containerPort\\ " :80 }]}]},\\" physicalResourceId\\ " :{\\" responsePath\\ " :\\" taskDefinition.taskDefinitionArn\\ " }}" ,
109- ],
110- ],
111- },
112- " Delete" : " {\\ " service \\" :\\ " ECS \\" ,\\ " action \\" :\\ " deregisterTaskDefinition \\" ,\\ " parameters \\" :{\\ " taskDefinition \\" :\\ " PHYSICAL :RESOURCEID :\\" }}" ,
113- " InstallLatestAwsSdk" : true ,
114- " ServiceToken" : Object {
115- " Fn::GetAtt" : Array [
116- " AWS679f53fac002430cb0da5b7982bd22872D164C4C" ,
117- " Arn" ,
118- ],
119- },
120- " Update" : " {\\ " service \\" :\\ " ECS \\" ,\\ " action \\" :\\ " describeTaskDefinition \\" ,\\ " parameters \\" :{\\ " taskDefinition \\" :\\ " PHYSICAL :RESOURCEID :\\" },\\ " physicalResourceId \\" :{\\ " responsePath \\" :\\ " taskDefinition .taskDefinitionArn \\" }}" ,
121- },
122- " Type" : " Custom::DummyTaskDefinition" ,
123- " UpdateReplacePolicy" : " Delete" ,
124- } ,
125- "DummyTaskDefinitionExecutionRole715DBD43": Object {
126- " Properties" : Object {
127- " AssumeRolePolicyDocument" : Object {
128- " Statement" : Array [
129- Object {
130- " Action" : " sts:AssumeRole" ,
131- " Effect" : " Allow" ,
132- " Principal" : Object {
133- " Service" : " ecs-tasks.amazonaws.com" ,
134- },
135- },
136- ],
137- " Version" : " 2012-10-17" ,
138- },
139- " ManagedPolicyArns" : Array [
140- Object {
141- " Fn::Join" : Array [
142- " " ,
143- Array [
144- " arn:" ,
145- Object {
146- " Ref" : " AWS::Partition" ,
147- },
148- " :iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy" ,
149- ],
150- ],
151- },
152- ],
153- },
154- " Type" : " AWS::IAM::Role" ,
155- } ,
156- },
157- }
158- `;
159-
160- exports[`with updates allowed 1`] = `
161- Object {
162- " Parameters" : Any <Object >,
163- "Resources": Object {
164- " AWS679f53fac002430cb0da5b7982bd22872D164C4C" : Object {
165- " DependsOn" : Array [
166- " AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" ,
167- ],
168- " Properties" : Object {
169- " Code" : Any <Object >,
170- "Handler": "index.handler",
171- "Role": Object {
172- " Fn::GetAtt" : Array [
173- " AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" ,
174- " Arn" ,
175- ],
176- } ,
177- "Runtime": "nodejs12.x",
178- "Timeout": 120,
179- },
180- "Type": "AWS::Lambda::Function",
181- },
182- "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": Object {
183- " Properties" : Object {
184- " AssumeRolePolicyDocument" : Object {
185- " Statement" : Array [
186- Object {
187- " Action" : " sts:AssumeRole" ,
188- " Effect" : " Allow" ,
189- " Principal" : Object {
190- " Service" : " lambda.amazonaws.com" ,
191- },
192- },
193- ],
194- " Version" : " 2012-10-17" ,
195- },
196- " ManagedPolicyArns" : Array [
197- Object {
198- " Fn::Join" : Array [
199- " " ,
200- Array [
201- " arn:" ,
202- Object {
203- " Ref" : " AWS::Partition" ,
204- },
205- " :iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" ,
206- ],
207- ],
208- },
209- ],
210- },
211- " Type" : " AWS::IAM::Role" ,
212- } ,
213- "DummyTaskDefinitionCustomResourcePolicyB5660701": Object {
214- " Properties" : Object {
215- " PolicyDocument" : Object {
216- " Statement" : Array [
217- Object {
218- " Action" : Array [
219- " ecs:RegisterTaskDefinition" ,
220- " ecs:DescribeTaskDefinition" ,
22163 " ecs:DeregisterTaskDefinition" ,
22264 ],
22365 " Effect" : " Allow" ,
0 commit comments