Skip to content

Commit d879954

Browse files
authored
Merge branch 'main' into bump-cfnspec-main/v78.1.0
2 parents cbb45f0 + d55ad0e commit d879954

163 files changed

Lines changed: 654 additions & 2051 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.30.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.29.1-alpha.0...v2.30.0-alpha.0) (2022-07-01)
6+
57
## [2.29.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.29.0-alpha.0...v2.29.1-alpha.0) (2022-06-24)
68

79
## [2.29.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.28.1-alpha.0...v2.29.0-alpha.0) (2022-06-22)

CHANGELOG.v2.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+
## [2.30.0](https://github.com/aws/aws-cdk/compare/v2.29.1...v2.30.0) (2022-07-01)
6+
7+
### Features
8+
9+
* **appmesh:** ipv6 support for app mesh ([#20766](https://github.com/aws/aws-cdk/issues/20766)) ([b1e6d62](https://github.com/aws/aws-cdk/commit/b1e6d62ed6b6ede0362d0a68d804660e84efe5cb)), closes [#20737](https://github.com/aws/aws-cdk/issues/20737)
10+
* **cognito:** make `grant()` available on `IUserPool` ([#20799](https://github.com/aws/aws-cdk/issues/20799)) ([a1df570](https://github.com/aws/aws-cdk/commit/a1df570b89c6d456077bb934e0bf08217677ef1f)), closes [#20285](https://github.com/aws/aws-cdk/issues/20285)
11+
* **iam:** PolicyStatements can be frozen ([#20911](https://github.com/aws/aws-cdk/issues/20911)) ([3bf737b](https://github.com/aws/aws-cdk/commit/3bf737bd172eda016d2e9bb7c5f40c001399fd23))
12+
* **lambda:** grant function permissions to an AWS organization ([#19975](https://github.com/aws/aws-cdk/issues/19975)) ([2566017](https://github.com/aws/aws-cdk/commit/2566017a83ec4f9c2c5cefda4585a3f71e3516e7)), closes [#19538](https://github.com/aws/aws-cdk/issues/19538) [#20146](https://github.com/aws/aws-cdk/issues/20146)
13+
* **rds:** add missing aurora postgres versions ([#20830](https://github.com/aws/aws-cdk/issues/20830)) ([2151a0e](https://github.com/aws/aws-cdk/commit/2151a0e9b988723e050e6f37ed1780cced16c519))
14+
15+
16+
### Bug Fixes
17+
18+
* **apigateway:** Explicitly test for undefined instead of falsey for stage default options ([#20868](https://github.com/aws/aws-cdk/issues/20868)) ([b368a31](https://github.com/aws/aws-cdk/commit/b368a315cab0cedf03298083f5f1fb809bd1d1f2))
19+
* **eks:** revert shell=True and allow public ecr to work ([#20724](https://github.com/aws/aws-cdk/issues/20724)) ([de153fc](https://github.com/aws/aws-cdk/commit/de153fcdd47a4cdcd1d156d5e19684969d990c8e))
20+
* **pipelines:** 'ConfirmPermissionsBroadening' uses wrong node version ([#20861](https://github.com/aws/aws-cdk/issues/20861)) ([bac965e](https://github.com/aws/aws-cdk/commit/bac965e9c4d435ae45d5cf16aa809f33bbb05a0f))
21+
* **secretsmanager:** SecretRotation app does not set DeletionPolicy ([#20901](https://github.com/aws/aws-cdk/issues/20901)) ([f2b4eff](https://github.com/aws/aws-cdk/commit/f2b4effc903ab3a36dc925516f3329f236d03a70))
22+
523
## [2.29.1](https://github.com/aws/aws-cdk/compare/v2.29.0...v2.29.1) (2022-06-24)
624

725

docs/DESIGN_GUIDELINES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ The AWS Construct Library, which is shipped as part of the AWS CDK constructs
126126
representing AWS resources.
127127

128128
The AWS Construct Library has multiple layers of constructs, beginning
129-
with low-level constructs, which we call _CFN Resources_ (or L1, short for
130-
"level 1") or CFN Resources (short for CloudFormation). These constructs
129+
with low-level constructs, which we call _CFN Resources_ (short for
130+
CloudFormation resources), or L1 (short for "level 1"). These constructs
131131
directly represent all resources available in AWS CloudFormation. CFN Resources
132132
are periodically generated from the AWS CloudFormation Resource
133133
Specification. They are named **Cfn**_Xyz_, where _Xyz_ is name of the
@@ -456,7 +456,7 @@ A prop should be *required* only if there is no possible sensible default value
456456
that can be provided *or calculated*.
457457

458458
Sensible defaults have a tremendous impact on the developer experience. They
459-
offer a quick way to get started with minimal cognitive, but do not limit users
459+
offer a quick way to get started with minimal cognitive load, but do not limit users
460460
from harnessing the full power of the resource, and customizing its behavior.
461461

462462
> A good way to determine what's the right sensible default is to refer to the

packages/@aws-cdk/aws-autoscaling/lib/step-scaling-policy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export class StepScalingPolicy extends Construct {
108108
this.lowerAction = new StepScalingAction(this, 'LowerPolicy', {
109109
adjustmentType: props.adjustmentType,
110110
cooldown: props.cooldown,
111+
estimatedInstanceWarmup: props.estimatedInstanceWarmup,
111112
metricAggregationType: props.metricAggregationType ?? aggregationTypeFromMetric(props.metric),
112113
minAdjustmentMagnitude: props.minAdjustmentMagnitude,
113114
autoScalingGroup: props.autoScalingGroup,
@@ -138,6 +139,7 @@ export class StepScalingPolicy extends Construct {
138139
this.upperAction = new StepScalingAction(this, 'UpperPolicy', {
139140
adjustmentType: props.adjustmentType,
140141
cooldown: props.cooldown,
142+
estimatedInstanceWarmup: props.estimatedInstanceWarmup,
141143
metricAggregationType: props.metricAggregationType ?? aggregationTypeFromMetric(props.metric),
142144
minAdjustmentMagnitude: props.minAdjustmentMagnitude,
143145
autoScalingGroup: props.autoScalingGroup,

packages/@aws-cdk/aws-autoscaling/test/scaling.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ describe('scaling', () => {
205205
namespace: 'Henk',
206206
dimensionsMap: { Mustache: 'Bushy' },
207207
}),
208+
estimatedInstanceWarmup: cdk.Duration.seconds(150),
208209
// Adjust the number of legs to be closer to 2
209210
scalingSteps: [
210211
{ lower: 0, upper: 2, change: +1 },
@@ -241,6 +242,7 @@ describe('scaling', () => {
241242
Template.fromStack(stack).hasResourceProperties('AWS::AutoScaling::ScalingPolicy', {
242243
MetricAggregationType: 'Average',
243244
PolicyType: 'StepScaling',
245+
EstimatedInstanceWarmup: 150,
244246
StepAdjustments: [
245247
{
246248
MetricIntervalUpperBound: 0,

packages/@aws-cdk/aws-chatbot/test/chatbot-logretention.integ.snapshot/asset.22bb41d703c8e7a9a1712308f455fcf58cc012b0a386c9df563a6244a61e6665/index.js

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/aws-cloudfront-origins/lib/s3-origin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ class S3BucketOrigin extends cloudfront.OriginBase {
8484
}
8585

8686
protected renderS3OriginConfig(): cloudfront.CfnDistribution.S3OriginConfigProperty | undefined {
87-
return { originAccessIdentity: `origin-access-identity/cloudfront/${this.originAccessIdentity.originAccessIdentityName}` };
87+
return { originAccessIdentity: `origin-access-identity/cloudfront/${this.originAccessIdentity.originAccessIdentityId}` };
8888
}
8989
}

packages/@aws-cdk/aws-cloudfront/lib/origin-access-identity.ts

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,35 @@ export interface OriginAccessIdentityProps {
2020
*/
2121
export interface IOriginAccessIdentity extends cdk.IResource, iam.IGrantable {
2222
/**
23-
* The Origin Access Identity Name
23+
* The Origin Access Identity Id (physical id)
24+
* It is misnamed and superseded by the correctly named originAccessIdentityId
25+
*
26+
* @deprecated use originAccessIdentityId instead
2427
*/
2528
readonly originAccessIdentityName: string;
29+
30+
/**
31+
* The Origin Access Identity Id (physical id)
32+
* This was called originAccessIdentityName before
33+
*/
34+
readonly originAccessIdentityId: string;
2635
}
2736

2837
abstract class OriginAccessIdentityBase extends cdk.Resource {
2938
/**
30-
* The Origin Access Identity Name (physical id)
39+
* The Origin Access Identity Id (physical id)
40+
* It is misnamed and superseded by the correctly named originAccessIdentityId
41+
*
42+
* @deprecated use originAccessIdentityId instead
3143
*/
3244
public abstract readonly originAccessIdentityName: string;
45+
46+
/**
47+
* The Origin Access Identity Id (physical id)
48+
* This was called originAccessIdentityName before
49+
*/
50+
public abstract readonly originAccessIdentityId: string;
51+
3352
/**
3453
* Derived principal value for bucket access
3554
*/
@@ -45,7 +64,7 @@ abstract class OriginAccessIdentityBase extends cdk.Resource {
4564
region: '', // global
4665
account: 'cloudfront',
4766
resource: 'user',
48-
resourceName: `CloudFront Origin Access Identity ${this.originAccessIdentityName}`,
67+
resourceName: `CloudFront Origin Access Identity ${this.originAccessIdentityId}`,
4968
},
5069
);
5170
}
@@ -60,18 +79,32 @@ abstract class OriginAccessIdentityBase extends cdk.Resource {
6079
*/
6180
export class OriginAccessIdentity extends OriginAccessIdentityBase implements IOriginAccessIdentity {
6281
/**
63-
* Creates a OriginAccessIdentity by providing the OriginAccessIdentityName
82+
* Creates a OriginAccessIdentity by providing the OriginAccessIdentityId.
83+
* It is misnamed and superseded by the correctly named fromOriginAccessIdentityId.
84+
*
85+
* @deprecated use `fromOriginAccessIdentityId`
6486
*/
6587
public static fromOriginAccessIdentityName(
6688
scope: Construct,
6789
id: string,
6890
originAccessIdentityName: string): IOriginAccessIdentity {
91+
return OriginAccessIdentity.fromOriginAccessIdentityId(scope, id, originAccessIdentityName);
92+
}
93+
94+
/**
95+
* Creates a OriginAccessIdentity by providing the OriginAccessIdentityId.
96+
*/
97+
public static fromOriginAccessIdentityId(
98+
scope: Construct,
99+
id: string,
100+
originAccessIdentityId: string): IOriginAccessIdentity {
69101

70102
class Import extends OriginAccessIdentityBase {
71-
public readonly originAccessIdentityName = originAccessIdentityName;
103+
public readonly originAccessIdentityId = originAccessIdentityId;
104+
public readonly originAccessIdentityName = originAccessIdentityId;
72105
public readonly grantPrincipal = new iam.ArnPrincipal(this.arn());
73106
constructor(s: Construct, i: string) {
74-
super(s, i, { physicalName: originAccessIdentityName });
107+
super(s, i, { physicalName: originAccessIdentityId });
75108
}
76109
}
77110

@@ -93,11 +126,23 @@ export class OriginAccessIdentity extends OriginAccessIdentityBase implements IO
93126
public readonly grantPrincipal: iam.IPrincipal;
94127

95128
/**
96-
* The Origin Access Identity Name (physical id)
129+
* The Origin Access Identity Id (physical id)
130+
* It is misnamed and superseded by the correctly named originAccessIdentityId
131+
*
132+
* @attribute
133+
* @deprecated use originAccessIdentityId instead
134+
*/
135+
public get originAccessIdentityName() {
136+
return this.originAccessIdentityId;
137+
}
138+
139+
/**
140+
* The Origin Access Identity Id (physical id)
141+
* This was called originAccessIdentityName before
97142
*
98143
* @attribute
99144
*/
100-
public readonly originAccessIdentityName: string;
145+
public readonly originAccessIdentityId: string;
101146

102147
/**
103148
* CDK L1 resource
@@ -112,8 +157,8 @@ export class OriginAccessIdentity extends OriginAccessIdentityBase implements IO
112157
this.resource = new CfnCloudFrontOriginAccessIdentity(this, 'Resource', {
113158
cloudFrontOriginAccessIdentityConfig: { comment },
114159
});
115-
// physical id - OAI name
116-
this.originAccessIdentityName = this.getResourceNameAttribute(this.resource.ref);
160+
// physical id - OAI Id
161+
this.originAccessIdentityId = this.getResourceNameAttribute(this.resource.ref);
117162

118163
// Canonical user to grant access to in the S3 Bucket Policy
119164
this.cloudFrontOriginAccessIdentityS3CanonicalUserId = this.resource.attrS3CanonicalUserId;

packages/@aws-cdk/aws-cloudfront/lib/web-distribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ export class CloudFrontWebDistribution extends cdk.Resource implements IDistribu
11071107
}));
11081108

11091109
s3OriginConfig = {
1110-
originAccessIdentity: `origin-access-identity/cloudfront/${originConfig.s3OriginSource.originAccessIdentity.originAccessIdentityName}`,
1110+
originAccessIdentity: `origin-access-identity/cloudfront/${originConfig.s3OriginSource.originAccessIdentity.originAccessIdentityId}`,
11111111
};
11121112
} else {
11131113
s3OriginConfig = {};

packages/@aws-cdk/aws-cloudfront/test/integ.cloudfront-s3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const oai = new cloudfront.CfnCloudFrontOriginAccessIdentity(stack, 'OAI', {
1212
},
1313
});
1414

15-
const oaiImported = cloudfront.OriginAccessIdentity.fromOriginAccessIdentityName(
15+
const oaiImported = cloudfront.OriginAccessIdentity.fromOriginAccessIdentityId(
1616
stack,
1717
'OAIImported',
1818
oai.ref,

0 commit comments

Comments
 (0)