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

chore(release): 1.74.0 #11508

Merged
merged 43 commits into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a70bceb
chore(pkglint): rule to ensure that only allowed packages are public …
Nov 11, 2020
8ae6082
Merge branch 'master' into merge-back/1.73.0
mergify[bot] Nov 11, 2020
bf1c1c1
chore(merge-back): 1.73.0 (#11419)
mergify[bot] Nov 11, 2020
f251ce6
chore: npm-check-updates && yarn upgrade (#11418)
aws-cdk-automation Nov 11, 2020
ec72c85
feat(efs): import access point - `fromAccessPointAttributes()` (#10712)
DaWyz Nov 11, 2020
8c17a35
feat(cfnspec): cloudformation spec v20.0.0 (#11319)
aws-cdk-automation Nov 11, 2020
62baa7b
feat(appmesh): add listener timeout to Virtual Nodes (#10793)
sshver Nov 11, 2020
544e802
chore: automatically add missing libraries to more packages (#11428)
njlynch Nov 11, 2020
6967f7d
docs(lamba-event-sources): Fix code example in README.md (#11411)
msimpsonnz Nov 11, 2020
5f3d646
chore(deps): bump aws-sdk from 2.789.0 to 2.790.0 (#11432)
dependabot-preview[bot] Nov 11, 2020
e5c2e58
chore(ecs-service-extensions): Promoting the ecs-service-extensions p…
nathanpeck Nov 11, 2020
cc28485
chore(deps-dev): bump parcel from 2.0.0-nightly.443 to 2.0.0-nightly.…
dependabot-preview[bot] Nov 12, 2020
b5c3f84
feat(applicationautoscaling): Add KAFKA to ServiceNamespace (#11394)
bracki Nov 12, 2020
182abfc
docs: fix typo of package name `@aws-cdk/aws-apigatewayv2-integration…
polamjag Nov 12, 2020
f26a592
fix(stepfunctions-tasks): encryption is required for AthenaStartQuery…
adamdottv Nov 12, 2020
025992b
feat(cfnspec): cloudformation spec v20.2.0 (#11429)
aws-cdk-automation Nov 12, 2020
58efbad
feat(stepfunctions-tasks): support overriding all properties of CodeB…
zxkane Nov 12, 2020
6d43bda
chore(deps): bump aws-sdk from 2.790.0 to 2.791.0 (#11447)
dependabot-preview[bot] Nov 12, 2020
58e6576
fix(stepfunctions-tasks): incorrect policy for Athena prevents databa…
amitkumardeol Nov 12, 2020
7d9d575
feat(codepipeline-actions): Add deployment timeout to EcsDeployAction…
iippis Nov 12, 2020
47e28d4
revert: "feat(stepfunctions-tasks): support overriding all properties…
shivlaks Nov 13, 2020
af8cf13
chore(deps-dev): bump parcel from 2.0.0-nightly.444 to 2.0.0-nightly.…
dependabot-preview[bot] Nov 13, 2020
809907d
chore: add new modules to auto label action (#11453)
SomayaB Nov 13, 2020
21ccfce
feat(logs): Add KMS key support to LogGroup (#11363)
nicklaw5 Nov 13, 2020
d42b71b
chore: attributions for transitive bundled dependencies (#11442)
Nov 13, 2020
c71a4e9
feat(core): add easy importValue to CfnOutput (#11368)
rix0rrr Nov 13, 2020
39e277f
fix(autoscaling): `targetRequestsPerSecond` is actually requests per …
rix0rrr Nov 13, 2020
3d4df34
chore(deps): bump aws-sdk from 2.791.0 to 2.792.0 (#11467)
dependabot-preview[bot] Nov 13, 2020
03e7cd5
feat(ecs): secret JSON field for Fargate tasks (#11348)
jogold Nov 13, 2020
ab248c6
chore(deps-dev): bump parcel from 2.0.0-nightly.445 to 2.0.0-nightly.…
dependabot-preview[bot] Nov 14, 2020
d12fcd3
chore(deps-dev): bump parcel from 2.0.0-nightly.446 to 2.0.0-nightly.…
dependabot-preview[bot] Nov 15, 2020
2ca31a8
fix(pipelines): synthesizes incorrect paths on Windows (#11464)
rix0rrr Nov 15, 2020
b722f08
chore(deps): bump yargs from 16.1.0 to 16.1.1 (#11485)
dependabot-preview[bot] Nov 15, 2020
4768c44
chore(deps-dev): bump fast-check from 2.6.1 to 2.7.0 (#11486)
dependabot-preview[bot] Nov 15, 2020
a4a555a
fix(core): missing context in Stages is not filled by CLI (#11461)
rix0rrr Nov 16, 2020
715a030
fix(lambda): failed to add permission to an imported lambda from anot…
Nov 16, 2020
a8c4f17
feat(iam): specify initial PolicyDocument for inline Policy (#11430)
markussiebert Nov 16, 2020
d5fe374
chore(ecr): use CloudFormation property for imageScanOnPush (#11490)
Nov 16, 2020
26ee52a
chore(deps-dev): bump @types/eslint from 7.2.4 to 7.2.5 (#11491)
dependabot-preview[bot] Nov 16, 2020
10473b9
chore(deps): bump @typescript-eslint/eslint-plugin from 4.7.0 to 4.8.…
dependabot-preview[bot] Nov 16, 2020
7127ff7
chore(pkglint): backport updates from v2 branch (#11497)
Nov 16, 2020
7bb53ba
chore: fix broken auto label action typo (#11466)
SomayaB Nov 16, 2020
637afde
chore(release): 1.74.0
Nov 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/issue-label-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
{"keywords":["[@aws-cdk/aws-amplify]","[aws-amplify]","[amplify]"],"labels":["@aws-cdk/aws-amplify"],"assignees":["MrArnoldPalmer"]},
{"keywords":["[@aws-cdk/aws-apigateway]","[aws-apigateway]","[apigateway]","[api gateway]","[api-gateway]"],"labels":["@aws-cdk/aws-apigateway"],"assignees":["nija-at"]},
{"keywords":["[@aws-cdk/aws-apigatewayv2]","[aws-apigatewayv2]","[apigatewayv2]","[apigateway v2]","[api-gateway-v2]"],"labels":["@aws-cdk/aws-apigatewayv2"],"assignees":["nija-at"]},
{"keywords":["[@aws-cdk/aws-apigatewayv2-integrations]","[aws-apigatewayv2-integrations]","[apigatewayv2-integrations]","[apigateway v2 integrations]","[api-gateway-v2-integrations]"],"labels":["@aws-cdk/aws-apigatewayv2-integrations"],"assignees":["nija-at"]},
{"keywords":["[@aws-cdk/aws-appconfig]","[aws-appconfig]","[appconfig]","[app config]","[app-config]"],"labels":["@aws-cdk/aws-appconfig"],"assignees":["MrArnoldPalmer"]},
{"keywords":["[@aws-cdk/aws-appflow]","[aws-appflow]","[appflow]","[app flow]","[app-flow]"],"labels":["@aws-cdk/aws-appflow"],"assignees":["skinny85"]},
{"keywords":["[@aws-cdk/aws-applicationautoscaling]","[aws-applicationautoscaling]","[applicationautoscaling]","[application autoscaling]","[application-autoscaling]"],"labels":["@aws-cdk/aws-applicationautoscaling"],"assignees":["NetaNir"]},
Expand Down Expand Up @@ -102,7 +103,9 @@ jobs:
{"keywords":["[@aws-cdk/aws-iot1click]","[aws-iot1click]","[iot1click]","[iot 1click]"],"labels":["@aws-cdk/aws-iot1click"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-iotanalytics]","[aws-iotanalytics]","[iotanalytics]","[iot analytics]","[iot-analytics]"],"labels":["@aws-cdk/aws-iotanalytics"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-iotevents]","[aws-iotevents]","[iotevents]","[iot events]","[iot-events]"],"labels":["@aws-cdk/aws-iotevents"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-iotsitewise]","[aws-iotsitewise]","[iotsitewise]","[iot sitewise]","[iot-sitewise]","[iot-site-wise]","[iot site wise]"],"labels":["@aws-cdk/aws-iotsitewise"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-iotthingsgraph]","[aws-iotthingsgraph]","[iotthingsgraph]","[iot things graph]","[iot-things-graph]"],"labels":["@aws-cdk/aws-iotthingsgraph"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-ivs]","[aws-ivs]","[Interactive Video Service]","[ivs]"],"labels":["@aws-cdk/aws-ivs"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-kendra]","[aws-kendra]","[kendra]"],"labels":["@aws-cdk/aws-kendra"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-kinesis]","[aws-kinesis]","[kinesis]"],"labels":["@aws-cdk/aws-kinesis"],"assignees":["iliapolo"]},
{"keywords":["[@aws-cdk/aws-kinesisanalytics]","[aws-kinesisanalytics]","[kinesisanalytics]","[kinesis analytics]","[kinesis-analytics]"],"labels":["@aws-cdk/aws-kinesisanalytics"],"assignees":["iliapolo"]},
Expand All @@ -120,6 +123,7 @@ jobs:
{"keywords":["[@aws-cdk/aws-mediaconvert]","[aws-mediaconvert]","[mediaconvert]","[media convert]","[media-convert]"],"labels":["@aws-cdk/aws-mediaconvert"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-medialive]","[aws-medialive]","[medialive]","[media live]","[media-live]"],"labels":["@aws-cdk/aws-medialive"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-mediastore]","[aws-mediastore]","[mediastore]","[media store]","[media-store]"],"labels":["@aws-cdk/aws-mediastore"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-mediapackage]","[aws-mediapackage]","[mediapackage]","[media package]","[media-package]"],"labels":["@aws-cdk/aws-mediapackage"],"assignees":["shivlaks"]},
{"keywords":["[@aws-cdk/aws-msk]","[aws-msk]","[msk]"],"labels":["@aws-cdk/aws-msk"],"assignees":["iliapolo"]},
{"keywords":["[@aws-cdk/aws-neptune]","[aws-neptune]","[neptune]"],"labels":["@aws-cdk/aws-neptune"],"assignees":["njlynch"]},
{"keywords":["[@aws-cdk/aws-networkmanager]","[aws-networkmanager]","[networkmanager]","[network manager]","[network-manager]"],"labels":["@aws-cdk/aws-networkmanager"],"assignees":["shivlaks"]},
Expand Down
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,48 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.74.0](https://github.com/aws/aws-cdk/compare/v1.73.0...v1.74.0) (2020-11-17)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **appmesh:** `IVirtualNode` no longer has the `addBackends()` method. A backend can be added to `VirtualNode` using the `addBackend()` method which accepts a single `IVirtualService`
* **appmesh**: `IVirtualNode` no longer has the `addListeners()` method. A listener can be added to `VirtualNode` using the `addListener()` method which accepts a single `VirtualNodeListener`
* **appmesh**: `VirtualNode` no longer has a default listener. It is valid to have a `VirtualNode` without any listeners
* **appmesh**: the construction property `listener` of `VirtualNode` has been renamed to `listeners`, and its type changed to an array of listeners
* **appmesh**: the struct `VirtualNodeListener` has been removed. To create Virtual Node listeners, use the static factory methods of the `VirtualNodeListener` class

### Features

* **applicationautoscaling:** Add KAFKA to ServiceNamespace ([#11394](https://github.com/aws/aws-cdk/issues/11394)) ([b5c3f84](https://github.com/aws/aws-cdk/commit/b5c3f84c8be855107d3ea6738bbf8511f2ecdb8e))
* **appmesh:** add listener timeout to Virtual Nodes ([#10793](https://github.com/aws/aws-cdk/issues/10793)) ([62baa7b](https://github.com/aws/aws-cdk/commit/62baa7b51b49c1a669c7144e5883375fe9ab5d35))
* **cfnspec:** cloudformation spec v20.0.0 ([#11319](https://github.com/aws/aws-cdk/issues/11319)) ([8c17a35](https://github.com/aws/aws-cdk/commit/8c17a35746271d38289f6e200aea35b201b8a93d))
* **cfnspec:** cloudformation spec v20.2.0 ([#11429](https://github.com/aws/aws-cdk/issues/11429)) ([025992b](https://github.com/aws/aws-cdk/commit/025992b0014aca493a669be518f4f423d3f39a57))
* **codepipeline-actions:** Add deployment timeout to EcsDeployAction ([#11407](https://github.com/aws/aws-cdk/issues/11407)) ([7d9d575](https://github.com/aws/aws-cdk/commit/7d9d5757db2acedb507da8bb84c65cc06d018b91))
* **core:** add easy importValue to CfnOutput ([#11368](https://github.com/aws/aws-cdk/issues/11368)) ([c71a4e9](https://github.com/aws/aws-cdk/commit/c71a4e9644fdd64fa00a6d804c921b32bd1816d1)), closes [#11360](https://github.com/aws/aws-cdk/issues/11360)
* **ecs:** secret JSON field for Fargate tasks ([#11348](https://github.com/aws/aws-cdk/issues/11348)) ([03e7cd5](https://github.com/aws/aws-cdk/commit/03e7cd5ebaf07be22f8fff8edacbc384989ebf7c)), closes [/github.com/aws/containers-roadmap/issues/385#issuecomment-722696672](https://github.com/aws//github.com/aws/containers-roadmap/issues/385/issues/issuecomment-722696672) [#11341](https://github.com/aws/aws-cdk/issues/11341)
* **efs:** import access point - `fromAccessPointAttributes()` ([#10712](https://github.com/aws/aws-cdk/issues/10712)) ([ec72c85](https://github.com/aws/aws-cdk/commit/ec72c859c31a069406994433fe430f56ff0e5ff3))
* **iam:** specify initial PolicyDocument for inline Policy ([#11430](https://github.com/aws/aws-cdk/issues/11430)) ([a8c4f17](https://github.com/aws/aws-cdk/commit/a8c4f178e08cef4f306f54976076c21de2252a55)), closes [#11236](https://github.com/aws/aws-cdk/issues/11236)
* **logs:** Add KMS key support to LogGroup ([#11363](https://github.com/aws/aws-cdk/issues/11363)) ([21ccfce](https://github.com/aws/aws-cdk/commit/21ccfce514e10cfcdde36148b45f085d3494c540)), closes [#11211](https://github.com/aws/aws-cdk/issues/11211)
* **stepfunctions-tasks:** support overriding all properties of CodeBuild StartBuild integration ([#10356](https://github.com/aws/aws-cdk/issues/10356)) ([58efbad](https://github.com/aws/aws-cdk/commit/58efbad743464439ce8eb97a6c6c3e07b531d93c)), closes [#10302](https://github.com/aws/aws-cdk/issues/10302)


### Bug Fixes

* **autoscaling:** `targetRequestsPerSecond` is actually requests per minute ([#11457](https://github.com/aws/aws-cdk/issues/11457)) ([39e277f](https://github.com/aws/aws-cdk/commit/39e277f65666e96fe1ad662254327967f666dbad)), closes [#11446](https://github.com/aws/aws-cdk/issues/11446)
* **core:** missing context in Stages is not filled by CLI ([#11461](https://github.com/aws/aws-cdk/issues/11461)) ([a4a555a](https://github.com/aws/aws-cdk/commit/a4a555a9f5e8844a377d8de5041219346d0eb65c)), closes [#9226](https://github.com/aws/aws-cdk/issues/9226)
* **lambda:** failed to add permission to an imported lambda from another account ([#11369](https://github.com/aws/aws-cdk/issues/11369)) ([715a030](https://github.com/aws/aws-cdk/commit/715a0300ea44c7cfcb6ae9973bd4ca16585c8fa5)), closes [#11278](https://github.com/aws/aws-cdk/issues/11278) [#11141](https://github.com/aws/aws-cdk/issues/11141) [#11141](https://github.com/aws/aws-cdk/issues/11141)
* **pipelines:** synthesizes incorrect paths on Windows ([#11464](https://github.com/aws/aws-cdk/issues/11464)) ([2ca31a8](https://github.com/aws/aws-cdk/commit/2ca31a87a8cbf0c5267b3d3b39c8dc75b142488e)), closes [#11359](https://github.com/aws/aws-cdk/issues/11359) [#11405](https://github.com/aws/aws-cdk/issues/11405) [#11424](https://github.com/aws/aws-cdk/issues/11424)
* **stepfunctions-tasks:** encryption is required for AthenaStartQueryExecution ([#11355](https://github.com/aws/aws-cdk/issues/11355)) ([f26a592](https://github.com/aws/aws-cdk/commit/f26a592e609674d528990aad14fb8884112ad64d))
* **stepfunctions-tasks:** incorrect policy for Athena prevents database deletions ([#11427](https://github.com/aws/aws-cdk/issues/11427)) ([58e6576](https://github.com/aws/aws-cdk/commit/58e6576a90f722929495b7cd9f1d67f93bf9c31e)), closes [#11357](https://github.com/aws/aws-cdk/issues/11357)

## [1.73.0](https://github.com/aws/aws-cdk/compare/v1.72.0...v1.73.0) (2020-11-11)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **apigatewayv2:** `LambdaProxyIntegration` and `HttpProxyIntegration`
classes have moved to the `@aws-cdk/aws-apigatewayv2-integration` module.
classes have moved to the `@aws-cdk/aws-apigatewayv2-integrations` module.
* **appmesh:** VirtualRouter's Listeners are no longer a struct; use the static factory methods of the `VirtualNodeListener` class to obtain instances of them
* **appmesh:** VirtualRouter accepts a list of listeners instead of a single listener
* **appmesh:** all `fromResourceName()` methods in the AppMesh module have been replaced with `fromResourceAttributes()`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<!--BEGIN STABILITY BANNER-->
---

![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge)

---
<!--END STABILITY BANNER-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,28 @@ export class AppMeshExtension extends ServiceExtension {
throw new Error('You must add a CloudMap namespace to the ECS cluster in order to use the AppMesh extension');
}

function addListener(protocol: appmesh.Protocol, port: number): appmesh.VirtualNodeListener {
switch (protocol) {
case appmesh.Protocol.HTTP :
return appmesh.VirtualNodeListener.http({ port });

case appmesh.Protocol.HTTP2 :
return appmesh.VirtualNodeListener.http2({ port });

case appmesh.Protocol.GRPC :
return appmesh.VirtualNodeListener.grpc({ port });

case appmesh.Protocol.TCP :
return appmesh.VirtualNodeListener.tcp({ port });
}
}

// Create a virtual node for the name service
this.virtualNode = new appmesh.VirtualNode(this.scope, `${this.parentService.id}-virtual-node`, {
mesh: this.mesh,
virtualNodeName: this.parentService.id,
cloudMapService: service.cloudMapService,
listener: {
portMapping: {
port: containerextension.trafficPort,
protocol: this.protocol,
},
},
listeners: [addListener(this.protocol, containerextension.trafficPort)],
});

// Create a virtual router for this service. This allows for retries
Expand Down Expand Up @@ -326,7 +337,7 @@ export class AppMeshExtension extends ServiceExtension {
// Next update the app mesh config so that the local Envoy
// proxy on this service knows how to route traffic to
// nodes from the other service.
this.virtualNode.addBackends(otherAppMesh.virtualService);
this.virtualNode.addBackend(otherAppMesh.virtualService);
}

private virtualRouterListener(port: number): appmesh.VirtualRouterListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@
"awscdkio": {
"announce": false
},
"maturity": "experimental",
"stability": "experimental"
}
"maturity": "stable",
"stability": "stable"
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/app-delivery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@types/nodeunit": "^0.0.31",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"fast-check": "^2.6.1",
"fast-check": "^2.7.0",
"nodeunit": "^0.11.3",
"pkglint": "0.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,9 @@ export enum ServiceNamespace {
* Comprehend
*/
COMPREHEND = 'comprehend',

/**
* Kafka
*/
KAFKA = 'kafka',
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-applicationautoscaling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@types/nodeunit": "^0.0.31",
"cdk-build-tools": "0.0.0",
"cfn2ts": "0.0.0",
"fast-check": "^2.6.1",
"fast-check": "^2.7.0",
"nodeunit": "^0.11.3",
"pkglint": "0.0.0"
},
Expand Down
25 changes: 11 additions & 14 deletions packages/@aws-cdk/aws-appmesh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,8 @@ const service = namespace.createService('Svc');

const node = mesh.addVirtualNode('virtual-node', {
cloudMapService: service,
listener: {
portMapping: {
port: 8081,
protocol: Protocol.HTTP,
},
listeners: [appmesh.VirtualNodeListener.httpNodeListener({
port: 8081,
healthCheck: {
healthyThreshold: 3,
interval: Duration.seconds(5), // minimum
Expand All @@ -153,9 +150,9 @@ const node = mesh.addVirtualNode('virtual-node', {
timeout: Duration.seconds(2), // minimum
unhealthyThreshold: 2,
},
},
})],
accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
})
});
```

Create a `VirtualNode` with the the constructor and add tags.
Expand All @@ -164,11 +161,8 @@ Create a `VirtualNode` with the the constructor and add tags.
const node = new VirtualNode(this, 'node', {
mesh,
cloudMapService: service,
listener: {
portMapping: {
port: 8080,
protocol: Protocol.HTTP,
},
listeners: [appmesh.VirtualNodeListener.httpNodeListener({
port: 8080,
healthCheck: {
healthyThreshold: 3,
interval: Duration.seconds(5), // min
Expand All @@ -177,15 +171,18 @@ const node = new VirtualNode(this, 'node', {
protocol: Protocol.HTTP,
timeout: Duration.seconds(2), // min
unhealthyThreshold: 2,
},
timeout: {
idle: cdk.Duration.seconds(5),
},
},
})],
accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
});

cdk.Tag.add(node, 'Environment', 'Dev');
```

The listeners property can be left blank and added later with the `node.addListeners()` method. The `healthcheck` property is optional but if specifying a listener, the `portMappings` must contain at least one property.
The `listeners` property can be left blank and added later with the `node.addListener()` method. The `healthcheck` and `timeout` properties are optional but if specifying a listener, the `port` must be added.

## Adding a Route

Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-appmesh/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from './virtual-node';
export * from './virtual-router';
export * from './virtual-router-listener';
export * from './virtual-service';
export * from './virtual-node-listener';
export * from './virtual-gateway';
export * from './virtual-gateway-listener';
export * from './gateway-route';
Expand Down
38 changes: 0 additions & 38 deletions packages/@aws-cdk/aws-appmesh/lib/shared-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,44 +68,6 @@ export interface HealthCheck {
readonly unhealthyThreshold?: number;
}

/**
* Port mappings for resources that require these attributes, such as VirtualNodes and Routes
*/
export interface PortMapping {
/**
* Port mapped to the VirtualNode / Route
*
* @default 8080
*/
readonly port: number;

/**
* Protocol for the VirtualNode / Route, only GRPC, HTTP, HTTP2, or TCP is supported
*
* @default HTTP
*/
readonly protocol: Protocol;
}

/**
* Represents the properties needed to define healthy and active listeners for nodes
*/
export interface VirtualNodeListener {
/**
* Array of PortMappingProps for the listener
*
* @default - HTTP port 8080
*/
readonly portMapping?: PortMapping;

/**
* Health checking strategy upstream nodes should use when communicating with the listener
*
* @default - no healthcheck
*/
readonly healthCheck?: HealthCheck;
}

/**
* All Properties for Envoy Access logs for mesh endpoints
*/
Expand Down
Loading