Skip to content

Commit

Permalink
Merge branch 'master' into msk-iam-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 23, 2021
2 parents ab6d411 + 5a9c738 commit a2f4ba1
Show file tree
Hide file tree
Showing 259 changed files with 1,424 additions and 393 deletions.
42 changes: 23 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ let us know if it's not up-to-date (even better, submit a PR with your correcti
- [Step 1: Find something to work on](#step-1-find-something-to-work-on)
- [Step 2: Design (optional)](#step-2-design-optional)
- [Step 3: Work your Magic](#step-3-work-your-magic)
- [Step 4: Commit](#step-4-commit)
- [Step 5: Pull Request](#step-5-pull-request)
- [Step 6: Merge](#step-6-merge)
- [Step 4: Pull Request](#step-5-pull-request)
- [Step 5: Merge](#step-5-merge)
- [Breaking Changes](#breaking-changes)
- [Documentation](#documentation)
- [rosetta](#rosetta)
Expand Down Expand Up @@ -279,46 +278,51 @@ $ cd packages/@aws-cdk/aws-iam
$ yarn watch & # runs in the background
```

### Step 4: Commit
### Step 4: Pull Request

Create a commit with the proposed changes:
* Create a commit with your changes and push them to a
[fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
> Note: CDK core members can push to a branch on the AWS CDK repo (naming convention: `<user>/<feature-bug-name>`).
* Commit title and message (and PR title and description) must adhere to [conventionalcommits](https://www.conventionalcommits.org).
* Create a [pull request on
Github](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).

* Pull request title and message (and PR title and description) must adhere to
[conventionalcommits](https://www.conventionalcommits.org).
* The title must begin with `feat(module): title`, `fix(module): title`, `refactor(module): title` or
`chore(module): title`.
* Title should be lowercase.
* No period at the end of the title.

* Commit message should describe _motivation_. Think about your code reviewers and what information they need in
* Pull request message should describe _motivation_. Think about your code reviewers and what information they need in
order to understand what you did. If it's a big commit (hopefully not), try to provide some good entry points so
it will be easier to follow.

* Commit message should indicate which issues are fixed: `fixes #<issue>` or `closes #<issue>`.
* Pull request message should indicate which issues are fixed: `fixes #<issue>` or `closes #<issue>`.

* Shout out to collaborators.

* If not obvious (i.e. from unit tests), describe how you verified that your change works.

* If this commit includes breaking changes, they must be listed at the end in the following format (notice how multiple breaking changes should be formatted):
* If this PR includes breaking changes, they must be listed at the end in the following format
(notice how multiple breaking changes should be formatted):

```
BREAKING CHANGE: Description of what broke and how to achieve this behavior now
* **module-name:** Another breaking change
* **module-name:** Yet another breaking change
```
```
BREAKING CHANGE: Description of what broke and how to achieve this behavior now
* **module-name:** Another breaking change
* **module-name:** Yet another breaking change
```

### Step 5: Pull Request
* Once the pull request is submitted, a reviewer will be assigned by the maintainers.

* Push to a GitHub fork.
* CDK core members can push to a branch on the AWS CDK repo (naming convention: `<user>/<feature-bug-name>`).
* Submit a Pull Request on GitHub. A reviewer will later be assigned by the maintainers.
* Discuss review comments and iterate until you get at least one "Approve". When iterating, push new commits to the
same branch. Usually all these are going to be squashed when you merge to master. The commit messages should be hints
for you when you finalize your merge commit message.

* Make sure to update the PR title/description if things change. The PR title/description are going to be used as the
commit title/message and will appear in the CHANGELOG, so maintain them all the way throughout the process.

### Step 6: Merge
### Step 5: Merge

* Make sure your PR builds successfully (we have CodeBuild setup to automatically build all PRs).
* Once approved and tested, one of our bots will squash-merge to master and will use your PR title/description as the
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/alexa-ask/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/app-delivery/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ tsconfig.json
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/assertions/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ jest.config.js
junit.xml
test/
!.jsii
!*.js
!*.js
!*.lit.ts
10 changes: 10 additions & 0 deletions packages/@aws-cdk/assertions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"devDependencies": {
"@types/jest": "^26.0.23",
"cdk-build-tools": "0.0.0",
"@aws-cdk/cfnspec": "0.0.0",
"constructs": "^3.3.69",
"jest": "^26.6.3",
"pkglint": "0.0.0",
Expand Down Expand Up @@ -102,6 +103,15 @@
"engines": {
"node": ">= 10.13.0 <13 || >=13.7.0"
},
"nozem": {
"ostools": ["dirname", "cd", "bash", "rm", "xargs", "sed", "mkdir", "rsync", "cat", "find"],
"additionalDirs": [
"../cfnspec/lib",
"ARTIFACTS:../cfnspec/spec",
"../cloudformation-diff",
"../assert-internal"
]
},
"stability": "experimental",
"maturity": "experimental",
"publishConfig": {
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/assets/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ tsconfig.json
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-accessanalyzer/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-acmpca/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-amazonmq/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-amplify/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
8 changes: 6 additions & 2 deletions packages/@aws-cdk/aws-amplify/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ export class App extends Resource implements IApp, iam.IGrantable {
accessToken: sourceCodeProviderOptions?.accessToken?.toString(),
autoBranchCreationConfig: props.autoBranchCreation && {
autoBranchCreationPatterns: props.autoBranchCreation.patterns,
basicAuthConfig: props.autoBranchCreation.basicAuth && props.autoBranchCreation.basicAuth.bind(this, 'BranchBasicAuth'),
basicAuthConfig: props.autoBranchCreation.basicAuth
? props.autoBranchCreation.basicAuth.bind(this, 'BranchBasicAuth')
: { enableBasicAuth: false },
buildSpec: props.autoBranchCreation.buildSpec && props.autoBranchCreation.buildSpec.toBuildSpec(),
enableAutoBranchCreation: true,
enableAutoBuild: props.autoBranchCreation.autoBuild ?? true,
Expand All @@ -225,7 +227,9 @@ export class App extends Resource implements IApp, iam.IGrantable {
stage: props.autoBranchCreation.stage,
},
enableBranchAutoDeletion: props.autoBranchDeletion,
basicAuthConfig: props.basicAuth && props.basicAuth.bind(this, 'AppBasicAuth'),
basicAuthConfig: props.basicAuth
? props.basicAuth.bind(this, 'AppBasicAuth')
: { enableBasicAuth: false },
buildSpec: props.buildSpec && props.buildSpec.toBuildSpec(),
customRules: Lazy.any({ produce: () => this.customRules }, { omitEmptyArray: true }),
description: props.description,
Expand Down
6 changes: 6 additions & 0 deletions packages/@aws-cdk/aws-amplify/test/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ test('create an app connected to a GitHub repository', () => {
},
OauthToken: 'secret',
Repository: 'https://github.com/aws/aws-cdk',
BasicAuthConfig: {
EnableBasicAuth: false,
},
});

expect(stack).toHaveResource('AWS::IAM::Role', {
Expand Down Expand Up @@ -355,6 +358,9 @@ test('with auto branch creation', () => {
// THEN
expect(stack).toHaveResource('AWS::Amplify::App', {
AutoBranchCreationConfig: {
BasicAuthConfig: {
EnableBasicAuth: false,
},
EnableAutoBranchCreation: true,
EnableAutoBuild: true,
EnablePullRequestPreview: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
"Type": "AWS::Amplify::App",
"Properties": {
"Name": "App",
"BasicAuthConfig": {
"EnableBasicAuth": false
},
"IAMServiceRole": {
"Fn::GetAtt": [
"AppRole1AF9B530",
Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-amplify/test/integ.app.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"Properties": {
"Name": "App",
"AutoBranchCreationConfig": {
"BasicAuthConfig": {
"EnableBasicAuth": false
},
"EnableAutoBranchCreation": true,
"EnableAutoBuild": true,
"EnablePullRequestPreview": true
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-apigateway/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-apigatewayv2-authorizers/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-apigatewayv2-integrations/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-apigatewayv2/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-appconfig/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-appflow/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jest.config.js
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
2 changes: 2 additions & 0 deletions packages/@aws-cdk/aws-appintegrations/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ jest.config.js
**/cdk.out
junit.xml
test/

!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-applicationautoscaling/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ tsconfig.json
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-applicationinsights/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ jest.config.js
**/cdk.out
junit.xml

test/
test/
!*.lit.ts
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-appmesh/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ tsconfig.json
# exclude cdk artifacts
**/cdk.out
junit.xml
test/
test/
!*.lit.ts
25 changes: 15 additions & 10 deletions packages/@aws-cdk/aws-appmesh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,29 @@ const router = mesh.addVirtualRouter('router', {
});
```

The router can also be created using the constructor and passing in the mesh instead of calling the `addVirtualRouter()` method for the mesh.
The same pattern applies to all constructs within the appmesh library, for any mesh.addXZY method, a new constuctor can also be used.
This is particularly useful for cross stack resources are required.
Where creating the `mesh` as part of an infrastructure stack and creating the `resources` such as `nodes` is more useful to keep in the application stack.
Note that creating the router using the `addVirtualRouter()` method places it in the same Stack that the mesh belongs to
(which might be different from the current Stack).
The router can also be created using the constructor of `VirtualRouter` and passing in the mesh instead of calling the `addVirtualRouter()` method.
This is particularly useful when splitting your resources between many Stacks,
like creating the `mesh` as part of an infrastructure stack,
but the other resources, such as routers, in the application stack:

```ts
const mesh = new Mesh(stack, 'AppMesh', {
const mesh = new Mesh(infraStack, 'AppMesh', {
meshName: 'myAwsmMesh',
egressFilter: MeshFilterType.Allow_All,
egressFilter: MeshFilterType.ALLOW_ALL,
});

const router = new VirtualRouter(stack, 'router', {
mesh, // notice that mesh is a required property when creating a router with a new statement
listeners: [ appmesh.VirtualRouterListener.http(8081) ]
}
// the VirtualRouter will belong to 'appStack',
// even though the Mesh belongs to 'infraStack'
const router = new VirtualRouter(appStack, 'router', {
mesh: mesh, // notice that mesh is a required property when creating a router with the 'new' statement
listeners: [appmesh.VirtualRouterListener.http(8081)],
});
```

The same is true for other `add*()` methods in the AppMesh library.

The _VirtualRouterListener_ class provides an easy interface for defining new protocol specific listeners.
The `http()`, `http2()`, `grpc()` and `tcp()` methods are available for use.
They accept a single port parameter, that is used to define what port to match requests on.
Expand Down
Loading

0 comments on commit a2f4ba1

Please sign in to comment.