Skip to content

Commit c712d0a

Browse files
committed
clean up code
1 parent 68aaee1 commit c712d0a

File tree

3 files changed

+0
-134
lines changed

3 files changed

+0
-134
lines changed

infrastructure/github-actions-role.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

infrastructure/github-actions-role.yml.txt

Lines changed: 0 additions & 31 deletions
This file was deleted.

infrastructure/lib/stacks/ecs-service-stack.ts

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@ export interface EcsServiceStackProps extends StackProps {
2020
vpc: string;
2121
subnets: string[];
2222

23-
// domain
2423
domainName: string;
25-
// domainZone: string;
26-
// certificate: string;
2724

2825
// default resources
2926
desiredCount: number;
30-
3127
priority: number;
3228

3329
// task definition
@@ -74,7 +70,6 @@ export class EcsServiceStack extends Stack {
7470
constructor(scope: Construct, id: string, props: EcsServiceStackProps) {
7571
super(scope, id, props);
7672
const { desiredCount } = props;
77-
console.log(props);
7873

7974
const vpc = ec2.Vpc.fromLookup(this, "ecs-service-vpc", { vpcName: props.vpc });
8075
// const subnets = props.subnets.map((subnet) => ec2.Subnet.fromSubnetId(this, `ecs-service-subnet-${subnet}`, subnet));
@@ -88,29 +83,6 @@ export class EcsServiceStack extends Stack {
8883
},
8984
});
9085

91-
// cluster,
92-
// // domainName: props.domainName,
93-
// // domainZone: route53.HostedZone.fromLookup(this, "ecs-service-hosted-zone", { domainName: props.domainZone }),
94-
// // publicLoadBalancer: false,
95-
// enableExecuteCommand: true,
96-
// // protocol: elbv2.ApplicationProtocol.HTTPS,
97-
// // loadBalancer: elbv2.ApplicationLoadBalancer.fromLookup(this, "ecs-service-load-balancer", { loadBalancerTags: { Name: tier } }),
98-
// loadBalancer: elbv2.ApplicationLoadBalancer.fromLookup(this, "ecs-service-load-balancer", { loadBalancerTags: { Name: tier } }),
99-
// // targetProtocol: elbv2.ApplicationProtocol.HTTPS,
100-
// // listenerPort: 443,
101-
// // certificate: cm.Certificate.fromCertificateArn(this, "ecs-service-certificate", props.certificate),
102-
// // loadBalancerName: prefix,
103-
// // openListener: true,
104-
// // openListener: !Boolean(props.allowedIngress),
105-
// serviceName: id,
106-
// // redirectHTTP: true,
107-
// desiredCount: props.desiredCount,
108-
// recordType: ApplicationLoadBalancedServiceRecordType.NONE,
109-
// // taskDefinition,
110-
// taskImageOptions: {
111-
// image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
112-
// },
113-
11486
const executionRole = new iam.Role(this, "ecs-task-execution-role", {
11587
assumedBy: new iam.ServicePrincipal("ecs-tasks.amazonaws.com"),
11688
roleName: `power-user-${prefix}-task-execution-role`.slice(0, 64),
@@ -183,15 +155,6 @@ export class EcsServiceStack extends Stack {
183155
}
184156
}
185157

186-
// // Add Apache container
187-
// const container = taskDefinition.addContainer("ecs-container-0", {
188-
// image: ecs.ContainerImage.fromRegistry("httpd"),
189-
// portMappings: [{ containerPort: 80 }],
190-
// logging: ecs.LogDrivers.awsLogs({
191-
// streamPrefix: "apache-service",
192-
// }),
193-
// });
194-
195158
const service = new ecs.FargateService(this, "ecs-service", {
196159
cluster,
197160
desiredCount,
@@ -239,40 +202,5 @@ export class EcsServiceStack extends Stack {
239202
});
240203

241204

242-
// const loadBalancer = new elbv2.ApplicationLoadBalancer(this, "ecs-service-load-balancer", {
243-
// vpc,
244-
// vpcSubnets: { subnetFilters: [ec2.SubnetFilter.onePerAz()] },
245-
// internetFacing: false,
246-
// loadBalancerName: prefix,
247-
// idleTimeout: Duration.seconds(60),
248-
// });
249-
250-
// console.log({ loadBalancerTags: { Name: tier }})
251-
// const service = new ApplicationLoadBalancedFargateService(this, "ecs-service", {
252-
// cluster,
253-
// // domainName: props.domainName,
254-
// // domainZone: route53.HostedZone.fromLookup(this, "ecs-service-hosted-zone", { domainName: props.domainZone }),
255-
// // publicLoadBalancer: false,
256-
// enableExecuteCommand: true,
257-
// // protocol: elbv2.ApplicationProtocol.HTTPS,
258-
// // loadBalancer: elbv2.ApplicationLoadBalancer.fromLookup(this, "ecs-service-load-balancer", { loadBalancerTags: { Name: tier } }),
259-
// loadBalancer: elbv2.ApplicationLoadBalancer.fromLookup(this, "ecs-service-load-balancer", { loadBalancerTags: { Name: tier } }),
260-
// // targetProtocol: elbv2.ApplicationProtocol.HTTPS,
261-
// // listenerPort: 443,
262-
// // certificate: cm.Certificate.fromCertificateArn(this, "ecs-service-certificate", props.certificate),
263-
// // loadBalancerName: prefix,
264-
// // openListener: true,
265-
// // openListener: !Boolean(props.allowedIngress),
266-
// serviceName: id,
267-
// // redirectHTTP: true,
268-
// desiredCount: props.desiredCount,
269-
// recordType: ApplicationLoadBalancedServiceRecordType.NONE,
270-
// // taskDefinition,
271-
// taskImageOptions: {
272-
// image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
273-
// },
274-
// });
275-
276-
277205
}
278206
}

0 commit comments

Comments
 (0)