cloudcomponents / cdk-constructs

A collection of higher-level reusable cdk constructs
MIT License
623 stars 101 forks source link

Some of the examples in the blue/green deployment doc are incorrect #138

Closed cuperman closed 2 years ago

cuperman commented 2 years ago

Some of the examples in the blue/green deployment README are incorrect.

The ECS required testTargetGroup:

const ecsService = new EcsService(this, 'EcsService', {
  cluster,
  serviceName: 'blue-green-service',
  desiredCount: 2,
  taskDefinition,
  prodTargetGroup,
});

The deployment group takes TargetGroup references instead of TargetGroup names:

const deploymentGroup = new EcsDeploymentGroup(this, 'DeploymentGroup', {
  applicationName: 'blue-green-application',
  deploymentGroupName: 'blue-green-deployment-group',
  ecsServices: [ecsService],
  targetGroupNames: [
    prodTargetGroup.targetGroupName,
    testTargetGroup.targetGroupName,
  ],
  ...  
});

And some other minor issues.