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): 2.161.0 #31647

Merged
merged 46 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
218331b
fix: update L1 CloudFormation resource definitions by removing outdat…
mrgrain Sep 24, 2024
a22e8cc
feat(ecs): support restart policy for container (#31228)
go-to-k Sep 24, 2024
c4bda64
chore(kinesisfirehose-destinations): refactor logging to combine logG…
paulhcsun Sep 25, 2024
4af74fe
Merge branch 'main' into merge-back/2.160.0
iliapolo Sep 25, 2024
c9709d4
chore(merge-back): 2.160.0 (#31553)
mergify[bot] Sep 25, 2024
a2d42d2
fix(lambda): configuring log retention fails on 70+ Lambdas (#31340)
rix0rrr Sep 25, 2024
abd1768
fix(stack): check stack tags for deploy-time values (#31457)
rix0rrr Sep 25, 2024
16b74f3
fix(pipelines): "Node with duplicate id" on duplicate stack names (#3…
rix0rrr Sep 25, 2024
73fed1e
chore: extend timeout for hotswap test (#31559)
iliapolo Sep 25, 2024
2813eb2
feat(logs): add metric methods for log group IncomingLogEvents and In…
michelle-wangg Sep 25, 2024
bcf9209
fix(cdk): `cdk diff --quiet` to print stack name when there is diffs …
sakurai-ryo Sep 25, 2024
4b00ffe
fix(cli): deployment errors are printed 3 times (#31389)
rix0rrr Sep 26, 2024
4ddc702
feat(bedrock): support meta llama3-2 (#31568)
go-to-k Sep 26, 2024
a633ee6
chore(cognito-identitypool): refactor and remove Digits authenticatio…
Leo10Gama Sep 26, 2024
48c4192
feat(rds): support for local write forwarding in an Aurora Mysql clus…
badmintoncryer Sep 26, 2024
00c2efb
feat(pipes-sources): add Kinesis and DynamoDB (#29476)
msambol Sep 26, 2024
a1c46cf
feat(redshift): supports excludeCharacters settings for DatabaseSecre…
mazyu36 Sep 26, 2024
511b630
chore(bedrock): support Jamba 1.5 Large and Mini (#31537)
mazyu36 Sep 26, 2024
52f676c
fix(rds): fixed the IAM policy that grantConnect() generates for Data…
moelasmar Sep 26, 2024
c7cee15
fix(appsync): lambda authorizer permission is not scoped to appsync a…
paulhcsun Sep 27, 2024
8318e79
chore(ecs): add integ test for ECS with Windows use case (#31545)
samson-keung Sep 27, 2024
54c01cb
feat(s3-deployment): added property outputObjectKeys for BucketDeploy…
moelasmar Sep 27, 2024
bdf1eef
chore(logs): fix for yarn build warning from log-group doc string (#3…
michelle-wangg Sep 27, 2024
5e08c98
feat(pipes-targets): add API destination (#30756)
msambol Sep 27, 2024
b0e4a54
feat(cli): notices on bootstrap version (#31555)
iliapolo Sep 30, 2024
4128bf1
fix(core): apps that use token-aware-stringify are construct-instanti…
comcalvi Oct 1, 2024
5c34e1f
chore: update Contributors File (#31601)
aws-cdk-automation Oct 1, 2024
6d41250
chore: improve integration test for notices (#31606)
iliapolo Oct 1, 2024
00cdbcb
fix(custom-resource-handlers): better fallback for require failures (…
glitchassassin Oct 1, 2024
b20fd8e
chore: document new `--unstable` protocol for CLI features (#31612)
kaizencc Oct 1, 2024
7e80cc9
fix(batch): remove default optimal for arm based instance types and a…
1kaileychen Oct 1, 2024
0755561
feat(cli): `cdk rollback` (#31407)
rix0rrr Oct 2, 2024
be70c82
fix(core): `isTaggable` function can return undefined instead of fals…
sumupitchayan Oct 2, 2024
ba5a53d
chore(ec2): support G6e instance type (#31134)
mazyu36 Oct 2, 2024
0c753c3
chore: fix failing notices integ test (#31625)
iliapolo Oct 2, 2024
be1207b
fix(core): file asset publishing role not used in `cdk diff` to uploa…
sumupitchayan Oct 3, 2024
7a4f865
chore(ec2): add SageMaker Interface VPC Endpoint (#31538)
KawaiHaruki Oct 3, 2024
b9e7855
chore(lambda): resolve unable to reference AuthType from FunctionUrl …
watany-dev Oct 3, 2024
0e03d39
chore(rds): supports Aurora PostgreSQL 16.4, 15.8, 14.13, 13.16, and …
mazyu36 Oct 3, 2024
9410361
fix(core): throw on intrinsics in CFN update and create policies (#31…
comcalvi Oct 3, 2024
182804a
feat(ec2): add interface endpoint dynamodb (#30162)
mazyu36 Oct 3, 2024
79d9c4d
feat: update L1 CloudFormation resource definitions (#31640)
aws-cdk-automation Oct 3, 2024
8fc6ec9
chore(deps): bump urllib3 from 1.26.18 to 1.26.19 in /packages/@aws-c…
dependabot[bot] Oct 3, 2024
d0c99d8
feat(pipes-targets): add Kinesis (#30656)
msambol Oct 3, 2024
19ee46d
fix(lambda-nodejs): remove smithy models from bundling for AWS SDK v3…
GavinZZ Oct 3, 2024
4e27cc3
chore(release): 2.161.0
Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Currently, this repository has LF dependencies in building and testing, with json, sh, and no extensions.
# Until this is fixed, it is best to just set the whole repository to be LF.
* eol=lf

*.gif binary
*.zip binary
*.png binary
*.jpg binary
*.tgz binary
*.tar.gz binary

# Hide snapshots from GitHub UI, except for the actual templates
**/*.snapshot/** linguist-generated
**/*.snapshot/**/*.template.json -linguist-generated
**/*.snapshot/**/*DeployAssert*.template.json linguist-generated
packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-big-response.js.snapshot/asset.3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip filter=lfs diff=lfs merge=lfs -text
59 changes: 59 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,65 @@

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.161.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.160.0-alpha.0...v2.161.0-alpha.0) (2024-10-03)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **kinesisfirehose-destinations:** the `logging` and `logGroup` properties in `DestinationLoggingProps` have been removed and replaced with a single optional property `loggingConfig` which accepts a class of type `LoggingConfig`.

#### Details
Combine the `logging` and `logGroup` properties into a single new optional property called `loggingConfig` which accepts a class of type `LoggingConfig`.

`LoggingConfig` is an abstract class which can be instantiated through either an instance of `EnableLogging` or `DisableLogging` which can be used in the following 3 ways:

```ts
import * as logs from 'aws-cdk-lib/aws-logs';

const logGroup = new logs.LogGroup(this, 'Log Group');
declare const bucket: s3.Bucket;

// 1. Enable logging with no parameters - a log group will be created for you
const destinationWithLogging = new destinations.S3Bucket(bucket, {
loggingConfig: new destinations.EnableLogging(),
});

// 2. Enable a logging and pass in a logGroup to be used
const destinationWithLoggingAndMyLogGroup = new destinations.S3Bucket(bucket, {
loggingConfig: new destinations.EnableLogging(logGroup),
});

// 3. Disable logging (does not accept any parameters so it is now impossible to provide a logGroup in this case)
const destinationWithoutLogging = new destinations.S3Bucket(bucket, {
loggingConfig: new destinations.DisableLogging(),
});

```

### Description of how you validated changes
unit + integ test

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

### Features

* **ec2:** add interface endpoint dynamodb ([#30162](https://github.com/aws/aws-cdk/issues/30162)) ([182804a](https://github.com/aws/aws-cdk/commit/182804a3b3116924e2f7a8e50a22e2e7d99c71ae)), closes [#29547](https://github.com/aws/aws-cdk/issues/29547)
* **pipes-sources:** add Kinesis and DynamoDB ([#29476](https://github.com/aws/aws-cdk/issues/29476)) ([00c2efb](https://github.com/aws/aws-cdk/commit/00c2efb323fdba21191c69e7f970e2cd78c37d68)), closes [#29378](https://github.com/aws/aws-cdk/issues/29378) [#29377](https://github.com/aws/aws-cdk/issues/29377)
* **pipes-targets:** add API destination ([#30756](https://github.com/aws/aws-cdk/issues/30756)) ([5e08c98](https://github.com/aws/aws-cdk/commit/5e08c981dd2a309c84abc01a0c8b358e55b5cc4c)), closes [/github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-events-targets/lib/api-gateway.ts#L11-L32](https://github.com/aws//github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-events-targets/lib/api-gateway.ts/issues/L11-L32)
* **pipes-targets:** add Kinesis ([#30656](https://github.com/aws/aws-cdk/issues/30656)) ([d0c99d8](https://github.com/aws/aws-cdk/commit/d0c99d85e0bd85beea78ce65f843d319abd493ce))
* **redshift:** supports excludeCharacters settings for DatabaseSecret ([#30563](https://github.com/aws/aws-cdk/issues/30563)) ([a1c46cf](https://github.com/aws/aws-cdk/commit/a1c46cfc5eefa58640324420a3dc15b32c37e7dd)), closes [#26847](https://github.com/aws/aws-cdk/issues/26847)


### Bug Fixes

* **custom-resource-handlers:** better fallback for require failures ([#31571](https://github.com/aws/aws-cdk/issues/31571)) ([00cdbcb](https://github.com/aws/aws-cdk/commit/00cdbcba93baa9a605f62ae8c18c0880ec15aea2)), closes [#30067](https://github.com/aws/aws-cdk/issues/30067)


### Miscellaneous Chores

* **kinesisfirehose-destinations:** refactor logging to combine logGroup and logging properties into loggingConfig ([#31488](https://github.com/aws/aws-cdk/issues/31488)) ([c4bda64](https://github.com/aws/aws-cdk/commit/c4bda6409cea78dbfa51fb6437f61fb13d0d0abb))

## [2.160.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.159.1-alpha.0...v2.160.0-alpha.0) (2024-09-24)


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

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.161.0](https://github.com/aws/aws-cdk/compare/v2.160.0...v2.161.0) (2024-10-03)


### Features

* update L1 CloudFormation resource definitions ([#31640](https://github.com/aws/aws-cdk/issues/31640)) ([79d9c4d](https://github.com/aws/aws-cdk/commit/79d9c4ddd4b96a4d4bd0c38a83687229253449fc)), closes [/docs.aws.amazon.com/datasync/latest/userguide/create-locations-cli.html#create-location-s3](https://github.com/aws//docs.aws.amazon.com/datasync/latest/userguide/create-locations-cli.html/issues/create-location-s3)
* **bedrock:** support meta llama3-2 ([#31568](https://github.com/aws/aws-cdk/issues/31568)) ([4ddc702](https://github.com/aws/aws-cdk/commit/4ddc702236e74abd179b5d866614066f71a0f91b))
* **cli:** `cdk rollback` ([#31407](https://github.com/aws/aws-cdk/issues/31407)) ([0755561](https://github.com/aws/aws-cdk/commit/0755561b79d6be0744b0b21504fe54ffcf2b618a)), closes [#30546](https://github.com/aws/aws-cdk/issues/30546)
* **cli:** notices on bootstrap version ([#31555](https://github.com/aws/aws-cdk/issues/31555)) ([b0e4a54](https://github.com/aws/aws-cdk/commit/b0e4a544aecce86e8b41e7cd148a139c2e34bfbd))
* **ecs:** support restart policy for container ([#31228](https://github.com/aws/aws-cdk/issues/31228)) ([a22e8cc](https://github.com/aws/aws-cdk/commit/a22e8cc8e2bd458fa2b972a76cd5c1f8c57a88d1)), closes [#31127](https://github.com/aws/aws-cdk/issues/31127) [#31425](https://github.com/aws/aws-cdk/issues/31425)
* **logs:** add metric methods for log group IncomingLogEvents and IncomingBytes ([#31535](https://github.com/aws/aws-cdk/issues/31535)) ([2813eb2](https://github.com/aws/aws-cdk/commit/2813eb26c5ae7457591897fd898438019af8ea65)), closes [#30034](https://github.com/aws/aws-cdk/issues/30034)
* **rds:** support for local write forwarding in an Aurora Mysql cluster ([#31524](https://github.com/aws/aws-cdk/issues/31524)) ([48c4192](https://github.com/aws/aws-cdk/commit/48c4192736c5ad1ea96f2b6760466031219adfbf)), closes [#31523](https://github.com/aws/aws-cdk/issues/31523)
* **s3-deployment:** added property outputObjectKeys for BucketDeployment ([#31452](https://github.com/aws/aws-cdk/issues/31452)) ([54c01cb](https://github.com/aws/aws-cdk/commit/54c01cbb24242f5646f2798f8b28ec6172dedbc9)), closes [#28579](https://github.com/aws/aws-cdk/issues/28579)


### Bug Fixes

* **appsync:** lambda authorizer permission is not scoped to appsync api arn ([#31567](https://github.com/aws/aws-cdk/issues/31567)) ([c7cee15](https://github.com/aws/aws-cdk/commit/c7cee1525deb48d915740c9b30bdc6f886d17aa5)), closes [#31550](https://github.com/aws/aws-cdk/issues/31550) [/docs.aws.amazon.com/controltower/latest/controlreference/lambda-rules.html#ct-lambda-pr-2](https://github.com/aws//docs.aws.amazon.com/controltower/latest/controlreference/lambda-rules.html/issues/ct-lambda-pr-2)
* **batch:** remove default optimal for arm based instance types and add error checks ([#31510](https://github.com/aws/aws-cdk/issues/31510)) ([7e80cc9](https://github.com/aws/aws-cdk/commit/7e80cc9665c0a1f7e82b124991d946a4234313c2)), closes [#31148](https://github.com/aws/aws-cdk/issues/31148)
* **cdk:** `cdk diff --quiet` to print stack name when there is diffs ([#30186](https://github.com/aws/aws-cdk/issues/30186)) ([bcf9209](https://github.com/aws/aws-cdk/commit/bcf9209fb1b9e9aa295f50c5681201db094b8c00)), closes [#27128](https://github.com/aws/aws-cdk/issues/27128)
* **cli:** deployment errors are printed 3 times ([#31389](https://github.com/aws/aws-cdk/issues/31389)) ([4b00ffe](https://github.com/aws/aws-cdk/commit/4b00ffeb86b3ebb9a0190c2842bd36ebb4043f52))
* **core:** `isTaggable` function can return undefined instead of false ([#31600](https://github.com/aws/aws-cdk/issues/31600)) ([be70c82](https://github.com/aws/aws-cdk/commit/be70c822a1608cb43a4b4b17fc0430f3352797c6)), closes [#26495](https://github.com/aws/aws-cdk/issues/26495)
* **core:** apps that use token-aware-stringify are construct-instantiation-order-dependent ([#31470](https://github.com/aws/aws-cdk/issues/31470)) ([4128bf1](https://github.com/aws/aws-cdk/commit/4128bf16b94c3fc9b654187abc8b52638d712999)), closes [#31345](https://github.com/aws/aws-cdk/issues/31345) [#31345](https://github.com/aws/aws-cdk/issues/31345)
* **core:** file asset publishing role not used in `cdk diff` to upload large templates ([#31597](https://github.com/aws/aws-cdk/issues/31597)) ([be1207b](https://github.com/aws/aws-cdk/commit/be1207beedb01fc1cf773f13705ddae19c3209f0)), closes [#29936](https://github.com/aws/aws-cdk/issues/29936) [/github.com/aws/aws-cdk/blob/main/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml#L275](https://github.com/aws//github.com/aws/aws-cdk/blob/main/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml/issues/L275) [/github.com/aws/aws-cdk/blob/4b00ffeb86b3ebb9a0190c2842bd36ebb4043f52/packages/aws-cdk/lib/api/deployments.ts#L605](https://github.com/aws//github.com/aws/aws-cdk/blob/4b00ffeb86b3ebb9a0190c2842bd36ebb4043f52/packages/aws-cdk/lib/api/deployments.ts/issues/L605)
* **core:** throw on intrinsics in CFN update and create policies ([#31578](https://github.com/aws/aws-cdk/issues/31578)) ([9410361](https://github.com/aws/aws-cdk/commit/941036100f1633a5693075ea07477122bab9cbb2)), closes [#27578](https://github.com/aws/aws-cdk/issues/27578) [#30740](https://github.com/aws/aws-cdk/issues/30740)
* **lambda:** configuring log retention fails on 70+ Lambdas ([#31340](https://github.com/aws/aws-cdk/issues/31340)) ([a2d42d2](https://github.com/aws/aws-cdk/commit/a2d42d20ad4439ba294d1027152a16fb19786df3)), closes [#31338](https://github.com/aws/aws-cdk/issues/31338)
* **lambda-nodejs:** remove smithy models from bundling for AWS SDK v3 runtimes (under feature flag) ([#31639](https://github.com/aws/aws-cdk/issues/31639)) ([19ee46d](https://github.com/aws/aws-cdk/commit/19ee46d7653894f0669aff3872c6c5314be0666c))
* **pipelines:** "Node with duplicate id" on duplicate stack names ([#31328](https://github.com/aws/aws-cdk/issues/31328)) ([16b74f3](https://github.com/aws/aws-cdk/commit/16b74f337e351b177aaeed2d80c519ff264c3e11)), closes [#30960](https://github.com/aws/aws-cdk/issues/30960)
* **rds:** fixed the IAM policy that grantConnect() generates for DatabaseInstanceReadReplica ([#31579](https://github.com/aws/aws-cdk/issues/31579)) ([52f676c](https://github.com/aws/aws-cdk/commit/52f676ca82a6078425020efcef73da8bd6afa261)), closes [#31061](https://github.com/aws/aws-cdk/issues/31061)
* **stack:** check stack tags for deploy-time values ([#31457](https://github.com/aws/aws-cdk/issues/31457)) ([abd1768](https://github.com/aws/aws-cdk/commit/abd176866a3ab3ce14b20bd5773ab3b23b1b7677)), closes [#28017](https://github.com/aws/aws-cdk/issues/28017)
* update L1 CloudFormation resource definitions by removing outdated schema overrides ([#31539](https://github.com/aws/aws-cdk/issues/31539)) ([218331b](https://github.com/aws/aws-cdk/commit/218331bd1f87897bf6cbd42a2059d570b59bfb3f))

## [2.160.0](https://github.com/aws/aws-cdk/compare/v2.159.1...v2.160.0) (2024-09-24)


Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,24 @@ grantAwesomePowerBeta1()
When we decide it's time to graduate the API, the latest preview version will
be deprecated and the final version - `grantAwesomePower` will be added.

### Adding new experimental CLI features

In order to move fast when developing new CLI features, we may decide to release
functionality as "experimental" or "incremental." In this scenario we can utilize
explicit opt-in via an `--unstable` flag.

Explicit opt-ins would look something like this:

```bash
cdk new-command --unstable='new-command'

cdk bootstrap --unstable='new-funky-bootstrap'
```

And can be simply added as an additional flag on the CLI command that is being worked on.
When the time comes to stabilize the command, we remove the requirement that such a flag
is set.

## Documentation

Every module's README is rendered as the landing page of the official documentation. For example, this is
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ Shout out to our top contributors!
- [mrgrain](https://github.com/mrgrain)
- [pahud](https://github.com/pahud)
- [TheRealAmazonKendra](https://github.com/TheRealAmazonKendra)
- [madeline-k](https://github.com/madeline-k)
- [comcalvi](https://github.com/comcalvi)
- [madeline-k](https://github.com/madeline-k)
- [NetaNir](https://github.com/NetaNir)
- [robertd](https://github.com/robertd)
- [MrArnoldPalmer](https://github.com/MrArnoldPalmer)
- [go-to-k](https://github.com/go-to-k)
- [MrArnoldPalmer](https://github.com/MrArnoldPalmer)
- [lpizzinidev](https://github.com/lpizzinidev)
- [peterwoodworth](https://github.com/peterwoodworth)
- [mazyu36](https://github.com/mazyu36)
- [colifran](https://github.com/colifran)
- [badmintoncryer](https://github.com/badmintoncryer)
- [msambol](https://github.com/msambol)
- [mazyu36](https://github.com/mazyu36)
- [watany-dev](https://github.com/watany-dev)
- [badmintoncryer](https://github.com/badmintoncryer)


_Last updated: Sun, 01 Sep 24 00:12:30 +0000_
_Last updated: Tue, 01 Oct 24 00:12:17 +0000_
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Test suites are written as a collection of Jest tests, and they are run using Je

### Setup

Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your enviornment is built properly by following the steps below:
Building the @aws-cdk-testing package is not very different from building the rest of the CDK. However, If you are having issues with the tests, you can ensure your environment is built properly by following the steps below:

```shell
yarn install # Install dependencies
Expand Down
21 changes: 18 additions & 3 deletions packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { shell, ShellOptions, ShellHelper, rimraf } from './shell';
import { AwsContext, withAws } from './with-aws';
import { withTimeout } from './with-timeout';

export const DEFAULT_TEST_TIMEOUT_S = 10 * 60;
export const DEFAULT_TEST_TIMEOUT_S = 20 * 60;
export const EXTENDED_TEST_TIMEOUT_S = 30 * 60;

/**
Expand All @@ -24,7 +24,8 @@ export const EXTENDED_TEST_TIMEOUT_S = 30 * 60;
* For backwards compatibility with existing tests (so we don't have to change
* too much) the inner block is expected to take a `TestFixture` object.
*/
export function withCdkApp(
export function withSpecificCdkApp(
appName: string,
block: (context: TestFixture) => Promise<void>,
): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise<void> {
return async (context: TestContext & AwsContext & DisableBootstrapContext) => {
Expand All @@ -36,7 +37,7 @@ export function withCdkApp(
context.output.write(` Test directory: ${integTestDir}\n`);
context.output.write(` Region: ${context.aws.region}\n`);

await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', 'app'), integTestDir, context.output);
await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', appName), integTestDir, context.output);
const fixture = new TestFixture(
integTestDir,
stackNamePrefix,
Expand Down Expand Up @@ -87,6 +88,16 @@ export function withCdkApp(
};
}

/**
* Like `withSpecificCdkApp`, but uses the default integration testing app with a million stacks in it
*/
export function withCdkApp(
block: (context: TestFixture) => Promise<void>,
): (context: TestContext & AwsContext & DisableBootstrapContext) => Promise<void> {
// 'app' is the name of the default integration app in the `cdk-apps` directory
return withSpecificCdkApp('app', block);
}

export function withCdkMigrateApp<A extends TestContext>(language: string, block: (context: TestFixture) => Promise<void>) {
return async (context: A) => {
const stackName = `cdk-migrate-${language}-integ-${context.randomString}`;
Expand Down Expand Up @@ -188,6 +199,10 @@ export function withDefaultFixture(block: (context: TestFixture) => Promise<void
return withAws(withTimeout(DEFAULT_TEST_TIMEOUT_S, withCdkApp(block)));
}

export function withSpecificFixture(appName: string, block: (context: TestFixture) => Promise<void>) {
return withAws(withTimeout(DEFAULT_TEST_TIMEOUT_S, withSpecificCdkApp(appName, block)));
}

export function withExtendedTimeoutFixture(block: (context: TestFixture) => Promise<void>) {
return withAws(withTimeout(EXTENDED_TEST_TIMEOUT_S, withCdkApp(block)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ class YourStack extends cdk.Stack {
}
}

class NoticesStack extends cdk.Stack {
constructor(parent, id, props) {
super(parent, id, props);
new sqs.Queue(this, 'queue');
}
}

class SsoPermissionSetNoPolicy extends Stack {
constructor(scope, id) {
super(scope, id);
Expand Down Expand Up @@ -424,6 +431,20 @@ class LambdaStack extends cdk.Stack {
}
}

class IamRolesStack extends cdk.Stack {
constructor(parent, id, props) {
super(parent, id, props);

// Environment variabile is used to create a bunch of roles to test
// that large diff templates are uploaded to S3 to create the changeset.
for(let i = 1; i <= Number(process.env.NUMBER_OF_ROLES) ; i++) {
new iam.Role(this, `Role${i}`, {
assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),
});
}
}
}

class SessionTagsStack extends cdk.Stack {
constructor(parent, id, props) {
super(parent, id, {
Expand Down Expand Up @@ -753,6 +774,7 @@ switch (stackSet) {
// Deploy all does a wildcard ${stackPrefix}-test-*
new MyStack(app, `${stackPrefix}-test-1`, { env: defaultEnv });
new YourStack(app, `${stackPrefix}-test-2`);
new NoticesStack(app, `${stackPrefix}-notices`);
// Deploy wildcard with parameters does ${stackPrefix}-param-test-*
new ParameterStack(app, `${stackPrefix}-param-test-1`);
new OtherParameterStack(app, `${stackPrefix}-param-test-2`);
Expand All @@ -770,6 +792,8 @@ switch (stackSet) {

new LambdaStack(app, `${stackPrefix}-lambda`);

new IamRolesStack(app, `${stackPrefix}-iam-roles`);

if (process.env.ENABLE_VPC_TESTING == 'IMPORT') {
// this stack performs a VPC lookup so we gate synth
const env = { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION };
Expand Down
Loading
Loading