Skip to content

Commit 229e57e

Browse files
authored
Merge branch 'master' into nija-at/rds-undep
2 parents a3e4bac + ddf2881 commit 229e57e

19 files changed

+1139
-4574
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
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.134.0](https://github.com/aws/aws-cdk/compare/v1.133.0...v1.134.0) (2021-11-23)
6+
7+
8+
### Features
9+
10+
* **apigatewayv2:** domain endpoint type, security policy and endpoint migration ([#17518](https://github.com/aws/aws-cdk/issues/17518)) ([261b331](https://github.com/aws/aws-cdk/commit/261b331e89be01dc996d153c91b4018e7ddfda29))
11+
* **cfnspec:** cloudformation spec v49.0.0 ([#17621](https://github.com/aws/aws-cdk/issues/17621)) ([ce638b4](https://github.com/aws/aws-cdk/commit/ce638b407ac9efc6a3ee4d5ecd22c68ab68b8e58))
12+
* **docdb:** add option to set the name of the generated Secret ([#17574](https://github.com/aws/aws-cdk/issues/17574)) ([18c9ef7](https://github.com/aws/aws-cdk/commit/18c9ef713717fcb2f84e687c1e34c887a50264bd)), closes [#17572](https://github.com/aws/aws-cdk/issues/17572)
13+
* **eks:** ALB Controller ([#17618](https://github.com/aws/aws-cdk/issues/17618)) ([1faf31d](https://github.com/aws/aws-cdk/commit/1faf31d1ec7ffec4c6323a050126b0b054094c63))
14+
* **msk:** add Kafka version 2.6.2 ([#17497](https://github.com/aws/aws-cdk/issues/17497)) ([5f1f476](https://github.com/aws/aws-cdk/commit/5f1f4762e964345741426fa1242320a5fc117338))
15+
16+
17+
### Bug Fixes
18+
19+
* **assets:** add missing SAM asset metadata information ([#17591](https://github.com/aws/aws-cdk/issues/17591)) ([55df760](https://github.com/aws/aws-cdk/commit/55df760fdd9514384de019e5ce338d5250c7df97)), closes [#14593](https://github.com/aws/aws-cdk/issues/14593)
20+
* **aws-ecs:** check for invalid capacityProviderName ([#17291](https://github.com/aws/aws-cdk/issues/17291)) ([6e2fde4](https://github.com/aws/aws-cdk/commit/6e2fde452de73c51011ddb14ede40ca0471d3663)), closes [#17321](https://github.com/aws/aws-cdk/issues/17321)
21+
* **opensearch:** correctly validate ebs configuration against instance types ([#16911](https://github.com/aws/aws-cdk/issues/16911)) ([34af598](https://github.com/aws/aws-cdk/commit/34af5988b7c1ff003d10612150191803f762a79f)), closes [#11898](https://github.com/aws/aws-cdk/issues/11898)
22+
523
## [1.133.0](https://github.com/aws/aws-cdk/compare/v1.132.0...v1.133.0) (2021-11-19)
624

725

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,12 @@ contain three slashes to achieve the same effect:
556556
For a practical example of how making sample code compilable works, see the
557557
`aws-ec2` package.
558558

559+
> ⚠️ NOTE: README files often contain code snippets that refer to modules that are consumers
560+
> of the current module, and hence not present in the current module's dependency closure.
561+
> Compilation of these snippets will fail if the module referenced has not been built.
562+
> For the best experience when working on snippets, a full build of the CDK repo is required.
563+
> However, it may be prudent to "build up" these modules as required.
564+
559565
#### Recommendations
560566

561567
In order to offer a consistent documentation style throughout the AWS CDK

DEPRECATED_APIs.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,6 @@
741741
| @aws-cdk/aws-ecs | BaseService.​configureAwsVpcNetworking() | use configureAwsVpcNetworkingWithSecurityGroups instead. |
742742
| @aws-cdk/aws-ecs | BaseServiceOptions.​propagateTaskTagsFrom | Use `propagateTags` instead. |
743743
| @aws-cdk/aws-ecs | Cluster.​addAutoScalingGroup() | Use {@link Cluster.addAsgCapacityProvider} instead. |
744-
| @aws-cdk/aws-ecs | Cluster.​addCapacity() | Use {@link Cluster.addAsgCapacityProvider} instead. |
745744
| @aws-cdk/aws-ecs | Cluster.​addCapacityProvider() | Use {@link enableFargateCapacityProviders} instead. |
746745
| @aws-cdk/aws-ecs | ClusterProps.​capacityProviders | Use {@link ClusterProps.enableFargateCapacityProviders} instead. |
747746
| @aws-cdk/aws-ecs | Ec2ServiceProps.​securityGroup | use securityGroups instead. |

deprecated_apis.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,6 @@ constructs.Node#uniqueId
737737
@aws-cdk/aws-ecs.BaseService#configureAwsVpcNetworking
738738
@aws-cdk/aws-ecs.BaseServiceOptions#propagateTaskTagsFrom
739739
@aws-cdk/aws-ecs.Cluster#addAutoScalingGroup
740-
@aws-cdk/aws-ecs.Cluster#addCapacity
741740
@aws-cdk/aws-ecs.Cluster#addCapacityProvider
742741
@aws-cdk/aws-ecs.ClusterProps#capacityProviders
743742
@aws-cdk/aws-ecs.Ec2ServiceProps#securityGroup

packages/@aws-cdk/aws-ecs/lib/cluster.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,11 @@ export class Cluster extends Resource implements ICluster {
287287
}
288288

289289
/**
290+
* It is highly recommended to use {@link Cluster.addAsgCapacityProvider} instead of this method.
291+
*
290292
* This method adds compute capacity to a cluster by creating an AutoScalingGroup with the specified options.
291293
*
292294
* Returns the AutoScalingGroup so you can add autoscaling settings to it.
293-
*
294-
* @deprecated Use {@link Cluster.addAsgCapacityProvider} instead.
295295
*/
296296
public addCapacity(id: string, options: AddCapacityOptions): autoscaling.AutoScalingGroup {
297297
// Do 2-way defaulting here: if the machineImageType is BOTTLEROCKET, pick the right AMI.

packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.expected.json

Lines changed: 194 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,181 @@
88
"BlockPublicPolicy": true,
99
"IgnorePublicAcls": true,
1010
"RestrictPublicBuckets": true
11+
},
12+
"Tags": [
13+
{
14+
"Key": "aws-cdk:auto-delete-objects",
15+
"Value": "true"
16+
},
17+
{
18+
"Key": "aws-cdk:cr-owned:f8f0a91c",
19+
"Value": "true"
20+
}
21+
]
22+
},
23+
"UpdateReplacePolicy": "Delete",
24+
"DeletionPolicy": "Delete"
25+
},
26+
"BucketPolicyE9A3008A": {
27+
"Type": "AWS::S3::BucketPolicy",
28+
"Properties": {
29+
"Bucket": {
30+
"Ref": "Bucket83908E77"
31+
},
32+
"PolicyDocument": {
33+
"Statement": [
34+
{
35+
"Action": [
36+
"s3:GetBucket*",
37+
"s3:List*",
38+
"s3:DeleteObject*"
39+
],
40+
"Effect": "Allow",
41+
"Principal": {
42+
"AWS": {
43+
"Fn::GetAtt": [
44+
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
45+
"Arn"
46+
]
47+
}
48+
},
49+
"Resource": [
50+
{
51+
"Fn::GetAtt": [
52+
"Bucket83908E77",
53+
"Arn"
54+
]
55+
},
56+
{
57+
"Fn::Join": [
58+
"",
59+
[
60+
{
61+
"Fn::GetAtt": [
62+
"Bucket83908E77",
63+
"Arn"
64+
]
65+
},
66+
"/*"
67+
]
68+
]
69+
}
70+
]
71+
}
72+
],
73+
"Version": "2012-10-17"
74+
}
75+
}
76+
},
77+
"BucketAutoDeleteObjectsCustomResourceBAFD23C2": {
78+
"Type": "Custom::S3AutoDeleteObjects",
79+
"Properties": {
80+
"ServiceToken": {
81+
"Fn::GetAtt": [
82+
"CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F",
83+
"Arn"
84+
]
85+
},
86+
"BucketName": {
87+
"Ref": "Bucket83908E77"
1188
}
1289
},
90+
"DependsOn": [
91+
"BucketPolicyE9A3008A"
92+
],
1393
"UpdateReplacePolicy": "Delete",
1494
"DeletionPolicy": "Delete"
1595
},
96+
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": {
97+
"Type": "AWS::IAM::Role",
98+
"Properties": {
99+
"AssumeRolePolicyDocument": {
100+
"Version": "2012-10-17",
101+
"Statement": [
102+
{
103+
"Action": "sts:AssumeRole",
104+
"Effect": "Allow",
105+
"Principal": {
106+
"Service": "lambda.amazonaws.com"
107+
}
108+
}
109+
]
110+
},
111+
"ManagedPolicyArns": [
112+
{
113+
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
114+
}
115+
]
116+
}
117+
},
118+
"CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": {
119+
"Type": "AWS::Lambda::Function",
120+
"Properties": {
121+
"Code": {
122+
"S3Bucket": {
123+
"Ref": "AssetParameters84e9b89449fe2573e51d08cc143e21116ed4608c6db56afffcb4ad85c8130709S3Bucket2C6C817C"
124+
},
125+
"S3Key": {
126+
"Fn::Join": [
127+
"",
128+
[
129+
{
130+
"Fn::Select": [
131+
0,
132+
{
133+
"Fn::Split": [
134+
"||",
135+
{
136+
"Ref": "AssetParameters84e9b89449fe2573e51d08cc143e21116ed4608c6db56afffcb4ad85c8130709S3VersionKeyFA215BD6"
137+
}
138+
]
139+
}
140+
]
141+
},
142+
{
143+
"Fn::Select": [
144+
1,
145+
{
146+
"Fn::Split": [
147+
"||",
148+
{
149+
"Ref": "AssetParameters84e9b89449fe2573e51d08cc143e21116ed4608c6db56afffcb4ad85c8130709S3VersionKeyFA215BD6"
150+
}
151+
]
152+
}
153+
]
154+
}
155+
]
156+
]
157+
}
158+
},
159+
"Timeout": 900,
160+
"MemorySize": 128,
161+
"Handler": "__entrypoint__.handler",
162+
"Role": {
163+
"Fn::GetAtt": [
164+
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
165+
"Arn"
166+
]
167+
},
168+
"Runtime": "nodejs12.x",
169+
"Description": {
170+
"Fn::Join": [
171+
"",
172+
[
173+
"Lambda function for auto-deleting objects in ",
174+
{
175+
"Ref": "Bucket83908E77"
176+
},
177+
" S3 bucket."
178+
]
179+
]
180+
}
181+
},
182+
"DependsOn": [
183+
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092"
184+
]
185+
},
16186
"Vpc8378EB38": {
17187
"Type": "AWS::EC2::VPC",
18188
"Properties": {
@@ -1087,7 +1257,6 @@
10871257
"DestinationBucketName": {
10881258
"Ref": "Bucket83908E77"
10891259
},
1090-
"RetainOnDelete": false,
10911260
"Prune": true
10921261
},
10931262
"UpdateReplacePolicy": "Delete",
@@ -1219,7 +1388,7 @@
12191388
"Properties": {
12201389
"Code": {
12211390
"S3Bucket": {
1222-
"Ref": "AssetParametersa3058ccb468d757ebb89df5363a1c20f5307c6911136f29d00e1a68c9b2aa7e8S3BucketD1AD544E"
1391+
"Ref": "AssetParameters983c442a2fe823a8b4ebb18d241a5150ae15103dacbf3f038c7c6343e565aa4cS3Bucket1BE31DB0"
12231392
},
12241393
"S3Key": {
12251394
"Fn::Join": [
@@ -1232,7 +1401,7 @@
12321401
"Fn::Split": [
12331402
"||",
12341403
{
1235-
"Ref": "AssetParametersa3058ccb468d757ebb89df5363a1c20f5307c6911136f29d00e1a68c9b2aa7e8S3VersionKey93A19D70"
1404+
"Ref": "AssetParameters983c442a2fe823a8b4ebb18d241a5150ae15103dacbf3f038c7c6343e565aa4cS3VersionKeyDC38E49C"
12361405
}
12371406
]
12381407
}
@@ -1245,7 +1414,7 @@
12451414
"Fn::Split": [
12461415
"||",
12471416
{
1248-
"Ref": "AssetParametersa3058ccb468d757ebb89df5363a1c20f5307c6911136f29d00e1a68c9b2aa7e8S3VersionKey93A19D70"
1417+
"Ref": "AssetParameters983c442a2fe823a8b4ebb18d241a5150ae15103dacbf3f038c7c6343e565aa4cS3VersionKeyDC38E49C"
12491418
}
12501419
]
12511420
}
@@ -1332,9 +1501,17 @@
13321501
}
13331502
},
13341503
"Parameters": {
1335-
"SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": {
1336-
"Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
1337-
"Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id"
1504+
"AssetParameters84e9b89449fe2573e51d08cc143e21116ed4608c6db56afffcb4ad85c8130709S3Bucket2C6C817C": {
1505+
"Type": "String",
1506+
"Description": "S3 bucket for asset \"84e9b89449fe2573e51d08cc143e21116ed4608c6db56afffcb4ad85c8130709\""
1507+
},
1508+
"AssetParameters84e9b89449fe2573e51d08cc143e21116ed4608c6db56afffcb4ad85c8130709S3VersionKeyFA215BD6": {
1509+
"Type": "String",
1510+
"Description": "S3 key for asset version \"84e9b89449fe2573e51d08cc143e21116ed4608c6db56afffcb4ad85c8130709\""
1511+
},
1512+
"AssetParameters84e9b89449fe2573e51d08cc143e21116ed4608c6db56afffcb4ad85c8130709ArtifactHash17D48178": {
1513+
"Type": "String",
1514+
"Description": "Artifact hash for asset \"84e9b89449fe2573e51d08cc143e21116ed4608c6db56afffcb4ad85c8130709\""
13381515
},
13391516
"AssetParameterse9882ab123687399f934da0d45effe675ecc8ce13b40cb946f3e1d6141fe8d68S3BucketAEADE8C7": {
13401517
"Type": "String",
@@ -1348,17 +1525,17 @@
13481525
"Type": "String",
13491526
"Description": "Artifact hash for asset \"e9882ab123687399f934da0d45effe675ecc8ce13b40cb946f3e1d6141fe8d68\""
13501527
},
1351-
"AssetParametersa3058ccb468d757ebb89df5363a1c20f5307c6911136f29d00e1a68c9b2aa7e8S3BucketD1AD544E": {
1528+
"AssetParameters983c442a2fe823a8b4ebb18d241a5150ae15103dacbf3f038c7c6343e565aa4cS3Bucket1BE31DB0": {
13521529
"Type": "String",
1353-
"Description": "S3 bucket for asset \"a3058ccb468d757ebb89df5363a1c20f5307c6911136f29d00e1a68c9b2aa7e8\""
1530+
"Description": "S3 bucket for asset \"983c442a2fe823a8b4ebb18d241a5150ae15103dacbf3f038c7c6343e565aa4c\""
13541531
},
1355-
"AssetParametersa3058ccb468d757ebb89df5363a1c20f5307c6911136f29d00e1a68c9b2aa7e8S3VersionKey93A19D70": {
1532+
"AssetParameters983c442a2fe823a8b4ebb18d241a5150ae15103dacbf3f038c7c6343e565aa4cS3VersionKeyDC38E49C": {
13561533
"Type": "String",
1357-
"Description": "S3 key for asset version \"a3058ccb468d757ebb89df5363a1c20f5307c6911136f29d00e1a68c9b2aa7e8\""
1534+
"Description": "S3 key for asset version \"983c442a2fe823a8b4ebb18d241a5150ae15103dacbf3f038c7c6343e565aa4c\""
13581535
},
1359-
"AssetParametersa3058ccb468d757ebb89df5363a1c20f5307c6911136f29d00e1a68c9b2aa7e8ArtifactHash238275D6": {
1536+
"AssetParameters983c442a2fe823a8b4ebb18d241a5150ae15103dacbf3f038c7c6343e565aa4cArtifactHashBA6352EA": {
13601537
"Type": "String",
1361-
"Description": "Artifact hash for asset \"a3058ccb468d757ebb89df5363a1c20f5307c6911136f29d00e1a68c9b2aa7e8\""
1538+
"Description": "Artifact hash for asset \"983c442a2fe823a8b4ebb18d241a5150ae15103dacbf3f038c7c6343e565aa4c\""
13621539
},
13631540
"AssetParameters972240f9dd6e036a93d5f081af9a24315b2053828ac049b3b19b2fa12d7ae64aS3Bucket1F1A8472": {
13641541
"Type": "String",
@@ -1383,6 +1560,10 @@
13831560
"AssetParameters872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724dArtifactHashC2522C05": {
13841561
"Type": "String",
13851562
"Description": "Artifact hash for asset \"872561bf078edd1685d50c9ff821cdd60d2b2ddfb0013c4087e79bf2bb50724d\""
1563+
},
1564+
"SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": {
1565+
"Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
1566+
"Default": "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id"
13861567
}
13871568
}
13881569
}

packages/@aws-cdk/aws-ecs/test/ec2/integ.environment-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const stack = new cdk.Stack(app, 'aws-ecs-integ');
1313
const bucket = new s3.Bucket(stack, 'Bucket', {
1414
blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
1515
removalPolicy: cdk.RemovalPolicy.DESTROY,
16+
autoDeleteObjects: true,
1617
});
1718
const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 });
1819

@@ -47,7 +48,6 @@ const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDefinition', {
4748
// deploy an envfile to S3 and delete when the bucket is deleted
4849
const envFileDeployment = new s3deployment.BucketDeployment(stack, 'EnvFileDeployment', {
4950
destinationBucket: bucket,
50-
retainOnDelete: false,
5151
sources: [s3deployment.Source.asset(path.join(__dirname, '../demo-envfiles'))],
5252
});
5353

0 commit comments

Comments
 (0)