Skip to content

Commit 2699ffd

Browse files
authored
2 parents 6b41c8b + 9616fd2 commit 2699ffd

File tree

540 files changed

+254477
-110753
lines changed

Some content is hidden

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

540 files changed

+254477
-110753
lines changed

CHANGELOG.v2.alpha.md

+2
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.139.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.138.0-alpha.0...v2.139.0-alpha.0) (2024-04-24)
6+
57
## [2.138.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.137.0-alpha.0...v2.138.0-alpha.0) (2024-04-18)
68

79

CHANGELOG.v2.md

+25
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
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.139.0](https://github.com/aws/aws-cdk/compare/v2.138.0...v2.139.0) (2024-04-24)
6+
7+
8+
### Features
9+
10+
* **appconfig:** constrain environments to a single deployment at a time ([#29500](https://github.com/aws/aws-cdk/issues/29500)) ([3dd834d](https://github.com/aws/aws-cdk/commit/3dd834d66a9345eaab372a9dd59e673e52c86d7e)), closes [#29345](https://github.com/aws/aws-cdk/issues/29345)
11+
* **ecs:** support `pidMode` for `FargateTaskDefinition` ([#29670](https://github.com/aws/aws-cdk/issues/29670)) ([ed75b16](https://github.com/aws/aws-cdk/commit/ed75b160f86b266a256ed7dd347dc54a34b937d0)), closes [#29619](https://github.com/aws/aws-cdk/issues/29619)
12+
* **ecs:** support adding docker labels after container construction ([#29734](https://github.com/aws/aws-cdk/issues/29734)) ([8e215b3](https://github.com/aws/aws-cdk/commit/8e215b3c740efa260e18dab9cd30c487c822f3ef)), closes [#29728](https://github.com/aws/aws-cdk/issues/29728)
13+
* **efs:** replicating file systems ([#29347](https://github.com/aws/aws-cdk/issues/29347)) ([a15dc93](https://github.com/aws/aws-cdk/commit/a15dc939c8d3ba3ac0f20b4a78ec7d403cde56bd)), closes [#21455](https://github.com/aws/aws-cdk/issues/21455)
14+
* **ses-actions:** `WorkMail` rule action ([#29854](https://github.com/aws/aws-cdk/issues/29854)) ([6fdc458](https://github.com/aws/aws-cdk/commit/6fdc4582f659549021a64a4d676fce12fc241715))
15+
* update L1 CloudFormation resource definitions ([#29924](https://github.com/aws/aws-cdk/issues/29924)) ([27b7a45](https://github.com/aws/aws-cdk/commit/27b7a4529bc23b068d338b937e08c92ab4a0f962))
16+
17+
18+
### Bug Fixes
19+
20+
* **CLI:** `diff --template` crashes ([#29896](https://github.com/aws/aws-cdk/issues/29896)) ([466f170](https://github.com/aws/aws-cdk/commit/466f170af409d0c9c44f0f03a6eb5a72553db29b)), closes [#29890](https://github.com/aws/aws-cdk/issues/29890)
21+
* **CLI:** bootstrap shows no hotswap changes when there are no changes ([#29877](https://github.com/aws/aws-cdk/issues/29877)) ([2126ee5](https://github.com/aws/aws-cdk/commit/2126ee5b1eac4bce2d085b1a9bd27a65eb33b137)), closes [#25736](https://github.com/aws/aws-cdk/issues/25736)
22+
* **custom-resource-handler:** auto-delete-[objects|images] breaks on cloudformation rollback ([#29581](https://github.com/aws/aws-cdk/issues/29581)) ([69ea52f](https://github.com/aws/aws-cdk/commit/69ea52f6e2b82dfe65c33d119f7ab998f367c6bf))
23+
* **custom-resources:** cannot set logging for state machine generated in CompleteHandler ([#28706](https://github.com/aws/aws-cdk/issues/28706)) ([99041b2](https://github.com/aws/aws-cdk/commit/99041b29fa00cad6c7dbdc19685866add3e1243e)), closes [#27283](https://github.com/aws/aws-cdk/issues/27283) [#28577](https://github.com/aws/aws-cdk/issues/28577) [#28744](https://github.com/aws/aws-cdk/issues/28744) [#27310](https://github.com/aws/aws-cdk/issues/27310) [#28699](https://github.com/aws/aws-cdk/issues/28699) [#28587](https://github.com/aws/aws-cdk/issues/28587)
24+
* **eks:** incorrect nodegroupName(under feature flag) ([#29794](https://github.com/aws/aws-cdk/issues/29794)) ([8bb8c55](https://github.com/aws/aws-cdk/commit/8bb8c5579108e8b80e465049c2a28c5c10c70b09))
25+
* **elasticloadbalancingv2:** crossZoneEnabled does not support false for ALB ([#29907](https://github.com/aws/aws-cdk/issues/29907)) ([f6c902e](https://github.com/aws/aws-cdk/commit/f6c902e701b3a8283a5d9a9fb136e3321d7bf61e))
26+
* **events-targets:** `ApiGateway` events target should accept IRestApi ([#29397](https://github.com/aws/aws-cdk/issues/29397)) ([8e1fefd](https://github.com/aws/aws-cdk/commit/8e1fefd81c6531063eba94f352a2b6d12c87810b)), closes [#16423](https://github.com/aws/aws-cdk/issues/16423) [/github.com/aws/aws-cdk/pull/16542#discussion_r713676896](https://github.com/aws//github.com/aws/aws-cdk/pull/16542/issues/discussion_r713676896) [/github.com/aws/aws-cdk/pull/16542#issuecomment-925051255](https://github.com/aws//github.com/aws/aws-cdk/pull/16542/issues/issuecomment-925051255)
27+
* **s3-notifications:** cdk destroy deletes external/existing s3 notification events ([#29939](https://github.com/aws/aws-cdk/issues/29939)) ([7360a88](https://github.com/aws/aws-cdk/commit/7360a885e6282ad28b4ae72f9ae92a6bcda88b15))
28+
* **ses-actions:** permissions too wide for S3 action ([#29833](https://github.com/aws/aws-cdk/issues/29833)) ([2da544f](https://github.com/aws/aws-cdk/commit/2da544feeeda68a379f0f79f18e138b9640c1691)), closes [#29811](https://github.com/aws/aws-cdk/issues/29811) [#29823](https://github.com/aws/aws-cdk/issues/29823) [/docs.aws.amazon.com/ses/latest/dg/receiving-email-permissions.html#receiving-email-permissions-s3](https://github.com/aws//docs.aws.amazon.com/ses/latest/dg/receiving-email-permissions.html/issues/receiving-email-permissions-s3)
29+
530
## [2.138.0](https://github.com/aws/aws-cdk/compare/v2.137.0...v2.138.0) (2024-04-18)
631

732

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
* @param maxAttempts the maximum number of attempts
3+
* @param interval interval in milliseconds to observe between attempts
4+
*/
5+
export type EventuallyOptions = {
6+
maxAttempts?: number;
7+
interval?: number;
8+
};
9+
10+
const wait = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms));
11+
const DEFAULT_INTERVAL = 1000;
12+
const DEFAULT_MAX_ATTEMPTS = 10;
13+
14+
/**
15+
* Runs a function on an interval until the maximum number of attempts has
16+
* been reached.
17+
*
18+
* Default interval = 1000 milliseconds
19+
* Default maxAttempts = 10
20+
*
21+
* @param fn function to run
22+
* @param options EventuallyOptions
23+
*/
24+
const eventually = async <T>(call: () => Promise<T>, options?: EventuallyOptions): Promise<T> => {
25+
const opts = {
26+
interval: options?.interval ? options.interval : DEFAULT_INTERVAL,
27+
maxAttempts: options?.maxAttempts ? options.maxAttempts : DEFAULT_MAX_ATTEMPTS,
28+
};
29+
30+
while (opts.maxAttempts-- >= 0) {
31+
try {
32+
return await call();
33+
} catch (err) {
34+
if (opts.maxAttempts <= 0) throw err;
35+
}
36+
await wait(opts.interval);
37+
}
38+
39+
throw new Error('An unexpected error has occurred.');
40+
};
41+
42+
export default eventually;

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

+19-10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as fs from 'fs';
33
import * as path from 'path';
44
import * as yaml from 'yaml';
55
import { integTest, randomString, withoutBootstrap } from '../../lib';
6+
import eventually from '../../lib/eventually';
67

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

@@ -283,17 +284,25 @@ integTest('can remove customPermissionsBoundary', withoutBootstrap(async (fixtur
283284
}),
284285
});
285286
policyArn = policy.Policy?.Arn;
286-
await fixture.cdkBootstrapModern({
287-
// toolkitStackName doesn't matter for this particular invocation
288-
toolkitStackName: bootstrapStackName,
289-
customPermissionsBoundary: policyName,
290-
});
291287

292-
const response = await fixture.aws.cloudFormation('describeStacks', { StackName: bootstrapStackName });
293-
expect(
294-
response.Stacks?.[0].Parameters?.some(
295-
param => (param.ParameterKey === 'InputPermissionsBoundary' && param.ParameterValue === policyName),
296-
)).toEqual(true);
288+
// Policy creation and consistency across regions is "almost immediate"
289+
// See: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
290+
// We will put this in an `eventually` block to retry stack creation with a reasonable timeout
291+
const createStackWithPermissionBoundary = async (): Promise<void> => {
292+
await fixture.cdkBootstrapModern({
293+
// toolkitStackName doesn't matter for this particular invocation
294+
toolkitStackName: bootstrapStackName,
295+
customPermissionsBoundary: policyName,
296+
});
297+
298+
const response = await fixture.aws.cloudFormation('describeStacks', { StackName: bootstrapStackName });
299+
expect(
300+
response.Stacks?.[0].Parameters?.some(
301+
param => (param.ParameterKey === 'InputPermissionsBoundary' && param.ParameterValue === policyName),
302+
)).toEqual(true);
303+
};
304+
305+
await eventually(createStackWithPermissionBoundary, { maxAttempts: 3 });
297306

298307
await fixture.cdkBootstrapModern({
299308
// toolkitStackName doesn't matter for this particular invocation

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.multi-config-env.js.snapshot/appconfigmulticonfigenvDefaultTestDeployAssert1621E45D.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.multi-config-env.js.snapshot/appconfigmulticonfigenvDefaultTestDeployAssert1621E45D.template.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.multi-config-env.js.snapshot/aws-appconfig-multi-config-env.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
{
2+
"Resources": {
3+
"MyApplicationForEnv1F597ED9": {
4+
"Type": "AWS::AppConfig::Application",
5+
"Properties": {
6+
"Name": "awsappconfigmulticonfigenv-MyApplicationForEnv-1EE3EA95"
7+
}
8+
},
9+
"MultiConfigEnvironment5F41B747": {
10+
"Type": "AWS::AppConfig::Environment",
11+
"Properties": {
12+
"ApplicationId": {
13+
"Ref": "MyApplicationForEnv1F597ED9"
14+
},
15+
"Name": "awsappconfigmulticonfigenv-MultiConfigEnvironment-59525230"
16+
}
17+
},
18+
"QuickDeploymentStrategy980252EC": {
19+
"Type": "AWS::AppConfig::DeploymentStrategy",
20+
"Properties": {
21+
"DeploymentDurationInMinutes": 1,
22+
"GrowthFactor": 50,
23+
"GrowthType": "LINEAR",
24+
"Name": "awsappconfigmulticonfigenv-QuickDeploymentStrategy-CAB72574",
25+
"ReplicateTo": "NONE"
26+
}
27+
},
28+
"MyFirstConfigConfigurationProfileAB11F87A": {
29+
"Type": "AWS::AppConfig::ConfigurationProfile",
30+
"Properties": {
31+
"ApplicationId": {
32+
"Ref": "MyApplicationForEnv1F597ED9"
33+
},
34+
"LocationUri": "hosted",
35+
"Name": "awsappconfigmulticonfigenv-MyFirstConfig-2FF7CAAB"
36+
}
37+
},
38+
"MyFirstConfig117AFBAC": {
39+
"Type": "AWS::AppConfig::HostedConfigurationVersion",
40+
"Properties": {
41+
"ApplicationId": {
42+
"Ref": "MyApplicationForEnv1F597ED9"
43+
},
44+
"ConfigurationProfileId": {
45+
"Ref": "MyFirstConfigConfigurationProfileAB11F87A"
46+
},
47+
"Content": "first config content",
48+
"ContentType": "application/octet-stream"
49+
},
50+
"UpdateReplacePolicy": "Retain",
51+
"DeletionPolicy": "Retain"
52+
},
53+
"MyFirstConfigDeployment5AEBAD52B8EE4": {
54+
"Type": "AWS::AppConfig::Deployment",
55+
"Properties": {
56+
"ApplicationId": {
57+
"Ref": "MyApplicationForEnv1F597ED9"
58+
},
59+
"ConfigurationProfileId": {
60+
"Ref": "MyFirstConfigConfigurationProfileAB11F87A"
61+
},
62+
"ConfigurationVersion": {
63+
"Ref": "MyFirstConfig117AFBAC"
64+
},
65+
"DeploymentStrategyId": {
66+
"Ref": "QuickDeploymentStrategy980252EC"
67+
},
68+
"EnvironmentId": {
69+
"Ref": "MultiConfigEnvironment5F41B747"
70+
}
71+
}
72+
},
73+
"MySecondConfigConfigurationProfileD0CC1BAA": {
74+
"Type": "AWS::AppConfig::ConfigurationProfile",
75+
"Properties": {
76+
"ApplicationId": {
77+
"Ref": "MyApplicationForEnv1F597ED9"
78+
},
79+
"LocationUri": "hosted",
80+
"Name": "awsappconfigmulticonfigenv-MySecondConfig-4F837809"
81+
}
82+
},
83+
"MySecondConfig28DEBAC4": {
84+
"Type": "AWS::AppConfig::HostedConfigurationVersion",
85+
"Properties": {
86+
"ApplicationId": {
87+
"Ref": "MyApplicationForEnv1F597ED9"
88+
},
89+
"ConfigurationProfileId": {
90+
"Ref": "MySecondConfigConfigurationProfileD0CC1BAA"
91+
},
92+
"Content": "second config content",
93+
"ContentType": "application/octet-stream"
94+
},
95+
"UpdateReplacePolicy": "Retain",
96+
"DeletionPolicy": "Retain"
97+
},
98+
"MySecondConfigDeployment5AEBAD1470BE4": {
99+
"Type": "AWS::AppConfig::Deployment",
100+
"Properties": {
101+
"ApplicationId": {
102+
"Ref": "MyApplicationForEnv1F597ED9"
103+
},
104+
"ConfigurationProfileId": {
105+
"Ref": "MySecondConfigConfigurationProfileD0CC1BAA"
106+
},
107+
"ConfigurationVersion": {
108+
"Ref": "MySecondConfig28DEBAC4"
109+
},
110+
"DeploymentStrategyId": {
111+
"Ref": "QuickDeploymentStrategy980252EC"
112+
},
113+
"EnvironmentId": {
114+
"Ref": "MultiConfigEnvironment5F41B747"
115+
}
116+
},
117+
"DependsOn": [
118+
"MyFirstConfigDeployment5AEBAD52B8EE4"
119+
]
120+
}
121+
},
122+
"Parameters": {
123+
"BootstrapVersion": {
124+
"Type": "AWS::SSM::Parameter::Value<String>",
125+
"Default": "/cdk-bootstrap/hnb659fds/version",
126+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
127+
}
128+
},
129+
"Rules": {
130+
"CheckBootstrapVersion": {
131+
"Assertions": [
132+
{
133+
"Assert": {
134+
"Fn::Not": [
135+
{
136+
"Fn::Contains": [
137+
[
138+
"1",
139+
"2",
140+
"3",
141+
"4",
142+
"5"
143+
],
144+
{
145+
"Ref": "BootstrapVersion"
146+
}
147+
]
148+
}
149+
]
150+
},
151+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
152+
}
153+
]
154+
}
155+
}
156+
}

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.multi-config-env.js.snapshot/cdk.out

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.multi-config-env.js.snapshot/integ.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)