Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealAmazonKendra committed May 12, 2022
1 parent 7c36d06 commit daa3216
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { IRole } from '@aws-cdk/aws-iam';
import { ARecord, CnameRecord, IHostedZone, RecordTarget } from '@aws-cdk/aws-route53';
import { LoadBalancerTarget } from '@aws-cdk/aws-route53-targets';
import { CfnOutput, Duration, FeatureFlags, Stack } from '@aws-cdk/core';
import { ECS_PATTERNS_TARGET_GROUP_PORT_FROM_COTAINER_PORT } from '@aws-cdk/cx-api';
import { ECS_PATTERNS_TARGET_GROUP_PORT_FROM_CONTAINER_PORT } from '@aws-cdk/cx-api';
import { Construct } from 'constructs';

// keep this import separate from other imports to reduce chance for merge conflicts with v2-main
Expand Down Expand Up @@ -348,7 +348,7 @@ export abstract class NetworkLoadBalancedServiceBase extends CoreConstruct {
const loadBalancer = props.loadBalancer ?? new NetworkLoadBalancer(this, 'LB', lbProps);
const listenerPort = props.listenerPort ?? 80;
const targetProps = {
port: FeatureFlags.of(this).isEnabled(ECS_PATTERNS_TARGET_GROUP_PORT_FROM_COTAINER_PORT) ? props.taskImageOptions?.containerPort ?? 80 : 80,
port: FeatureFlags.of(this).isEnabled(ECS_PATTERNS_TARGET_GROUP_PORT_FROM_CONTAINER_PORT) ? props.taskImageOptions?.containerPort ?? 80 : 80,
};

this.listener = loadBalancer.addListener('PublicListener', { port: listenerPort });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { IRole } from '@aws-cdk/aws-iam';
import { ARecord, IHostedZone, RecordTarget } from '@aws-cdk/aws-route53';
import { LoadBalancerTarget } from '@aws-cdk/aws-route53-targets';
import { CfnOutput, Duration, FeatureFlags, Stack } from '@aws-cdk/core';
import { ECS_PATTERNS_TARGET_GROUP_PORT_FROM_COTAINER_PORT } from '@aws-cdk/cx-api';
import { ECS_PATTERNS_TARGET_GROUP_PORT_FROM_CONTAINER_PORT } from '@aws-cdk/cx-api';
import { Construct } from 'constructs';

// v2 - keep this import as a separate section to reduce merge conflict when forward merging with the v2 branch.
Expand Down Expand Up @@ -375,7 +375,7 @@ export abstract class NetworkMultipleTargetGroupsServiceBase extends CoreConstru
protected registerECSTargets(service: BaseService, container: ContainerDefinition, targets: NetworkTargetProps[]): NetworkTargetGroup {
for (const targetProps of targets) {
const targetGroup = this.findListener(targetProps.listener).addTargets(`ECSTargetGroup${container.containerName}${targetProps.containerPort}`, {
port: FeatureFlags.of(this).isEnabled(ECS_PATTERNS_TARGET_GROUP_PORT_FROM_COTAINER_PORT) ? targetProps.containerPort ?? 80 : 80,
port: FeatureFlags.of(this).isEnabled(ECS_PATTERNS_TARGET_GROUP_PORT_FROM_CONTAINER_PORT) ? targetProps.containerPort ?? 80 : 80,
targets: [
service.loadBalancerTarget({
containerName: container.containerName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ContainerImage } from '@aws-cdk/aws-ecs';
import { CompositePrincipal, Role, ServicePrincipal } from '@aws-cdk/aws-iam';
import { testFutureBehavior, testLegacyBehavior } from '@aws-cdk/cdk-build-tools';
import { App, Duration, Stack } from '@aws-cdk/core';
import { ECS_PATTERNS_TARGET_GROUP_PORT_FROM_COTAINER_PORT } from '@aws-cdk/cx-api';
import { ECS_PATTERNS_TARGET_GROUP_PORT_FROM_CONTAINER_PORT } from '@aws-cdk/cx-api';
import { ApplicationLoadBalancedFargateService, ApplicationMultipleTargetGroupsFargateService, NetworkLoadBalancedFargateService, NetworkMultipleTargetGroupsFargateService } from '../../lib';

describe('When Application Load Balancer', () => {
Expand Down Expand Up @@ -692,7 +692,7 @@ describe('When Network Load Balancer', () => {
});
});

testFutureBehavior('Fargate networkloadbalanced construct uses custom Port for target group when feature flag is enabled', { [ECS_PATTERNS_TARGET_GROUP_PORT_FROM_COTAINER_PORT]: true }, App, (app) => {
testFutureBehavior('Fargate networkloadbalanced construct uses custom Port for target group when feature flag is enabled', { [ECS_PATTERNS_TARGET_GROUP_PORT_FROM_CONTAINER_PORT]: true }, App, (app) => {
// GIVEN
const stack = new Stack(app);
const vpc = new Vpc(stack, 'VPC');
Expand All @@ -719,7 +719,7 @@ describe('When Network Load Balancer', () => {
});
});

testFutureBehavior('Fargate networkloadbalanced construct uses 80 for target group when feature flag is enabled but container port is not provided', { [ECS_PATTERNS_TARGET_GROUP_PORT_FROM_COTAINER_PORT]: true }, App, (app) => {
testFutureBehavior('Fargate networkloadbalanced construct uses 80 for target group when feature flag is enabled but container port is not provided', { [ECS_PATTERNS_TARGET_GROUP_PORT_FROM_CONTAINER_PORT]: true }, App, (app) => {
// GIVEN
const stack = new Stack(app);
const vpc = new Vpc(stack, 'VPC');
Expand Down Expand Up @@ -789,7 +789,7 @@ describe('When Network Load Balancer', () => {
});
});

testFutureBehavior('test Fargate multinetworkloadbalanced construct uses custom Port for target group when feature flag is enabled', { [ECS_PATTERNS_TARGET_GROUP_PORT_FROM_COTAINER_PORT]: true }, App, (app) => {
testFutureBehavior('test Fargate multinetworkloadbalanced construct uses custom Port for target group when feature flag is enabled', { [ECS_PATTERNS_TARGET_GROUP_PORT_FROM_CONTAINER_PORT]: true }, App, (app) => {
// GIVEN
const stack = new Stack(app);
const vpc = new Vpc(stack, 'VPC');
Expand Down Expand Up @@ -833,7 +833,7 @@ describe('When Network Load Balancer', () => {
});
});

testFutureBehavior('test Fargate multinetworkloadbalanced construct uses 80 for target group when feature flag is enabled but container port is not provided', { [ECS_PATTERNS_TARGET_GROUP_PORT_FROM_COTAINER_PORT]: true }, App, (app) => {
testFutureBehavior('test Fargate multinetworkloadbalanced construct uses 80 for target group when feature flag is enabled but container port is not provided', { [ECS_PATTERNS_TARGET_GROUP_PORT_FROM_CONTAINER_PORT]: true }, App, (app) => {
// GIVEN
const stack = new Stack(app);
const vpc = new Vpc(stack, 'VPC');
Expand Down

0 comments on commit daa3216

Please sign in to comment.