Skip to content

Commit 2381a44

Browse files
authored
Merge branch 'main' into colifran/eks-documentation
2 parents 6b88435 + 8bac15d commit 2381a44

682 files changed

Lines changed: 144068 additions & 18497 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/github-merit-badger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
badges: '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]'
1818
thresholds: '[0,3,6,13,25,50]'
1919
badge-type: 'achievement'
20-
ignore-usernames: '[rix0rrr,iliapolo,otaviomacedo,kaizencc,comcalvi,TheRealAmazonKendra,vinayak-kukreja,mrgrain,pahud,cgarvis,kellertk,HBobertz,sumupitchayan,SankyRed,udaypant,colifran,khushail,scanlonp,mikewrighton,moelasmar,paulhcsun,awsmjs,evgenyka,GavinZZ,aaythapa,xazhao,ConnorRobertson,ssenchenko,gracelu0,jfuss,SimonCMoore,shikha372,kirtishrinkhala,godwingrs22,bergjaak,aws-cdk-automation,dependabot[bot],mergify[bot]]'
20+
ignore-usernames: '[rix0rrr,iliapolo,otaviomacedo,kaizencc,comcalvi,TheRealAmazonKendra,vinayak-kukreja,mrgrain,pahud,cgarvis,kellertk,HBobertz,sumupitchayan,SankyRed,udaypant,colifran,khushail,scanlonp,mikewrighton,moelasmar,paulhcsun,awsmjs,evgenyka,GavinZZ,aaythapa,xazhao,ConnorRobertson,ssenchenko,gracelu0,jfuss,SimonCMoore,shikha372,kirtishrinkhala,godwingrs22,bergjaak,Leo10Gama,scorbiere,aws-cdk-automation,dependabot[bot],mergify[bot]]'

.github/workflows/request-cli-integ-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
persist-credentials: false
2020
- name: Find changed cli files
2121
id: changed-cli-files
22-
uses: tj-actions/changed-files@0874344d6ebbaa00a27da73276ae7162fadcaf69
22+
uses: tj-actions/changed-files@a29e8b565651ce417abb5db7164b4a2ad8b6155c
2323
with:
2424
base_sha: ${{ github.event.pull_request.base.sha }}
2525
files_yaml: |

.mergify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pull_request_rules:
1111
label:
1212
add: [ contribution/core ]
1313
conditions:
14-
- author~=^(rix0rrr|iliapolo|otaviomacedo|kaizencc|comcalvi|TheRealAmazonKendra|vinayak-kukreja|mrgrain|pahud|cgarvis|kellertk|HBobertz|sumupitchayan|SankyRed|udaypant|colifran|scanlonp|mikewrighton|moelasmar|paulhcsun|awsmjs|evgenyka|GavinZZ|aaythapa|xazhao|ConnorRobertson|ssenchenko|gracelu0|jfuss|SimonCMoore|shikha372|kirtishrinkhala|godwingrs22|bergjaak)$
14+
- author~=^(rix0rrr|iliapolo|otaviomacedo|kaizencc|comcalvi|TheRealAmazonKendra|vinayak-kukreja|mrgrain|pahud|cgarvis|kellertk|HBobertz|sumupitchayan|SankyRed|udaypant|colifran|scanlonp|mikewrighton|moelasmar|paulhcsun|awsmjs|evgenyka|GavinZZ|aaythapa|xazhao|ConnorRobertson|ssenchenko|gracelu0|jfuss|SimonCMoore|shikha372|kirtishrinkhala|godwingrs22|bergjaak|Leo10Gama|scorbiere)$
1515
- -label~="contribution/core"
1616
- name: automatic merge
1717
actions:

CHANGELOG.v2.alpha.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
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.
44

5+
## [2.142.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.142.0-alpha.0...v2.142.1-alpha.0) (2024-05-17)
6+
7+
## [2.142.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.141.0-alpha.0...v2.142.0-alpha.0) (2024-05-15)
8+
9+
10+
### Features
11+
12+
* **pipes-targets:** add step function target ([#29987](https://github.com/aws/aws-cdk/issues/29987)) ([b0975e4](https://github.com/aws/aws-cdk/commit/b0975e410a404d07952e01303af01224ccfad864)), closes [#29665](https://github.com/aws/aws-cdk/issues/29665) [#29665](https://github.com/aws/aws-cdk/issues/29665)
13+
* **redshift:** multi AZ cluster ([#29976](https://github.com/aws/aws-cdk/issues/29976)) ([a53517c](https://github.com/aws/aws-cdk/commit/a53517c6772332cc2a15c9b38e964a933e9c8355))
14+
515
## [2.141.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.140.0-alpha.0...v2.141.0-alpha.0) (2024-05-08)
616

717
## [2.140.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.139.1-alpha.0...v2.140.0-alpha.0) (2024-05-02)

CHANGELOG.v2.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
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.
44

5+
## [2.142.1](https://github.com/aws/aws-cdk/compare/v2.142.0...v2.142.1) (2024-05-17)
6+
7+
8+
### Reverts
9+
10+
* fix(diff): properties from ChangeSet diff were ignored ([#30243](https://github.com/aws/aws-cdk/issues/30243)) ([3748472](https://github.com/aws/aws-cdk/commit/37484726f235013ec0e71cefb9e1fc35caf12e74))
11+
12+
## [2.142.0](https://github.com/aws/aws-cdk/compare/v2.141.0...v2.142.0) (2024-05-15)
13+
14+
15+
### Features
16+
17+
* **asg:** support keypair functionality for asg ([#29679](https://github.com/aws/aws-cdk/issues/29679)) ([f6b649d](https://github.com/aws/aws-cdk/commit/f6b649d47f8bc30ca741fbb7a4852d51e8275002)), closes [#29237](https://github.com/aws/aws-cdk/issues/29237)
18+
* **codepipeline:** `GitPullRequestFilter` for pipeline trigger ([#29128](https://github.com/aws/aws-cdk/issues/29128)) ([5ce1b64](https://github.com/aws/aws-cdk/commit/5ce1b6485eb4336634f4f14bfe3d0b17b071e83b)), closes [#29126](https://github.com/aws/aws-cdk/issues/29126)
19+
* **docdb:** add copyTagsToSnapshot property to the DatabaseCluster Construct ([#30120](https://github.com/aws/aws-cdk/issues/30120)) ([30f0db6](https://github.com/aws/aws-cdk/commit/30f0db6ad810f0e93187082bd50ddb46726d8f5f)), closes [#30090](https://github.com/aws/aws-cdk/issues/30090)
20+
* **docdb:** support CA certificate for cluster instances ([#28791](https://github.com/aws/aws-cdk/issues/28791)) ([e87f25e](https://github.com/aws/aws-cdk/commit/e87f25e1e93350e53aadb15e19ed7a9bf378c315)), closes [#27138](https://github.com/aws/aws-cdk/issues/27138) [#28356](https://github.com/aws/aws-cdk/issues/28356)
21+
* **events-targets:** add support for AppSync as an EventBridge rule target ([#29584](https://github.com/aws/aws-cdk/issues/29584)) ([5be88a3](https://github.com/aws/aws-cdk/commit/5be88a3055fe1e6b55884847d1b8a75b03341b39)), closes [#29884](https://github.com/aws/aws-cdk/issues/29884)
22+
* **servicecatalog:** `ProductStack` memoryLimit prop ([#30105](https://github.com/aws/aws-cdk/issues/30105)) ([4b6dc8c](https://github.com/aws/aws-cdk/commit/4b6dc8c650822bcd0231c8890bd94a934a0cd34d)), closes [#29862](https://github.com/aws/aws-cdk/issues/29862)
23+
24+
25+
### Bug Fixes
26+
27+
* **apigateway:** set authorization scope when authorization type is Cognito ([#30035](https://github.com/aws/aws-cdk/issues/30035)) ([38a2284](https://github.com/aws/aws-cdk/commit/38a2284bccd9119f3bcc8d0baef8525ab416bb67))
28+
* **autoscaling:** cooldown cannot be set with step scaling actions ([#30150](https://github.com/aws/aws-cdk/issues/30150)) ([6810762](https://github.com/aws/aws-cdk/commit/68107624e50d738be7e10fd22072b5a40983e720)), closes [#29779](https://github.com/aws/aws-cdk/issues/29779)
29+
* **cli:** cdk bootstrap --help does not show some options ([#30113](https://github.com/aws/aws-cdk/issues/30113)) ([8debd20](https://github.com/aws/aws-cdk/commit/8debd205b1f52e172de844f349d4e76e39df269d))
30+
* **cli:** handle attributes of AWS::KMS::Key when hotswapping ([#30112](https://github.com/aws/aws-cdk/issues/30112)) ([a1dcaa6](https://github.com/aws/aws-cdk/commit/a1dcaa6c4a3db245d1becf0e9ace1d488b6d528d)), closes [#25418](https://github.com/aws/aws-cdk/issues/25418)
31+
* **cli:** template created during import should be written to assets folder ([#29830](https://github.com/aws/aws-cdk/issues/29830)) ([a96cf55](https://github.com/aws/aws-cdk/commit/a96cf5500242890cddbbaa46af7f7228c7126d98)), closes [#22928](https://github.com/aws/aws-cdk/issues/22928) [#22530](https://github.com/aws/aws-cdk/issues/22530)
32+
* **diff:** properties from ChangeSet diff were ignored ([#30093](https://github.com/aws/aws-cdk/issues/30093)) ([9c3f3f5](https://github.com/aws/aws-cdk/commit/9c3f3f5dbb9b4b9f86911d9cd7c056a9fc0432b3)), closes [#29731](https://github.com/aws/aws-cdk/issues/29731)
33+
* **ecs:** require task pidMode for Linux-based Fargate tasks, not host ([#30020](https://github.com/aws/aws-cdk/issues/30020)) ([3e9e0a8](https://github.com/aws/aws-cdk/commit/3e9e0a8696630c9368adf012aff1fb919e398164)), closes [#29995](https://github.com/aws/aws-cdk/issues/29995)
34+
* **eks:** in place updates for EKS security group and Subnets ([#30114](https://github.com/aws/aws-cdk/issues/30114)) ([eb39d9e](https://github.com/aws/aws-cdk/commit/eb39d9e1924240d433dc91b7f8d98ebcf5cd87c8)), closes [#28584](https://github.com/aws/aws-cdk/issues/28584)
35+
* **iam:** fromUserArn returns incorrect principalAccount ([#30023](https://github.com/aws/aws-cdk/issues/30023)) ([f9f3681](https://github.com/aws/aws-cdk/commit/f9f3681be9fc6a0c998cd26119053c5832ef9806)), closes [/github.com/aws/aws-cdk/issues/29999#issuecomment-2087672380](https://github.com/aws//github.com/aws/aws-cdk/issues/29999/issues/issuecomment-2087672380)
36+
* **s3:** add bucket policy dependency to notification resource ([#30053](https://github.com/aws/aws-cdk/issues/30053)) ([71986ff](https://github.com/aws/aws-cdk/commit/71986ff986d13bbb496b33c0554f657e77dbb2d0)), closes [#27600](https://github.com/aws/aws-cdk/issues/27600) [#16811](https://github.com/aws/aws-cdk/issues/16811)
37+
* **stepfunctions-tasks:** documentation fix for retryOnServiceExceptions ([#30077](https://github.com/aws/aws-cdk/issues/30077)) ([205163f](https://github.com/aws/aws-cdk/commit/205163fc0d2cac84d3d746a98c393e137f0e2388))
38+
539
## [2.141.0](https://github.com/aws/aws-cdk/compare/v2.140.0...v2.141.0) (2024-05-08)
640

741

packages/@aws-cdk-testing/cli-integ/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@
7272
"publishConfig": {
7373
"tag": "latest"
7474
}
75-
}
75+
}

packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,37 @@ class MigrateStack extends cdk.Stack {
232232
}
233233
}
234234

235-
class ImportableStack extends MigrateStack {
235+
class ImportableStack extends cdk.Stack {
236236
constructor(parent, id, props) {
237237
super(parent, id, props);
238238
new cdk.CfnWaitConditionHandle(this, 'Handle');
239+
240+
if (process.env.INCLUDE_SINGLE_QUEUE === '1') {
241+
const queue = new sqs.Queue(this, 'Queue', {
242+
removalPolicy: (process.env.RETAIN_SINGLE_QUEUE === '1') ? cdk.RemovalPolicy.RETAIN : cdk.RemovalPolicy.DESTROY,
243+
});
244+
245+
new cdk.CfnOutput(this, 'QueueName', {
246+
value: queue.queueName,
247+
});
248+
249+
new cdk.CfnOutput(this, 'QueueUrl', {
250+
value: queue.queueUrl,
251+
});
252+
253+
new cdk.CfnOutput(this, 'QueueLogicalId', {
254+
value: queue.node.defaultChild.logicalId,
255+
});
256+
}
257+
258+
if (process.env.LARGE_TEMPLATE === '1') {
259+
for (let i = 1; i <= 70; i++) {
260+
new sqs.Queue(this, `cdk-import-queue-test${i}`, {
261+
enforceSSL: true,
262+
removalPolicy: cdk.RemovalPolicy.DESTROY,
263+
});
264+
}
265+
}
239266
}
240267
}
241268

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This patch brings the [fix](https://github.com/aws/aws-cdk/issues/30241) into the regression suite.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Skipping the test to fix issue https://github.com/aws/aws-cdk/issues/30241.
2+
# cli-integ tests failing for the old tests with the new cli changes for diff stacks.
3+
4+
cdk diff picks up changes that are only present in changeset

packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { promises as fs, existsSync } from 'fs';
22
import * as os from 'os';
33
import * as path from 'path';
4-
import { integTest, cloneDirectory, shell, withDefaultFixture, retry, sleep, randomInteger, withSamIntegrationFixture, RESOURCES_DIR, withCDKMigrateFixture, withExtendedTimeoutFixture } from '../../lib';
4+
import { integTest, cloneDirectory, shell, withDefaultFixture, retry, sleep, randomInteger, withSamIntegrationFixture, RESOURCES_DIR, withCDKMigrateFixture, withExtendedTimeoutFixture, randomString } from '../../lib';
55

66
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
77

@@ -1575,37 +1575,60 @@ integTest('skips notice refresh', withDefaultFixture(async (fixture) => {
15751575
}));
15761576

15771577
/**
1578-
* Create a queue with a fresh name, redeploy orphaning the queue, then import it again
1578+
* Create a queue, orphan that queue, then import the queue.
1579+
*
1580+
* We want to test with a large template to make sure large templates can work with import.
15791581
*/
15801582
integTest('test resource import', withDefaultFixture(async (fixture) => {
1581-
const outputsFile = path.join(fixture.integTestDir, 'outputs', 'outputs.json');
1583+
// GIVEN
1584+
const randomPrefix = randomString();
1585+
const uniqueOutputsFileName = `${randomPrefix}Outputs.json`; // other tests use the outputs file. Make sure we don't collide.
1586+
const outputsFile = path.join(fixture.integTestDir, 'outputs', uniqueOutputsFileName);
15821587
await fs.mkdir(path.dirname(outputsFile), { recursive: true });
15831588

1584-
// Initial deploy
1589+
// First, create a stack that includes many queues, and one queue that will be removed from the stack but NOT deleted from AWS.
15851590
await fixture.cdkDeploy('importable-stack', {
1586-
modEnv: { ORPHAN_TOPIC: '1' },
1591+
modEnv: { LARGE_TEMPLATE: '1', INCLUDE_SINGLE_QUEUE: '1', RETAIN_SINGLE_QUEUE: '1' },
15871592
options: ['--outputs-file', outputsFile],
15881593
});
15891594

1590-
const outputs = JSON.parse((await fs.readFile(outputsFile, { encoding: 'utf-8' })).toString());
1591-
const queueName = outputs.QueueName;
1592-
const queueLogicalId = outputs.QueueLogicalId;
1593-
fixture.log(`Setup complete, created queue ${queueName}`);
15941595
try {
1595-
// Deploy again, orphaning the queue
1596+
1597+
// Second, now the queue we will remove is in the stack and has a logicalId. We can now make the resource mapping file.
1598+
// This resource mapping file will be used to tell the import operation what queue to bring into the stack.
1599+
const fullStackName = fixture.fullStackName('importable-stack');
1600+
const outputs = JSON.parse((await fs.readFile(outputsFile, { encoding: 'utf-8' })).toString());
1601+
const queueLogicalId = outputs[fullStackName].QueueLogicalId;
1602+
const queueResourceMap = {
1603+
[queueLogicalId]: { QueueUrl: outputs[fullStackName].QueueUrl },
1604+
};
1605+
const mappingFile = path.join(fixture.integTestDir, 'outputs', `${randomPrefix}Mapping.json`);
1606+
await fs.writeFile(
1607+
mappingFile,
1608+
JSON.stringify(queueResourceMap),
1609+
{ encoding: 'utf-8' },
1610+
);
1611+
1612+
// Third, remove the queue from the stack, but don't delete the queue from AWS.
15961613
await fixture.cdkDeploy('importable-stack', {
1597-
modEnv: { OMIT_TOPIC: '1' },
1614+
modEnv: { LARGE_TEMPLATE: '1', INCLUDE_SINGLE_QUEUE: '0', RETAIN_SINGLE_QUEUE: '0' },
15981615
});
1616+
const cfnTemplateBeforeImport = await fixture.aws.cloudFormation('getTemplate', { StackName: fullStackName });
1617+
expect(cfnTemplateBeforeImport.TemplateBody).not.toContain(queueLogicalId);
15991618

1600-
// Write a resource mapping file based on the ID from step one, then run an import
1601-
const mappingFile = path.join(fixture.integTestDir, 'outputs', 'mapping.json');
1602-
await fs.writeFile(mappingFile, JSON.stringify({ [queueLogicalId]: { QueueName: queueName } }), { encoding: 'utf-8' });
1619+
// WHEN
1620+
await fixture.cdk(
1621+
['import', '--resource-mapping', mappingFile, fixture.fullStackName('importable-stack')],
1622+
{ modEnv: { LARGE_TEMPLATE: '1', INCLUDE_SINGLE_QUEUE: '1', RETAIN_SINGLE_QUEUE: '0' } },
1623+
);
16031624

1604-
await fixture.cdk(['import',
1605-
'--resource-mapping', mappingFile,
1606-
fixture.fullStackName('importable-stack')]);
1625+
// THEN
1626+
const describeStacksResponse = await fixture.aws.cloudFormation('describeStacks', { StackName: fullStackName });
1627+
const cfnTemplateAfterImport = await fixture.aws.cloudFormation('getTemplate', { StackName: fullStackName });
1628+
expect(describeStacksResponse.Stacks![0].StackStatus).toEqual('IMPORT_COMPLETE');
1629+
expect(cfnTemplateAfterImport.TemplateBody).toContain(queueLogicalId);
16071630
} finally {
1608-
// Cleanup
1631+
// Clean up
16091632
await fixture.cdkDestroy('importable-stack');
16101633
}
16111634
}));

0 commit comments

Comments
 (0)