Skip to content

Commit

Permalink
Merge branch 'master' into shivlaks/sfn-merge-task-and-state-lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
shivlaks committed May 20, 2020
2 parents 28b7165 + ba97c90 commit 7183cb2
Show file tree
Hide file tree
Showing 137 changed files with 4,340 additions and 989 deletions.
5 changes: 0 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
### Commit Message
COMMIT/PR TITLE HERE (must follow conventionalcommits.org)

COMMIT MESSAGE HERE
### End Commit Message

----

Expand Down
7 changes: 7 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
image: jsii/superchain
tasks:
- init: yarn build --skip-test --no-bail

vscode:
extensions:
- dbaeumer.vscode-eslint@2.1.5:9Wg0Glx/TwD8ElFBg+FKcQ==
8 changes: 5 additions & 3 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pull_request_rules:
strict: smart
method: squash
strict_method: merge
commit_message: title+body
delete_head_branch: {}
conditions:
- base!=release
Expand All @@ -29,7 +30,7 @@ pull_request_rules:
- -approved-reviews-by~=author
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=Semantic Pull Request
#- status-success=Semantic Pull Request
- status-success=mandatory-changes
- name: automatic merge
actions:
Expand All @@ -40,6 +41,7 @@ pull_request_rules:
# Merge instead of squash
method: merge
strict_method: merge
commit_message: title+body
delete_head_branch: {}
conditions:
- -title~=(WIP|wip)
Expand All @@ -54,7 +56,7 @@ pull_request_rules:
- -approved-reviews-by~=author
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=Semantic Pull Request
#- status-success=Semantic Pull Request
- status-success=mandatory-changes
- name: remove stale reviews
actions:
Expand Down Expand Up @@ -111,5 +113,5 @@ pull_request_rules:
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- status-success~=AWS CodeBuild us-east-1
- status-success=Semantic Pull Request
#- status-success=Semantic Pull Request
- status-success=mandatory-changes
42 changes: 37 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,31 @@ and let us know if it's not up-to-date (even better, submit a PR with your corr

## Getting Started

For day-to-day development and normal contributions, the following SDKs and tools are required:
### Gitpod

For setting up a local development environment,
we recommend using [Gitpod](http://gitpod.io) -
a service that allows you to spin up an in-browser
Visual Studio Code-compatible editor,
with everything set up and ready to go for CDK development.
Just click the button below to create your private workspace:

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/aws/aws-cdk)

This will start a new Gitpod workspace,
and immediately kick off a build of the CDK code.
Once it's done (it takes around an hour, unfortunately),
you can work on any package that you want to modify,
as described in ['Quick Iteration'](#quick-iteration) below.

Gitpod is free for 50 hours per month -
make sure to stop your workspace when you're done
(you can always resume it later, and it won't need to run the build again).

### Local dependencies

If you don't want to use Gitpod,
you need to have the following SDKs and tools locally:

- [Node.js >= 10.13.0](https://nodejs.org/download/release/latest-v10.x/)
- We recommend using a version in [Active LTS](https://nodejs.org/en/about/releases/)
Expand Down Expand Up @@ -484,27 +508,35 @@ The `dist/` folder within each module contains the packaged up language artifact

### Quick Iteration

After you've built the modules you want to work on once, use `lr watch` for each module that you are modifying.
After you've built the modules you want to work on once, use `yarn watch` for each module that you are modifying.

Watch the EC2 and IAM modules in a second terminal session:

```console
$ cd packages/@aws-cdk/aws-ec2
$ lr watch & # runs in the background
$ yarn watch & # runs in the background
$ cd packages/@aws-cdk/aws-iam
$ lr watch & # runs in the background
$ yarn watch & # runs in the background
```

Code...

Now to test, you can either use `lr test` or invoke nodeunit directory (faster, since "test" will also build):
Now to test, you can either use `yarn test` or invoke nodeunit/jest directly:

Running nodeunit tests directly on a module
```console
$ cd packages/@aws-cdk/aws-iam
$ nodeunit test/test.*.js
<BOOM>
```

Running jest tests directly on a module
```console
$ cd packages/@aws-cdk/aws-iam
$ jest test/*test.js
<BOOM>
```

### Linking against this repository

The script `./link-all.sh` can be used to generate symlinks to all modules in this repository under some `node_module`
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

![Build Status](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiSy9rWmVENzRDbXBoVlhYaHBsNks4OGJDRXFtV1IySmhCVjJoaytDU2dtVWhhVys3NS9Odk5DbC9lR2JUTkRvSWlHSXZrNVhYQ3ZsaUJFY3o4OERQY1pnPSIsIml2UGFyYW1ldGVyU3BlYyI6IlB3ODEyRW9KdU0yaEp6NDkiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/awslabs/aws-cdk)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/aws/aws-cdk)
[![NPM version](https://badge.fury.io/js/aws-cdk.svg)](https://badge.fury.io/js/aws-cdk)
[![PyPI version](https://badge.fury.io/py/aws-cdk.core.svg)](https://badge.fury.io/py/aws-cdk.core)
[![NuGet version](https://badge.fury.io/nu/Amazon.CDK.svg)](https://badge.fury.io/nu/Amazon.CDK)
Expand Down
2 changes: 2 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ removed:@aws-cdk/cdk-assets-schema.Placeholders
# Needs to be removed after next release.
incompatible-argument:@aws-cdk/cloud-assembly-schema.Manifest.save
change-return-type:@aws-cdk/cloud-assembly-schema.Manifest.load
removed:@aws-cdk/core.DefaultStackSynthesizer.DEFAULT_DEPLOY_ACTION_ROLE_ARN
removed:@aws-cdk/core.DefaultStackSynthesizerProps.deployActionRoleArn
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^25.2.2",
"@types/jest": "^25.2.3",
"cdk-build-tools": "0.0.0",
"jest": "^25.5.4",
"pkglint": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"@types/nodeunit": "^0.0.31",
"@types/sinon": "^9.0.1",
"@types/sinon": "^9.0.3",
"aws-cdk": "0.0.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apigateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ running on AWS Lambda, or any web application.
- [Access Logging](#access-logging)
- [Cross Origin Resource Sharing (CORS)](#cross-origin-resource-sharing-cors)
- [Endpoint Configuration](#endpoint-configuration)
- [Private Integrations](#Private Integrations)
- [Private Integrations](#private-integrations)
- [Gateway Response](#gateway-response)
- [OpenAPI Definition](#openapi-definition)
- [APIGateway v2](#apigateway-v2)
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-apigateway/lib/base-path-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export interface BasePathMappingProps extends BasePathMappingOptions {
* This resource creates a base path that clients who call your API must use in
* the invocation URL.
*
* In most cases, you will probably want to use
* `DomainName.addBasePathMapping()` to define mappings.
* Unless you're importing a domain with `DomainName.fromDomainNameAttributes()`,
* you can use `DomainName.addBasePathMapping()` to define mappings.
*/
export class BasePathMapping extends Resource {
constructor(scope: Construct, id: string, props: BasePathMappingProps) {
Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-certificatemanager/lib/certificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { Construct, IResource, Resource, Token } from '@aws-cdk/core';
import { CfnCertificate } from './certificatemanager.generated';
import { apexDomain } from './util';

/**
* Represents a certificate in AWS Certificate Manager
*/
export interface ICertificate extends IResource {
/**
* The certificate's ARN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import * as path from 'path';
import { CertificateProps, ICertificate } from './certificate';

/**
* Properties to create a DNS validated certificate managed by AWS Certificate Manager
*
* @experimental
*/
export interface DnsValidatedCertificateProps extends CertificateProps {
Expand Down
4 changes: 1 addition & 3 deletions packages/@aws-cdk/aws-certificatemanager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@
"awslint": {
"exclude": [
"props-physical-name:@aws-cdk/aws-certificatemanager.CertificateProps",
"props-physical-name:@aws-cdk/aws-certificatemanager.DnsValidatedCertificateProps",
"docs-public-apis:@aws-cdk/aws-certificatemanager.DnsValidatedCertificateProps",
"docs-public-apis:@aws-cdk/aws-certificatemanager.ICertificate"
"props-physical-name:@aws-cdk/aws-certificatemanager.DnsValidatedCertificateProps"
]
},
"stability": "stable",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudfront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"@types/nodeunit": "^0.0.31",
"aws-sdk": "^2.678.0",
"aws-sdk": "^2.679.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/@aws-cdk/aws-cloudtrail/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ nyc.config.js
.LAST_PACKAGE
*.snk
!.eslintrc.js

!jest.config.js
2 changes: 2 additions & 0 deletions packages/@aws-cdk/aws-cloudtrail/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ dist

tsconfig.json
.eslintrc.js

jest.config.js
10 changes: 10 additions & 0 deletions packages/@aws-cdk/aws-cloudtrail/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const baseConfig = require('../../../tools/cdk-build-tools/config/jest.config');
module.exports = {
...baseConfig,
coverageThreshold: {
global: {
branches: 75,
statements: 80,
}
}
};
25 changes: 25 additions & 0 deletions packages/@aws-cdk/aws-cloudtrail/lib/cloudtrail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import * as s3 from '@aws-cdk/aws-s3';
import { Construct, Resource, Stack } from '@aws-cdk/core';
import { CfnTrail } from './cloudtrail.generated';

/**
* Properties for an AWS CloudTrail trail
*/
export interface TrailProps {
/**
* For most services, events are recorded in the region where the action occurred.
Expand Down Expand Up @@ -98,9 +101,27 @@ export interface TrailProps {
readonly bucket?: s3.IBucket
}

/**
* Types of events that CloudTrail can log
*/
export enum ReadWriteType {
/**
* Read-only events include API operations that read your resources,
* but don't make changes.
* For example, read-only events include the Amazon EC2 DescribeSecurityGroups
* and DescribeSubnets API operations.
*/
READ_ONLY = 'ReadOnly',
/**
* Write-only events include API operations that modify (or might modify)
* your resources.
* For example, the Amazon EC2 RunInstances and TerminateInstances API
* operations modify your instances.
*/
WRITE_ONLY = 'WriteOnly',
/**
* All events
*/
ALL = 'All'
}

Expand All @@ -120,11 +141,15 @@ export enum ReadWriteType {
export class Trail extends Resource {

/**
* ARN of the CloudTrail trail
* i.e. arn:aws:cloudtrail:us-east-2:123456789012:trail/myCloudTrail
* @attribute
*/
public readonly trailArn: string;

/**
* ARN of the Amazon SNS topic that's associated with the CloudTrail trail,
* i.e. arn:aws:sns:us-east-2:123456789012:mySNSTopic
* @attribute
*/
public readonly trailSnsTopicArn: string;
Expand Down
19 changes: 4 additions & 15 deletions packages/@aws-cdk/aws-cloudtrail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"compat": "cdk-compat"
},
"cdk-build": {
"cloudformation": "AWS::CloudTrail"
"cloudformation": "AWS::CloudTrail",
"jest": true
},
"keywords": [
"aws",
Expand All @@ -63,13 +64,12 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/assert": "0.0.0",
"@types/nodeunit": "^0.0.31",
"aws-sdk": "^2.678.0",
"aws-sdk": "^2.679.0",
"cdk-build-tools": "0.0.0",
"cdk-integ-tools": "0.0.0",
"cfn2ts": "0.0.0",
"colors": "^1.4.0",
"nodeunit": "^0.11.3",
"jest": "^25.5.4",
"pkglint": "0.0.0"
},
"dependencies": {
Expand Down Expand Up @@ -98,17 +98,6 @@
},
"stability": "experimental",
"maturity": "experimental",
"awslint": {
"exclude": [
"docs-public-apis:@aws-cdk/aws-cloudtrail.Trail.trailArn",
"docs-public-apis:@aws-cdk/aws-cloudtrail.Trail.trailSnsTopicArn",
"docs-public-apis:@aws-cdk/aws-cloudtrail.TrailProps",
"docs-public-apis:@aws-cdk/aws-cloudtrail.ReadWriteType",
"docs-public-apis:@aws-cdk/aws-cloudtrail.ReadWriteType.READ_ONLY",
"docs-public-apis:@aws-cdk/aws-cloudtrail.ReadWriteType.WRITE_ONLY",
"docs-public-apis:@aws-cdk/aws-cloudtrail.ReadWriteType.ALL"
]
},
"awscdkio": {
"announce": false
}
Expand Down
Loading

0 comments on commit 7183cb2

Please sign in to comment.