Skip to content

Commit 2a534c4

Browse files
authored
Merge branch 'main' into TheRealAmazonKendra/eks-legacy
2 parents 2140999 + 1a560b0 commit 2a534c4

216 files changed

Lines changed: 505 additions & 615 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.

CHANGELOG.v2.alpha.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
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.38.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.38.0-alpha.0...v2.38.1-alpha.0) (2022-08-18)
6+
57
## [2.38.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.37.1-alpha.0...v2.38.0-alpha.0) (2022-08-17)
68

79

CHANGELOG.v2.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
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.38.1](https://github.com/aws/aws-cdk/compare/v2.38.0...v2.38.1) (2022-08-18)
6+
7+
### Reverts
8+
9+
* cli: revert "feat(cli): --concurrency option" ([#21664](https://github.com/aws/aws-cdk/pull/21664)) ([2ad2163b](https://github.com/aws/aws-cdk/commit/2ad2163b96254f9715dff405100a047d6c2c5958))
10+
* cli: revert "feat(cli): cdk watch --concurrency" ([#21665](https://github.com/aws/aws-cdk/pull/21665)) ([6048d4fc](https://github.com/aws/aws-cdk/commit/6048d4fc37239bcd5193d5487464590c786bf56b))
11+
512
## [2.38.0](https://github.com/aws/aws-cdk/compare/v2.37.1...v2.38.0) (2022-08-17)
613

714

packages/@aws-cdk/aws-ecr-assets/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ configure it on the asset itself.
4949
Use `asset.imageUri` to reference the image. It includes both the ECR image URL
5050
and tag.
5151

52+
Use `asset.imageTag` to reference only the image tag.
53+
5254
You can optionally pass build args to the `docker build` command by specifying
5355
the `buildArgs` property. It is recommended to skip hashing of `buildArgs` for
5456
values that can change between different machines to maintain a consistent

packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ export class DockerImageAsset extends Construct implements IAsset {
243243
*/
244244
public readonly assetHash: string;
245245

246+
/**
247+
* The tag of this asset when it is uploaded to ECR. The tag may differ from the assetHash if a stack synthesizer adds a dockerTagPrefix.
248+
*/
249+
public readonly imageTag: string;
250+
246251
/**
247252
* The path to the asset, relative to the current Cloud Assembly
248253
*
@@ -362,6 +367,7 @@ export class DockerImageAsset extends Construct implements IAsset {
362367

363368
this.repository = ecr.Repository.fromRepositoryName(this, 'Repository', location.repositoryName);
364369
this.imageUri = location.imageUri;
370+
this.imageTag = location.imageTag ?? this.assetHash;
365371
}
366372

367373
/**

packages/@aws-cdk/aws-ecr-assets/lib/tarball-asset.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ export class TarballImageAsset extends Construct implements IAsset {
5151
*/
5252
public readonly assetHash: string;
5353

54+
/**
55+
* The tag of this asset when it is uploaded to ECR. The tag may differ from the assetHash if a stack synthesizer adds a dockerTagPrefix.
56+
*/
57+
public readonly imageTag: string;
58+
5459
constructor(scope: Construct, id: string, props: TarballImageAssetProps) {
5560
super(scope, id);
5661

@@ -78,6 +83,7 @@ export class TarballImageAsset extends Construct implements IAsset {
7883

7984
this.repository = ecr.Repository.fromRepositoryName(this, 'Repository', location.repositoryName);
8085
this.imageUri = location.imageUri;
86+
this.imageTag = location.imageTag ?? this.assetHash;
8187
}
8288
}
8389

packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,30 @@ describe('image asset', () => {
405405
expect(asset1.assetHash).toEqual('13248c55633f3b198a628bb2ea4663cb5226f8b2801051bd0c725950266fd590');
406406
expect(asset2.assetHash).toEqual('b78978ca702a8eccd37804ce31d76cd83a695b557dbf95aeb109332ee8b1fd32');
407407
});
408+
409+
describe('imageTag is correct for different stack synthesizers', () => {
410+
const stack1 = new Stack();
411+
const stack2 = new Stack(undefined, undefined, {
412+
synthesizer: new DefaultStackSynthesizer({
413+
dockerTagPrefix: 'banana',
414+
}),
415+
});
416+
417+
const directory = path.join(__dirname, 'demo-image-custom-docker-file');
418+
419+
const asset1 = new DockerImageAsset(stack1, 'Asset1', { directory });
420+
const asset2 = new DockerImageAsset(stack2, 'Asset2', { directory });
421+
422+
test('stack with default synthesizer', () => {
423+
expect(asset1.assetHash).toEqual('13248c55633f3b198a628bb2ea4663cb5226f8b2801051bd0c725950266fd590');
424+
expect(asset1.imageTag).toEqual('13248c55633f3b198a628bb2ea4663cb5226f8b2801051bd0c725950266fd590');
425+
});
426+
427+
test('stack with overwritten synthesizer', () => {
428+
expect(asset2.assetHash).toEqual('13248c55633f3b198a628bb2ea4663cb5226f8b2801051bd0c725950266fd590');
429+
expect(asset2.imageTag).toEqual('banana13248c55633f3b198a628bb2ea4663cb5226f8b2801051bd0c725950266fd590');
430+
});
431+
});
408432
});
409433

410434
function testDockerDirectoryIsStagedWithoutFilesSpecifiedInDockerignore(app: App, ignoreMode?: IgnoreMode) {

packages/@aws-cdk/aws-ecr-assets/test/tarball-asset.test.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Template } from '@aws-cdk/assertions';
44
import * as iam from '@aws-cdk/aws-iam';
55
import { testFutureBehavior } from '@aws-cdk/cdk-build-tools/lib/feature-flag';
66
import * as cxschema from '@aws-cdk/cloud-assembly-schema';
7-
import { App, Stack } from '@aws-cdk/core';
7+
import { App, Stack, DefaultStackSynthesizer } from '@aws-cdk/core';
88
import * as cxapi from '@aws-cdk/cx-api';
99
import { TarballImageAsset } from '../lib';
1010

@@ -136,6 +136,32 @@ describe('image asset', () => {
136136
}).toThrow(/Cannot find file at/);
137137

138138
});
139+
140+
describe('imageTag is correct for different stack synthesizers', () => {
141+
const stack1 = new Stack();
142+
const stack2 = new Stack(undefined, undefined, {
143+
synthesizer: new DefaultStackSynthesizer({
144+
dockerTagPrefix: 'banana',
145+
}),
146+
});
147+
const asset1 = new TarballImageAsset(stack1, 'MyAsset', {
148+
tarballFile: 'test/demo-tarball/empty.tar',
149+
});
150+
const asset2 = new TarballImageAsset(stack2, 'MyAsset', {
151+
tarballFile: 'test/demo-tarball/empty.tar',
152+
});
153+
154+
test('stack with default synthesizer', () => {
155+
expect(asset1.assetHash).toEqual('95c924c84f5d023be4edee540cb2cb401a49f115d01ed403b288f6cb412771df');
156+
expect(asset1.imageTag).toEqual('95c924c84f5d023be4edee540cb2cb401a49f115d01ed403b288f6cb412771df');
157+
});
158+
159+
test('stack with overwritten synthesizer', () => {
160+
expect(asset2.assetHash).toEqual('95c924c84f5d023be4edee540cb2cb401a49f115d01ed403b288f6cb412771df');
161+
expect(asset2.imageTag).toEqual('banana95c924c84f5d023be4edee540cb2cb401a49f115d01ed403b288f6cb412771df');
162+
});
163+
});
164+
139165
});
140166

141167
function isAssetManifest(x: cxapi.CloudArtifact): x is cxapi.AssetManifestArtifact {

packages/@aws-cdk/cfnspec/CHANGELOG.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,96 @@
1+
# CloudFormation Resource Specification v85.0.0
2+
3+
## New Resource Types
4+
5+
6+
## Attribute Changes
7+
8+
* AWS::RDS::DBParameterGroup Documentation (__changed__)
9+
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbparametergroup.html
10+
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html
11+
* AWS::RDS::DBParameterGroup DBParameterGroupName (__deleted__)
12+
13+
## Property Changes
14+
15+
* AWS::Connect::ContactFlow Type.Required (__changed__)
16+
* Old: false
17+
* New: true
18+
* AWS::EC2::LaunchTemplate VersionDescription (__added__)
19+
* AWS::Lambda::EventSourceMapping AmazonManagedKafkaEventSourceConfig (__added__)
20+
* AWS::Lambda::EventSourceMapping SelfManagedKafkaEventSourceConfig (__added__)
21+
* AWS::OpenSearchService::Domain AdvancedSecurityOptions.UpdateType (__changed__)
22+
* Old: Immutable
23+
* New: Mutable
24+
* AWS::RDS::DBInstance AvailabilityZone.UpdateType (__changed__)
25+
* Old: Immutable
26+
* New: Mutable
27+
* AWS::RDS::DBParameterGroup Description.Documentation (__changed__)
28+
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbparametergroup.html#cfn-rds-dbparametergroup-description
29+
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html#cfn-rds-dbparametergroup-description
30+
* AWS::RDS::DBParameterGroup Description.UpdateType (__changed__)
31+
* Old: Immutable
32+
* New: Mutable
33+
* AWS::RDS::DBParameterGroup Family.Documentation (__changed__)
34+
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbparametergroup.html#cfn-rds-dbparametergroup-family
35+
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html#cfn-rds-dbparametergroup-family
36+
* AWS::RDS::DBParameterGroup Family.UpdateType (__changed__)
37+
* Old: Immutable
38+
* New: Mutable
39+
* AWS::RDS::DBParameterGroup Parameters.PrimitiveType (__deleted__)
40+
* AWS::RDS::DBParameterGroup Parameters.DuplicatesAllowed (__added__)
41+
* AWS::RDS::DBParameterGroup Parameters.PrimitiveItemType (__added__)
42+
* AWS::RDS::DBParameterGroup Parameters.Type (__added__)
43+
* AWS::RDS::DBParameterGroup Parameters.Documentation (__changed__)
44+
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbparametergroup.html#cfn-rds-dbparametergroup-parameters
45+
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html#cfn-rds-dbparametergroup-parameters
46+
* AWS::RDS::DBParameterGroup Tags.Documentation (__changed__)
47+
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbparametergroup.html#cfn-rds-dbparametergroup-tags
48+
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html#cfn-rds-dbparametergroup-tags
49+
* AWS::Redshift::EndpointAccess ClusterIdentifier.Required (__changed__)
50+
* Old: false
51+
* New: true
52+
* AWS::Redshift::EndpointAccess SubnetGroupName.Required (__changed__)
53+
* Old: false
54+
* New: true
55+
56+
## Property Type Changes
57+
58+
* AWS::EC2::NetworkInsightsAnalysis.AdditionalDetail (__added__)
59+
* AWS::Lambda::EventSourceMapping.AmazonManagedKafkaEventSourceConfig (__added__)
60+
* AWS::Lambda::EventSourceMapping.SelfManagedKafkaEventSourceConfig (__added__)
61+
* AWS::EC2::NetworkInsightsAnalysis.AnalysisRouteTableRoute State (__added__)
62+
* AWS::EC2::NetworkInsightsAnalysis.Explanation ComponentAccount (__added__)
63+
* AWS::EC2::NetworkInsightsAnalysis.Explanation ComponentRegion (__added__)
64+
* AWS::EC2::NetworkInsightsAnalysis.PathComponent AdditionalDetails (__added__)
65+
* AWS::EC2::NetworkInsightsAnalysis.PathComponent ElasticLoadBalancerListener (__added__)
66+
* AWS::EC2::NetworkInsightsAnalysis.PathComponent Explanations (__added__)
67+
* AWS::OpenSearchService::Domain.AdvancedSecurityOptionsInput Enabled.UpdateType (__changed__)
68+
* Old: Immutable
69+
* New: Mutable
70+
* AWS::OpenSearchService::Domain.AdvancedSecurityOptionsInput InternalUserDatabaseEnabled.UpdateType (__changed__)
71+
* Old: Immutable
72+
* New: Mutable
73+
* AWS::OpenSearchService::Domain.AdvancedSecurityOptionsInput MasterUserOptions.UpdateType (__changed__)
74+
* Old: Immutable
75+
* New: Mutable
76+
* AWS::OpenSearchService::Domain.EBSOptions Throughput (__added__)
77+
* AWS::OpenSearchService::Domain.MasterUserOptions MasterUserARN.UpdateType (__changed__)
78+
* Old: Immutable
79+
* New: Mutable
80+
* AWS::OpenSearchService::Domain.MasterUserOptions MasterUserName.UpdateType (__changed__)
81+
* Old: Immutable
82+
* New: Mutable
83+
* AWS::OpenSearchService::Domain.MasterUserOptions MasterUserPassword.UpdateType (__changed__)
84+
* Old: Immutable
85+
* New: Mutable
86+
87+
## Unapplied changes
88+
89+
* AWS::ConnectCampaigns is at 0.0.0
90+
* AWS::Rekognition is at 68.0.0
91+
* AWS::RolesAnywhere is at 0.0.0
92+
* AWS::SageMaker is at 72.0.0
93+
194
# CloudFormation Resource Specification v84.0.0
295

396
## New Resource Types
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
84.0.0
1+
85.0.0

packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/.000_AWS_ConnectCampaigns.rejected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828
}
2929
},
30-
"ResourceSpecificationVersion": "84.0.0",
30+
"ResourceSpecificationVersion": "85.0.0",
3131
"ResourceTypes": {
3232
"AWS::ConnectCampaigns::Campaign": {
3333
"Attributes": {

0 commit comments

Comments
 (0)