Skip to content

Commit

Permalink
Merge branch 'main' into neptune-engine-version
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 8, 2022
2 parents 0c0ee6e + 46cf825 commit 2ed8ece
Show file tree
Hide file tree
Showing 22 changed files with 1,150 additions and 12 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

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.

## [2.41.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.40.0-alpha.0...v2.41.0-alpha.0) (2022-09-07)


### Features

* **batch:** add propagate tags prop in job definition ([#21904](https://github.com/aws/aws-cdk/issues/21904)) ([1bc4526](https://github.com/aws/aws-cdk/commit/1bc4526261c2fbdd6ce6c371ba1d9da2f79e07bd)), closes [#21740](https://github.com/aws/aws-cdk/issues/21740)


### Bug Fixes

* **lambda-python:** bundling with poetry is broken ([#21945](https://github.com/aws/aws-cdk/issues/21945)) ([4b37157](https://github.com/aws/aws-cdk/commit/4b37157b47ab38124b62649649d0df9b701cb7fe)), closes [#21867](https://github.com/aws/aws-cdk/issues/21867)
* **lambda-python:** poetry bundling fails on python3.7 ([#21950](https://github.com/aws/aws-cdk/issues/21950)) ([809e1b0](https://github.com/aws/aws-cdk/commit/809e1b0d5dc29be02f95ea4361b6f87f94325f3d))

## [2.40.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.39.1-alpha.0...v2.40.0-alpha.0) (2022-08-31)


Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

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.

## [2.41.0](https://github.com/aws/aws-cdk/compare/v2.40.0...v2.41.0) (2022-09-07)


### Features

* **assertions:** add function for verifying the number of matching resource properties ([#21707](https://github.com/aws/aws-cdk/issues/21707)) ([80cb527](https://github.com/aws/aws-cdk/commit/80cb527c01173a060064606b8fe286d5510f145e))
* **custom-resource:** allow AwsCustomResource to be placed in vpc ([#21357](https://github.com/aws/aws-cdk/issues/21357)) ([62d7bf8](https://github.com/aws/aws-cdk/commit/62d7bf83b4bfe6358e86ecf1c332e51a3909bd8a))
* **ec2:** allow private non-nat subnets ([#21699](https://github.com/aws/aws-cdk/issues/21699)) ([e1794e3](https://github.com/aws/aws-cdk/commit/e1794e346c2a04bf8f2e5f63138095a79f512cfe))
* **ecs:** add `maxSwap` and `swappiness` properties to LinuxParameters ([#18703](https://github.com/aws/aws-cdk/issues/18703)) ([08eb1d6](https://github.com/aws/aws-cdk/commit/08eb1d66ae9caa6589c3ee66c4040a4e116adf52)), closes [#18460](https://github.com/aws/aws-cdk/issues/18460)
* **lambda-event-sources:** add kafka consumerGroupId support ([#21791](https://github.com/aws/aws-cdk/issues/21791)) ([b36bc11](https://github.com/aws/aws-cdk/commit/b36bc1146d06c7b9decface9f4ed9edeca61aa56))
* compress aws-cdk-lib tablet file ([#21854](https://github.com/aws/aws-cdk/issues/21854)) ([5a3db2d](https://github.com/aws/aws-cdk/commit/5a3db2d19dc5525bfef568f17fffa09657b6ef21))
* **ecs:** add function for adding secrets to containers after instantiating them ([#21826](https://github.com/aws/aws-cdk/issues/21826)) ([572f781](https://github.com/aws/aws-cdk/commit/572f7815cc5447aac9413b374ebbfd92bfa610a6)), closes [#18959](https://github.com/aws/aws-cdk/issues/18959)


### Bug Fixes

* **aws-cdk:** cdk bootstrap print JSON template when using --json option ([#21852](https://github.com/aws/aws-cdk/issues/21852)) ([7bc3d18](https://github.com/aws/aws-cdk/commit/7bc3d18ff742140a35238af0241b5dc4c2cf73ee)), closes [#21456](https://github.com/aws/aws-cdk/issues/21456) [#21456](https://github.com/aws/aws-cdk/issues/21456)
* **core:** `--debug` doesn't record stack traces ([#21931](https://github.com/aws/aws-cdk/issues/21931)) ([9f2ea45](https://github.com/aws/aws-cdk/commit/9f2ea458609b29a91eb792165be6de596ce1aea9))
* **events:** additional plaintext header are not set on eventbridge connection ([#21857](https://github.com/aws/aws-cdk/issues/21857)) ([f3f4814](https://github.com/aws/aws-cdk/commit/f3f4814b66ef2b0070fb6b25af9f6566bc1783a0))
* **events-targets:** cannot set retry policy to 0 retry attempts ([#21900](https://github.com/aws/aws-cdk/issues/21900)) ([5549f16](https://github.com/aws/aws-cdk/commit/5549f1692270bce06a1d9cde952f9cd23a04204b)), closes [40aws-cdk/aws-events-targets/lib/util.ts#L54-L59](https://github.com/40aws-cdk/aws-events-targets/lib/util.ts/issues/L54-L59) [#21864](https://github.com/aws/aws-cdk/issues/21864)
* **stepfunctions:** cfnSpec breaks definitionSubstitutions prop ([#21887](https://github.com/aws/aws-cdk/issues/21887)) ([3adf841](https://github.com/aws/aws-cdk/commit/3adf84188947eb2fde6171f70d0d9c2dcdb78563)), closes [#21653](https://github.com/aws/aws-cdk/issues/21653)

## [2.40.0](https://github.com/aws/aws-cdk/compare/v2.39.1...v2.40.0) (2022-08-31)


Expand Down
17 changes: 14 additions & 3 deletions packages/@aws-cdk/aws-ec2/lib/vpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,13 @@ export interface VpcAttributes {
* VPN gateway's identifier
*/
readonly vpnGatewayId?: string;

/**
* The region the VPC is in
*
* @default - The region of the stack where the VPC belongs to
*/
readonly region?: string;
}

export interface SubnetAttributes {
Expand Down Expand Up @@ -1203,7 +1210,7 @@ export class Vpc extends VpcBase {
dummyValue: undefined,
}).value;

return new LookedUpVpc(scope, id, attributes || DUMMY_VPC_PROPS, attributes === undefined);
return new LookedUpVpc(scope, id, attributes ?? DUMMY_VPC_PROPS, attributes === undefined);

/**
* Prefixes all keys in the argument with `tag:`.`
Expand Down Expand Up @@ -2008,7 +2015,9 @@ class ImportedVpc extends VpcBase {
private readonly cidr?: string | undefined;

constructor(scope: Construct, id: string, props: VpcAttributes, isIncomplete: boolean) {
super(scope, id);
super(scope, id, {
region: props.region,
});

this.vpcId = props.vpcId;
this.vpcArn = Arn.format({
Expand Down Expand Up @@ -2058,7 +2067,9 @@ class LookedUpVpc extends VpcBase {
private readonly cidr?: string | undefined;

constructor(scope: Construct, id: string, props: cxapi.VpcContextResponse, isIncomplete: boolean) {
super(scope, id);
super(scope, id, {
region: props.region,
});

this.vpcId = props.vpcId;
this.vpcArn = Arn.format({
Expand Down
48 changes: 48 additions & 0 deletions packages/@aws-cdk/aws-ec2/test/integ.vpc-lookup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import * as cdk from '@aws-cdk/core';
import { IntegTest } from '@aws-cdk/integ-tests';
import * as ec2 from '../lib';

const appWithVpc = new cdk.App();
const stack = new cdk.Stack(appWithVpc, 'StackWithVpc', {
env: {
region: 'eu-west-1',
account: '123456',
},
});

const testVpc = new ec2.Vpc(stack, 'MyVpc', {
vpcName: 'my-vpc-name',
});

const appUnderTest = new cdk.App();
const stackLookup = new cdk.Stack(appUnderTest, 'StackUnderTest', {
env: {
region: 'us-east-2',
account: '123456',
},
});

const vpcFromVpcAttributes = ec2.Vpc.fromVpcAttributes(stackLookup, 'VpcFromVpcAttributes', {
region: 'eu-west-1',
availabilityZones: ['eu-west-1a'],
vpcId: testVpc.vpcId,
});

const vpcFromLookup = ec2.Vpc.fromLookup(stack, 'VpcFromLookup', {
region: 'eu-west-1',
vpcName: 'my-vpc-name',
});

new cdk.CfnOutput(stackLookup, 'OutputFromVpcAttributes', {
value: `Region fromVpcAttributes: ${vpcFromVpcAttributes.env.region}`,
});

new cdk.CfnOutput(stackLookup, 'OutputFromLookup', {
value: `Region fromLookup: ${vpcFromLookup.env.region}`,
});

new IntegTest(appUnderTest, 'ArchiveTest', {
testCases: [stackLookup],
});
appWithVpc.synth();
appUnderTest.synth();
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "21.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
"path": "ArchiveTestDefaultTestDeployAssert3405726A.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "21.0.0",
"files": {
"cfac1423efb7c99cadc3f40367c753fe5b1527d9a6950c096ba326fabac4c89f": {
"source": {
"path": "StackUnderTest.template.json",
"packaging": "file"
},
"destinations": {
"123456-us-east-2": {
"bucketName": "cdk-hnb659fds-assets-123456-us-east-2",
"objectKey": "cfac1423efb7c99cadc3f40367c753fe5b1527d9a6950c096ba326fabac4c89f.json",
"region": "us-east-2",
"assumeRoleArn": "arn:${AWS::Partition}:iam::123456:role/cdk-hnb659fds-file-publishing-role-123456-us-east-2"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"Outputs": {
"OutputFromVpcAttributes": {
"Value": "Region fromVpcAttributes: eu-west-1"
},
"OutputFromLookup": {
"Value": "Region fromLookup: eu-west-1"
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "21.0.0",
"files": {
"628a32283150d3af24efb3a11967996306884a3835ac731ab35822da2ce7e9ff": {
"source": {
"path": "StackWithVpc.template.json",
"packaging": "file"
},
"destinations": {
"123456-eu-west-1": {
"bucketName": "cdk-hnb659fds-assets-123456-eu-west-1",
"objectKey": "628a32283150d3af24efb3a11967996306884a3835ac731ab35822da2ce7e9ff.json",
"region": "eu-west-1",
"assumeRoleArn": "arn:${AWS::Partition}:iam::123456:role/cdk-hnb659fds-file-publishing-role-123456-eu-west-1"
}
}
}
},
"dockerImages": {}
}
Loading

0 comments on commit 2ed8ece

Please sign in to comment.