Skip to content

Commit

Permalink
ecs service minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
edo92 committed Jan 3, 2022
1 parent 65bca0c commit 1ed8e1c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/pattern/EcsService/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface EcsServiceProps {
}

export class EcsService extends cdk.Construct {
public readonly applicationName: string;
public readonly listeners: Listeners;
public readonly targetGroups: TargetGroups;

Expand All @@ -33,6 +34,7 @@ export class EcsService extends cdk.Construct {

constructor(scope: cdk.Construct, id: string, props: EcsServiceProps) {
super(scope, id);
this.applicationName = props.names.applicationName;

/**
*
Expand Down Expand Up @@ -65,16 +67,16 @@ export class EcsService extends cdk.Construct {
* Task Containers
*/
const container = new TaskContainer(this, "Task-Containers", {
appName: props.names.applicationName,
appName: this.applicationName,
});

/**
*
* Ecs Task Definition
*/
this.taskDef = new TaskDef(this, "Ecs-TaskDef", {
appName: this.applicationName,
familyName: props.names.familyName,
appName: props.names.applicationName,
taskContainers: container.allContainers,
});

Expand All @@ -85,7 +87,7 @@ export class EcsService extends cdk.Construct {
this.service = new Service(this, "Ecs-Service", {
cluster: this.cluster,
taskDefinition: this.taskDef,
serviceName: props.names.applicationName,
serviceName: this.applicationName,
});

/**
Expand Down

0 comments on commit 1ed8e1c

Please sign in to comment.