Skip to content

Commit

Permalink
Merge branch 'master' into geduld/codepipeline-template-string
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Oct 5, 2020
2 parents 2273f89 + 3cbb863 commit 872c5ba
Show file tree
Hide file tree
Showing 138 changed files with 893 additions and 142 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ falling prey to the [X/Y problem][2]!


### Other information
<!-- e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc -->
<!-- e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc -->
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ What is the unexpected behavior you were seeing? If you got an error, paste it h

### Other

<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc -->
<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc -->



Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ labels: feature-request, needs-triage

<!--
e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix,
links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc
links for us to have context, eg. associated pull-request, stackoverflow, slack, etc
-->


Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/general-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ falling prey to the [X/Y problem][2]!


### Other information
<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc -->
<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc -->
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# AWS Cloud Development Kit (AWS CDK)

![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)
Expand Down Expand Up @@ -130,11 +129,9 @@ If you have a support plan with AWS Support, you can also create a new [support

You may also find help on these community resources:
* Look through the [API Reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-construct-library.html) or [Developer Guide](https://docs.aws.amazon.com/cdk/latest/guide)
* The #aws-cdk Slack channel in [cdk.dev](https://cdk.dev)
* Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/aws-cdk)
and tag it with `aws-cdk`
* Come join the AWS CDK community on [Gitter](https://gitter.im/awslabs/aws-cdk)
* Talk in the CDK channel of the [AWS Developers Slack workspace](https://awsdevelopers.slack.com) (invite required)
* A community-driven Slack channel is also available, invite at [cdk.dev](https://cdk.dev)

### Roadmap

Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/app-delivery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"pkglint": "pkglint -f",
"test": "cdk-test",
"watch": "cdk-watch",
"lint": "cdk-lint",
"integ": "cdk-integ",
"awslint": "cdk-awslint",
"build+test+package": "npm run build+test && npm run package",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as iam from '@aws-cdk/aws-iam';
import * as s3 from '@aws-cdk/aws-s3';
import * as cxschema from '@aws-cdk/cloud-assembly-schema';
import * as cdk from '@aws-cdk/core';
import * as constructs from 'constructs';
import * as fc from 'fast-check';
import * as nodeunit from 'nodeunit';
import { PipelineDeployStackAction } from '../lib/pipeline-deploy-stack-action';
Expand Down Expand Up @@ -459,7 +460,7 @@ class FakeAction implements codepipeline.IAction {
this.outputArtifact = new codepipeline.Artifact('OutputArtifact');
}

public bind(_scope: cdk.Construct, _stage: codepipeline.IStage, _options: codepipeline.ActionBindOptions):
public bind(_scope: constructs.Construct, _stage: codepipeline.IStage, _options: codepipeline.ActionBindOptions):
codepipeline.ActionConfig {
return {};
}
Expand Down
5 changes: 3 additions & 2 deletions packages/@aws-cdk/assert/test/assertions.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as cdk from '@aws-cdk/core';
import * as cx from '@aws-cdk/cx-api';
import * as constructs from 'constructs';

import { countResources, countResourcesLike, exist, expect as cdkExpect, haveType, MatchStyle, matchTemplate } from '../lib/index';

Expand Down Expand Up @@ -332,7 +333,7 @@ interface TestResourceProps extends cdk.CfnResourceProps {
}

class TestResource extends cdk.CfnResource {
constructor(scope: cdk.Construct, id: string, props: TestResourceProps) {
constructor(scope: constructs.Construct, id: string, props: TestResourceProps) {
super(scope, id, props);
}
}
Expand All @@ -342,7 +343,7 @@ interface TestParameterProps extends cdk.CfnParameterProps {
}

class TestParameter extends cdk.CfnParameter {
constructor(scope: cdk.Construct, id: string, props: TestParameterProps) {
constructor(scope: constructs.Construct, id: string, props: TestParameterProps) {
super(scope, id, props);
}
}
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-amplify/test/integ.app-codecommit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as codecommit from '@aws-cdk/aws-codecommit';
import { App, Construct, Stack, StackProps } from '@aws-cdk/core';
import { App, Stack, StackProps } from '@aws-cdk/core';
import { Construct } from 'constructs';
import * as amplify from '../lib';

class TestStack extends Stack {
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-amplify/test/integ.app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { App, Construct, Stack, StackProps } from '@aws-cdk/core';
import { App, Stack, StackProps } from '@aws-cdk/core';
import { Construct } from 'constructs';
import * as amplify from '../lib';

class TestStack extends Stack {
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-apigateway/test/integ.cors.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/// !cdk-integ pragma:ignore-assets
import * as path from 'path';
import * as lambda from '@aws-cdk/aws-lambda';
import { App, Construct, Stack, StackProps } from '@aws-cdk/core';
import { App, Stack, StackProps } from '@aws-cdk/core';
import { Construct } from 'constructs';
import * as apigw from '../lib';

class TestStack extends Stack {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Code, Function, Runtime } from '@aws-cdk/aws-lambda';
import { App, Construct, Stack } from '@aws-cdk/core';
import { App, Stack } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { Deployment, LambdaRestApi, Stage } from '../lib';

class LateBoundDeploymentStageStack extends Stack {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { App, CfnOutput, Construct, NestedStack, NestedStackProps, Stack } from '@aws-cdk/core';
import { App, CfnOutput, NestedStack, NestedStackProps, Stack } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { Deployment, Method, MockIntegration, PassthroughBehavior, RestApi, Stage } from '../lib';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import * as lambda from '@aws-cdk/aws-lambda';
import * as cdk from '@aws-cdk/core';
import * as constructs from 'constructs';
import * as apig from '../lib';

class FirstStack extends cdk.Stack {
public readonly firstLambda: lambda.Function;

constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
constructor(scope: constructs.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);

this.firstLambda = new lambda.Function(this, 'firstLambda', {
Expand All @@ -29,7 +30,7 @@ interface SecondStackProps extends cdk.StackProps {
}

class SecondStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props: SecondStackProps) {
constructor(scope: constructs.Construct, id: string, props: SecondStackProps) {
super(scope, id, props);

const api = new apig.RestApi(this, 'BooksApi', {
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-applicationautoscaling/test/util.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as scalingcommon from '@aws-cdk/aws-autoscaling-common';
import * as cdk from '@aws-cdk/core';
import * as constructs from 'constructs';
import * as fc from 'fast-check';
import * as appscaling from '../lib';

export function createScalableTarget(scope: cdk.Construct) {
export function createScalableTarget(scope: constructs.Construct) {
return new appscaling.ScalableTarget(scope, 'Target', {
serviceNamespace: appscaling.ServiceNamespace.DYNAMODB,
scalableDimension: 'test:TestCount',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '@aws-cdk/assert/jest';
import * as cdk from '@aws-cdk/core';
import * as cognito from '@aws-cdk/aws-cognito';
import * as cdk from '@aws-cdk/core';
import * as appsync from '../lib';
import * as t from './scalar-type-defintions';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { expect, haveResource, ResourcePart } from '@aws-cdk/assert';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as iam from '@aws-cdk/aws-iam';
import * as cdk from '@aws-cdk/core';
import * as constructs from 'constructs';
import { nodeunitShim, Test } from 'nodeunit-shim';
import * as autoscaling from '../lib';

Expand Down Expand Up @@ -71,7 +72,7 @@ nodeunitShim({
});

class FakeNotificationTarget implements autoscaling.ILifecycleHookTarget {
public bind(_scope: cdk.Construct, lifecycleHook: autoscaling.ILifecycleHook): autoscaling.LifecycleHookTargetConfig {
public bind(_scope: constructs.Construct, lifecycleHook: autoscaling.ILifecycleHook): autoscaling.LifecycleHookTargetConfig {
lifecycleHook.role.addToPolicy(new iam.PolicyStatement({
actions: ['action:Work'],
resources: ['*'],
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2';
import * as cdk from '@aws-cdk/core';
import * as constructs from 'constructs';
import { nodeunitShim, Test } from 'nodeunit-shim';
import * as autoscaling from '../lib';

Expand Down Expand Up @@ -228,7 +229,7 @@ class ASGFixture extends cdk.Construct {
public readonly vpc: ec2.Vpc;
public readonly asg: autoscaling.AutoScalingGroup;

constructor(scope: cdk.Construct, id: string) {
constructor(scope: constructs.Construct, id: string) {
super(scope, id);

this.vpc = new ec2.Vpc(this, 'VPC');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { expect, haveResource, MatchStyle } from '@aws-cdk/assert';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as cdk from '@aws-cdk/core';
import * as constructs from 'constructs';
import { nodeunitShim, Test } from 'nodeunit-shim';
import * as autoscaling from '../lib';

Expand Down Expand Up @@ -107,7 +108,7 @@ nodeunitShim({
},
});

function makeAutoScalingGroup(scope: cdk.Construct) {
function makeAutoScalingGroup(scope: constructs.Construct) {
const vpc = new ec2.Vpc(scope, 'VPC');
return new autoscaling.AutoScalingGroup(scope, 'ASG', {
vpc,
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-backup/test/integ.backup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as dynamodb from '@aws-cdk/aws-dynamodb';
import * as efs from '@aws-cdk/aws-efs';
import { App, Construct, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core';
import { App, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core';
import { Construct } from 'constructs';
import * as backup from '../lib';

class TestStack extends Stack {
Expand Down
11 changes: 8 additions & 3 deletions packages/@aws-cdk/aws-backup/test/selection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ import '@aws-cdk/assert/jest';
import * as dynamodb from '@aws-cdk/aws-dynamodb';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as efs from '@aws-cdk/aws-efs';
import { Construct, Stack } from '@aws-cdk/core';
import { Stack } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { BackupPlan, BackupResource, BackupSelection } from '../lib';

// v2 - keep this import as a separate section to reduce merge conflict when forward merging with the v2 branch.
// eslint-disable-next-line
import { Construct as CoreConstruct } from '@aws-cdk/core';

let stack: Stack;
let plan: BackupPlan;
beforeEach(() => {
Expand Down Expand Up @@ -120,13 +125,13 @@ test('allow restores', () => {

test('fromConstruct', () => {
// GIVEN
class EfsConstruct extends Construct {
class EfsConstruct extends CoreConstruct {
constructor(scope: Construct, id: string) {
super(scope, id);
new efs.CfnFileSystem(this, 'FileSystem');
}
}
class MyConstruct extends Construct {
class MyConstruct extends CoreConstruct {
constructor(scope: Construct, id: string) {
super(scope, id);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as route53 from '@aws-cdk/aws-route53';
import { App, Construct, Stack } from '@aws-cdk/core';
import { App, Stack } from '@aws-cdk/core';
import { Construct } from 'constructs';
import * as certmgr from '../lib';

class CertStack extends Stack {
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-cloud9/test/integ.cloud9.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as codecommit from '@aws-cdk/aws-codecommit';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as cdk from '@aws-cdk/core';
import * as constructs from 'constructs';
import * as cloud9 from '../lib';

export class Cloud9Env extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
constructor(scope: constructs.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);

const vpc = new ec2.Vpc(this, 'VPC', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/
import { App, CfnOutput, Construct, CustomResource, CustomResourceProvider, CustomResourceProviderRuntime, Stack, Token } from '@aws-cdk/core';

/* eslint-disable cdk/no-core-construct */

class TestStack extends Stack {
constructor(scope: Construct, id: string) {
super(scope, id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as sqs from '@aws-cdk/aws-sqs';
import { App, CfnParameter, Construct, Stack } from '@aws-cdk/core';
import * as cfn from '../lib';

/* eslint-disable cdk/no-core-construct */

interface MyNestedStackProps {
readonly subscriber?: sqs.Queue;
readonly siblingTopic?: sns.Topic; // a topic defined in a sibling nested stack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import * as lambda from '@aws-cdk/aws-lambda';
import { App, Construct, Stack } from '@aws-cdk/core';
import * as cfn from '../lib';

/* eslint-disable cdk/no-core-construct */

class NestedStack extends cfn.NestedStack {
constructor(scope: Construct, id: string) {
super(scope, id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import * as sns from '@aws-cdk/aws-sns';
import { App, Construct, Stack } from '@aws-cdk/core';
import * as cfn from '../lib';

/* eslint-disable cdk/no-core-construct */

class YourNestedStack extends cfn.NestedStack {
constructor(scope: Construct, id: string) {
super(scope, id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

// nested stack references a resource from a non-nested non-parent stack

/* eslint-disable cdk/no-core-construct */

import * as sns from '@aws-cdk/aws-sns';
import { App, Construct, Stack } from '@aws-cdk/core';
import * as cfn from '../lib';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as cfn from '../lib';

// non-nested non-parent stack consumes a resource from a nested stack

/* eslint-disable cdk/no-core-construct */

class ProducerNestedStack extends cfn.NestedStack {
public readonly topic: sns.Topic;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as cfn from '../lib';

// references between siblings

/* eslint-disable cdk/no-core-construct */

class ProducerNestedStack extends cfn.NestedStack {
public readonly topic: sns.Topic;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as lambda from '@aws-cdk/aws-lambda';
import * as cdk from '@aws-cdk/core';
import { CustomResource, CustomResourceProvider } from '../lib';

/* eslint-disable cdk/no-core-construct */

interface DemoResourceProps {
/**
* Message to echo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { App, CfnParameter, CfnResource, Construct, ContextProvider, Stack } fro
import { Test } from 'nodeunit';
import { NestedStack } from '../lib/nested-stack';

/* eslint-disable cdk/no-core-construct */
/* eslint-disable max-len */

export = {
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-cloudformation/test/test.resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as cdk from '@aws-cdk/core';
import { Test, testCase } from 'nodeunit';
import { CustomResource, CustomResourceProvider } from '../lib';

/* eslint-disable cdk/no-core-construct */
/* eslint-disable quote-props */

export = testCase({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as certificatemanager from '@aws-cdk/aws-certificatemanager';
import * as s3 from '@aws-cdk/aws-s3';
import { App, Construct, Stack } from '@aws-cdk/core';
import { App, Stack } from '@aws-cdk/core';
import { Construct } from 'constructs';
import * as cloudfront from '../lib';

class AcmCertificateAliasStack extends Stack {
Expand Down
Loading

0 comments on commit 872c5ba

Please sign in to comment.