Skip to content

Commit

Permalink
fix(ecs-patterns): Fix issue related to protocol being passed to targ…
Browse files Browse the repository at this point in the history
…et group
  • Loading branch information
piradeepk committed Nov 13, 2019
1 parent 6fa4713 commit bc3d82d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ export interface ApplicationLoadBalancedServiceBaseProps {
/**
* Listener port of the application load balancer that will serve traffic to the service.
*
* @default 80
* @default - The default listener port is determined from the protocol (port 80 for HTTP,
* port 443 for HTTPS). A domain name and zone must be also be specified if using HTTPS.
*/
readonly listenerPort?: number;

Expand Down Expand Up @@ -286,8 +287,7 @@ export abstract class ApplicationLoadBalancedServiceBase extends cdk.Construct {
const protocol = props.protocol !== undefined ? props.protocol : (props.certificate ? ApplicationProtocol.HTTPS : ApplicationProtocol.HTTP);

const targetProps = {
port: props.listenerPort !== undefined ? props.listenerPort : 80,
protocol
port: 80
};

this.listener = this.loadBalancer.addListener('PublicListener', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export abstract class NetworkLoadBalancedServiceBase extends cdk.Construct {
const listenerPort = props.listenerPort !== undefined ? props.listenerPort : 80;

const targetProps = {
port: listenerPort
port: 80
};

this.listener = this.loadBalancer.addListener('PublicListener', { port: listenerPort });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
"FargateNlbServiceLBPublicListenerECSGroup7501571D": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Port": 2015,
"Port": 80,
"Protocol": "TCP",
"TargetType": "ip",
"VpcId": {
Expand Down Expand Up @@ -667,7 +667,7 @@
"FargateAlbServiceLBPublicListenerECSGroupB3826700": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Port": 2015,
"Port": 80,
"Protocol": "HTTP",
"TargetType": "ip",
"VpcId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export = {
cluster,
listenerPort: 2015,
taskImageOptions: {
containerPort: 2015,
containerPort: 80,
image: ecs.ContainerImage.fromRegistry('abiosoft/caddy')
},
});
Expand Down Expand Up @@ -333,7 +333,7 @@ export = {
node: stack.node,
},
taskImageOptions: {
containerPort: 2015,
containerPort: 80,
image: ecs.ContainerImage.fromRegistry('abiosoft/caddy')
},
});
Expand Down Expand Up @@ -363,7 +363,7 @@ export = {
cluster,
protocol: ApplicationProtocol.HTTP,
taskImageOptions: {
containerPort: 2015,
containerPort: 80,
image: ecs.ContainerImage.fromRegistry('abiosoft/caddy')
},
});
Expand Down Expand Up @@ -392,7 +392,7 @@ export = {
new ecsPatterns.ApplicationLoadBalancedFargateService(stack, "FargateAlbService", {
cluster,
taskImageOptions: {
containerPort: 2015,
containerPort: 80,
image: ecs.ContainerImage.fromRegistry('abiosoft/caddy')
},
});
Expand Down

0 comments on commit bc3d82d

Please sign in to comment.