Skip to content

Commit a610017

Browse files
piradeepkrix0rrr
authored andcommitted
fix(ecs): remove LoadBalancedFargateServiceApplet, no longer supported (#2779)
1 parent 3f7a0ad commit a610017

File tree

3 files changed

+0
-240
lines changed

3 files changed

+0
-240
lines changed

packages/@aws-cdk/aws-ecs-patterns/lib/fargate/load-balanced-fargate-service-applet.ts

-148
This file was deleted.

packages/@aws-cdk/aws-ecs-patterns/lib/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export * from './base/queue-worker-service-base';
44

55
export * from './ecs/load-balanced-ecs-service';
66
export * from './fargate/load-balanced-fargate-service';
7-
export * from './fargate/load-balanced-fargate-service-applet';
87
export * from './base/load-balanced-service-base';
98

109
export * from './ecs/scheduled-ecs-task';

packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.l3s.ts

-91
Original file line numberDiff line numberDiff line change
@@ -249,95 +249,4 @@ export = {
249249

250250
test.done();
251251
},
252-
253-
'test Fargateloadbalanced applet'(test: Test) {
254-
// WHEN
255-
const app = new cdk.App();
256-
const stack = new ecsPatterns.LoadBalancedFargateServiceApplet(app, 'Service', {
257-
image: 'test',
258-
desiredCount: 2,
259-
environment: {
260-
TEST_ENVIRONMENT_VARIABLE1: "test environment variable 1 value",
261-
TEST_ENVIRONMENT_VARIABLE2: "test environment variable 2 value"
262-
}
263-
});
264-
265-
// THEN - stack contains a load balancer and a service
266-
expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer'));
267-
268-
expect(stack).to(haveResource("AWS::ECS::Service", {
269-
DesiredCount: 2,
270-
LaunchType: "FARGATE",
271-
}));
272-
273-
expect(stack).to(haveResourceLike('AWS::ECS::TaskDefinition', {
274-
ContainerDefinitions: [
275-
{
276-
Environment: [
277-
{
278-
Name: "TEST_ENVIRONMENT_VARIABLE1",
279-
Value: "test environment variable 1 value"
280-
},
281-
{
282-
Name: "TEST_ENVIRONMENT_VARIABLE2",
283-
Value: "test environment variable 2 value"
284-
}
285-
],
286-
}
287-
]
288-
}));
289-
290-
test.done();
291-
},
292-
293-
'test Fargateloadbalanced applet with TLS'(test: Test) {
294-
// WHEN
295-
const app = new cdk.App();
296-
const stack = new ecsPatterns.LoadBalancedFargateServiceApplet(app, 'Service', {
297-
image: 'test',
298-
desiredCount: 2,
299-
domainName: 'api.example.com',
300-
domainZone: 'example.com',
301-
certificate: 'helloworld'
302-
});
303-
304-
// THEN - stack contains a load balancer and a service
305-
expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer'));
306-
307-
expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', {
308-
Port: 443,
309-
Certificates: [{
310-
CertificateArn: "helloworld"
311-
}]
312-
}));
313-
314-
expect(stack).to(haveResource("AWS::ECS::Service", {
315-
DesiredCount: 2,
316-
LaunchType: "FARGATE",
317-
}));
318-
319-
expect(stack).to(haveResource('AWS::Route53::RecordSet', {
320-
Name: 'api.example.com.',
321-
HostedZoneId: "/hostedzone/DUMMY",
322-
Type: 'A',
323-
AliasTarget: {
324-
HostedZoneId: { 'Fn::GetAtt': ['FargateServiceLBB353E155', 'CanonicalHostedZoneID'] },
325-
DNSName: { 'Fn::GetAtt': ['FargateServiceLBB353E155', 'DNSName'] },
326-
}
327-
}));
328-
329-
test.done();
330-
},
331-
332-
"errors when setting domainName but not domainZone on applet"(test: Test) {
333-
// THEN
334-
test.throws(() => {
335-
new ecsPatterns.LoadBalancedFargateServiceApplet(new cdk.App(), 'Service', {
336-
image: 'test',
337-
domainName: 'api.example.com'
338-
});
339-
});
340-
341-
test.done();
342-
}
343252
};

0 commit comments

Comments
 (0)