Skip to content

Commit 3d4d576

Browse files
authored
chore: forward merge 'master' into 'v2-main' (#18857)
Automated action from aws/cdk-ops
2 parents 305f403 + 5db188b commit 3d4d576

File tree

370 files changed

+7578
-1331
lines changed

Some content is hidden

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

370 files changed

+7578
-1331
lines changed

.devcontainer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "Dev Container Definition - AWS CDK",
3-
"image": "jsii/superchain",
3+
"image": "jsii/superchain:1-buster-slim",
44
"postCreateCommand": "yarn build --skip-test --no-bail --skip-prereqs --skip-compat",
55
"extensions": [
66
77
]
8-
}
8+
}

.github/workflows/issue-label-assign.yml

+43-43
Large diffs are not rendered by default.

CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
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+
## [1.143.0](https://github.com/aws/aws-cdk/compare/v1.142.0...v1.143.0) (2022-02-02)
6+
7+
8+
### Features
9+
10+
* **amplify:** support performance mode in Branch ([#18598](https://github.com/aws/aws-cdk/issues/18598)) ([bdeb8eb](https://github.com/aws/aws-cdk/commit/bdeb8eb604f5012ce3180d2f6d887fed1834e4f4)), closes [#18557](https://github.com/aws/aws-cdk/issues/18557)
11+
* **cfnspec:** cloudformation spec v54.0.0 ([#18764](https://github.com/aws/aws-cdk/issues/18764)) ([71601c1](https://github.com/aws/aws-cdk/commit/71601c115a6460b4532a34c83100ae70a476fad2))
12+
* **cloudwatch-actions:** add ssm opsitem action for cloudwatch alarm ([#16923](https://github.com/aws/aws-cdk/issues/16923)) ([9380885](https://github.com/aws/aws-cdk/commit/93808851415bff269418f28d9de3c61727e143d3)), closes [#16861](https://github.com/aws/aws-cdk/issues/16861)
13+
* **dynamodb:** allow setting TableClass for a Table ([#18719](https://github.com/aws/aws-cdk/issues/18719)) ([73a889e](https://github.com/aws/aws-cdk/commit/73a889eba85d0aa542ac96a1124f3ae4f1d351bc)), closes [#18718](https://github.com/aws/aws-cdk/issues/18718)
14+
* **ec2:** support KMS keys for block device mappings for both instances and launch templates ([#18326](https://github.com/aws/aws-cdk/issues/18326)) ([17dbe5f](https://github.com/aws/aws-cdk/commit/17dbe5f476ac1ccc0c0e6a0905b0de5ae6186704)), closes [#18309](https://github.com/aws/aws-cdk/issues/18309)
15+
* **ecr:** add server-side encryption configuration ([#16966](https://github.com/aws/aws-cdk/issues/16966)) ([c46acd5](https://github.com/aws/aws-cdk/commit/c46acd5f13442c43d0c2ed339e3091dd46002741)), closes [#15400](https://github.com/aws/aws-cdk/issues/15400) [#15571](https://github.com/aws/aws-cdk/issues/15571)
16+
* **ecs:** expose image name in container definition ([#17793](https://github.com/aws/aws-cdk/issues/17793)) ([1947d7c](https://github.com/aws/aws-cdk/commit/1947d7cc809fda0765bee3dbb2286190ec2847f7))
17+
* **fsx:** add support for FSx Lustre Persistent_2 deployment type ([#18626](https://github.com/aws/aws-cdk/issues/18626)) ([6036d99](https://github.com/aws/aws-cdk/commit/6036d9927bb3607e31a57361bf304976ff1891f7))
18+
* **iot:** add Action to republish MQTT messages to another MQTT topic ([#18661](https://github.com/aws/aws-cdk/issues/18661)) ([7ac1215](https://github.com/aws/aws-cdk/commit/7ac121546776cae972bbfb89c2a11949762e7c47))
19+
20+
21+
### Bug Fixes
22+
23+
* **core:** correctly reference versionless secure parameters ([#18730](https://github.com/aws/aws-cdk/issues/18730)) ([9f6e10e](https://github.com/aws/aws-cdk/commit/9f6e10ed0a751c06fe0cc1d79f38d5fb4b686087)), closes [#18729](https://github.com/aws/aws-cdk/issues/18729)
24+
* **ec2:** `UserData.addSignalOnExitCommand` does not work in combination with `userDataCausesReplacement` ([#18726](https://github.com/aws/aws-cdk/issues/18726)) ([afdc550](https://github.com/aws/aws-cdk/commit/afdc550ee372dd25d9d2eef81a545da1e923f796)), closes [#12749](https://github.com/aws/aws-cdk/issues/12749)
25+
* **vpc:** Vpc.fromLookup should throw if subnet group name tag is explicitly given and does not exist ([#18714](https://github.com/aws/aws-cdk/issues/18714)) ([13e1c7f](https://github.com/aws/aws-cdk/commit/13e1c7f10b81fc350953fe69fcccb61ff5aa9c1e)), closes [#13962](https://github.com/aws/aws-cdk/issues/13962)
26+
27+
28+
### Reverts
29+
30+
* "chore(cloudfront): encryption and enforceSSL on distribution s3 loggingBucket ([#18264](https://github.com/aws/aws-cdk/issues/18264))" ([#18772](https://github.com/aws/aws-cdk/issues/18772)) ([121e4a1](https://github.com/aws/aws-cdk/commit/121e4a1dec13d31644f6176d0a1d703952dc1ba3)), closes [#18271](https://github.com/aws/aws-cdk/issues/18271) [/docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-logs-infrastructure-S3](https://github.com/aws//docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html/issues/AWS-logs-infrastructure-S3) [#18676](https://github.com/aws/aws-cdk/issues/18676)
31+
* "chore(ec2): enforceSSL on flowLog s3 bucket ([#18271](https://github.com/aws/aws-cdk/issues/18271))" ([#18770](https://github.com/aws/aws-cdk/issues/18770)) ([a2eb092](https://github.com/aws/aws-cdk/commit/a2eb092b2b468bffa2acde9b98ca34cefa3e48f1)), closes [/docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-logs-infrastructure-S3](https://github.com/aws//docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html/issues/AWS-logs-infrastructure-S3) [#18676](https://github.com/aws/aws-cdk/issues/18676)
32+
533
## [1.142.0](https://github.com/aws/aws-cdk/compare/v1.141.0...v1.142.0) (2022-01-28)
634

735

CONTRIBUTING.md

+19-16
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let us know if it's not up-to-date (even better, submit a PR with your correcti
2222
- [Step 5: Merge](#step-5-merge)
2323
- [Breaking Changes](#breaking-changes)
2424
- [Documentation](#documentation)
25-
- [rosetta](#rosetta)
25+
- [Rosetta](#rosetta)
2626
- [Tools](#tools)
2727
- [Linters](#linters)
2828
- [cfn2ts](#cfn2ts)
@@ -217,6 +217,8 @@ Work your magic. Here are some guidelines:
217217
Watch out for their error messages and adjust your code accordingly.
218218
* Every change requires a unit test
219219
* If you change APIs, make sure to update the module's README file
220+
* When you add new examples to the module's README file, you must also ensure they compile - the PR build will fail
221+
if they do not. To learn more about how to ensure that they compile, see [Documentation](#documentation).
220222
* Try to maintain a single feature/bugfix per pull request. It's okay to introduce a little bit of housekeeping
221223
changes along the way, but try to avoid conflating multiple features. Eventually, all these are going to go into a
222224
single commit, so you can use that to frame your scope.
@@ -508,7 +510,7 @@ the README for the `aws-ec2` module - https://docs.aws.amazon.com/cdk/api/latest
508510

509511
### Rosetta
510512

511-
The README file contains code snippets written as typescript code. Code snippets typed in fenced code blocks
513+
The README file contains code snippets written as typescript code. Code snippets typed in fenced code blocks
512514
(such as `` ```ts ``) will be automatically extracted, compiled and translated to other languages when the
513515
during the [pack](#pack) step. We call this feature 'rosetta'.
514516

@@ -541,11 +543,12 @@ When no fixture is specified, the fixture with the name
541543
`rosetta/default.ts-fixture` will be used if present. `nofixture` can be used to
542544
opt out of that behavior.
543545

544-
In an `@example` block, which is unfenced, the first line of the example can
545-
contain three slashes to achieve the same effect:
546+
In an `@example` block, which is unfenced, additional information pertaining to
547+
the example can be provided via the `@exampleMetadata` tag:
546548

547549
```
548550
/**
551+
* @exampleMetadata fixture=with-bucket
549552
* @example
550553
* /// fixture=with-bucket
551554
* bucket.addLifecycleTransition({ ...props });
@@ -582,21 +585,21 @@ cases where some of those do not apply - good judgement is to be applied):
582585
// ...rest of the example...
583586
```
584587

585-
- Within `.ts-fixture` files, make use of `declare` statements instead of
586-
writing a compatible value (this will make your fixtures more durable):
588+
- Make use of `declare` statements directly in examples for values that are
589+
necessary for compilation but unimportant to the example:
587590

588591
```ts
589-
// An hypothetical 'rosetta/default.ts-fixture' file in `@aws-cdk/core`
590-
import * as kms from '@aws-cdk/aws-kms';
591-
import * as s3 from '@aws-cdk/aws-s3';
592-
import { StackProps } from '@aws-cdk/core';
593-
594-
declare const kmsKey: kms.IKey;
595-
declare const bucket: s3.Bucket;
596-
597-
declare const props: StackProps;
592+
// An example about adding a stage to a pipeline in the @aws-cdk/pipelines library
593+
declare const pipeline: pipelines.CodePipeline;
594+
declare const myStage: Stage;
595+
pipeline.addStage(myStage);
598596
```
599597

598+
- Utilize the `default.ts-fixture` that already exists rather than writing new
599+
`.ts-fixture` files. This is because values stored in `.ts-fixture` files do
600+
not surface to the examples visible in the docs, so while they help successful
601+
compilation, they do not help users understand the example.
602+
600603
## Tools (Advanced)
601604

602605
### scripts/foreach.sh
@@ -662,7 +665,7 @@ extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-e
662665

663666
#### pkglint
664667

665-
The `pkglint` tool "lints" package.json files across the repo according to [rules.ts](tools/pkglint/lib/rules.ts).
668+
The `pkglint` tool "lints" package.json files across the repo according to [rules.ts](tools/@aws-cdk/pkglint/lib/rules.ts).
666669

667670
To evaluate (and attempt to fix) all package linting issues in the repo, run the following command from the root of the
668671
repository (after bootstrapping):

design/aws-ecs/aws-ecs-fargate-capacity-providers.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Objective
44

5-
Since Capacity Providers are now supported in CloudFormation, incorporating support for Fargate Spot capacity has been one of the [top asks](https://github.com/aws/aws-cdk/issues?q=is%3Aissue+is%3Aopen+label%3A%40aws-cdk%2Faws-ecs+sort%3Areactions-%2B1-desc) for the ECS CDK module, with over 60 customer reactions. While there are still some outstanding issues regarding capacity provider support in general, specifically regarding cyclic workflows with named clusters (See: [CFN issue](http://%20https//github.com/aws/containers-roadmap/issues/631#issuecomment-702580141)), we should be able to move ahead with supporting `FARGATE` and `FARGATE_SPOT` capacity providers with our existing FargateService construct.
5+
Since Capacity Providers are now supported in CloudFormation, incorporating support for Fargate Spot capacity has been one of the [top asks](https://github.com/aws/aws-cdk/issues?q=is%3Aissue+is%3Aopen+label%3A%40aws-cdk%2Faws-ecs+sort%3Areactions-%2B1-desc) for the ECS CDK module, with over 60 customer reactions. While there are still some outstanding issues regarding capacity provider support in general, specifically regarding cyclic workflows with named clusters (See: [CFN issue](https://github.com/aws/containers-roadmap/issues/631#issuecomment-702580141)), we should be able to move ahead with supporting `FARGATE` and `FARGATE_SPOT` capacity providers with our existing FargateService construct.
66

77
See: https://github.com/aws/aws-cdk/issues/5850
88

@@ -118,4 +118,3 @@ One alternative considered was to provide a more magical experience by populatin
118118
For future extensibility, we can however add an `addCapacityProvider` method on the Cluster resource, to allow modifying the cluster CapacityProviders field post-construction.
119119

120120
Another option would be to create a new FargateCluster resource, that would have the two Fargate capacity providers set by default. The main advantage with this alternative would be that it would be consistent with the current Console experience, which sets the Fargate capacity providers for you if you choose the “Networking Only” cluster template via the cluster wizard. The downside is that it would be a more restrictive resource model that would go back on the decision to have a single generic ECS Cluster resource that could potentially contain both Fargate and EC2 services or tasks. Given that we are moving towards more generic versions of ECS resources, this is not a preferable solution. That being said, in the current iteration we can set the Fargate Capacity Providers on the cluster by default, but put them behind a feature flag, which we would be able to remove in the v2 version of the ECS module. Using the feature flag would ensure that there would not be a diff in the generated CFN template for existing customers defining ECS clusters in their stack who redeploy using an updated version of the CDK.
121-

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"@yarnpkg/lockfile": "^1.1.0",
20-
"cdk-generate-synthetic-examples": "^0.1.3",
20+
"cdk-generate-synthetic-examples": "^0.1.5",
2121
"conventional-changelog-cli": "^2.2.2",
2222
"fs-extra": "^9.1.0",
2323
"graceful-fs": "^4.2.9",
@@ -33,7 +33,8 @@
3333
},
3434
"resolutions": {
3535
"colors": "1.4.0",
36-
"string-width": "^4.2.3"
36+
"string-width": "^4.2.3",
37+
"markdown-it": "^12.3.2"
3738
},
3839
"repository": {
3940
"type": "git",

packages/@aws-cdk-containers/ecs-service-extensions/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@aws-cdk/cfn2ts": "0.0.0",
4646
"jest": "^27.4.7",
4747
"@aws-cdk/pkglint": "0.0.0",
48-
"@aws-cdk/assert-internal": "0.0.0"
48+
"@aws-cdk/assertions": "0.0.0"
4949
},
5050
"dependencies": {
5151
"@aws-cdk/aws-applicationautoscaling": "0.0.0",

packages/@aws-cdk-containers/ecs-service-extensions/test/appmesh.test.ts

+9-25
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Match, Template } from '@aws-cdk/assertions';
22
import * as appmesh from '@aws-cdk/aws-appmesh';
33
import * as ecs from '@aws-cdk/aws-ecs';
44
import * as cdk from '@aws-cdk/core';
@@ -34,7 +34,7 @@ describe('appmesh', () => {
3434

3535
// THEN
3636
// Ensure that task has an App Mesh sidecar
37-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
37+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
3838
ContainerDefinitions: [
3939
{
4040
Cpu: 256,
@@ -210,7 +210,7 @@ describe('appmesh', () => {
210210
});
211211

212212
// Ensure that the service has the right settings
213-
expect(stack).toHaveResource('AWS::ECS::Service', {
213+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
214214
Cluster: {
215215
Ref: 'productionenvironmentclusterC6599D2D',
216216
},
@@ -256,8 +256,6 @@ describe('appmesh', () => {
256256
Ref: 'myservicetaskdefinitionF3E2D86F',
257257
},
258258
});
259-
260-
261259
});
262260

263261
test('should have the right maximumPercentage at desired count == 1', () => {
@@ -288,15 +286,13 @@ describe('appmesh', () => {
288286
desiredCount: 1,
289287
});
290288

291-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
289+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
292290
DeploymentConfiguration: {
293291
MaximumPercent: 200,
294292
MinimumHealthyPercent: 100,
295293
},
296294
DesiredCount: 1,
297295
});
298-
299-
300296
});
301297

302298
test('should have the right maximumPercentage at desired count == 2', () => {
@@ -327,15 +323,13 @@ describe('appmesh', () => {
327323
desiredCount: 2,
328324
});
329325

330-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
326+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
331327
DeploymentConfiguration: {
332328
MaximumPercent: 150,
333329
MinimumHealthyPercent: 100,
334330
},
335331
DesiredCount: 2,
336332
});
337-
338-
339333
});
340334

341335
test('should have the right maximumPercentage at desired count == 3', () => {
@@ -366,15 +360,13 @@ describe('appmesh', () => {
366360
desiredCount: 3,
367361
});
368362

369-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
363+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
370364
DeploymentConfiguration: {
371365
MaximumPercent: 150,
372366
MinimumHealthyPercent: 100,
373367
},
374368
DesiredCount: 3,
375369
});
376-
377-
378370
});
379371

380372
test('should have the right maximumPercentage at desired count == 4', () => {
@@ -405,15 +397,13 @@ describe('appmesh', () => {
405397
desiredCount: 4,
406398
});
407399

408-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
400+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
409401
DeploymentConfiguration: {
410402
MaximumPercent: 125,
411403
MinimumHealthyPercent: 100,
412404
},
413405
DesiredCount: 4,
414406
});
415-
416-
417407
});
418408

419409
test('should have the right maximumPercentage at desired count > 4', () => {
@@ -444,15 +434,13 @@ describe('appmesh', () => {
444434
desiredCount: 8,
445435
});
446436

447-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
437+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
448438
DeploymentConfiguration: {
449439
MaximumPercent: 125,
450440
MinimumHealthyPercent: 100,
451441
},
452442
DesiredCount: 8,
453443
});
454-
455-
456444
});
457445

458446
test('should be able to create multiple App Mesh enabled services and connect', () => {
@@ -516,9 +504,7 @@ describe('appmesh', () => {
516504
greeterService.connectTo(greetingService);
517505

518506
// THEN
519-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition');
520-
521-
507+
Template.fromStack(stack).hasResource('AWS::ECS::TaskDefinition', Match.anyValue());
522508
});
523509

524510
test('should detect when attempting to connect services from two different envs', () => {
@@ -572,7 +558,5 @@ describe('appmesh', () => {
572558
expect(() => {
573559
developmentNameService.connectTo(productionNameService);
574560
}).toThrow(/Unable to connect service 'name-development' in environment 'development' to service 'name-production' in environment 'production' because services can not be connected across environment boundaries/);
575-
576-
577561
});
578562
});

packages/@aws-cdk-containers/ecs-service-extensions/test/assign-public-ip.test.ts

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as autoscaling from '@aws-cdk/aws-autoscaling';
33
import * as ec2 from '@aws-cdk/aws-ec2';
44
import * as ecs from '@aws-cdk/aws-ecs';
@@ -29,15 +29,13 @@ describe('assign public ip', () => {
2929
});
3030

3131
// THEN
32-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
32+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
3333
NetworkConfiguration: {
3434
AwsvpcConfiguration: {
3535
AssignPublicIp: 'ENABLED',
3636
},
3737
},
3838
});
39-
40-
4139
});
4240

4341
test('errors when adding a public ip to ec2-backed service', () => {
@@ -76,8 +74,6 @@ describe('assign public ip', () => {
7674
serviceDescription,
7775
});
7876
}).toThrow(/Fargate/i);
79-
80-
8177
});
8278

8379
test('should not add a task record manager by default', () => {
@@ -103,8 +99,6 @@ describe('assign public ip', () => {
10399

104100
// THEN
105101
expect(service.ecsService.node.tryFindChild('TaskRecordManager')).toBeUndefined();
106-
107-
108102
});
109103

110104
test('should add a task record manager when dns is requested', () => {
@@ -138,8 +132,6 @@ describe('assign public ip', () => {
138132

139133
// THEN
140134
expect(service.ecsService.node.tryFindChild('TaskRecordManager')).toBeDefined();
141-
142-
143135
});
144136

145137
test('task record manager listens for ecs events', () => {
@@ -172,7 +164,7 @@ describe('assign public ip', () => {
172164
});
173165

174166
// THEN
175-
expect(stack).toHaveResourceLike('AWS::Events::Rule', {
167+
Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
176168
EventPattern: {
177169
'source': ['aws.ecs'],
178170
'detail-type': [
@@ -185,7 +177,7 @@ describe('assign public ip', () => {
185177
},
186178
});
187179

188-
expect(stack).toHaveResourceLike('AWS::Events::Rule', {
180+
Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
189181
EventPattern: {
190182
'source': ['aws.ecs'],
191183
'detail-type': [
@@ -197,7 +189,5 @@ describe('assign public ip', () => {
197189
},
198190
},
199191
});
200-
201-
202192
});
203193
});

0 commit comments

Comments
 (0)