Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(aws-codedeploy): support setting a load balancer on a Deployment Group #786

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

skinny85
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

@skinny85 skinny85 requested review from rix0rrr and eladb September 26, 2018 23:50
/**
* The first generation (ELB Classic).
*/
FIRST,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PascalCase please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

This package contains the abstract API of Load Balancers
as required by the AWS CodeDeploy Construct Library.

You shoould never need to depend on it directly -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just testing you 😉 Done!

* An interface of an abstract laod balancer, as needed by CodeDeploy.
*/
export interface LoadBalancerProvider {
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ILoadBalancerProvider

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (ILoadBalancer).

@@ -47,6 +47,49 @@ const deploymentGroup = codedeploy.ServerDeploymentGroupRef.import(this, 'Existi
});
```

#### Load balancers

You can specify a load balancer with the `loadBalancer` property when creating a Deployment Group.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing:

  • Why would I want to do that? (you can copy & paste from the AWS docs)
  • Reference to relevant AWS documentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

/**
* An interface of an abstract laod balancer, as needed by CodeDeploy.
*/
export interface LoadBalancerProvider {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's how we usually formulate such interfaces:

interface ILoadBalancer {
  readonly asCodeDeployLoadBalancer: LoadBalancerProps
}

interface LoadBalancerProps {
  generation: LoadBalancerGeneration;
  name: string;
}

Then, the implementors will look like this:

class ClassicLoadBalancer implements codedeployapi.ILoadBalancer {
  public get asCodeDeployLoadBalancer(): codedeployapi.LoadBalancerProps {
    return {
      generation: ...,
      name: this.blaName
   }
 }
}

The asXxx pattern signals the user that they shouldn't need to use this property directly. It's "a cast" to the specific interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@rix0rrr
Copy link
Contributor

rix0rrr commented Sep 27, 2018

As another comment: we already have the "something is a load balancer TARGET" interface, usable like this:

loadBalancer.addTarget(someThing);

(It exists for both Classic ELB and ELBv2, although the interfaces are slightly different)

Does that not suffice for your use case?

@skinny85
Copy link
Contributor Author

Does that not suffice for your use case?

Sadly, it does not. CodeDeploy has different requirements for ELB and ALB/NLB (different things need to be set as load balancers - the LB itself for ELB, the Target Group for ALB/NLB). Also, it needs to be a single type to avoid wrapping it in the Deployment Group class.

@skinny85 skinny85 force-pushed the feature/codedeploy-lb branch from 7f8abd2 to 321fdf7 Compare September 27, 2018 21:33
@skinny85
Copy link
Contributor Author

Updated with Elad's feedback.

@skinny85 skinny85 force-pushed the feature/codedeploy-lb branch from 321fdf7 to 609e6dc Compare September 27, 2018 21:45
@skinny85
Copy link
Contributor Author

Rebased on top of 0.10.0.

@skinny85 skinny85 force-pushed the feature/codedeploy-lb branch from 609e6dc to f70bd0a Compare September 27, 2018 21:49
@skinny85
Copy link
Contributor Author

Missed that the new test (integ.deployment-group.ts) was indented with 4 spaces instead of 2.

@skinny85
Copy link
Contributor Author

The build failure is weird:

> @aws-cdk/aws-elasticloadbalancing@0.10.0 package /codebuild/output/src144793856/src/github.com/awslabs/aws-cdk/packages/@aws-cdk/aws-elasticloadbalancing
> cdk-package


lerna ERR! npm run package stderr:
[jsii-pacmak] [INFO] Building @aws-cdk/aws-elasticloadbalancing (java,dotnet,sphinx,js) into dist
Error: Process exited with status 1
Microsoft (R) Build Engine version 15.6.82.30579 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restoring packages for /tmp/jsii-pacmak-code0Ql8th/Amazon.CDK.AWS.ElasticLoadBalancing/Amazon.CDK.AWS.ElasticLoadBalancing.csproj...
  Installing Amazon.CDK.AWS.EC2 0.10.0.
  Installing Amazon.CDK.AWS.CodeDeploy.Api 0.10.0.
  Generating MSBuild file /tmp/jsii-pacmak-code0Ql8th/Amazon.CDK.AWS.ElasticLoadBalancing/obj/Amazon.CDK.AWS.ElasticLoadBalancing.csproj.nuget.g.props.
  Generating MSBuild file /tmp/jsii-pacmak-code0Ql8th/Amazon.CDK.AWS.ElasticLoadBalancing/obj/Amazon.CDK.AWS.ElasticLoadBalancing.csproj.nuget.g.targets.
  Restore completed in 264.29 ms for /tmp/jsii-pacmak-code0Ql8th/Amazon.CDK.AWS.ElasticLoadBalancing/Amazon.CDK.AWS.ElasticLoadBalancing.csproj.
LoadBalancer.cs(14,59): error CS0738: 'LoadBalancer' does not implement interface member 'IILoadBalancer.AsCodeDeployLoadBalancer()'. 'LoadBalancer.AsCodeDeployLoadBalancer()' cannot implement 'IILoadBalancer.AsCodeDeployLoadBalancer()' because it does not have the matching return type of 'ILoadBalancerProps'. [/tmp/jsii-pacmak-code0Ql8th/Amazon.CDK.AWS.ElasticLoadBalancing/Amazon.CDK.AWS.ElasticLoadBalancing.csproj]

Build FAILED.

LoadBalancer.cs(14,59): error CS0738: 'LoadBalancer' does not implement interface member 'IILoadBalancer.AsCodeDeployLoadBalancer()'. 'LoadBalancer.AsCodeDeployLoadBalancer()' cannot implement 'IILoadBalancer.AsCodeDeployLoadBalancer()' because it does not have the matching return type of 'ILoadBalancerProps'. [/tmp/jsii-pacmak-code0Ql8th/Amazon.CDK.AWS.ElasticLoadBalancing/Amazon.CDK.AWS.ElasticLoadBalancing.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.90

Could this be a bug in the .NET part of JSII...?

@skinny85
Copy link
Contributor Author

Just realized that I left out setting the DeploymentStyle.DeploymentOption property to WITH_TRAFFIC_CONTROL when there is a load balancer present - will fix.

@rix0rrr
Copy link
Contributor

rix0rrr commented Sep 28, 2018

Sadly, it does not. CodeDeploy has different requirements for ELB and ALB/NLB (different things need to be set as load balancers - the LB itself for ELB, the Target Group for ALB/NLB). Also, it needs to be a single type to avoid wrapping it in the Deployment Group class.

Sorry, I don't understand that. Can you clarify a bit more? Because for example, if I do the following:

class ServerDeploymentGroup
    implements elb.ILoadBalancerTarget, elbv2.IApplicationLoadBalancerTarget, elbv2.INetworkLoadBalancerTarget {

    public attachToClassicLB(loadBalancer: elb.LoadBalancer): void {
        this.loadBalancerInfo.elbInfoList.push(loadBalancer.loadBalancerName);
    }
    
    public attachToApplicationTargetGroup(targetGroup: elbv2.ApplicationTargetGroup): elbv2.LoadBalancerTargetProps {
        this.loadBalancerInfo.targetGroupInfoList.push(targetGroup.targetGroupName);
        return { targetType: elbv2.TargetType.SelfRegistering };
    }

    public attachToNetworkTargetGroup(targetGroup: elbv2.NetworkTargetGroup): elbv2.LoadBalancerTargetProps {
        this.loadBalancerInfo.targetGroupInfoList.push(targetGroup.targetGroupName);
        return { targetType: elbv2.TargetType.SelfRegistering };
    }    
}

I don't understand why that wouldn't work?

const deploymentGroup = new codedeploy.ServerDeploymentGroup(stack, 'CodeDeployGroup', {
   autoScalingGroups: [asg]
});

lb.addTarget(asg);
lb.addTarget(deploymentGroup);

Granted, addTarget() on the deploymentgroup might be confusing (or not), but would like to keep some consistency in the load balancer modeling, and right now the load balancer points to things (as opposed to things pointing to the load balancer).

The duplication that I mentioned in that code review comment is even more visible here. So maybe model it differently? Like ASGs having an "ITellYouAboutMyLoadBalancers" interface?

});

const elb = new lb.LoadBalancer(stack, 'ELB', { vpc });
elb.addTarget(asg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this duplication very much. (1/2)

new codedeploy.ServerDeploymentGroup(stack, 'CodeDeployGroup', {
deploymentConfig: codedeploy.ServerDeploymentConfig.AllAtOnce,
autoScalingGroups: [asg],
loadBalancer: elb,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this duplication very much. (2/2)

We're both saying that the ASG should be a load balancer target (directly), AND that the ASG is a load balancer target (via the DeploymentGroup).

Why are both necessary? I mean, I can think of some mechanical reasons why this is necessary today: probably the DeploymentGroup is going to call register-instance and register-instance only when it makes changes, and the direct association between load balancer and ASG is necessary to register the initial instances, before CodeDeploy makes any changes... but I still don't really like it.

Can't we interrogate the ASGs for their load balancers and copy those onto the DeploymentGroup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are both necessary?

Honestly, I'm not even 100% sure that this duplication is required. Perhaps setting the ASG just on the Deployment Group, and then setting the load balancer on the Deployment Group, is actually enough? I'll do some research.

Can't we interrogate the ASGs for their load balancers and copy those onto the DeploymentGroup?

That won't work. You can have a load balancer for a Deployment Group without any ASGs (when the Deployment Group uses tags for EC2/on-premise instances).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That won't work. You can have a load balancer for a Deployment Group without any ASGs (when the Deployment Group uses tags for EC2/on-premise instances).

One doesn't have to preclude the other. I want to (be able to) get rid of the repetition if it exists.

Also, you could still have an object that represents the tagged instances.

Copy link
Contributor Author

@skinny85 skinny85 Sep 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One doesn't have to preclude the other. I want to (be able to) get rid of the repetition if it exists.

Well, I really feel like there should be one way of doing this. I don't think taking load balancers both from the ASGs and from another source (if a Deployment Group doesn't have any ASGs) is a great experience.

Also, you could still have an object that represents the tagged instances.

How would that look? So you would create a TaggedInstances object, supply it to the Deployment Group on construction, and then call loadBalancer.addTarget(taggedInstances), which would in the background set the load balancer of the Deployment Group?

That doesn't sound great to me - seems a little too magical/indirect...

EDIT: actually, I have no idea how would that work at all... What if I add the taggedInstances to the LB before creating the Deployment Group - how will that work? Does taggedInstances have some state...? Would you mind writing out the full code of how you see this working?

@skinny85
Copy link
Contributor Author

const deploymentGroup = new codedeploy.ServerDeploymentGroup(stack, 'CodeDeployGroup', {
  autoScalingGroups: [asg]
});

lb.addTarget(asg);
lb.addTarget(deploymentGroup);

I'm not a huge fan of this mutable API... doesn't seem very discoverable, for example.

I like giving the Load Balancer in the construction properties of the Deployment Group a lot more. Seems also more consistent (why would some things be set in the construction properties, while others you have to call a method on the object for?).

@skinny85 skinny85 force-pushed the feature/codedeploy-lb branch from f70bd0a to bac82b9 Compare October 1, 2018 20:48
@skinny85
Copy link
Contributor Author

skinny85 commented Oct 1, 2018

Added setting the DeploymentStyle.DeploymentOption property correctly to WITH_TRAFFIC_CONTROL when a load balancer is present.

@rix0rrr I've confirmed that you don't need to set the ASG as target on the LB for the integration to work - it's enough to provide it in the Deployment Group. I've removed the duplication from the integ test. Given that, are you OK with this API?

@rix0rrr
Copy link
Contributor

rix0rrr commented Oct 2, 2018

I'm still not happy, but disagree and commit is what we're about :)

@skinny85
Copy link
Contributor Author

skinny85 commented Oct 2, 2018

I'm still not happy, but disagree and commit is what we're about :)

I appreciate your LP strength :) but can you write out (in pseudo code) a proposal that would make you happy, including support for setting a load balancer on a Deployment Group without any AGSs, only with tag filters?

Perhaps there is a way for everybody to be happy :)

@skinny85
Copy link
Contributor Author

skinny85 commented Oct 3, 2018

@rix0rrr ping

@rix0rrr
Copy link
Contributor

rix0rrr commented Oct 3, 2018

Honestly, I'm not quite sure anymore. Just merge it.

@skinny85
Copy link
Contributor Author

skinny85 commented Oct 3, 2018

I see I wore you down :D

@skinny85 skinny85 merged commit 3d1095e into aws:master Oct 4, 2018
@skinny85 skinny85 deleted the feature/codedeploy-lb branch October 4, 2018 00:35
eladb pushed a commit that referenced this pull request Oct 10, 2018
Bug Fixes
=========

* **aws-apigateway:** allow + in path parts ([#769](#769)) ([9aadcb6](9aadcb6)), closes [#768](#768)
* **aws-cdk:** continue after exceptions in stack monitor ([#791](#791)) ([88b599d](88b599d)), closes [#787](#787)
* **aws-cloudfront:** properly support loggingConfig ([#809](#809)) ([a09afc4](a09afc4)), closes [#721](#721)
* **aws-ec2:** Add Burstable Generation 3 Instances ([#812](#812)) ([6c523f2](6c523f2))
* **aws-ec2:** fix typo in resource identifier ([#818](#818)) ([bebfef0](bebfef0))
* **aws-s3:** properly export bucketDomainName ([#844](#844)) ([8caa28c](8caa28c))
* **aws-sqs:** Queue.import() doesn't return a value ([#885](#885)) ([c21ebb5](c21ebb5)), closes [#879](#879)
* **cdk:** fix TagManager to evaluate to undefined if no tags are included ([#882](#882)) ([96767d7](96767d7))
* Emit valid YAML-1.1 ([#876](#876)) ([3cedc0c](3cedc0c)), closes [#875](#875)
* **cdk:** jsx support conflicts with React usage ([#884](#884)) ([8824356](8824356)), closes [#830](#830)
* **docs:** update supported languages in README ([#819](#819), [#450](#450)) ([#820](#820)) ([7e5738f](7e5738f))

Features
========

* **aws-apigateway:** "LambdaRestApi" and "addProxy" routes ([#867](#867)) ([aa76305](aa76305))
* **aws-cdk:** add maven wrapper to java template ([#811](#811)) ([86a55a9](86a55a9))
* **aws-cloudfront:** Support Security Policy ([#804](#804)) ([8a5299a](8a5299a)), closes [#795](#795)
* **aws-codedeploy:** support setting a load balancer on a Deployment Group. ([#786](#786)) ([3d1095e](3d1095e))
* **aws-codepipeline:** allow specifying the runOrder property when creating Actions. ([#776](#776)) ([bba3602](bba3602))
* **aws-dynamodb:** IAM grants support ([#870](#870)) ([1561a4d](1561a4d))
* **aws-dynamodb:** support Global Secondary Indexes ([#760](#760)) ([4980c97](4980c97))
* **aws-dynamodb:** tags support ([#814](#814)) ([644947a](644947a))
* **aws-dynamodB:** support Local Secondary Indexes ([#825](#825)) ([a67b2d9](a67b2d9))
* **aws-ec2:** support UDP port ranges in SecurityGroups ([#835](#835)) ([8215389](8215389))
* **aws-s3:** support granting public access to objects ([#886](#886)) ([d730ac6](d730ac6)), closes [#877](#877)
* **cdk:** Add support for UseOnlineResharding with UpdatePolicies ([#881](#881)) ([56f0b4e](56f0b4e))
* Manage IAM permissions for (some) CFN CodePipeline actions ([#843](#843)) ([4e050c3](4e050c3))
* Resolve paths to nyc & nodeunit ([#887](#887)) ([66ff0a8](66ff0a8))
* upgrade to jsii v0.7.7 ([c231242](c231242))
@eladb eladb mentioned this pull request Oct 10, 2018
eladb pushed a commit that referenced this pull request Oct 10, 2018
BREAKING CHANGES
================

* The `cdk.App` initializer doesn't accept any arguments and the `app.run()`
  method does not return a `string` anymore. All AWS CDK apps in all languages
  would need to be modified to adhere to the new API of the `cdk.App` construct.

    Instead of:

      const app = new App(process.argv); // ERROR
      // add stacks
      process.stdout.write(app.run());   // ERROR

    The new usage is:

      const app = new App();
      // add stacks
      app.run();

    In order to interact with applications written using this
    version, the CDK Toolkit must also be update using:

      $ npm i -g aws-cdk

* **aws-iam:** This change moves the `PolicyDocument`, `PolicyStatement` and
all `PolicyPrincipal` classes from the @aws-cdk/cdk module
and into the @aws-cdk/aws-iam module.
* **jsx:** The CDK is no longer shipped with built-in support for JSX.
You can still use JSX but you will have to manually configure it.

Features
========

* **aws-apigateway:** "LambdaRestApi" and "addProxy" routes ([#867](#867)) ([a733bd1](a733bd1))
* **aws-cdk:** add maven wrapper to java template ([#811](#811)) ([1ee729e](1ee729e))
* **aws-cloudfront:** Support Security Policy ([#804](#804)) ([d69b1d6](d69b1d6)), closes [#795](#795)
* **aws-codedeploy:** support setting a load balancer on a Deployment Group. ([#786](#786)) ([dc0af46](dc0af46))
* **aws-codepipeline:** allow specifying the runOrder property when creating Actions. ([#776](#776)) ([8302541](8302541))
* **aws-dynamodb:** IAM grants support ([#870](#870)) ([f6c7760](f6c7760))
* **aws-dynamodb:** support Global Secondary Indexes ([#760](#760)) ([737b481](737b481))
* **aws-dynamodb:** tags support ([#814](#814)) ([c76d8c1](c76d8c1))
* **aws-dynamodB:** support Local Secondary Indexes ([#825](#825)) ([fdb4974](fdb4974))
* Manage IAM permissions for (some) CFN CodePipeline actions ([#843](#843)) ([5f2cb9f](5f2cb9f))
* Resolve paths to nyc & nodeunit ([#887](#887)) ([6d71a87](6d71a87))
* upgrade to jsii v0.7.7 ([43d2d9e](43d2d9e))
* **aws-ec2:** allow configuring subnets for NAT gateway ([#874](#874)) ([958dce6](958dce6))
* **aws-ec2:** support UDP port ranges in SecurityGroups ([#835](#835)) ([6920b9c](6920b9c))
* **aws-s3:** support granting public access to objects ([#886](#886)) ([50e0c41](50e0c41)), closes [#877](#877)
* **cdk:** Add support for UseOnlineResharding with UpdatePolicies ([#881](#881)) ([a95f081](a95f081))

Bug Fixes
=========

* **aws-apigateway:** allow + in path parts ([#769](#769)) ([6905b7e](6905b7e)), closes [#768](#768)
* **aws-cdk:** continue after exceptions in stack monitor ([#791](#791)) ([b7c244f](b7c244f)), closes [#787](#787)
* **aws-cloudfront:** properly support loggingConfig ([#809](#809)) ([d279a1d](d279a1d)), closes [#721](#721)
* **aws-ec2:** Add Burstable Generation 3 Instances ([#812](#812)) ([cf62e9d](cf62e9d))
* **aws-s3:** properly export bucketDomainName ([#844](#844)) ([9a53069](9a53069))
* Emit valid YAML-1.1 ([#876](#876)) ([6c98b73](6c98b73)), closes [#875](#875)
* **aws-sqs:** Queue.import() doesn't return a value ([#885](#885)) ([c38c3e7](c38c3e7)), closes [#879](#879)
* **cdk:** fix TagManager to evaluate to undefined if no tags are included ([#882](#882)) ([be65a04](be65a04))
* **cdk:** jsx support conflicts with React usage ([#884](#884)) ([2a979cc](2a979cc)), closes [#830](#830)
* **docs:** update supported languages in README ([#819](#819), [#450](#450)) ([#820](#820)) ([1ec443e](1ec443e))


Code Refactoring
================

* **aws-iam:** move IAM classes cdk to aws-iam ([#866](#866)) ([6c58556](6c58556)), closes [#196](#196)
* remove app boilerplate and improvements to cx protocol ([#868](#868)) ([7bb5a60](7bb5a60)), closes [#216](#216)
eladb pushed a commit that referenced this pull request Oct 11, 2018
Bug Fixes
---------

* **aws-apigateway:** allow + in path parts ([#769](#769)) ([0c50d27](0c50d27)), closes [#768](#768)
* **aws-cdk:** continue after exceptions in stack monitor ([#791](#791)) ([b0f3298](b0f3298)), closes [#787](#787)
* **aws-cloudfront:** check for undefined and determining of the defaultRootObject prop is set or not ([#801](#801)) ([32a74c6](32a74c6))
* **aws-cloudfront:** properly support loggingConfig ([#809](#809)) ([5512f70](5512f70)), closes [#721](#721)
* **aws-codecommit:** typo in README ([#780](#780)) ([0e79c2d](0e79c2d))
* **aws-ec2:** Add Burstable Generation 3 Instances ([#812](#812)) ([d36ee6d](d36ee6d))
* **aws-ec2:** fix capitalization of "VPCEndpointType" to "VpcEndpointType" ([#789](#789)) ([7a8ee2c](7a8ee2c)), closes [#765](#765)
* **aws-ec2:** fix typo in resource identifier ([#818](#818)) ([f529c80](f529c80))
* **aws-elbv2:** fix load balancer registration ([#890](#890)) ([8cc9abe](8cc9abe))
* **aws-s3:** properly export bucketDomainName ([#844](#844)) ([a65060d](a65060d))
* **aws-sqs:** Queue.import() doesn't return a value ([#885](#885)) ([c592b7f](c592b7f)), closes [#879](#879)
* **cdk:** fix TagManager to evaluate to undefined if no tags are included ([#882](#882)) ([477c827](477c827))
* **cdk:** init templates were not upgraded to typescript ^3.0.0 ([#904](#904)) ([2cc7475](2cc7475))
* **cdk:** jsx support conflicts with React usage ([#884](#884)) ([76d8031](76d8031)), closes [#830](#830)
* **cfn2ts:** expect Token instead of CloudFormationToken ([#896](#896)) ([6eee1d2](6eee1d2))
* **docs:** fix issue [#718](#718) (Aurora DB example) ([#783](#783)) ([016f3a8](016f3a8))
* **docs:** update supported languages in README ([#819](#819), [#450](#450)) ([#820](#820)) ([ffac98c](ffac98c))
* Correct heading level of CHANGELOG.md 0.10.0 ([40d9ef0](40d9ef0))
* Emit valid YAML-1.1 ([#876](#876)) ([ff857ea](ff857ea)), closes [#875](#875)
* **toolkit:** improve error message for large templates ([#900](#900)) ([a41f48f](a41f48f)), closes [#34](#34)

Code Refactoring
----------------

* **aws-iam:** move IAM classes cdk to aws-iam ([#866](#866)) ([d46a95b](d46a95b)), closes [#196](#196)
* **util:** remove [@aws-cdk](https://github.com/aws-cdk)/util ([#745](#745)) ([10015cb](10015cb)), closes [#709](#709)
* **framework:** remove app boilerplate and improvements to cx protocol ([#868](#868)) ([005beec](005beec)), closes [#216](#216)


Features
--------

* **aws-apigateway:** "LambdaRestApi" and "addProxy" routes ([#867](#867)) ([905a95d](905a95d))
* **aws-cdk:** add maven wrapper to java template ([#811](#811)) ([72aa872](72aa872))
* **aws-cloudformation:** rename the CFN CodePipeline Actions. ([#771](#771)) ([007e7b4](007e7b4))
* **aws-cloudformation:** update the ReadMe of the module to reflect the new Action names. ([#775](#775)) ([6c0e75b](6c0e75b)), closes [#771](#771)
* **aws-cloudfront:** Support Security Policy ([#804](#804)) ([b39bf11](b39bf11)), closes [#795](#795)
* **aws-codedeploy:** Add the auto-scaling groups property to ServerDeploymentGroup. ([#739](#739)) ([0b28886](0b28886))
* **aws-codedeploy:** Deployment Configuration Construct. ([#653](#653)) ([e6b67ad](e6b67ad))
* **aws-codedeploy:** support setting a load balancer on a Deployment Group. ([#786](#786)) ([e7af9f5](e7af9f5))
* **aws-codepipeline:** allow specifying the runOrder property when creating Actions. ([#776](#776)) ([d146c8d](d146c8d))
* **aws-codepipeline, aws-codecommit, aws-s3:** change the convention for naming the source Actions to XxxSourceAction. ([#753](#753)) ([9c3ce7f](9c3ce7f))
* **aws-dynamodb:** IAM grants support ([#870](#870)) ([c5a4200](c5a4200))
* **aws-dynamodb:** support Global Secondary Indexes ([#760](#760)) ([3601440](3601440))
* **aws-dynamodb:** tags support ([#814](#814)) ([924c84e](924c84e))
* **aws-dynamodB:** support Local Secondary Indexes ([#825](#825)) ([3175af3](3175af3))
* **aws-ec2:** add support for ICMP protocol's classification Types & Codes to SecurityGroupRule ([#893](#893)) ([85bd3c0](85bd3c0))
* **aws-ec2:** allow configuring subnets for NAT gateway ([#874](#874)) ([8ec761c](8ec761c))
* **aws-ec2:** support UDP port ranges in SecurityGroups ([#835](#835)) ([b42ef90](b42ef90))
* **aws-elasticloadbalancingv2:** support for ALB/NLB ([#750](#750)) ([bd9ee01](bd9ee01))
* **aws-s3:** support granting public access to objects ([#886](#886)) ([bdee191](bdee191)), closes [#877](#877)
* **cdk:** Add support for UseOnlineResharding with UpdatePolicies ([#881](#881)) ([1f717e1](1f717e1))
* **cdk:** configurable default SSM context provider ([#889](#889)) ([353412b](353412b))
* **core:** resource overrides (escape hatch) ([#784](#784)) ([5054eef](5054eef)), closes [#606](#606)
* **aws-codepipeline**: Manage IAM permissions for (some) CFN CodePipeline actions ([#843](#843)) ([4c69118](4c69118))
* **toolkit:** Stop creating 'empty' stacks ([#779](#779)) ([1dddd8a](1dddd8a))
* **aws-autoscaling, aws-ec2:** Tagging support for AutoScaling/SecurityGroup ([#766](#766)) ([3d48eb2](3d48eb2))

### BREAKING CHANGES

* **framework:** The `cdk.App` constructor doesn't accept any arguments,
and `app.run()` does not return a `string` anymore. All AWS CDK apps in
all languages would need to be modified to adhere to the new API of the
`cdk.App` construct.

    Instead of:

      const app = new App(process.argv); // ERROR
      // add stacks
      process.stdout.write(app.run());   // ERROR

    The new usage is:

      const app = new App();
      // add stacks
      app.run();
* **framework:** The CDK is no longer shipped with built-in support for JSX.
You can still use JSX but you will have to manually configure it.
* **aws-iam:** `PolicyDocument`, `PolicyStatement` and
all `PolicyPrincipal` classes moved from the @aws-cdk/cdk module
and into the @aws-cdk/aws-iam module.
* **aws-codepipeline-api**: `Artifact.subartifact` method of the
CodePipeline API was renamed to `Artifact.atPath`.
* constructor signature of `TagManager` has changed.
`initialTags` is now passed inside a props object.
* **util:** @aws-cdk/util is no longer available
* **aws-elasticloadbalancingv2:** Adds classes for modeling Application and Network Load
Balancers. AutoScalingGroups now implement the interface that makes
constructs a load balancing target. The breaking change is that Security
Group rule identifiers have been changed in order to make adding rules
more reliable. No code changes are necessary but existing deployments
may experience unexpected changes.
* **aws-cloudformation:** this renames all CloudFormation Actions for CodePipeline
to bring them in line with Actions defined in other service packages.
* **aws-codepipeline, aws-codecommit, aws-s3:** change the names of the source Actions from XxxSource to XxxSourceAction.
This is to align them with the other Actions, like Build.
Also, CodeBuild has the concept of Sources, so it makes sense to strongly differentiate between the two.
eladb pushed a commit that referenced this pull request Oct 11, 2018
Bug Fixes
---------

* **aws-apigateway:** allow + in path parts ([#769](#769)) ([0c50d27](0c50d27)), closes [#768](#768)
* **aws-cdk:** continue after exceptions in stack monitor ([#791](#791)) ([b0f3298](b0f3298)), closes [#787](#787)
* **aws-cloudfront:** check for undefined and determining of the defaultRootObject prop is set or not ([#801](#801)) ([32a74c6](32a74c6))
* **aws-cloudfront:** properly support loggingConfig ([#809](#809)) ([5512f70](5512f70)), closes [#721](#721)
* **aws-codecommit:** typo in README ([#780](#780)) ([0e79c2d](0e79c2d))
* **aws-ec2:** Add Burstable Generation 3 Instances ([#812](#812)) ([d36ee6d](d36ee6d))
* **aws-ec2:** fix capitalization of "VPCEndpointType" to "VpcEndpointType" ([#789](#789)) ([7a8ee2c](7a8ee2c)), closes [#765](#765)
* **aws-ec2:** fix typo in resource identifier ([#818](#818)) ([f529c80](f529c80))
* **aws-elbv2:** fix load balancer registration ([#890](#890)) ([8cc9abe](8cc9abe))
* **aws-s3:** properly export bucketDomainName ([#844](#844)) ([a65060d](a65060d))
* **aws-sqs:** Queue.import() doesn't return a value ([#885](#885)) ([c592b7f](c592b7f)), closes [#879](#879)
* **cdk:** fix TagManager to evaluate to undefined if no tags are included ([#882](#882)) ([477c827](477c827))
* **cdk:** init templates were not upgraded to typescript ^3.0.0 ([#904](#904)) ([2cc7475](2cc7475))
* **cdk:** jsx support conflicts with React usage ([#884](#884)) ([76d8031](76d8031)), closes [#830](#830)
* **cfn2ts:** expect Token instead of CloudFormationToken ([#896](#896)) ([6eee1d2](6eee1d2))
* **docs:** fix issue [#718](#718) (Aurora DB example) ([#783](#783)) ([016f3a8](016f3a8))
* **docs:** update supported languages in README ([#819](#819), [#450](#450)) ([#820](#820)) ([ffac98c](ffac98c))
* Correct heading level of CHANGELOG.md 0.10.0 ([40d9ef0](40d9ef0))
* Emit valid YAML-1.1 ([#876](#876)) ([ff857ea](ff857ea)), closes [#875](#875)
* **toolkit:** improve error message for large templates ([#900](#900)) ([a41f48f](a41f48f)), closes [#34](#34)

Code Refactoring
----------------

* **aws-iam:** move IAM classes cdk to aws-iam ([#866](#866)) ([d46a95b](d46a95b)), closes [#196](#196)
* **util:** remove [@aws-cdk](https://github.com/aws-cdk)/util ([#745](#745)) ([10015cb](10015cb)), closes [#709](#709)
* **framework:** remove app boilerplate and improvements to cx protocol ([#868](#868)) ([005beec](005beec)), closes [#216](#216)


Features
--------

* **aws-apigateway:** "LambdaRestApi" and "addProxy" routes ([#867](#867)) ([905a95d](905a95d))
* **aws-cdk:** add maven wrapper to java template ([#811](#811)) ([72aa872](72aa872))
* **aws-cloudformation:** rename the CFN CodePipeline Actions. ([#771](#771)) ([007e7b4](007e7b4))
* **aws-cloudformation:** update the ReadMe of the module to reflect the new Action names. ([#775](#775)) ([6c0e75b](6c0e75b)), closes [#771](#771)
* **aws-cloudfront:** Support Security Policy ([#804](#804)) ([b39bf11](b39bf11)), closes [#795](#795)
* **aws-codedeploy:** Add the auto-scaling groups property to ServerDeploymentGroup. ([#739](#739)) ([0b28886](0b28886))
* **aws-codedeploy:** Deployment Configuration Construct. ([#653](#653)) ([e6b67ad](e6b67ad))
* **aws-codedeploy:** support setting a load balancer on a Deployment Group. ([#786](#786)) ([e7af9f5](e7af9f5))
* **aws-codepipeline:** allow specifying the runOrder property when creating Actions. ([#776](#776)) ([d146c8d](d146c8d))
* **aws-codepipeline, aws-codecommit, aws-s3:** change the convention for naming the source Actions to XxxSourceAction. ([#753](#753)) ([9c3ce7f](9c3ce7f))
* **aws-dynamodb:** IAM grants support ([#870](#870)) ([c5a4200](c5a4200))
* **aws-dynamodb:** support Global Secondary Indexes ([#760](#760)) ([3601440](3601440))
* **aws-dynamodb:** tags support ([#814](#814)) ([924c84e](924c84e))
* **aws-dynamodB:** support Local Secondary Indexes ([#825](#825)) ([3175af3](3175af3))
* **aws-ec2:** add support for ICMP protocol's classification Types & Codes to SecurityGroupRule ([#893](#893)) ([85bd3c0](85bd3c0))
* **aws-ec2:** allow configuring subnets for NAT gateway ([#874](#874)) ([8ec761c](8ec761c))
* **aws-ec2:** support UDP port ranges in SecurityGroups ([#835](#835)) ([b42ef90](b42ef90))
* **aws-elasticloadbalancingv2:** support for ALB/NLB ([#750](#750)) ([bd9ee01](bd9ee01))
* **aws-s3:** support granting public access to objects ([#886](#886)) ([bdee191](bdee191)), closes [#877](#877)
* **cdk:** Add support for UseOnlineResharding with UpdatePolicies ([#881](#881)) ([1f717e1](1f717e1))
* **cdk:** configurable default SSM context provider ([#889](#889)) ([353412b](353412b))
* **core:** resource overrides (escape hatch) ([#784](#784)) ([5054eef](5054eef)), closes [#606](#606)
* **aws-codepipeline**: Manage IAM permissions for (some) CFN CodePipeline actions ([#843](#843)) ([4c69118](4c69118))
* **toolkit:** Stop creating 'empty' stacks ([#779](#779)) ([1dddd8a](1dddd8a))
* **aws-autoscaling, aws-ec2:** Tagging support for AutoScaling/SecurityGroup ([#766](#766)) ([3d48eb2](3d48eb2))

### BREAKING CHANGES

* **framework:** The `cdk.App` constructor doesn't accept any arguments,
and `app.run()` does not return a `string` anymore. All AWS CDK apps in
all languages would need to be modified to adhere to the new API of the
`cdk.App` construct.

    Instead of:

      const app = new App(process.argv); // ERROR
      // add stacks
      process.stdout.write(app.run());   // ERROR

    The new usage is:

      const app = new App();
      // add stacks
      app.run();
* **framework:** The CDK is no longer shipped with built-in support for JSX.
You can still use JSX but you will have to manually configure it.
* **aws-iam:** `PolicyDocument`, `PolicyStatement` and
all `PolicyPrincipal` classes moved from the @aws-cdk/cdk module
and into the @aws-cdk/aws-iam module.
* **aws-codepipeline-api**: `Artifact.subartifact` method of the
CodePipeline API was renamed to `Artifact.atPath`.
* constructor signature of `TagManager` has changed.
`initialTags` is now passed inside a props object.
* **util:** @aws-cdk/util is no longer available
* **aws-elasticloadbalancingv2:** Adds classes for modeling Application and Network Load
Balancers. AutoScalingGroups now implement the interface that makes
constructs a load balancing target. The breaking change is that Security
Group rule identifiers have been changed in order to make adding rules
more reliable. No code changes are necessary but existing deployments
may experience unexpected changes.
* **aws-cloudformation:** this renames all CloudFormation Actions for CodePipeline
to bring them in line with Actions defined in other service packages.
* **aws-codepipeline, aws-codecommit, aws-s3:** change the names of the source Actions from XxxSource to XxxSourceAction.
This is to align them with the other Actions, like Build.
Also, CodeBuild has the concept of Sources, so it makes sense to strongly differentiate between the two.
@NGL321 NGL321 added the contribution/core This is a PR that came from AWS. label Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants