diff --git a/package.json b/package.json
index 02cb1f0f0ad24..90c003df8e3e3 100644
--- a/package.json
+++ b/package.json
@@ -19,14 +19,14 @@
"@types/node": "18.11.19",
"@types/prettier": "2.6.0",
"@yarnpkg/lockfile": "^1.1.0",
- "cdk-generate-synthetic-examples": "^0.1.167",
+ "cdk-generate-synthetic-examples": "^0.1.173",
"conventional-changelog-cli": "^2.2.2",
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.10",
"jest-junit": "^13.2.0",
- "jsii-diff": "1.76.0",
- "jsii-pacmak": "1.76.0",
- "jsii-reflect": "1.76.0",
+ "jsii-diff": "1.77.0",
+ "jsii-pacmak": "1.77.0",
+ "jsii-reflect": "1.77.0",
"jsii-rosetta": "v4.9-next",
"lerna": "^4.0.0",
"patch-package": "^6.5.1",
diff --git a/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts b/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts
index 779df577f10bb..7c8611e45bf21 100644
--- a/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts
+++ b/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts
@@ -36,6 +36,7 @@ export function integTest(
output.write('================================================================\n');
try {
+ process.stderr.write(`▶️ [INTEG TEST::${name}] Starting...\n`);
return await callback({
output,
randomString: randomString(),
@@ -44,6 +45,7 @@ export function integTest(
},
});
} catch (e) {
+ process.stderr.write(`💥 [INTEG TEST::${name}] Failed: ${e}\n`);
output.write(e.message);
output.write(e.stack);
// Print output only if the test fails. Use 'console.log' so the output is buffered by
@@ -51,6 +53,8 @@ export function integTest(
// eslint-disable-next-line no-console
console.log(output.buffer().toString());
throw e;
+ } finally {
+ process.stderr.write(`⏹️ [INTEG TEST::${name}] Done.\n`);
}
}, timeoutMillis);
}
diff --git a/packages/@aws-cdk-testing/cli-integ/lib/resource-pool.ts b/packages/@aws-cdk-testing/cli-integ/lib/resource-pool.ts
index 1c10f54be562d..58c39e0364797 100644
--- a/packages/@aws-cdk-testing/cli-integ/lib/resource-pool.ts
+++ b/packages/@aws-cdk-testing/cli-integ/lib/resource-pool.ts
@@ -44,9 +44,12 @@ export class ResourcePool {
while (true) {
// Start a wait on the unlock now -- if the unlock signal comes after
// we try to acquire but before we start the wait, we might miss it.
- const wait = this.pool.awaitUnlock(5000);
+ //
+ // (The timeout is in case the unlock signal doesn't come for whatever reason).
+ const wait = this.pool.awaitUnlock(10_000);
- for (const res of this.unlockedResources()) {
+ // Try all mutexes, we might need to reacquire an expired lock
+ for (const res of this.resources) {
const lease = await this.tryObtainLease(res);
if (lease) {
// Ignore the wait (count as handled)
@@ -107,13 +110,6 @@ export class ResourcePool {
delete this.locks[value];
await lock?.release();
}
-
- /**
- * Return all resources that we definitely don't own the locks for
- */
- private unlockedResources(): A[] {
- return this.resources.filter(res => !this.locks[res]);
- }
}
/**
diff --git a/packages/@aws-cdk-testing/cli-integ/lib/xpmutex.ts b/packages/@aws-cdk-testing/cli-integ/lib/xpmutex.ts
index 4687164a1b5ee..5b900b92f6e4d 100644
--- a/packages/@aws-cdk-testing/cli-integ/lib/xpmutex.ts
+++ b/packages/@aws-cdk-testing/cli-integ/lib/xpmutex.ts
@@ -141,7 +141,7 @@ export class XpMutex {
// signal due to unfortunate timing.
const wait = this.pool.awaitUnlock(5000);
- const lock = await this.acquire();
+ const lock = await this.tryAcquire();
if (lock) {
// Ignore the wait (count as handled)
wait.then(() => {}, () => {});
diff --git a/packages/@aws-cdk-testing/cli-integ/package.json b/packages/@aws-cdk-testing/cli-integ/package.json
index c10c9e803dd9f..1112571062f33 100644
--- a/packages/@aws-cdk-testing/cli-integ/package.json
+++ b/packages/@aws-cdk-testing/cli-integ/package.json
@@ -39,7 +39,7 @@
},
"dependencies": {
"@octokit/rest": "^18.12.0",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"axios": "^0.27.2",
"fs-extra": "^9.1.0",
"glob": "^7.2.3",
diff --git a/packages/@aws-cdk-testing/cli-integ/test/xpmutex.test.ts b/packages/@aws-cdk-testing/cli-integ/test/xpmutex.test.ts
new file mode 100644
index 0000000000000..7adfbea8f4a4b
--- /dev/null
+++ b/packages/@aws-cdk-testing/cli-integ/test/xpmutex.test.ts
@@ -0,0 +1,46 @@
+import { XpMutexPool } from '../lib/xpmutex';
+
+const POOL = XpMutexPool.fromName('test-pool');
+
+test('acquire waits', async () => {
+ const mux = POOL.mutex('testA');
+ let secondLockAcquired = false;
+
+ // Current "process" acquires lock
+ const lock = await mux.acquire();
+
+ // Start a second "process" that tries to acquire the lock
+ const secondProcess = (async () => {
+ const secondLock = await mux.acquire();
+ try {
+ secondLockAcquired = true;
+ } finally {
+ await secondLock.release();
+ }
+ })();
+
+ // Once we release the lock the second process is free to take it
+ expect(secondLockAcquired).toBe(false);
+ await lock.release();
+
+ // We expect the variable to become true
+ await waitFor(() => secondLockAcquired);
+ expect(secondLockAcquired).toBe(true);
+
+ await secondProcess;
+});
+
+
+/**
+ * Poll for some condition every 10ms
+ */
+function waitFor(pred: () => boolean): Promise {
+ return new Promise((ok) => {
+ const timerHandle = setInterval(() => {
+ if (pred()) {
+ clearInterval(timerHandle);
+ ok();
+ }
+ }, 5);
+ });
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk-testing/cli-integ/tests/init-go/init-go.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/init-go/init-go.integtest.ts
index f9772a7d80460..779078ac68739 100644
--- a/packages/@aws-cdk-testing/cli-integ/tests/init-go/init-go.integtest.ts
+++ b/packages/@aws-cdk-testing/cli-integ/tests/init-go/init-go.integtest.ts
@@ -8,7 +8,7 @@ import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '..
await context.packages.makeCliAvailable();
await shell.shell(['cdk', 'init', '-l', 'go', template]);
- await shell.shell(['go', 'mod', 'edit', '-replace', 'github.com/aws/aws-cdk-go/awscdk=$dist_root/go/awscdk']);
+ await shell.shell(['go', 'mod', 'edit', '-replace', 'github.com/aws/aws-cdk-go/awscdk/v2=$CODEBUILD_SRC_DIR/go/awscdk']);
await shell.shell(['go', 'mod', 'tidy']);
await shell.shell(['go', 'test']);
await shell.shell(['cdk', 'synth']);
diff --git a/packages/@aws-cdk/aws-amplify/package.json b/packages/@aws-cdk/aws-amplify/package.json
index f20455b24296e..c6408fb81a4e9 100644
--- a/packages/@aws-cdk/aws-amplify/package.json
+++ b/packages/@aws-cdk/aws-amplify/package.json
@@ -88,7 +88,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"jsii": "v4.9-next"
},
"dependencies": {
diff --git a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts
index 545e5440ef34b..8315f5c54db13 100644
--- a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts
+++ b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts
@@ -7,6 +7,7 @@ import { CfnAuthorizer, CfnAuthorizerProps } from '../apigateway.generated';
import { Authorizer, IAuthorizer } from '../authorizer';
import { IRestApi } from '../restapi';
+
/**
* Base properties for all lambda authorizers
*/
@@ -122,22 +123,36 @@ abstract class LambdaAuthorizer extends Authorizer implements IAuthorizer {
*/
protected setupPermissions() {
if (!this.role) {
- this.handler.addPermission(`${Names.uniqueId(this)}:Permissions`, {
- principal: new iam.ServicePrincipal('apigateway.amazonaws.com'),
- sourceArn: this.authorizerArn,
- });
- } else if (this.role instanceof iam.Role) { // i.e. not imported
- this.role.attachInlinePolicy(new iam.Policy(this, 'authorizerInvokePolicy', {
- statements: [
- new iam.PolicyStatement({
- resources: this.handler.resourceArnsForGrantInvoke,
- actions: ['lambda:InvokeFunction'],
- }),
- ],
- }));
+ this.addDefaultPermisionRole();
+ } else if (iam.Role.isRole(this.role)) {
+ this.addLambdaInvokePermission(this.role);
}
}
+ /**
+ * Add Default Permission Role for handler
+ */
+ private addDefaultPermisionRole() :void {
+ this.handler.addPermission(`${Names.uniqueId(this)}:Permissions`, {
+ principal: new iam.ServicePrincipal('apigateway.amazonaws.com'),
+ sourceArn: this.authorizerArn,
+ });
+ }
+
+ /**
+ * Add Lambda Invoke Permission for LambdaAurhorizer's role
+ */
+ private addLambdaInvokePermission(role: iam.Role) :void {
+ role.attachInlinePolicy(new iam.Policy(this, 'authorizerInvokePolicy', {
+ statements: [
+ new iam.PolicyStatement({
+ resources: this.handler.resourceArnsForGrantInvoke,
+ actions: ['lambda:InvokeFunction'],
+ }),
+ ],
+ }));
+ }
+
/**
* Returns a token that resolves to the Rest Api Id at the time of synthesis.
* Throws an error, during token resolution, if no RestApi is attached to this authorizer.
diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.ts
index 169355dad134f..8d629a76aa98f 100644
--- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.ts
+++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.ts
@@ -1,9 +1,7 @@
import * as path from 'path';
import * as lambda from '@aws-cdk/aws-lambda';
import { App, Stack } from '@aws-cdk/core';
-import { MockIntegration, PassthroughBehavior, RestApi } from '../../lib';
-import { RequestAuthorizer } from '../../lib/authorizers';
-import { IdentitySource } from '../../lib/authorizers/identity-source';
+import { MockIntegration, PassthroughBehavior, RestApi, RequestAuthorizer, IdentitySource } from '../../lib';
// Against the RestApi endpoint from the stack output, run
// `curl -s -o /dev/null -w "%{http_code}" ` should return 401
diff --git a/packages/@aws-cdk/aws-apprunner/lib/service.ts b/packages/@aws-cdk/aws-apprunner/lib/service.ts
index 4ab5553ad0442..7cabd377c2574 100644
--- a/packages/@aws-cdk/aws-apprunner/lib/service.ts
+++ b/packages/@aws-cdk/aws-apprunner/lib/service.ts
@@ -4,6 +4,7 @@ import * as iam from '@aws-cdk/aws-iam';
import * as secretsmanager from '@aws-cdk/aws-secretsmanager';
import * as ssm from '@aws-cdk/aws-ssm';
import * as cdk from '@aws-cdk/core';
+import { Lazy } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { CfnService } from './apprunner.generated';
import { IVpcConnector } from './vpc-connector';
@@ -924,16 +925,6 @@ export class Service extends cdk.Resource {
*/
readonly environment: { [key: string]: string } = {};
- /**
- * Environment variables for this service.
- */
- private environmentVariables: { [key: string]: string } = {};
-
- /**
- * Environment secrets for this service.
- */
- private environmentSecrets: { [key: string]: Secret; } = {};
-
/**
* Environment secrets for this service.
*/
@@ -981,17 +972,22 @@ export class Service extends cdk.Resource {
this.source = source;
this.props = props;
- this.environmentVariables = this.getEnvironmentVariables();
- this.environmentSecrets = this.getEnvironmentSecrets();
+ this.instanceRole = this.props.instanceRole;
+
+ const environmentVariables = this.getEnvironmentVariables();
+ const environmentSecrets = this.getEnvironmentSecrets();
+
+ for (const [key, value] of Object.entries(environmentVariables)) {
+ this.addEnvironmentVariable(key, value);
+ }
+ for (const [key, value] of Object.entries(environmentSecrets)) {
+ this.addSecret(key, value);
+ }
// generate an IAM role only when ImageRepositoryType is ECR and props.accessRole is undefined
this.accessRole = (this.source.imageRepository?.imageRepositoryType == ImageRepositoryType.ECR) ?
this.props.accessRole ?? this.generateDefaultRole() : undefined;
- // generalte an IAM role only when environmentSecrets has values and props.instanceRole is undefined
- this.instanceRole = (Object.keys(this.environmentSecrets).length > 0 && !this.props.instanceRole) ?
- this.createInstanceRole() : this.props.instanceRole;
-
if (this.source.codeRepository?.codeConfiguration.configurationSource == ConfigurationSourceType.REPOSITORY &&
this.source.codeRepository?.codeConfiguration.configurationValues) {
throw new Error('configurationValues cannot be provided if the ConfigurationSource is Repository');
@@ -1001,7 +997,7 @@ export class Service extends cdk.Resource {
instanceConfiguration: {
cpu: this.props.cpu?.unit,
memory: this.props.memory?.unit,
- instanceRoleArn: this.instanceRole?.roleArn,
+ instanceRoleArn: Lazy.string({ produce: () => this.instanceRole?.roleArn }),
},
sourceConfiguration: {
authenticationConfiguration: this.renderAuthenticationConfiguration(),
@@ -1036,6 +1032,9 @@ export class Service extends cdk.Resource {
* This method adds an environment variable to the App Runner service.
*/
public addEnvironmentVariable(name: string, value: string) {
+ if (name.startsWith('AWSAPPRUNNER')) {
+ throw new Error(`Environment variable key ${name} with a prefix of AWSAPPRUNNER is not allowed`);
+ }
this.variables.push({ name: name, value: value });
}
@@ -1043,6 +1042,9 @@ export class Service extends cdk.Resource {
* This method adds a secret as environment variable to the App Runner service.
*/
public addSecret(name: string, secret: Secret) {
+ if (name.startsWith('AWSAPPRUNNER')) {
+ throw new Error(`Environment secret key ${name} with a prefix of AWSAPPRUNNER is not allowed`);
+ }
if (!this.instanceRole) {
this.instanceRole = this.createInstanceRole();
}
@@ -1130,20 +1132,14 @@ export class Service extends cdk.Resource {
port: props.port,
buildCommand: props.buildCommand,
runtime: props.runtime.name,
- runtimeEnvironmentVariables: this.renderEnvironmentVariables(),
- runtimeEnvironmentSecrets: this.renderEnvironmentSecrets(),
+ runtimeEnvironmentVariables: Lazy.any({ produce: () => this.renderEnvironmentVariables() }),
+ runtimeEnvironmentSecrets: Lazy.any({ produce: () => this.renderEnvironmentSecrets() }),
startCommand: props.startCommand,
};
}
private renderEnvironmentVariables(): EnvironmentVariable[] | undefined {
- if (Object.keys(this.environmentVariables).length > 0) {
- for (const [key, value] of Object.entries(this.environmentVariables)) {
- if (key.startsWith('AWSAPPRUNNER')) {
- throw new Error(`Environment variable key ${key} with a prefix of AWSAPPRUNNER is not allowed`);
- }
- this.variables.push({ name: key, value: value });
- }
+ if (this.variables.length > 0) {
return this.variables;
} else {
return undefined;
@@ -1151,15 +1147,7 @@ export class Service extends cdk.Resource {
}
private renderEnvironmentSecrets(): EnvironmentSecret[] | undefined {
- if (Object.keys(this.environmentSecrets).length > 0 && this.instanceRole) {
- for (const [key, value] of Object.entries(this.environmentSecrets)) {
- if (key.startsWith('AWSAPPRUNNER')) {
- throw new Error(`Environment secret key ${key} with a prefix of AWSAPPRUNNER is not allowed`);
- }
-
- value.grantRead(this.instanceRole);
- this.secrets.push({ name: key, value: value.arn });
- }
+ if (this.secrets.length > 0 && this.instanceRole) {
return this.secrets;
} else {
return undefined;
@@ -1171,8 +1159,8 @@ export class Service extends cdk.Resource {
imageConfiguration: {
port: repo.imageConfiguration?.port?.toString(),
startCommand: repo.imageConfiguration?.startCommand,
- runtimeEnvironmentVariables: this.renderEnvironmentVariables(),
- runtimeEnvironmentSecrets: this.renderEnvironmentSecrets(),
+ runtimeEnvironmentVariables: Lazy.any({ produce: () => this.renderEnvironmentVariables() }),
+ runtimeEnvironmentSecrets: Lazy.any({ produce: () => this.renderEnvironmentSecrets() }),
},
});
}
diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.assets.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.assets.json
new file mode 100644
index 0000000000000..12219ed3e9ba6
--- /dev/null
+++ b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "30.1.0",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
+ }
+ }
+ }
+ },
+ "dockerImages": {}
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.template.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.template.json
new file mode 100644
index 0000000000000..ad9d0fb73d1dd
--- /dev/null
+++ b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.template.json
@@ -0,0 +1,36 @@
+{
+ "Parameters": {
+ "BootstrapVersion": {
+ "Type": "AWS::SSM::Parameter::Value",
+ "Default": "/cdk-bootstrap/hnb659fds/version",
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
+ }
+ },
+ "Rules": {
+ "CheckBootstrapVersion": {
+ "Assertions": [
+ {
+ "Assert": {
+ "Fn::Not": [
+ {
+ "Fn::Contains": [
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ {
+ "Ref": "BootstrapVersion"
+ }
+ ]
+ }
+ ]
+ },
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/cdk.out b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/cdk.out
new file mode 100644
index 0000000000000..b72fef144f05c
--- /dev/null
+++ b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"30.1.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/integ-apprunner-later-secrets-env-vars.assets.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/integ-apprunner-later-secrets-env-vars.assets.json
new file mode 100644
index 0000000000000..94ab415cc5959
--- /dev/null
+++ b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/integ-apprunner-later-secrets-env-vars.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "30.1.0",
+ "files": {
+ "7cbdc4561bb7693ec11f95d96ee8a14d99732d386c66f27cb36e08a108d4ef30": {
+ "source": {
+ "path": "integ-apprunner-later-secrets-env-vars.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "7cbdc4561bb7693ec11f95d96ee8a14d99732d386c66f27cb36e08a108d4ef30.json",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
+ }
+ }
+ }
+ },
+ "dockerImages": {}
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/integ-apprunner-later-secrets-env-vars.template.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/integ-apprunner-later-secrets-env-vars.template.json
new file mode 100644
index 0000000000000..b9d9c032d5622
--- /dev/null
+++ b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/integ-apprunner-later-secrets-env-vars.template.json
@@ -0,0 +1,157 @@
+{
+ "Resources": {
+ "LaterSecretF6C54C5B": {
+ "Type": "AWS::SecretsManager::Secret",
+ "Properties": {
+ "SecretString": "{\"password\":\"mySecretPassword\",\"apikey\":\"mySecretApiKey\"}"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "Service9DECC815E": {
+ "Type": "AWS::AppRunner::Service",
+ "Properties": {
+ "SourceConfiguration": {
+ "AuthenticationConfiguration": {},
+ "ImageRepository": {
+ "ImageConfiguration": {
+ "Port": "8000",
+ "RuntimeEnvironmentSecrets": [
+ {
+ "Name": "LATER_SECRET",
+ "Value": {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Ref": "LaterSecretF6C54C5B"
+ },
+ ":apikey::"
+ ]
+ ]
+ }
+ }
+ ],
+ "RuntimeEnvironmentVariables": [
+ {
+ "Name": "LATER_ENVVAR",
+ "Value": "testNewEnvVar"
+ }
+ ]
+ },
+ "ImageIdentifier": "public.ecr.aws/aws-containers/hello-app-runner:latest",
+ "ImageRepositoryType": "ECR_PUBLIC"
+ }
+ },
+ "InstanceConfiguration": {
+ "InstanceRoleArn": {
+ "Fn::GetAtt": [
+ "Service9InstanceRole8BD2CEE0",
+ "Arn"
+ ]
+ }
+ },
+ "NetworkConfiguration": {
+ "EgressConfiguration": {
+ "EgressType": "DEFAULT"
+ }
+ }
+ }
+ },
+ "Service9InstanceRole8BD2CEE0": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "tasks.apprunner.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "Service9InstanceRoleDefaultPolicy85BF9E64": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "secretsmanager:DescribeSecret",
+ "secretsmanager:GetSecretValue"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "LaterSecretF6C54C5B"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "Service9InstanceRoleDefaultPolicy85BF9E64",
+ "Roles": [
+ {
+ "Ref": "Service9InstanceRole8BD2CEE0"
+ }
+ ]
+ }
+ }
+ },
+ "Outputs": {
+ "URL9": {
+ "Value": {
+ "Fn::Join": [
+ "",
+ [
+ "https://",
+ {
+ "Fn::GetAtt": [
+ "Service9DECC815E",
+ "ServiceUrl"
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "Parameters": {
+ "BootstrapVersion": {
+ "Type": "AWS::SSM::Parameter::Value",
+ "Default": "/cdk-bootstrap/hnb659fds/version",
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
+ }
+ },
+ "Rules": {
+ "CheckBootstrapVersion": {
+ "Assertions": [
+ {
+ "Assert": {
+ "Fn::Not": [
+ {
+ "Fn::Contains": [
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ {
+ "Ref": "BootstrapVersion"
+ }
+ ]
+ }
+ ]
+ },
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/integ.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/integ.json
new file mode 100644
index 0000000000000..6bb968cb25c63
--- /dev/null
+++ b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "30.1.0",
+ "testCases": {
+ "AppRunnerLaterSecretsEnvVars/DefaultTest": {
+ "stacks": [
+ "integ-apprunner-later-secrets-env-vars"
+ ],
+ "assertionStack": "AppRunnerLaterSecretsEnvVars/DefaultTest/DeployAssert",
+ "assertionStackName": "AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/manifest.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/manifest.json
new file mode 100644
index 0000000000000..26532fdc82343
--- /dev/null
+++ b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/manifest.json
@@ -0,0 +1,135 @@
+{
+ "version": "30.1.0",
+ "artifacts": {
+ "integ-apprunner-later-secrets-env-vars.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "integ-apprunner-later-secrets-env-vars.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "integ-apprunner-later-secrets-env-vars": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "integ-apprunner-later-secrets-env-vars.template.json",
+ "validateOnSynth": false,
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7cbdc4561bb7693ec11f95d96ee8a14d99732d386c66f27cb36e08a108d4ef30.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "integ-apprunner-later-secrets-env-vars.assets"
+ ],
+ "lookupRole": {
+ "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
+ "requiresBootstrapStackVersion": 8,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "dependencies": [
+ "integ-apprunner-later-secrets-env-vars.assets"
+ ],
+ "metadata": {
+ "/integ-apprunner-later-secrets-env-vars/LaterSecret/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "LaterSecretF6C54C5B"
+ }
+ ],
+ "/integ-apprunner-later-secrets-env-vars/Service9/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "Service9DECC815E"
+ }
+ ],
+ "/integ-apprunner-later-secrets-env-vars/Service9/InstanceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "Service9InstanceRole8BD2CEE0"
+ }
+ ],
+ "/integ-apprunner-later-secrets-env-vars/Service9/InstanceRole/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "Service9InstanceRoleDefaultPolicy85BF9E64"
+ }
+ ],
+ "/integ-apprunner-later-secrets-env-vars/URL9": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "URL9"
+ }
+ ],
+ "/integ-apprunner-later-secrets-env-vars/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/integ-apprunner-later-secrets-env-vars/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "integ-apprunner-later-secrets-env-vars"
+ },
+ "AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.template.json",
+ "validateOnSynth": false,
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.assets"
+ ],
+ "lookupRole": {
+ "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
+ "requiresBootstrapStackVersion": 8,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "dependencies": [
+ "AppRunnerLaterSecretsEnvVarsDefaultTestDeployAssert07867A67.assets"
+ ],
+ "metadata": {
+ "/AppRunnerLaterSecretsEnvVars/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/AppRunnerLaterSecretsEnvVars/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "AppRunnerLaterSecretsEnvVars/DefaultTest/DeployAssert"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/tree.json b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/tree.json
new file mode 100644
index 0000000000000..56bafbed7e5e2
--- /dev/null
+++ b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.js.snapshot/tree.json
@@ -0,0 +1,288 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "integ-apprunner-later-secrets-env-vars": {
+ "id": "integ-apprunner-later-secrets-env-vars",
+ "path": "integ-apprunner-later-secrets-env-vars",
+ "children": {
+ "LaterSecret": {
+ "id": "LaterSecret",
+ "path": "integ-apprunner-later-secrets-env-vars/LaterSecret",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "integ-apprunner-later-secrets-env-vars/LaterSecret/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret",
+ "aws:cdk:cloudformation:props": {
+ "secretString": "{\"password\":\"mySecretPassword\",\"apikey\":\"mySecretApiKey\"}"
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-secretsmanager.Secret",
+ "version": "0.0.0"
+ }
+ },
+ "Service9": {
+ "id": "Service9",
+ "path": "integ-apprunner-later-secrets-env-vars/Service9",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "integ-apprunner-later-secrets-env-vars/Service9/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::AppRunner::Service",
+ "aws:cdk:cloudformation:props": {
+ "sourceConfiguration": {
+ "authenticationConfiguration": {},
+ "imageRepository": {
+ "imageConfiguration": {
+ "port": "8000",
+ "runtimeEnvironmentVariables": [
+ {
+ "name": "LATER_ENVVAR",
+ "value": "testNewEnvVar"
+ }
+ ],
+ "runtimeEnvironmentSecrets": [
+ {
+ "name": "LATER_SECRET",
+ "value": {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Ref": "LaterSecretF6C54C5B"
+ },
+ ":apikey::"
+ ]
+ ]
+ }
+ }
+ ]
+ },
+ "imageIdentifier": "public.ecr.aws/aws-containers/hello-app-runner:latest",
+ "imageRepositoryType": "ECR_PUBLIC"
+ }
+ },
+ "instanceConfiguration": {
+ "instanceRoleArn": {
+ "Fn::GetAtt": [
+ "Service9InstanceRole8BD2CEE0",
+ "Arn"
+ ]
+ }
+ },
+ "networkConfiguration": {
+ "egressConfiguration": {
+ "egressType": "DEFAULT"
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-apprunner.CfnService",
+ "version": "0.0.0"
+ }
+ },
+ "InstanceRole": {
+ "id": "InstanceRole",
+ "path": "integ-apprunner-later-secrets-env-vars/Service9/InstanceRole",
+ "children": {
+ "ImportInstanceRole": {
+ "id": "ImportInstanceRole",
+ "path": "integ-apprunner-later-secrets-env-vars/Service9/InstanceRole/ImportInstanceRole",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "integ-apprunner-later-secrets-env-vars/Service9/InstanceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "tasks.apprunner.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.CfnRole",
+ "version": "0.0.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "integ-apprunner-later-secrets-env-vars/Service9/InstanceRole/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "integ-apprunner-later-secrets-env-vars/Service9/InstanceRole/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "secretsmanager:DescribeSecret",
+ "secretsmanager:GetSecretValue"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "LaterSecretF6C54C5B"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "Service9InstanceRoleDefaultPolicy85BF9E64",
+ "roles": [
+ {
+ "Ref": "Service9InstanceRole8BD2CEE0"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.CfnPolicy",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.Policy",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.Role",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-apprunner.Service",
+ "version": "0.0.0"
+ }
+ },
+ "URL9": {
+ "id": "URL9",
+ "path": "integ-apprunner-later-secrets-env-vars/URL9",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "integ-apprunner-later-secrets-env-vars/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "integ-apprunner-later-secrets-env-vars/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ },
+ "AppRunnerLaterSecretsEnvVars": {
+ "id": "AppRunnerLaterSecretsEnvVars",
+ "path": "AppRunnerLaterSecretsEnvVars",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "AppRunnerLaterSecretsEnvVars/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "AppRunnerLaterSecretsEnvVars/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.1.252"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "AppRunnerLaterSecretsEnvVars/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "AppRunnerLaterSecretsEnvVars/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "AppRunnerLaterSecretsEnvVars/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests.IntegTestCase",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests.IntegTest",
+ "version": "0.0.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.1.252"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.App",
+ "version": "0.0.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.ts b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.ts
new file mode 100644
index 0000000000000..163ea13282811
--- /dev/null
+++ b/packages/@aws-cdk/aws-apprunner/test/integ.service-later-secrets-env-vars.ts
@@ -0,0 +1,36 @@
+import * as secretsmanager from '@aws-cdk/aws-secretsmanager';
+import * as cdk from '@aws-cdk/core';
+import * as integ from '@aws-cdk/integ-tests';
+import * as apprunner from '../lib';
+
+const app = new cdk.App();
+
+const stack = new cdk.Stack(app, 'integ-apprunner-later-secrets-env-vars');
+
+// Scenario 9: Create the service from ECR public with secrets and environment vars added later
+const laterSecret = new secretsmanager.Secret(stack, 'LaterSecret', {
+ secretObjectValue: {
+ password: cdk.SecretValue.unsafePlainText('mySecretPassword'),
+ apikey: cdk.SecretValue.unsafePlainText('mySecretApiKey'),
+ },
+});
+
+const service9 = new apprunner.Service(stack, 'Service9', {
+ source: apprunner.Source.fromEcrPublic({
+ imageConfiguration: {
+ port: 8000,
+ },
+ imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
+ }),
+});
+
+service9.addSecret('LATER_SECRET', apprunner.Secret.fromSecretsManager(laterSecret, 'apikey'));
+service9.addEnvironmentVariable('LATER_ENVVAR', 'testNewEnvVar');
+
+new cdk.CfnOutput(stack, 'URL9', { value: `https://${service9.serviceUrl}` });
+
+new integ.IntegTest(app, 'AppRunnerLaterSecretsEnvVars', {
+ testCases: [stack],
+});
+
+app.synth();
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-apprunner/test/service.test.ts b/packages/@aws-cdk/aws-apprunner/test/service.test.ts
index a5e4604278194..914fdd81f1745 100644
--- a/packages/@aws-cdk/aws-apprunner/test/service.test.ts
+++ b/packages/@aws-cdk/aws-apprunner/test/service.test.ts
@@ -391,6 +391,109 @@ test('custom environment secrets and start commands are allowed for imageConfigu
});
});
+test('custom environment variables can be added with .addEnvironmentVariable() without first defining them in props', () => {
+ // GIVEN
+ const app = new cdk.App();
+ const stack = new cdk.Stack(app, 'demo-stack');
+ const service = new apprunner.Service(stack, 'DemoService', {
+ source: apprunner.Source.fromEcrPublic({
+ imageConfiguration: {
+ startCommand: '/root/start-command.sh',
+ },
+ imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
+ }),
+ });
+
+ // WHEN
+ service.addEnvironmentVariable('TEST_ENVIRONMENT_VARIABLE', 'test environment variable value');
+
+ // THEN
+ Template.fromStack(stack).hasResourceProperties('AWS::AppRunner::Service', {
+ SourceConfiguration: {
+ AuthenticationConfiguration: {},
+ ImageRepository: {
+ ImageConfiguration: {
+ RuntimeEnvironmentVariables: [
+ {
+ Name: 'TEST_ENVIRONMENT_VARIABLE',
+ Value: 'test environment variable value',
+ },
+ ],
+ StartCommand: '/root/start-command.sh',
+ },
+ ImageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
+ ImageRepositoryType: 'ECR_PUBLIC',
+ },
+ },
+ NetworkConfiguration: {
+ EgressConfiguration: {
+ EgressType: 'DEFAULT',
+ },
+ },
+ });
+});
+
+test('custom environment secrets can be added with .addSecret() without first defining them in props', () => {
+ // GIVEN
+ const app = new cdk.App();
+ const stack = new cdk.Stack(app, 'demo-stack');
+ const secret = new secretsmanager.Secret(stack, 'Secret');
+ const service = new apprunner.Service(stack, 'DemoService', {
+ source: apprunner.Source.fromEcrPublic({
+ imageConfiguration: {
+ startCommand: '/root/start-command.sh',
+ },
+ imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
+ }),
+ });
+
+ // WHEN
+ service.addSecret('LATER_SECRET', apprunner.Secret.fromSecretsManager(secret, 'field'));
+
+ // THEN
+ Template.fromStack(stack).hasResourceProperties('AWS::AppRunner::Service', {
+ SourceConfiguration: {
+ AuthenticationConfiguration: {},
+ ImageRepository: {
+ ImageConfiguration: {
+ RuntimeEnvironmentSecrets: [
+ {
+ Name: 'LATER_SECRET',
+ Value: {
+ 'Fn::Join': [
+ '',
+ [
+ {
+ Ref: 'SecretA720EF05',
+ },
+ ':field::',
+ ],
+ ],
+ },
+ },
+ ],
+ StartCommand: '/root/start-command.sh',
+ },
+ ImageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
+ ImageRepositoryType: 'ECR_PUBLIC',
+ },
+ },
+ NetworkConfiguration: {
+ EgressConfiguration: {
+ EgressType: 'DEFAULT',
+ },
+ },
+ InstanceConfiguration: {
+ InstanceRoleArn: {
+ 'Fn::GetAtt': [
+ 'DemoServiceInstanceRoleFCED1725',
+ 'Arn',
+ ],
+ },
+ },
+ });
+});
+
test('create a service from existing ECR repository(image repository type: ECR)', () => {
// GIVEN
const app = new cdk.App();
@@ -871,6 +974,22 @@ test('environment variable with a prefix of AWSAPPRUNNER should throw an error',
}).toThrow('Environment variable key AWSAPPRUNNER_FOO with a prefix of AWSAPPRUNNER is not allowed');
});
+test('environment variable with a prefix of AWSAPPRUNNER added later should throw an error', () => {
+ // GIVEN
+ const app = new cdk.App();
+ const stack = new cdk.Stack(app, 'demo-stack');
+ // WHEN
+ // we should have the service
+ expect(() => {
+ const service = new apprunner.Service(stack, 'DemoService', {
+ source: apprunner.Source.fromEcrPublic({
+ imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
+ }),
+ });
+ service.addEnvironmentVariable('AWSAPPRUNNER_FOO', 'BAR');
+ }).toThrow('Environment variable key AWSAPPRUNNER_FOO with a prefix of AWSAPPRUNNER is not allowed');
+});
+
test('environment secrets with a prefix of AWSAPPRUNNER should throw an error', () => {
// GIVEN
const app = new cdk.App();
@@ -893,6 +1012,24 @@ test('environment secrets with a prefix of AWSAPPRUNNER should throw an error',
}).toThrow('Environment secret key AWSAPPRUNNER_FOO with a prefix of AWSAPPRUNNER is not allowed');
});
+test('environment secrets with a prefix of AWSAPPRUNNER added later should throw an error', () => {
+ // GIVEN
+ const app = new cdk.App();
+ const stack = new cdk.Stack(app, 'demo-stack');
+ const secret = new secretsmanager.Secret(stack, 'Secret');
+
+ // WHEN
+ // we should have the service
+ expect(() => {
+ const service = new apprunner.Service(stack, 'DemoService', {
+ source: apprunner.Source.fromEcrPublic({
+ imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
+ }),
+ });
+ service.addSecret('AWSAPPRUNNER_FOO', apprunner.Secret.fromSecretsManager(secret));
+ }).toThrow('Environment secret key AWSAPPRUNNER_FOO with a prefix of AWSAPPRUNNER is not allowed');
+});
+
test('specifying a vpcConnector should assign the service to it and set the egressType to VPC', () => {
// GIVEN
const app = new cdk.App();
diff --git a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json
index c3b0d3fada58a..e0722e21b085d 100644
--- a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json
+++ b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json
@@ -32,7 +32,7 @@
"@types/aws-lambda": "^8.10.111",
"@types/sinon": "^9.0.11",
"@aws-cdk/cdk-build-tools": "0.0.0",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"aws-sdk-mock": "5.6.0",
"eslint": "^7.32.0",
"eslint-config-standard": "^14.1.1",
diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json
index 932b2d8481ecf..cfd2c78d0d9fc 100644
--- a/packages/@aws-cdk/aws-cloudfront-origins/package.json
+++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json
@@ -85,7 +85,7 @@
"@aws-cdk/integ-tests": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0"
+ "aws-sdk": "^2.1329.0"
},
"dependencies": {
"@aws-cdk/aws-apigateway": "0.0.0",
diff --git a/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts b/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts
index d5ea07364adcc..103e992dda640 100644
--- a/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts
+++ b/packages/@aws-cdk/aws-cloudfront/lib/experimental/edge-function.ts
@@ -250,7 +250,7 @@ interface FunctionConfig {
}
function addEdgeLambdaToRoleTrustStatement(role: iam.IRole) {
- if (role instanceof iam.Role && role.assumeRolePolicy) {
+ if (iam.Role.isRole(role) && role.assumeRolePolicy) {
const statement = new iam.PolicyStatement();
const edgeLambdaServicePrincipal = new iam.ServicePrincipal('edgelambda.amazonaws.com');
statement.addPrincipals(edgeLambdaServicePrincipal);
diff --git a/packages/@aws-cdk/aws-cloudfront/lib/private/cache-behavior.ts b/packages/@aws-cdk/aws-cloudfront/lib/private/cache-behavior.ts
index 43d31bd976f40..a4708b7e2fb58 100644
--- a/packages/@aws-cdk/aws-cloudfront/lib/private/cache-behavior.ts
+++ b/packages/@aws-cdk/aws-cloudfront/lib/private/cache-behavior.ts
@@ -75,7 +75,7 @@ export class CacheBehavior {
if (!edgeLambdas || edgeLambdas.length === 0) { return; }
edgeLambdas.forEach((edgeLambda) => {
const role = edgeLambda.functionVersion.role;
- if (role && role instanceof iam.Role && role.assumeRolePolicy) {
+ if (role && iam.Role.isRole(role) && role.assumeRolePolicy) {
role.assumeRolePolicy.addStatements(new iam.PolicyStatement({
actions: ['sts:AssumeRole'],
principals: [new iam.ServicePrincipal('edgelambda.amazonaws.com')],
diff --git a/packages/@aws-cdk/aws-cloudfront/lib/web-distribution.ts b/packages/@aws-cdk/aws-cloudfront/lib/web-distribution.ts
index 6910f68a4d25f..ca08aa477f018 100644
--- a/packages/@aws-cdk/aws-cloudfront/lib/web-distribution.ts
+++ b/packages/@aws-cdk/aws-cloudfront/lib/web-distribution.ts
@@ -1053,7 +1053,7 @@ export class CloudFrontWebDistribution extends cdk.Resource implements IDistribu
// allow edgelambda.amazonaws.com to assume the functions' execution role.
for (const a of input.lambdaFunctionAssociations) {
- if (a.lambdaFunction.role && a.lambdaFunction.role instanceof iam.Role && a.lambdaFunction.role.assumeRolePolicy) {
+ if (a.lambdaFunction.role && iam.Role.isRole(a.lambdaFunction.role) && a.lambdaFunction.role.assumeRolePolicy) {
a.lambdaFunction.role.assumeRolePolicy.addStatements(new iam.PolicyStatement({
actions: ['sts:AssumeRole'],
principals: [new iam.ServicePrincipal('edgelambda.amazonaws.com')],
diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json
index c01da3b4a87dc..07562a41b9e53 100644
--- a/packages/@aws-cdk/aws-cloudfront/package.json
+++ b/packages/@aws-cdk/aws-cloudfront/package.json
@@ -88,7 +88,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"jest": "^27.5.1"
},
"dependencies": {
diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json
index 648268d27890b..768f1b9ff5dc4 100644
--- a/packages/@aws-cdk/aws-cloudtrail/package.json
+++ b/packages/@aws-cdk/aws-cloudtrail/package.json
@@ -87,7 +87,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"jest": "^27.5.1"
},
"dependencies": {
diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json
index 85b89e6d33502..b852fc29fe572 100644
--- a/packages/@aws-cdk/aws-codebuild/package.json
+++ b/packages/@aws-cdk/aws-codebuild/package.json
@@ -93,7 +93,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"jest": "^27.5.1"
},
"dependencies": {
diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json
index 90821ac3cedf1..7448d83798d16 100644
--- a/packages/@aws-cdk/aws-codecommit/package.json
+++ b/packages/@aws-cdk/aws-codecommit/package.json
@@ -93,7 +93,7 @@
"@aws-cdk/cloud-assembly-schema": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"jest": "^27.5.1"
},
"dependencies": {
diff --git a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts
index 37d4034e9b448..11d3173baea7d 100644
--- a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts
+++ b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts
@@ -764,7 +764,7 @@ export class Pipeline extends PipelineBase {
// because the role might be from a different environment),
// but _only_ if it's a new Role -
// an imported Role should not add the dependency
- if (action.actionProperties.role instanceof iam.Role) {
+ if (iam.Role.isRole(action.actionProperties.role)) {
const roleStack = Stack.of(action.actionProperties.role);
pipelineStack.addDependency(roleStack);
}
diff --git a/packages/@aws-cdk/aws-docdb/test/integ.cluster.ts b/packages/@aws-cdk/aws-docdb/test/integ.cluster.ts
index cf485ab440c6d..1922febe59a98 100644
--- a/packages/@aws-cdk/aws-docdb/test/integ.cluster.ts
+++ b/packages/@aws-cdk/aws-docdb/test/integ.cluster.ts
@@ -2,8 +2,7 @@ import * as ec2 from '@aws-cdk/aws-ec2';
import * as kms from '@aws-cdk/aws-kms';
import * as cdk from '@aws-cdk/core';
import * as constructs from 'constructs';
-import { DatabaseCluster } from '../lib';
-import { ClusterParameterGroup } from '../lib/parameter-group';
+import { DatabaseCluster, ClusterParameterGroup } from '../lib';
/*
* Stack verification steps:
diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json
index 3270864374893..473081a3bb8da 100644
--- a/packages/@aws-cdk/aws-dynamodb/package.json
+++ b/packages/@aws-cdk/aws-dynamodb/package.json
@@ -89,7 +89,7 @@
"@types/aws-lambda": "^8.10.111",
"@types/jest": "^27.5.2",
"@types/sinon": "^9.0.11",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1",
"sinon": "^9.2.4",
diff --git a/packages/@aws-cdk/aws-ecs/lib/cluster.ts b/packages/@aws-cdk/aws-ecs/lib/cluster.ts
index 8bea6de94872a..c2c886cd51431 100644
--- a/packages/@aws-cdk/aws-ecs/lib/cluster.ts
+++ b/packages/@aws-cdk/aws-ecs/lib/cluster.ts
@@ -13,6 +13,8 @@ import { InstanceDrainHook } from './drain-hook/instance-drain-hook';
import { ECSMetrics } from './ecs-canned-metrics.generated';
import { CfnCluster, CfnCapacityProvider, CfnClusterCapacityProviderAssociations } from './ecs.generated';
+const CLUSTER_SYMBOL = Symbol.for('@aws-cdk/aws-ecs/lib/cluster.Cluster');
+
/**
* The properties used to define an ECS cluster.
*/
@@ -94,6 +96,14 @@ export enum MachineImageType {
* A regional grouping of one or more container instances on which you can run tasks and services.
*/
export class Cluster extends Resource implements ICluster {
+
+ /**
+ * Return whether the given object is a Cluster
+ */
+ public static isCluster(x: any) : x is Cluster {
+ return x !== null && typeof(x) === 'object' && CLUSTER_SYMBOL in x;
+ }
+
/**
* Import an existing cluster to the stack from its attributes.
*/
@@ -679,6 +689,12 @@ export class Cluster extends Resource implements ICluster {
}
}
+Object.defineProperty(Cluster.prototype, CLUSTER_SYMBOL, {
+ value: true,
+ enumerable: false,
+ writable: false,
+});
+
/**
* A regional grouping of one or more container instances on which you can run tasks and services.
*/
@@ -1259,7 +1275,7 @@ class MaybeCreateCapacityProviderAssociations implements IAspect {
}
public visit(node: IConstruct): void {
- if (node instanceof Cluster) {
+ if (Cluster.isCluster(node)) {
if ((this.scope.defaultCapacityProviderStrategy.length > 0 || this.scope.capacityProviderNames.length > 0 && !this.resource)) {
this.resource = new CfnClusterCapacityProviderAssociations(this.scope, this.id, {
cluster: node.clusterName,
diff --git a/packages/@aws-cdk/aws-ecs/test/cluster.test.ts b/packages/@aws-cdk/aws-ecs/test/cluster.test.ts
index bd3d15a4c3bd2..333e709a26e7f 100644
--- a/packages/@aws-cdk/aws-ecs/test/cluster.test.ts
+++ b/packages/@aws-cdk/aws-ecs/test/cluster.test.ts
@@ -11,6 +11,38 @@ import * as cxapi from '@aws-cdk/cx-api';
import * as ecs from '../lib';
describe('cluster', () => {
+ describe('isCluster() returns', () => {
+ test('true if given cluster instance', () => {
+ // GIVEN
+ const stack = new cdk.Stack();
+ // WHEN
+ const createdCluster = new ecs.Cluster(stack, 'EcsCluster');
+ // THEN
+ expect(ecs.Cluster.isCluster(createdCluster)).toBe(true);
+ });
+
+ test('false if given imported cluster instance', () => {
+ // GIVEN
+ const stack = new cdk.Stack();
+ const vpc = new ec2.Vpc(stack, 'Vpc');
+
+ const importedSg = ec2.SecurityGroup.fromSecurityGroupId(stack, 'SG1', 'sg-1', { allowAllOutbound: false });
+ // WHEN
+ const importedCluster = ecs.Cluster.fromClusterAttributes(stack, 'Cluster', {
+ clusterName: 'cluster-name',
+ securityGroups: [importedSg],
+ vpc,
+ });
+ // THEN
+ expect(ecs.Cluster.isCluster(importedCluster)).toBe(false);
+ });
+
+ test('false if given undefined', () => {
+ // THEN
+ expect(ecs.Cluster.isCluster(undefined)).toBe(false);
+ });
+ });
+
describe('When creating an ECS Cluster', () => {
testDeprecated('with no properties set, it correctly sets default properties', () => {
// GIVEN
diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json
index 479e774d254a0..5a73c8f6e49d9 100644
--- a/packages/@aws-cdk/aws-eks/package.json
+++ b/packages/@aws-cdk/aws-eks/package.json
@@ -80,7 +80,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
- "@aws-cdk/lambda-layer-kubectl-v24": "^2.0.113",
+ "@aws-cdk/lambda-layer-kubectl-v24": "^2.0.121",
"aws-cdk-lib": "2.47.0",
"@aws-cdk/assertions": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
@@ -92,9 +92,9 @@
"@types/jest": "^27.5.2",
"@types/sinon": "^9.0.11",
"@types/yaml": "1.9.6",
- "aws-sdk": "^2.1325.0",
- "cdk8s": "^2.7.15",
- "cdk8s-plus-24": "2.4.40",
+ "aws-sdk": "^2.1329.0",
+ "cdk8s": "^2.7.23",
+ "cdk8s-plus-24": "2.4.46",
"jest": "^27.5.1",
"sinon": "^9.2.4"
},
diff --git a/packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/package.json b/packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/package.json
index e954bcb2b77e7..65e9857efb409 100644
--- a/packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/package.json
+++ b/packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/package.json
@@ -2,6 +2,6 @@
"name": "eks-service-account-sdk-call-integ-test",
"private": "true",
"dependencies": {
- "aws-sdk": "^2.1325.0"
+ "aws-sdk": "^2.1329.0"
}
}
diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json
index 3455b64b3521f..5197728a9c35e 100644
--- a/packages/@aws-cdk/aws-events-targets/package.json
+++ b/packages/@aws-cdk/aws-events-targets/package.json
@@ -89,7 +89,7 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1"
},
diff --git a/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json b/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json
index 2f1f657b94807..268c59f7ad46f 100644
--- a/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json
+++ b/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json
@@ -81,7 +81,7 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1"
},
diff --git a/packages/@aws-cdk/aws-iam/lib/role.ts b/packages/@aws-cdk/aws-iam/lib/role.ts
index 1b10eb330002e..26810da203014 100644
--- a/packages/@aws-cdk/aws-iam/lib/role.ts
+++ b/packages/@aws-cdk/aws-iam/lib/role.ts
@@ -18,6 +18,7 @@ import { AttachedPolicies, UniqueStringSet } from './private/util';
const MAX_INLINE_SIZE = 10000;
const MAX_MANAGEDPOL_SIZE = 6000;
+const IAM_ROLE_SYMBOL = Symbol.for('@aws-cdk/packages/aws-iam/lib/role.Role');
/**
* Properties for defining an IAM Role
@@ -297,6 +298,14 @@ export class Role extends Resource implements IRole {
: new ImmutableRole(scope, id, importedRole, options.addGrantsToResources ?? false);
}
+ /**
+ * Return whether the given object is a Role
+ */
+ public static isRole(x: any) : x is Role {
+ return x !== null && typeof(x) === 'object' && IAM_ROLE_SYMBOL in x;
+ }
+
+
/**
* Import an external role by name.
*
@@ -776,3 +785,9 @@ export interface WithoutPolicyUpdatesOptions {
*/
readonly addGrantsToResources?: boolean;
}
+
+Object.defineProperty(Role.prototype, IAM_ROLE_SYMBOL, {
+ value: true,
+ enumerable: false,
+ writable: false,
+});
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.ts b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.ts
index 26496c79e4b38..4bbc7372e1285 100644
--- a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.ts
+++ b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.ts
@@ -1,7 +1,6 @@
import { App, Stack } from '@aws-cdk/core';
import { IntegTest } from '@aws-cdk/integ-tests';
-import { AccountRootPrincipal, Grant, ManagedPolicy, PolicyStatement, Role } from '../lib';
-import { User } from '../lib/user';
+import { AccountRootPrincipal, Grant, ManagedPolicy, PolicyStatement, Role, User } from '../lib';
const app = new App();
diff --git a/packages/@aws-cdk/aws-iam/test/integ.policy.ts b/packages/@aws-cdk/aws-iam/test/integ.policy.ts
index 058390178413d..2ad98cb2ed931 100644
--- a/packages/@aws-cdk/aws-iam/test/integ.policy.ts
+++ b/packages/@aws-cdk/aws-iam/test/integ.policy.ts
@@ -1,7 +1,6 @@
import { App, Stack } from '@aws-cdk/core';
import { IntegTest } from '@aws-cdk/integ-tests';
-import { AccountRootPrincipal, Grant, Policy, PolicyStatement, Role } from '../lib';
-import { User } from '../lib/user';
+import { AccountRootPrincipal, Grant, Policy, PolicyStatement, Role, User } from '../lib';
const app = new App();
diff --git a/packages/@aws-cdk/aws-iam/test/role.test.ts b/packages/@aws-cdk/aws-iam/test/role.test.ts
index 85e1ee38e6fdb..e2e8ce720aad8 100644
--- a/packages/@aws-cdk/aws-iam/test/role.test.ts
+++ b/packages/@aws-cdk/aws-iam/test/role.test.ts
@@ -4,6 +4,36 @@ import { Duration, Stack, App, CfnResource, RemovalPolicy, Lazy, Stage, DefaultS
import { Construct } from 'constructs';
import { AnyPrincipal, ArnPrincipal, CompositePrincipal, FederatedPrincipal, ManagedPolicy, PolicyStatement, Role, ServicePrincipal, User, Policy, PolicyDocument, Effect } from '../lib';
+describe('isRole() returns', () => {
+ test('true if given Role instance', () => {
+ // GIVEN
+ const app = new App();
+ const stack = new Stack(app, 'MyStack');
+ // WHEN
+ const pureRole = new Role(stack, 'Role', {
+ assumedBy: new ServicePrincipal('sns.amazonaws.com'),
+ });
+
+ // THEN
+ expect(Role.isRole(pureRole)).toBe(true);
+ });
+
+ test('false if given imported role instance', () => {
+ // GIVEN
+ const app = new App();
+ const stack = new Stack(app, 'MyStack');
+ // WHEN
+ const importedRole = Role.fromRoleName(stack, 'ImportedRole', 'ImportedRole');
+ // THEN
+ expect(Role.isRole(importedRole)).toBe(false);
+ });
+
+ test('false if given undefined', () => {
+ // THEN
+ expect(Role.isRole(undefined)).toBe(false);
+ });
+});
+
describe('customizeRoles', () => {
test('throws if precreatedRoles is not used', () => {
// GIVEN
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/README.md b/packages/@aws-cdk/aws-lambda-nodejs/README.md
index a895188db5206..35cb80d44b9a2 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/README.md
+++ b/packages/@aws-cdk/aws-lambda-nodejs/README.md
@@ -53,6 +53,10 @@ new nodejs.NodejsFunction(this, 'MyFunction', {
});
```
+The handler value will be automatically prefixed with the bundled output file name, `index.`,
+unless the handler value contains a `.` character, in which case the handler value is used as-is to
+allow for values needed by some Lambda extensions.
+
For monorepos, the reference architecture becomes:
```plaintext
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts
index 202be464b16da..0af7a63ce7d02 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts
+++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts
@@ -25,6 +25,9 @@ export interface NodejsFunctionProps extends lambda.FunctionOptions {
/**
* The name of the exported handler in the entry file.
*
+ * The handler is prefixed with `index.` unless the specified handler value contains a `.`,
+ * in which case it is used as-is.
+ *
* @default handler
*/
readonly handler?: string;
@@ -108,7 +111,7 @@ export class NodejsFunction extends lambda.Function {
depsLockFilePath,
projectRoot,
}),
- handler: `index.${handler}`,
+ handler: handler.indexOf('.') !== -1 ? `${handler}` : `index.${handler}`,
});
// Enable connection reuse for aws-sdk
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json
index d84acd65d1fde..bfad18cd373b4 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/package.json
+++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json
@@ -81,7 +81,7 @@
"@aws-cdk/triggers": "0.0.0",
"@types/jest": "^27.5.2",
"delay": "5.0.0",
- "esbuild": "^0.17.10"
+ "esbuild": "^0.17.11"
},
"dependencies": {
"@aws-cdk/aws-lambda": "0.0.0",
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts
index f197bb34b60da..0bc5e25917cfa 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts
@@ -45,6 +45,38 @@ test('NodejsFunction with .ts handler', () => {
});
});
+test('NodejsFunction with overridden handler - no dots', () => {
+ // WHEN
+ new NodejsFunction(stack, 'handler1', {
+ handler: 'myHandler',
+ });
+
+ expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({
+ entry: expect.stringContaining('function.test.handler1.ts'), // Automatically finds .ts handler file
+ }));
+
+ Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
+ Handler: 'index.myHandler', // automatic index. prefix
+ Runtime: 'nodejs14.x',
+ });
+});
+
+test('NodejsFunction with overridden handler - with dots', () => {
+ // WHEN
+ new NodejsFunction(stack, 'handler1', {
+ handler: 'run.sh',
+ });
+
+ expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({
+ entry: expect.stringContaining('function.test.handler1.ts'), // Automatically finds .ts handler file
+ }));
+
+ Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
+ Handler: 'run.sh', // No index. prefix
+ Runtime: 'nodejs14.x',
+ });
+});
+
test('NodejsFunction with .js handler', () => {
// WHEN
new NodejsFunction(stack, 'handler2');
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ-handlers/ts-web-handler.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/integ-handlers/ts-web-handler.ts
new file mode 100644
index 0000000000000..bb0b3187a74ed
--- /dev/null
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ-handlers/ts-web-handler.ts
@@ -0,0 +1,12 @@
+import { Server } from 'http';
+import { mult } from './util';
+
+// Create simple http server
+const server = new Server((_req, res) => {
+ res.writeHead(200, { 'Content-Type': 'text/plain' });
+ res.end(`${mult(3, 4)}`);
+ console.log(mult(3, 4)); // eslint-disable-line no-console
+});
+
+const port = parseInt(process.env.PORT || '3001', 10);
+server.listen(port);
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ-handlers/ts-web-run.sh b/packages/@aws-cdk/aws-lambda-nodejs/test/integ-handlers/ts-web-run.sh
new file mode 100755
index 0000000000000..def03845104ba
--- /dev/null
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ-handlers/ts-web-run.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# For AWS Lambda Adapter
+# https://github.com/awslabs/aws-lambda-web-adapter
+export READINESS_CHECK_PATH="${READINESS_CHECK_PATH:-/health}"
+export AWS_LAMBDA_EXEC_WRAPPER="${AWS_LAMBDA_EXEC_WRAPPER:-/opt/bootstrap}"
+export RUST_LOG="${RUST_LOG:-info}"
+export AWS_LWA_ENABLE_COMPRESSION="${AWS_LWA_ENABLE_COMPRESSION:-true}"
+export PORT="${PORT:-3001}"
+
+exec node index.js
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce/index.js b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce/index.js
new file mode 100644
index 0000000000000..70a6e7f17eb64
--- /dev/null
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce/index.js
@@ -0,0 +1,2 @@
+"use strict";var t=require("http");function r(n,e){return n*e}var o=new t.Server((n,e)=>{e.writeHead(200,{"Content-Type":"text/plain"}),e.end(`${r(3,4)}`),console.log(r(3,4))}),m=parseInt(process.env.PORT||"3001",10);o.listen(m);
+//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vaW50ZWctaGFuZGxlcnMvdHMtd2ViLWhhbmRsZXIudHMiLCAiLi4vLi4vaW50ZWctaGFuZGxlcnMvdXRpbC50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiaW1wb3J0IHsgU2VydmVyIH0gZnJvbSAnaHR0cCc7XG5pbXBvcnQgeyBtdWx0IH0gZnJvbSAnLi91dGlsJztcblxuLy8gQ3JlYXRlIHNpbXBsZSBodHRwIHNlcnZlclxuY29uc3Qgc2VydmVyID0gbmV3IFNlcnZlcigoX3JlcSwgcmVzKSA9PiB7XG4gIHJlcy53cml0ZUhlYWQoMjAwLCB7ICdDb250ZW50LVR5cGUnOiAndGV4dC9wbGFpbicgfSk7XG4gIHJlcy5lbmQoYCR7bXVsdCgzLCA0KX1gKTtcbiAgY29uc29sZS5sb2cobXVsdCgzLCA0KSk7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tY29uc29sZVxufSk7XG5cbmNvbnN0IHBvcnQgPSBwYXJzZUludChwcm9jZXNzLmVudi5QT1JUIHx8ICczMDAxJywgMTApO1xuc2VydmVyLmxpc3Rlbihwb3J0KTtcbiIsICJleHBvcnQgZnVuY3Rpb24gYWRkKGE6IG51bWJlciwgYjogbnVtYmVyKTogbnVtYmVyIHtcbiAgcmV0dXJuIGEgKyBiO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbXVsdChhOiBudW1iZXIsIGI6IG51bWJlcik6IG51bWJlciB7XG4gIHJldHVybiBhICogYjtcbn1cbiJdLAogICJtYXBwaW5ncyI6ICJhQUFBLElBQUFBLEVBQXVCLGdCQ0loQixTQUFTQyxFQUFLQyxFQUFXQyxFQUFtQixDQUNqRCxPQUFPRCxFQUFJQyxDQUNiLENERkEsSUFBTUMsRUFBUyxJQUFJLFNBQU8sQ0FBQ0MsRUFBTUMsSUFBUSxDQUN2Q0EsRUFBSSxVQUFVLElBQUssQ0FBRSxlQUFnQixZQUFhLENBQUMsRUFDbkRBLEVBQUksSUFBSSxHQUFHQyxFQUFLLEVBQUcsQ0FBQyxHQUFHLEVBQ3ZCLFFBQVEsSUFBSUEsRUFBSyxFQUFHLENBQUMsQ0FBQyxDQUN4QixDQUFDLEVBRUtDLEVBQU8sU0FBUyxRQUFRLElBQUksTUFBUSxPQUFRLEVBQUUsRUFDcERKLEVBQU8sT0FBT0ksQ0FBSSIsCiAgIm5hbWVzIjogWyJpbXBvcnRfaHR0cCIsICJtdWx0IiwgImEiLCAiYiIsICJzZXJ2ZXIiLCAiX3JlcSIsICJyZXMiLCAibXVsdCIsICJwb3J0Il0KfQo=
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce/index.js.map b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce/index.js.map
new file mode 100644
index 0000000000000..1466fdadbee8c
--- /dev/null
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce/index.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["../../integ-handlers/ts-web-handler.ts", "../../integ-handlers/util.ts"],
+ "sourcesContent": ["import { Server } from 'http';\nimport { mult } from './util';\n\n// Create simple http server\nconst server = new Server((_req, res) => {\n res.writeHead(200, { 'Content-Type': 'text/plain' });\n res.end(`${mult(3, 4)}`);\n console.log(mult(3, 4)); // eslint-disable-line no-console\n});\n\nconst port = parseInt(process.env.PORT || '3001', 10);\nserver.listen(port);\n", "export function add(a: number, b: number): number {\n return a + b;\n}\n\nexport function mult(a: number, b: number): number {\n return a * b;\n}\n"],
+ "mappings": "aAAA,IAAAA,EAAuB,gBCIhB,SAASC,EAAKC,EAAWC,EAAmB,CACjD,OAAOD,EAAIC,CACb,CDFA,IAAMC,EAAS,IAAI,SAAO,CAACC,EAAMC,IAAQ,CACvCA,EAAI,UAAU,IAAK,CAAE,eAAgB,YAAa,CAAC,EACnDA,EAAI,IAAI,GAAGC,EAAK,EAAG,CAAC,GAAG,EACvB,QAAQ,IAAIA,EAAK,EAAG,CAAC,CAAC,CACxB,CAAC,EAEKC,EAAO,SAAS,QAAQ,IAAI,MAAQ,OAAQ,EAAE,EACpDJ,EAAO,OAAOI,CAAI",
+ "names": ["import_http", "mult", "a", "b", "server", "_req", "res", "mult", "port"]
+}
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce/ts-web-run.sh b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce/ts-web-run.sh
new file mode 100755
index 0000000000000..def03845104ba
--- /dev/null
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce/ts-web-run.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# For AWS Lambda Adapter
+# https://github.com/awslabs/aws-lambda-web-adapter
+export READINESS_CHECK_PATH="${READINESS_CHECK_PATH:-/health}"
+export AWS_LAMBDA_EXEC_WRAPPER="${AWS_LAMBDA_EXEC_WRAPPER:-/opt/bootstrap}"
+export RUST_LOG="${RUST_LOG:-info}"
+export AWS_LWA_ENABLE_COMPRESSION="${AWS_LWA_ENABLE_COMPRESSION:-true}"
+export PORT="${PORT:-3001}"
+
+exec node index.js
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.assets.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.assets.json
index 5d852f260508e..9130aa4703d05 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.assets.json
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.assets.json
@@ -1,5 +1,5 @@
{
- "version": "20.0.0",
+ "version": "30.1.0",
"files": {
"5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a": {
"source": {
@@ -40,7 +40,20 @@
}
}
},
- "90cb9162c12b37a3990ecbde27ea037907171ccb64eeb60f046f098a9ae069cd": {
+ "a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce": {
+ "source": {
+ "path": "asset.a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce",
+ "packaging": "zip"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce.zip",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
+ }
+ }
+ },
+ "76dea8b92881f37d669c02f0271a5aa08e02b115b3fbe57063dbb99c5acb1932": {
"source": {
"path": "cdk-integ-lambda-nodejs.template.json",
"packaging": "file"
@@ -48,7 +61,7 @@
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "90cb9162c12b37a3990ecbde27ea037907171ccb64eeb60f046f098a9ae069cd.json",
+ "objectKey": "76dea8b92881f37d669c02f0271a5aa08e02b115b3fbe57063dbb99c5acb1932.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.template.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.template.json
index f72cbf8df949d..eb052475e4bfd 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.template.json
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk-integ-lambda-nodejs.template.json
@@ -626,6 +626,136 @@
"VpcPrivateSubnet2DefaultRoute060D2087",
"VpcPrivateSubnet2RouteTableAssociationA89CAD56"
]
+ },
+ "tshandlercustomhandlernodotsServiceRole1775E15E": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "tshandlercustomhandlernodots381F62EE": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "S3Bucket": {
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
+ },
+ "S3Key": "5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a.zip"
+ },
+ "Role": {
+ "Fn::GetAtt": [
+ "tshandlercustomhandlernodotsServiceRole1775E15E",
+ "Arn"
+ ]
+ },
+ "Environment": {
+ "Variables": {
+ "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
+ }
+ },
+ "Handler": "index.handler",
+ "Runtime": "nodejs14.x"
+ },
+ "DependsOn": [
+ "tshandlercustomhandlernodotsServiceRole1775E15E"
+ ]
+ },
+ "tshandlercustomhandlerdotsServiceRole0575D3CB": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "tshandlercustomhandlerdots2695F653": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "S3Bucket": {
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
+ },
+ "S3Key": "a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce.zip"
+ },
+ "Role": {
+ "Fn::GetAtt": [
+ "tshandlercustomhandlerdotsServiceRole0575D3CB",
+ "Arn"
+ ]
+ },
+ "Environment": {
+ "Variables": {
+ "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
+ }
+ },
+ "Handler": "ts-web.run.sh",
+ "Layers": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:aws:lambda:",
+ {
+ "Ref": "AWS::Region"
+ },
+ ":753240598075:layer:LambdaAdapterLayerX86:13"
+ ]
+ ]
+ }
+ ],
+ "Runtime": "nodejs14.x"
+ },
+ "DependsOn": [
+ "tshandlercustomhandlerdotsServiceRole0575D3CB"
+ ]
}
},
"Parameters": {
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk.out
index 588d7b269d34f..b72fef144f05c 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk.out
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/cdk.out
@@ -1 +1 @@
-{"version":"20.0.0"}
\ No newline at end of file
+{"version":"30.1.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/integ.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/integ.json
index e9f051c1b0d53..c76a9db715ffb 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/integ.json
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/integ.json
@@ -1,5 +1,5 @@
{
- "version": "20.0.0",
+ "version": "30.1.0",
"testCases": {
"integ.function": {
"stacks": [
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/manifest.json
index d868041e21916..6ba270bef70dd 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/manifest.json
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/manifest.json
@@ -1,12 +1,6 @@
{
- "version": "20.0.0",
+ "version": "30.1.0",
"artifacts": {
- "Tree": {
- "type": "cdk:tree",
- "properties": {
- "file": "tree.json"
- }
- },
"cdk-integ-lambda-nodejs.assets": {
"type": "cdk:asset-manifest",
"properties": {
@@ -23,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/90cb9162c12b37a3990ecbde27ea037907171ccb64eeb60f046f098a9ae069cd.json",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/76dea8b92881f37d669c02f0271a5aa08e02b115b3fbe57063dbb99c5acb1932.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
@@ -219,6 +213,30 @@
"data": "tshandlervpcA502E26A"
}
],
+ "/cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "tshandlercustomhandlernodotsServiceRole1775E15E"
+ }
+ ],
+ "/cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "tshandlercustomhandlernodots381F62EE"
+ }
+ ],
+ "/cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "tshandlercustomhandlerdotsServiceRole0575D3CB"
+ }
+ ],
+ "/cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "tshandlercustomhandlerdots2695F653"
+ }
+ ],
"/cdk-integ-lambda-nodejs/BootstrapVersion": [
{
"type": "aws:cdk:logicalId",
@@ -233,6 +251,12 @@
]
},
"displayName": "cdk-integ-lambda-nodejs"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
}
}
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/tree.json b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/tree.json
index 0c03f93bc762b..56f5b3601ae24 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/tree.json
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.js.snapshot/tree.json
@@ -4,14 +4,6 @@
"id": "App",
"path": "",
"children": {
- "Tree": {
- "id": "Tree",
- "path": "Tree",
- "constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
- }
- },
"cdk-integ-lambda-nodejs": {
"id": "cdk-integ-lambda-nodejs",
"path": "cdk-integ-lambda-nodejs",
@@ -24,6 +16,14 @@
"id": "ServiceRole",
"path": "cdk-integ-lambda-nodejs/ts-handler/ServiceRole",
"children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "cdk-integ-lambda-nodejs/ts-handler/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
+ }
+ },
"Resource": {
"id": "Resource",
"path": "cdk-integ-lambda-nodejs/ts-handler/ServiceRole/Resource",
@@ -77,8 +77,8 @@
"id": "Stage",
"path": "cdk-integ-lambda-nodejs/ts-handler/Code/Stage",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.AssetStaging",
+ "version": "0.0.0"
}
},
"AssetBucket": {
@@ -141,6 +141,14 @@
"id": "ServiceRole",
"path": "cdk-integ-lambda-nodejs/js-handler/ServiceRole",
"children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "cdk-integ-lambda-nodejs/js-handler/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
+ }
+ },
"Resource": {
"id": "Resource",
"path": "cdk-integ-lambda-nodejs/js-handler/ServiceRole/Resource",
@@ -194,8 +202,8 @@
"id": "Stage",
"path": "cdk-integ-lambda-nodejs/js-handler/Code/Stage",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.AssetStaging",
+ "version": "0.0.0"
}
},
"AssetBucket": {
@@ -325,8 +333,8 @@
"id": "Acl",
"path": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet1/Acl",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
}
},
"RouteTable": {
@@ -492,8 +500,8 @@
"id": "Acl",
"path": "cdk-integ-lambda-nodejs/Vpc/PublicSubnet2/Acl",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
}
},
"RouteTable": {
@@ -659,8 +667,8 @@
"id": "Acl",
"path": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet1/Acl",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
}
},
"RouteTable": {
@@ -778,8 +786,8 @@
"id": "Acl",
"path": "cdk-integ-lambda-nodejs/Vpc/PrivateSubnet2/Acl",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
}
},
"RouteTable": {
@@ -901,6 +909,14 @@
"id": "ServiceRole",
"path": "cdk-integ-lambda-nodejs/ts-handler-vpc/ServiceRole",
"children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-vpc/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
+ }
+ },
"Resource": {
"id": "Resource",
"path": "cdk-integ-lambda-nodejs/ts-handler-vpc/ServiceRole/Resource",
@@ -966,8 +982,8 @@
"id": "Stage",
"path": "cdk-integ-lambda-nodejs/ts-handler-vpc/Code/Stage",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.AssetStaging",
+ "version": "0.0.0"
}
},
"AssetBucket": {
@@ -1073,17 +1089,313 @@
"fqn": "@aws-cdk/aws-lambda-nodejs.NodejsFunction",
"version": "0.0.0"
}
+ },
+ "ts-handler-custom-handler-no-dots": {
+ "id": "ts-handler-custom-handler-no-dots",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.CfnRole",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.Role",
+ "version": "0.0.0"
+ }
+ },
+ "Code": {
+ "id": "Code",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots/Code",
+ "children": {
+ "Stage": {
+ "id": "Stage",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots/Code/Stage",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.AssetStaging",
+ "version": "0.0.0"
+ }
+ },
+ "AssetBucket": {
+ "id": "AssetBucket",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots/Code/AssetBucket",
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-s3.BucketBase",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-s3-assets.Asset",
+ "version": "0.0.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-no-dots/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "s3Bucket": {
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
+ },
+ "s3Key": "5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a.zip"
+ },
+ "role": {
+ "Fn::GetAtt": [
+ "tshandlercustomhandlernodotsServiceRole1775E15E",
+ "Arn"
+ ]
+ },
+ "environment": {
+ "variables": {
+ "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
+ }
+ },
+ "handler": "index.handler",
+ "runtime": "nodejs14.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-lambda.CfnFunction",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-lambda-nodejs.NodejsFunction",
+ "version": "0.0.0"
+ }
+ },
+ "lambda-adapter-layer": {
+ "id": "lambda-adapter-layer",
+ "path": "cdk-integ-lambda-nodejs/lambda-adapter-layer",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
+ }
+ },
+ "ts-handler-custom-handler-dots": {
+ "id": "ts-handler-custom-handler-dots",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.CfnRole",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.Role",
+ "version": "0.0.0"
+ }
+ },
+ "Code": {
+ "id": "Code",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots/Code",
+ "children": {
+ "Stage": {
+ "id": "Stage",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots/Code/Stage",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.AssetStaging",
+ "version": "0.0.0"
+ }
+ },
+ "AssetBucket": {
+ "id": "AssetBucket",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots/Code/AssetBucket",
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-s3.BucketBase",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-s3-assets.Asset",
+ "version": "0.0.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "cdk-integ-lambda-nodejs/ts-handler-custom-handler-dots/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "s3Bucket": {
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
+ },
+ "s3Key": "a33898f49e24c41ff9be236439c418d30e576c5f57763097162d9ec4245216ce.zip"
+ },
+ "role": {
+ "Fn::GetAtt": [
+ "tshandlercustomhandlerdotsServiceRole0575D3CB",
+ "Arn"
+ ]
+ },
+ "environment": {
+ "variables": {
+ "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
+ }
+ },
+ "handler": "ts-web.run.sh",
+ "layers": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:aws:lambda:",
+ {
+ "Ref": "AWS::Region"
+ },
+ ":753240598075:layer:LambdaAdapterLayerX86:13"
+ ]
+ ]
+ }
+ ],
+ "runtime": "nodejs14.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-lambda.CfnFunction",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-lambda-nodejs.NodejsFunction",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "cdk-integ-lambda-nodejs/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "cdk-integ-lambda-nodejs/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
}
},
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.85"
+ "version": "10.1.264"
}
}
},
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.App",
+ "version": "0.0.0"
}
}
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts
index 2dc25ef3679dc..ba6e676e1b7fc 100644
--- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts
+++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts
@@ -1,7 +1,8 @@
+import * as os from 'os';
import * as path from 'path';
import { Vpc } from '@aws-cdk/aws-ec2';
-import { Runtime } from '@aws-cdk/aws-lambda';
-import { App, Stack, StackProps } from '@aws-cdk/core';
+import { LayerVersion, Runtime } from '@aws-cdk/aws-lambda';
+import { Aws, App, Stack, StackProps } from '@aws-cdk/core';
import { Construct } from 'constructs';
import * as lambda from '../lib';
@@ -29,6 +30,46 @@ class TestStack extends Stack {
runtime: Runtime.NODEJS_14_X,
vpc: new Vpc(this, 'Vpc'),
});
+
+ new lambda.NodejsFunction(this, 'ts-handler-custom-handler-no-dots', {
+ entry: path.join(__dirname, 'integ-handlers/ts-handler.ts'),
+ runtime: Runtime.NODEJS_14_X,
+ bundling: {
+ minify: true,
+ sourceMap: true,
+ sourceMapMode: lambda.SourceMapMode.BOTH,
+ },
+ handler: 'handler',
+ });
+
+ new lambda.NodejsFunction(this, 'ts-handler-custom-handler-dots', {
+ entry: path.join(__dirname, 'integ-handlers/ts-web-handler.ts'),
+ runtime: Runtime.NODEJS_14_X,
+ bundling: {
+ minify: true,
+ sourceMap: true,
+ sourceMapMode: lambda.SourceMapMode.BOTH,
+ commandHooks: {
+ beforeBundling: () => [],
+ beforeInstall: () => [],
+ afterBundling: (_inputDir, outputDir) => [
+ `${os.platform() === 'win32' ? 'copy' : 'cp'} ${path.join(
+ __dirname,
+ 'integ-handlers',
+ 'ts-web-run.sh',
+ )} ${outputDir}`,
+ ],
+ },
+ },
+ handler: 'ts-web.run.sh',
+ layers: [
+ LayerVersion.fromLayerVersionArn(
+ this,
+ 'lambda-adapter-layer',
+ `arn:aws:lambda:${Aws.REGION}:753240598075:layer:LambdaAdapterLayerX86:13`,
+ ),
+ ],
+ });
}
}
diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json
index 56ae9b9b1293d..695355472f6c0 100644
--- a/packages/@aws-cdk/aws-logs/package.json
+++ b/packages/@aws-cdk/aws-logs/package.json
@@ -89,7 +89,7 @@
"@types/aws-lambda": "^8.10.111",
"@types/jest": "^27.5.2",
"@types/sinon": "^9.0.11",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1",
"nock": "^13.3.0",
diff --git a/packages/@aws-cdk/aws-msk/lib/cluster-version.ts b/packages/@aws-cdk/aws-msk/lib/cluster-version.ts
index e3cdf502caf4b..ba370f8c04885 100644
--- a/packages/@aws-cdk/aws-msk/lib/cluster-version.ts
+++ b/packages/@aws-cdk/aws-msk/lib/cluster-version.ts
@@ -87,6 +87,10 @@ export class KafkaVersion {
*/
public static readonly V3_3_1 = KafkaVersion.of('3.3.1');
+ /**
+ * Kafka version 3.3.2
+ */
+ public static readonly V3_3_2 = KafkaVersion.of('3.3.2');
/**
* Custom cluster version
* @param version custom version number
diff --git a/packages/@aws-cdk/aws-msk/test/cluster.test.ts b/packages/@aws-cdk/aws-msk/test/cluster.test.ts
index e6443cd4762c2..be4f6e92679ca 100644
--- a/packages/@aws-cdk/aws-msk/test/cluster.test.ts
+++ b/packages/@aws-cdk/aws-msk/test/cluster.test.ts
@@ -40,6 +40,7 @@ describe('MSK Cluster', () => {
[msk.KafkaVersion.V3_1_1, '3.1.1'],
[msk.KafkaVersion.V3_2_0, '3.2.0'],
[msk.KafkaVersion.V3_3_1, '3.3.1'],
+ [msk.KafkaVersion.V3_3_2, '3.3.2'],
],
)('created with expected Kafka version %j', (parameter, result) => {
new msk.Cluster(stack, 'Cluster', {
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.assets.json b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.assets.json
index e504429e84b40..2d32efad89dbf 100644
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.assets.json
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.assets.json
@@ -1,20 +1,20 @@
{
- "version": "30.0.0",
+ "version": "30.1.0",
"files": {
- "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28": {
+ "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": {
"source": {
- "path": "asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle",
+ "path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip",
+ "objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
- "e05a31925a856f753d012d462f51a3f4b884235b0fe9c3cea1b63e4c95fcd2c4": {
+ "26ebb083b5aa4c4938dd01e52996de45327a2629e9d6d262659c6f011a7b21a1": {
"source": {
"path": "MskLoggingDefaultTestDeployAssertC2F074AF.template.json",
"packaging": "file"
@@ -22,7 +22,7 @@
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "e05a31925a856f753d012d462f51a3f4b884235b0fe9c3cea1b63e4c95fcd2c4.json",
+ "objectKey": "26ebb083b5aa4c4938dd01e52996de45327a2629e9d6d262659c6f011a7b21a1.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.template.json b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.template.json
index af795cd591edf..8ab6331d020e2 100644
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.template.json
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.template.json
@@ -31,7 +31,7 @@
}
},
"flattenResponse": "false",
- "salt": "1677027448917"
+ "salt": "1677835197710"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
@@ -124,7 +124,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
- "S3Key": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip"
+ "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip"
},
"Timeout": 120,
"Handler": "index.handler",
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js
similarity index 59%
rename from packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js
rename to packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js
index 2d6c2f0e85497..58bcb1ef7f38e 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
@@ -34,40 +38,83 @@ module.exports = __toCommonJS(lambda_handler_exports);
// ../assertions/lib/matcher.ts
var Matcher = class {
+ /**
+ * Check whether the provided object is a subtype of the `IMatcher`.
+ */
static isMatcher(x) {
return x && x instanceof Matcher;
}
};
var MatchResult = class {
constructor(target) {
- this.failures = [];
+ this.failuresHere = /* @__PURE__ */ new Map();
this.captures = /* @__PURE__ */ new Map();
this.finalized = false;
+ this.innerMatchFailures = /* @__PURE__ */ new Map();
+ this._hasFailed = false;
+ this._failCount = 0;
+ this._cost = 0;
this.target = target;
}
+ /**
+ * DEPRECATED
+ * @deprecated use recordFailure()
+ */
push(matcher, path, message) {
return this.recordFailure({ matcher, path, message });
}
+ /**
+ * Record a new failure into this result at a specific path.
+ */
recordFailure(failure) {
- this.failures.push(failure);
+ const failKey = failure.path.join(".");
+ let list = this.failuresHere.get(failKey);
+ if (!list) {
+ list = [];
+ this.failuresHere.set(failKey, list);
+ }
+ this._failCount += 1;
+ this._cost += failure.cost ?? 1;
+ list.push(failure);
+ this._hasFailed = true;
return this;
}
+ /** Whether the match is a success */
+ get isSuccess() {
+ return !this._hasFailed;
+ }
+ /** Does the result contain any failures. If not, the result is a success */
hasFailed() {
- return this.failures.length !== 0;
+ return this._hasFailed;
}
+ /** The number of failures */
get failCount() {
- return this.failures.length;
+ return this._failCount;
}
+ /** The cost of the failures so far */
+ get failCost() {
+ return this._cost;
+ }
+ /**
+ * Compose the results of a previous match as a subtree.
+ * @param id the id of the parent tree.
+ */
compose(id, inner) {
- const innerF = inner.failures;
- this.failures.push(...innerF.map((f) => {
- return { path: [id, ...f.path], message: f.message, matcher: f.matcher };
- }));
+ if (inner.hasFailed()) {
+ this._hasFailed = true;
+ this._failCount += inner.failCount;
+ this._cost += inner._cost;
+ this.innerMatchFailures.set(id, inner);
+ }
inner.captures.forEach((vals, capture) => {
vals.forEach((value) => this.recordCapture({ capture, value }));
});
return this;
}
+ /**
+ * Prepare the result to be analyzed.
+ * This API *must* be called prior to analyzing these results.
+ */
finished() {
if (this.finalized) {
return this;
@@ -78,12 +125,169 @@ var MatchResult = class {
this.finalized = true;
return this;
}
+ /**
+ * Render the failed match in a presentable way
+ *
+ * Prefer using `renderMismatch` over this method. It is left for backwards
+ * compatibility for test suites that expect it, but `renderMismatch()` will
+ * produce better output.
+ */
toHumanStrings() {
- return this.failures.map((r) => {
- const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`;
+ const failures = new Array();
+ debugger;
+ recurse(this, []);
+ return failures.map((r) => {
+ const loc = r.path.length === 0 ? "" : ` at /${r.path.join("/")}`;
return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`;
});
+ function recurse(x, prefix) {
+ for (const fail of Array.from(x.failuresHere.values()).flat()) {
+ failures.push({
+ matcher: fail.matcher,
+ message: fail.message,
+ path: [...prefix, ...fail.path]
+ });
+ }
+ for (const [key, inner] of x.innerMatchFailures.entries()) {
+ recurse(inner, [...prefix, key]);
+ }
+ }
}
+ /**
+ * Do a deep render of the match result, showing the structure mismatches in context
+ */
+ renderMismatch() {
+ if (!this.hasFailed()) {
+ return "";
+ }
+ const parts = new Array();
+ const indents = new Array();
+ emitFailures(this, "");
+ recurse(this);
+ return moveMarkersToFront(parts.join("").trimEnd());
+ function emit(x) {
+ if (x === void 0) {
+ debugger;
+ }
+ parts.push(x.replace(/\n/g, `
+${indents.join("")}`));
+ }
+ function emitFailures(r, path, scrapSet) {
+ for (const fail of r.failuresHere.get(path) ?? []) {
+ emit(`!! ${fail.message}
+`);
+ }
+ scrapSet == null ? void 0 : scrapSet.delete(path);
+ }
+ function recurse(r) {
+ const remainingFailures = new Set(Array.from(r.failuresHere.keys()).filter((x) => x !== ""));
+ if (Array.isArray(r.target)) {
+ indents.push(" ");
+ emit("[\n");
+ for (const [first, i] of enumFirst(range(r.target.length))) {
+ if (!first) {
+ emit(",\n");
+ }
+ emitFailures(r, `${i}`, remainingFailures);
+ const innerMatcher = r.innerMatchFailures.get(`${i}`);
+ if (innerMatcher) {
+ emitFailures(innerMatcher, "");
+ recurseComparingValues(innerMatcher, r.target[i]);
+ } else {
+ emit(renderAbridged(r.target[i]));
+ }
+ }
+ emitRemaining();
+ indents.pop();
+ emit("\n]");
+ return;
+ }
+ if (r.target && typeof r.target === "object") {
+ indents.push(" ");
+ emit("{\n");
+ const keys = Array.from(/* @__PURE__ */ new Set([
+ ...Object.keys(r.target),
+ ...Array.from(remainingFailures)
+ ])).sort();
+ for (const [first, key] of enumFirst(keys)) {
+ if (!first) {
+ emit(",\n");
+ }
+ emitFailures(r, key, remainingFailures);
+ const innerMatcher = r.innerMatchFailures.get(key);
+ if (innerMatcher) {
+ emitFailures(innerMatcher, "");
+ emit(`${jsonify(key)}: `);
+ recurseComparingValues(innerMatcher, r.target[key]);
+ } else {
+ emit(`${jsonify(key)}: `);
+ emit(renderAbridged(r.target[key]));
+ }
+ }
+ emitRemaining();
+ indents.pop();
+ emit("\n}");
+ return;
+ }
+ emitRemaining();
+ emit(jsonify(r.target));
+ function emitRemaining() {
+ if (remainingFailures.size > 0) {
+ emit("\n");
+ }
+ for (const key of remainingFailures) {
+ emitFailures(r, key);
+ }
+ }
+ }
+ function recurseComparingValues(inner, actualValue) {
+ if (inner.target === actualValue) {
+ return recurse(inner);
+ }
+ emit(renderAbridged(actualValue));
+ emit(" <*> ");
+ recurse(inner);
+ }
+ function renderAbridged(x) {
+ if (Array.isArray(x)) {
+ switch (x.length) {
+ case 0:
+ return "[]";
+ case 1:
+ return `[ ${renderAbridged(x[0])} ]`;
+ case 2:
+ if (x.every((e) => ["number", "boolean", "string"].includes(typeof e))) {
+ return `[ ${x.map(renderAbridged).join(", ")} ]`;
+ }
+ return "[ ... ]";
+ default:
+ return "[ ... ]";
+ }
+ }
+ if (x && typeof x === "object") {
+ const keys = Object.keys(x);
+ switch (keys.length) {
+ case 0:
+ return "{}";
+ case 1:
+ return `{ ${JSON.stringify(keys[0])}: ${renderAbridged(x[keys[0]])} }`;
+ default:
+ return "{ ... }";
+ }
+ }
+ return jsonify(x);
+ }
+ function jsonify(x) {
+ return JSON.stringify(x) ?? "undefined";
+ }
+ function moveMarkersToFront(x) {
+ const re = /^(\s+)!!/gm;
+ return x.replace(re, (_, spaces) => `!!${spaces.substring(0, spaces.length - 2)}`);
+ }
+ }
+ /**
+ * Record a capture against in this match result.
+ */
recordCapture(options) {
let values = this.captures.get(options.capture);
if (values === void 0) {
@@ -93,6 +297,18 @@ var MatchResult = class {
this.captures.set(options.capture, values);
}
};
+function* range(n) {
+ for (let i = 0; i < n; i++) {
+ yield i;
+ }
+}
+function* enumFirst(xs) {
+ let first = true;
+ for (const x of xs) {
+ yield [first, x];
+ first = false;
+ }
+}
// ../assertions/lib/private/matchers/absent.ts
var AbsentMatch = class extends Matcher {
@@ -113,6 +329,51 @@ var AbsentMatch = class extends Matcher {
}
};
+// ../assertions/lib/private/sorting.ts
+function sortKeyComparator(keyFn) {
+ return (a, b) => {
+ const ak = keyFn(a);
+ const bk = keyFn(b);
+ for (let i = 0; i < ak.length && i < bk.length; i++) {
+ const av = ak[i];
+ const bv = bk[i];
+ let diff = 0;
+ if (typeof av === "number" && typeof bv === "number") {
+ diff = av - bv;
+ } else if (typeof av === "string" && typeof bv === "string") {
+ diff = av.localeCompare(bv);
+ }
+ if (diff !== 0) {
+ return diff;
+ }
+ }
+ return bk.length - ak.length;
+ };
+}
+
+// ../assertions/lib/private/sparse-matrix.ts
+var SparseMatrix = class {
+ constructor() {
+ this.matrix = /* @__PURE__ */ new Map();
+ }
+ get(row, col) {
+ var _a;
+ return (_a = this.matrix.get(row)) == null ? void 0 : _a.get(col);
+ }
+ row(row) {
+ var _a;
+ return Array.from(((_a = this.matrix.get(row)) == null ? void 0 : _a.entries()) ?? []);
+ }
+ set(row, col, value) {
+ let r = this.matrix.get(row);
+ if (!r) {
+ r = /* @__PURE__ */ new Map();
+ this.matrix.set(row, r);
+ }
+ r.set(col, value);
+ }
+};
+
// ../assertions/lib/private/type.ts
function getType(obj) {
return Array.isArray(obj) ? "array" : typeof obj;
@@ -120,33 +381,74 @@ function getType(obj) {
// ../assertions/lib/match.ts
var Match = class {
+ /**
+ * Use this matcher in the place of a field's value, if the field must not be present.
+ */
static absent() {
return new AbsentMatch("absent");
}
+ /**
+ * Matches the specified pattern with the array found in the same relative path of the target.
+ * The set of elements (or matchers) must be in the same order as would be found.
+ * @param pattern the pattern to match
+ */
static arrayWith(pattern) {
return new ArrayMatch("arrayWith", pattern);
}
+ /**
+ * Matches the specified pattern with the array found in the same relative path of the target.
+ * The set of elements (or matchers) must match exactly and in order.
+ * @param pattern the pattern to match
+ */
static arrayEquals(pattern) {
return new ArrayMatch("arrayEquals", pattern, { subsequence: false });
}
+ /**
+ * Deep exact matching of the specified pattern to the target.
+ * @param pattern the pattern to match
+ */
static exact(pattern) {
return new LiteralMatch("exact", pattern, { partialObjects: false });
}
+ /**
+ * Matches the specified pattern to an object found in the same relative path of the target.
+ * The keys and their values (or matchers) must be present in the target but the target can be a superset.
+ * @param pattern the pattern to match
+ */
static objectLike(pattern) {
return new ObjectMatch("objectLike", pattern);
}
+ /**
+ * Matches the specified pattern to an object found in the same relative path of the target.
+ * The keys and their values (or matchers) must match exactly with the target.
+ * @param pattern the pattern to match
+ */
static objectEquals(pattern) {
return new ObjectMatch("objectEquals", pattern, { partial: false });
}
+ /**
+ * Matches any target which does NOT follow the specified pattern.
+ * @param pattern the pattern to NOT match
+ */
static not(pattern) {
return new NotMatch("not", pattern);
}
+ /**
+ * Matches any string-encoded JSON and applies the specified pattern after parsing it.
+ * @param pattern the pattern to match after parsing the encoded JSON.
+ */
static serializedJson(pattern) {
return new SerializedJson("serializedJson", pattern);
}
+ /**
+ * Matches any non-null value at the target.
+ */
static anyValue() {
return new AnyMatch("anyValue");
}
+ /**
+ * Matches targets according to a regular expression
+ */
static stringLikeRegexp(pattern) {
return new StringLikeRegexpMatch("stringLikeRegexp", pattern);
}
@@ -203,40 +505,87 @@ var ArrayMatch = class extends Matcher {
message: `Expected type array but received ${getType(actual)}`
});
}
- if (!this.subsequence && this.pattern.length !== actual.length) {
- return new MatchResult(actual).recordFailure({
+ return this.subsequence ? this.testSubsequence(actual) : this.testFullArray(actual);
+ }
+ testFullArray(actual) {
+ const result = new MatchResult(actual);
+ let i = 0;
+ for (; i < this.pattern.length && i < actual.length; i++) {
+ const patternElement = this.pattern[i];
+ const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects });
+ const innerResult = matcher.test(actual[i]);
+ result.compose(`${i}`, innerResult);
+ }
+ if (i < this.pattern.length) {
+ result.recordFailure({
matcher: this,
- path: [],
- message: `Expected array of length ${this.pattern.length} but received ${actual.length}`
+ message: `Not enough elements in array (expecting ${this.pattern.length}, got ${actual.length})`,
+ path: [`${i}`]
+ });
+ }
+ if (i < actual.length) {
+ result.recordFailure({
+ matcher: this,
+ message: `Too many elements in array (expecting ${this.pattern.length}, got ${actual.length})`,
+ path: [`${i}`]
});
}
+ return result;
+ }
+ testSubsequence(actual) {
+ const result = new MatchResult(actual);
let patternIdx = 0;
let actualIdx = 0;
- const result = new MatchResult(actual);
+ const matches = new SparseMatrix();
while (patternIdx < this.pattern.length && actualIdx < actual.length) {
const patternElement = this.pattern[patternIdx];
const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects });
const matcherName = matcher.name;
- if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) {
+ if (matcherName == "absent" || matcherName == "anyValue") {
throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`);
}
const innerResult = matcher.test(actual[actualIdx]);
- if (!this.subsequence || !innerResult.hasFailed()) {
- result.compose(`[${actualIdx}]`, innerResult);
+ matches.set(patternIdx, actualIdx, innerResult);
+ actualIdx++;
+ if (innerResult.isSuccess) {
+ result.compose(`${actualIdx}`, innerResult);
patternIdx++;
- actualIdx++;
- } else {
- actualIdx++;
}
}
- for (; patternIdx < this.pattern.length; patternIdx++) {
- const pattern = this.pattern[patternIdx];
- const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `;
- result.recordFailure({
- matcher: this,
- path: [],
- message: `Missing element${element}at pattern index ${patternIdx}`
- });
+ if (patternIdx < this.pattern.length) {
+ for (let spi = 0; spi < patternIdx; spi++) {
+ const foundMatch = matches.row(spi).find(([, r]) => r.isSuccess);
+ if (!foundMatch) {
+ continue;
+ }
+ const [index] = foundMatch;
+ result.compose(`${index}`, new MatchResult(actual[index]).recordFailure({
+ matcher: this,
+ message: `arrayWith pattern ${spi} matched here`,
+ path: [],
+ cost: 0
+ // This is an informational message so it would be unfair to assign it cost
+ }));
+ }
+ const failedMatches = matches.row(patternIdx);
+ failedMatches.sort(sortKeyComparator(([i, r]) => [r.failCost, i]));
+ if (failedMatches.length > 0) {
+ const [index, innerResult] = failedMatches[0];
+ result.recordFailure({
+ matcher: this,
+ message: `Could not match arrayWith pattern ${patternIdx}. This is the closest match`,
+ path: [`${index}`],
+ cost: 0
+ // Informational message
+ });
+ result.compose(`${index}`, innerResult);
+ } else {
+ result.recordFailure({
+ matcher: this,
+ message: `Could not match arrayWith pattern ${patternIdx}. No more elements to try`,
+ path: [`${actual.length}`]
+ });
+ }
}
return result;
}
@@ -262,8 +611,8 @@ var ObjectMatch = class extends Matcher {
if (!(a in this.pattern)) {
result.recordFailure({
matcher: this,
- path: [`/${a}`],
- message: "Unexpected key"
+ path: [a],
+ message: `Unexpected key ${a}`
});
}
}
@@ -272,14 +621,14 @@ var ObjectMatch = class extends Matcher {
if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) {
result.recordFailure({
matcher: this,
- path: [`/${patternKey}`],
- message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}`
+ path: [patternKey],
+ message: `Missing key '${patternKey}'`
});
continue;
}
const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial });
const inner = matcher.test(actual[patternKey]);
- result.compose(`/${patternKey}`, inner);
+ result.compose(patternKey, inner);
}
return result;
}
@@ -291,34 +640,37 @@ var SerializedJson = class extends Matcher {
this.pattern = pattern;
}
test(actual) {
- const result = new MatchResult(actual);
if (getType(actual) !== "string") {
- result.recordFailure({
+ return new MatchResult(actual).recordFailure({
matcher: this,
path: [],
message: `Expected JSON as a string but found ${getType(actual)}`
});
- return result;
}
let parsed;
try {
parsed = JSON.parse(actual);
} catch (err) {
if (err instanceof SyntaxError) {
- result.recordFailure({
+ return new MatchResult(actual).recordFailure({
matcher: this,
path: [],
message: `Invalid JSON string: ${actual}`
});
- return result;
} else {
throw err;
}
}
const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern);
const innerResult = matcher.test(parsed);
- result.compose(`(${this.name})`, innerResult);
- return result;
+ if (innerResult.hasFailed()) {
+ innerResult.recordFailure({
+ matcher: this,
+ path: [],
+ message: "Encoded JSON value does not match"
+ });
+ }
+ return innerResult;
}
};
var NotMatch = class extends Matcher {
@@ -405,6 +757,10 @@ var CustomResourceHandler = class {
this.event = event;
this.physicalResourceId = extractPhysicalResourceId(event);
}
+ /**
+ * Handles executing the custom resource event. If `stateMachineArn` is present
+ * in the props then trigger the waiter statemachine
+ */
async handle() {
try {
if ("stateMachineArn" in this.event.ResourceProperties) {
@@ -426,6 +782,9 @@ var CustomResourceHandler = class {
clearTimeout(this.timeout);
}
}
+ /**
+ * Handle async requests from the waiter state machine
+ */
async handleIsComplete() {
try {
const result = await this.processEvent(this.event.ResourceProperties);
@@ -437,6 +796,10 @@ var CustomResourceHandler = class {
clearTimeout(this.timeout);
}
}
+ /**
+ * Start a step function state machine which will wait for the request
+ * to be successful.
+ */
async startExecution(req) {
try {
const sfn = new AWS.StepFunctions();
@@ -507,10 +870,7 @@ var AssertionHandler = class extends CustomResourceHandler {
failed: true,
assertion: JSON.stringify({
status: "fail",
- message: [
- ...matchResult.toHumanStrings(),
- JSON.stringify(matchResult.target, void 0, 2)
- ].join("\n")
+ message: matchResult.renderMismatch()
})
};
if (request2.failDeployment) {
@@ -532,6 +892,65 @@ var MatchCreator = class {
matcher: obj
};
}
+ /**
+ * Return a Matcher that can be tested against the actual results.
+ * This will convert the encoded matchers into their corresponding
+ * assertions matcher.
+ *
+ * For example:
+ *
+ * ExpectedResult.objectLike({
+ * Messages: [{
+ * Body: Match.objectLike({
+ * Elements: Match.arrayWith([{ Asdf: 3 }]),
+ * Payload: Match.serializedJson({ key: 'value' }),
+ * }),
+ * }],
+ * });
+ *
+ * Will be encoded as:
+ * {
+ * $ObjectLike: {
+ * Messages: [{
+ * Body: {
+ * $ObjectLike: {
+ * Elements: {
+ * $ArrayWith: [{ Asdf: 3 }],
+ * },
+ * Payload: {
+ * $SerializedJson: { key: 'value' }
+ * }
+ * },
+ * },
+ * }],
+ * },
+ * }
+ *
+ * Which can then be parsed by this function. For each key (recursively)
+ * the parser will check if the value has one of the encoded matchers as a key
+ * and if so, it will set the value as the Matcher. So,
+ *
+ * {
+ * Body: {
+ * $ObjectLike: {
+ * Elements: {
+ * $ArrayWith: [{ Asdf: 3 }],
+ * },
+ * Payload: {
+ * $SerializedJson: { key: 'value' }
+ * }
+ * },
+ * },
+ * }
+ *
+ * Will be converted to
+ * {
+ * Body: Match.objectLike({
+ * Elements: Match.arrayWith([{ Asdf: 3 }]),
+ * Payload: Match.serializedJson({ key: 'value' }),
+ * }),
+ * }
+ */
getMatcher() {
try {
const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) {
@@ -543,6 +962,8 @@ var MatchCreator = class {
return Match.objectLike(v[nested]);
case "$StringLike":
return Match.stringLikeRegexp(v[nested]);
+ case "$SerializedJson":
+ return Match.serializedJson(v[nested]);
default:
return v;
}
@@ -614,11 +1035,26 @@ var AwsApiCallHandler = class extends CustomResourceHandler {
const flatData = {
...flatten(respond)
};
- const resp = request2.flattenResponse === "true" ? flatData : respond;
+ let resp = respond;
+ if (request2.outputPaths) {
+ resp = filterKeys(flatData, request2.outputPaths);
+ } else if (request2.flattenResponse === "true") {
+ resp = flatData;
+ }
console.log(`Returning result ${JSON.stringify(resp)}`);
return resp;
}
};
+function filterKeys(object, searchStrings) {
+ return Object.entries(object).reduce((filteredObject, [key, value]) => {
+ for (const searchString of searchStrings) {
+ if (key.startsWith(`apiCallResponse.${searchString}`)) {
+ filteredObject[key] = value;
+ }
+ }
+ return filteredObject;
+ }, {});
+}
function isJsonString(value) {
try {
return JSON.parse(value);
@@ -664,6 +1100,7 @@ async function handler(event, context) {
await provider.respond({
status: "SUCCESS",
reason: "OK",
+ // return both the result of the API call _and_ the assertion results
data: {
...assertionResult,
...result
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/asset.a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476/index.js b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/asset.a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476/index.js
deleted file mode 100644
index d913ab9defaa1..0000000000000
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/asset.a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476/index.js
+++ /dev/null
@@ -1,253 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.handler = exports.forceSdkInstallation = exports.flatten = exports.PHYSICAL_RESOURCE_ID_REFERENCE = void 0;
-/* eslint-disable no-console */
-const child_process_1 = require("child_process");
-const fs = require("fs");
-const path_1 = require("path");
-/**
- * Serialized form of the physical resource id for use in the operation parameters
- */
-exports.PHYSICAL_RESOURCE_ID_REFERENCE = 'PHYSICAL:RESOURCEID:';
-/**
- * Flattens a nested object
- *
- * @param object the object to be flattened
- * @returns a flat object with path as keys
- */
-function flatten(object) {
- return Object.assign({}, ...function _flatten(child, path = []) {
- return [].concat(...Object.keys(child)
- .map(key => {
- const childKey = Buffer.isBuffer(child[key]) ? child[key].toString('utf8') : child[key];
- return typeof childKey === 'object' && childKey !== null
- ? _flatten(childKey, path.concat([key]))
- : ({ [path.concat([key]).join('.')]: childKey });
- }));
- }(object));
-}
-exports.flatten = flatten;
-/**
- * Decodes encoded special values (physicalResourceId)
- */
-function decodeSpecialValues(object, physicalResourceId) {
- return JSON.parse(JSON.stringify(object), (_k, v) => {
- switch (v) {
- case exports.PHYSICAL_RESOURCE_ID_REFERENCE:
- return physicalResourceId;
- default:
- return v;
- }
- });
-}
-/**
- * Filters the keys of an object.
- */
-function filterKeys(object, pred) {
- return Object.entries(object)
- .reduce((acc, [k, v]) => pred(k)
- ? { ...acc, [k]: v }
- : acc, {});
-}
-let latestSdkInstalled = false;
-function forceSdkInstallation() {
- latestSdkInstalled = false;
-}
-exports.forceSdkInstallation = forceSdkInstallation;
-/**
- * Installs latest AWS SDK v2
- */
-function installLatestSdk() {
- console.log('Installing latest AWS SDK v2');
- // Both HOME and --prefix are needed here because /tmp is the only writable location
- child_process_1.execSync('HOME=/tmp npm install aws-sdk@2 --production --no-package-lock --no-save --prefix /tmp');
- latestSdkInstalled = true;
-}
-// no currently patched services
-const patchedServices = [];
-/**
- * Patches the AWS SDK by loading service models in the same manner as the actual SDK
- */
-function patchSdk(awsSdk) {
- const apiLoader = awsSdk.apiLoader;
- patchedServices.forEach(({ serviceName, apiVersions }) => {
- const lowerServiceName = serviceName.toLowerCase();
- if (!awsSdk.Service.hasService(lowerServiceName)) {
- apiLoader.services[lowerServiceName] = {};
- awsSdk[serviceName] = awsSdk.Service.defineService(lowerServiceName, apiVersions);
- }
- else {
- awsSdk.Service.addVersions(awsSdk[serviceName], apiVersions);
- }
- apiVersions.forEach(apiVersion => {
- Object.defineProperty(apiLoader.services[lowerServiceName], apiVersion, {
- get: function get() {
- const modelFilePrefix = `aws-sdk-patch/${lowerServiceName}-${apiVersion}`;
- const model = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.service.json`), 'utf-8'));
- model.paginators = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.paginators.json`), 'utf-8')).pagination;
- return model;
- },
- enumerable: true,
- configurable: true,
- });
- });
- });
- return awsSdk;
-}
-/* eslint-disable @typescript-eslint/no-require-imports, import/no-extraneous-dependencies */
-async function handler(event, context) {
- try {
- let AWS;
- if (!latestSdkInstalled && event.ResourceProperties.InstallLatestAwsSdk === 'true') {
- try {
- installLatestSdk();
- AWS = require('/tmp/node_modules/aws-sdk');
- }
- catch (e) {
- console.log(`Failed to install latest AWS SDK v2: ${e}`);
- AWS = require('aws-sdk'); // Fallback to pre-installed version
- }
- }
- else if (latestSdkInstalled) {
- AWS = require('/tmp/node_modules/aws-sdk');
- }
- else {
- AWS = require('aws-sdk');
- }
- try {
- AWS = patchSdk(AWS);
- }
- catch (e) {
- console.log(`Failed to patch AWS SDK: ${e}. Proceeding with the installed copy.`);
- }
- console.log(JSON.stringify({ ...event, ResponseURL: '...' }));
- console.log('AWS SDK VERSION: ' + AWS.VERSION);
- event.ResourceProperties.Create = decodeCall(event.ResourceProperties.Create);
- event.ResourceProperties.Update = decodeCall(event.ResourceProperties.Update);
- event.ResourceProperties.Delete = decodeCall(event.ResourceProperties.Delete);
- // Default physical resource id
- let physicalResourceId;
- switch (event.RequestType) {
- case 'Create':
- physicalResourceId = event.ResourceProperties.Create?.physicalResourceId?.id ??
- event.ResourceProperties.Update?.physicalResourceId?.id ??
- event.ResourceProperties.Delete?.physicalResourceId?.id ??
- event.LogicalResourceId;
- break;
- case 'Update':
- case 'Delete':
- physicalResourceId = event.ResourceProperties[event.RequestType]?.physicalResourceId?.id ?? event.PhysicalResourceId;
- break;
- }
- let flatData = {};
- let data = {};
- const call = event.ResourceProperties[event.RequestType];
- if (call) {
- let credentials;
- if (call.assumedRoleArn) {
- const timestamp = (new Date()).getTime();
- const params = {
- RoleArn: call.assumedRoleArn,
- RoleSessionName: `${timestamp}-${physicalResourceId}`.substring(0, 64),
- };
- credentials = new AWS.ChainableTemporaryCredentials({
- params: params,
- stsConfig: { stsRegionalEndpoints: 'regional' },
- });
- }
- if (!Object.prototype.hasOwnProperty.call(AWS, call.service)) {
- throw Error(`Service ${call.service} does not exist in AWS SDK version ${AWS.VERSION}.`);
- }
- const awsService = new AWS[call.service]({
- apiVersion: call.apiVersion,
- credentials: credentials,
- region: call.region,
- });
- try {
- const response = await awsService[call.action](call.parameters && decodeSpecialValues(call.parameters, physicalResourceId)).promise();
- flatData = {
- apiVersion: awsService.config.apiVersion,
- region: awsService.config.region,
- ...flatten(response),
- };
- let outputPaths;
- if (call.outputPath) {
- outputPaths = [call.outputPath];
- }
- else if (call.outputPaths) {
- outputPaths = call.outputPaths;
- }
- if (outputPaths) {
- data = filterKeys(flatData, startsWithOneOf(outputPaths));
- }
- else {
- data = flatData;
- }
- }
- catch (e) {
- if (!call.ignoreErrorCodesMatching || !new RegExp(call.ignoreErrorCodesMatching).test(e.code)) {
- throw e;
- }
- }
- if (call.physicalResourceId?.responsePath) {
- physicalResourceId = flatData[call.physicalResourceId.responsePath];
- }
- }
- await respond('SUCCESS', 'OK', physicalResourceId, data);
- }
- catch (e) {
- console.log(e);
- await respond('FAILED', e.message || 'Internal Error', context.logStreamName, {});
- }
- function respond(responseStatus, reason, physicalResourceId, data) {
- const responseBody = JSON.stringify({
- Status: responseStatus,
- Reason: reason,
- PhysicalResourceId: physicalResourceId,
- StackId: event.StackId,
- RequestId: event.RequestId,
- LogicalResourceId: event.LogicalResourceId,
- NoEcho: false,
- Data: data,
- });
- console.log('Responding', responseBody);
- // eslint-disable-next-line @typescript-eslint/no-require-imports
- const parsedUrl = require('url').parse(event.ResponseURL);
- const requestOptions = {
- hostname: parsedUrl.hostname,
- path: parsedUrl.path,
- method: 'PUT',
- headers: { 'content-type': '', 'content-length': responseBody.length },
- };
- return new Promise((resolve, reject) => {
- try {
- // eslint-disable-next-line @typescript-eslint/no-require-imports
- const request = require('https').request(requestOptions, resolve);
- request.on('error', reject);
- request.write(responseBody);
- request.end();
- }
- catch (e) {
- reject(e);
- }
- });
- }
-}
-exports.handler = handler;
-function decodeCall(call) {
- if (!call) {
- return undefined;
- }
- return JSON.parse(call);
-}
-function startsWithOneOf(searchStrings) {
- return function (string) {
- for (const searchString of searchStrings) {
- if (string.startsWith(searchString)) {
- return true;
- }
- }
- return false;
- };
-}
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsaURBQXlDO0FBQ3pDLHlCQUF5QjtBQUN6QiwrQkFBNEI7QUFTNUI7O0dBRUc7QUFDVSxRQUFBLDhCQUE4QixHQUFHLHNCQUFzQixDQUFDO0FBRXJFOzs7OztHQUtHO0FBQ0gsU0FBZ0IsT0FBTyxDQUFDLE1BQWM7SUFDcEMsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUNsQixFQUFFLEVBQ0YsR0FBRyxTQUFTLFFBQVEsQ0FBQyxLQUFVLEVBQUUsT0FBaUIsRUFBRTtRQUNsRCxPQUFPLEVBQUUsQ0FBQyxNQUFNLENBQUMsR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQzthQUNuQyxHQUFHLENBQUMsR0FBRyxDQUFDLEVBQUU7WUFDVCxNQUFNLFFBQVEsR0FBRyxNQUFNLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsUUFBUSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUM7WUFDeEYsT0FBTyxPQUFPLFFBQVEsS0FBSyxRQUFRLElBQUksUUFBUSxLQUFLLElBQUk7Z0JBQ3RELENBQUMsQ0FBQyxRQUFRLENBQUMsUUFBUSxFQUFFLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO2dCQUN4QyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQUUsUUFBUSxFQUFFLENBQUMsQ0FBQztRQUNyRCxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ1IsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUNWLENBQUM7QUFDSixDQUFDO0FBYkQsMEJBYUM7QUFFRDs7R0FFRztBQUNILFNBQVMsbUJBQW1CLENBQUMsTUFBYyxFQUFFLGtCQUEwQjtJQUNyRSxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxDQUFDLEVBQUUsRUFBRTtRQUNsRCxRQUFRLENBQUMsRUFBRTtZQUNULEtBQUssc0NBQThCO2dCQUNqQyxPQUFPLGtCQUFrQixDQUFDO1lBQzVCO2dCQUNFLE9BQU8sQ0FBQyxDQUFDO1NBQ1o7SUFDSCxDQUFDLENBQUMsQ0FBQztBQUNMLENBQUM7QUFFRDs7R0FFRztBQUNILFNBQVMsVUFBVSxDQUFDLE1BQWMsRUFBRSxJQUE4QjtJQUNoRSxPQUFPLE1BQU0sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDO1NBQzFCLE1BQU0sQ0FDTCxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztRQUN0QixDQUFDLENBQUMsRUFBRSxHQUFHLEdBQUcsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRTtRQUNwQixDQUFDLENBQUMsR0FBRyxFQUNQLEVBQUUsQ0FDSCxDQUFDO0FBQ04sQ0FBQztBQUVELElBQUksa0JBQWtCLEdBQUcsS0FBSyxDQUFDO0FBRS9CLFNBQWdCLG9CQUFvQjtJQUNsQyxrQkFBa0IsR0FBRyxLQUFLLENBQUM7QUFDN0IsQ0FBQztBQUZELG9EQUVDO0FBRUQ7O0dBRUc7QUFDSCxTQUFTLGdCQUFnQjtJQUN2QixPQUFPLENBQUMsR0FBRyxDQUFDLDhCQUE4QixDQUFDLENBQUM7SUFDNUMsb0ZBQW9GO0lBQ3BGLHdCQUFRLENBQUMsd0ZBQXdGLENBQUMsQ0FBQztJQUNuRyxrQkFBa0IsR0FBRyxJQUFJLENBQUM7QUFDNUIsQ0FBQztBQUVELGdDQUFnQztBQUNoQyxNQUFNLGVBQWUsR0FBcUQsRUFBRSxDQUFDO0FBQzdFOztHQUVHO0FBQ0gsU0FBUyxRQUFRLENBQUMsTUFBVztJQUMzQixNQUFNLFNBQVMsR0FBRyxNQUFNLENBQUMsU0FBUyxDQUFDO0lBQ25DLGVBQWUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxFQUFFLFdBQVcsRUFBRSxXQUFXLEVBQUUsRUFBRSxFQUFFO1FBQ3ZELE1BQU0sZ0JBQWdCLEdBQUcsV0FBVyxDQUFDLFdBQVcsRUFBRSxDQUFDO1FBQ25ELElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFFO1lBQ2hELFNBQVMsQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLENBQUMsR0FBRyxFQUFFLENBQUM7WUFDMUMsTUFBTSxDQUFDLFdBQVcsQ0FBQyxHQUFHLE1BQU0sQ0FBQyxPQUFPLENBQUMsYUFBYSxDQUFDLGdCQUFnQixFQUFFLFdBQVcsQ0FBQyxDQUFDO1NBQ25GO2FBQU07WUFDTCxNQUFNLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsV0FBVyxDQUFDLEVBQUUsV0FBVyxDQUFDLENBQUM7U0FDOUQ7UUFDRCxXQUFXLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxFQUFFO1lBQy9CLE1BQU0sQ0FBQyxjQUFjLENBQUMsU0FBUyxDQUFDLFFBQVEsQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFFLFVBQVUsRUFBRTtnQkFDdEUsR0FBRyxFQUFFLFNBQVMsR0FBRztvQkFDZixNQUFNLGVBQWUsR0FBRyxpQkFBaUIsZ0JBQWdCLElBQUksVUFBVSxFQUFFLENBQUM7b0JBQzFFLE1BQU0sS0FBSyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLFlBQVksQ0FBQyxXQUFJLENBQUMsU0FBUyxFQUFFLEdBQUcsZUFBZSxlQUFlLENBQUMsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFDO29CQUN2RyxLQUFLLENBQUMsVUFBVSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLFlBQVksQ0FBQyxXQUFJLENBQUMsU0FBUyxFQUFFLEdBQUcsZUFBZSxrQkFBa0IsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDO29CQUMxSCxPQUFPLEtBQUssQ0FBQztnQkFDZixDQUFDO2dCQUNELFVBQVUsRUFBRSxJQUFJO2dCQUNoQixZQUFZLEVBQUUsSUFBSTthQUNuQixDQUFDLENBQUM7UUFDTCxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQyxDQUFDO0lBQ0gsT0FBTyxNQUFNLENBQUM7QUFDaEIsQ0FBQztBQUVELDZGQUE2RjtBQUN0RixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsSUFBSTtRQUNGLElBQUksR0FBUSxDQUFDO1FBQ2IsSUFBSSxDQUFDLGtCQUFrQixJQUFJLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxtQkFBbUIsS0FBSyxNQUFNLEVBQUU7WUFDbEYsSUFBSTtnQkFDRixnQkFBZ0IsRUFBRSxDQUFDO2dCQUNuQixHQUFHLEdBQUcsT0FBTyxDQUFDLDJCQUEyQixDQUFDLENBQUM7YUFDNUM7WUFBQyxPQUFPLENBQUMsRUFBRTtnQkFDVixPQUFPLENBQUMsR0FBRyxDQUFDLHdDQUF3QyxDQUFDLEVBQUUsQ0FBQyxDQUFDO2dCQUN6RCxHQUFHLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsb0NBQW9DO2FBQy9EO1NBQ0Y7YUFBTSxJQUFJLGtCQUFrQixFQUFFO1lBQzdCLEdBQUcsR0FBRyxPQUFPLENBQUMsMkJBQTJCLENBQUMsQ0FBQztTQUM1QzthQUFNO1lBQ0wsR0FBRyxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztTQUMxQjtRQUNELElBQUk7WUFDRixHQUFHLEdBQUcsUUFBUSxDQUFDLEdBQUcsQ0FBQyxDQUFDO1NBQ3JCO1FBQUMsT0FBTyxDQUFDLEVBQUU7WUFDVixPQUFPLENBQUMsR0FBRyxDQUFDLDRCQUE0QixDQUFDLHVDQUF1QyxDQUFDLENBQUM7U0FDbkY7UUFFRCxPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsRUFBRSxHQUFHLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQyxDQUFDO1FBQzlELE9BQU8sQ0FBQyxHQUFHLENBQUMsbUJBQW1CLEdBQUcsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBRS9DLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFNLEdBQUcsVUFBVSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUM5RSxLQUFLLENBQUMsa0JBQWtCLENBQUMsTUFBTSxHQUFHLFVBQVUsQ0FBQyxLQUFLLENBQUMsa0JBQWtCLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDOUUsS0FBSyxDQUFDLGtCQUFrQixDQUFDLE1BQU0sR0FBRyxVQUFVLENBQUMsS0FBSyxDQUFDLGtCQUFrQixDQUFDLE1BQU0sQ0FBQyxDQUFDO1FBQzlFLCtCQUErQjtRQUMvQixJQUFJLGtCQUEwQixDQUFDO1FBQy9CLFFBQVEsS0FBSyxDQUFDLFdBQVcsRUFBRTtZQUN6QixLQUFLLFFBQVE7Z0JBQ1gsa0JBQWtCLEdBQUcsS0FBSyxDQUFDLGtCQUFrQixDQUFDLE1BQU0sRUFBRSxrQkFBa0IsRUFBRSxFQUFFO29CQUN2RCxLQUFLLENBQUMsa0JBQWtCLENBQUMsTUFBTSxFQUFFLGtCQUFrQixFQUFFLEVBQUU7b0JBQ3ZELEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFNLEVBQUUsa0JBQWtCLEVBQUUsRUFBRTtvQkFDdkQsS0FBSyxDQUFDLGlCQUFpQixDQUFDO2dCQUM3QyxNQUFNO1lBQ1IsS0FBSyxRQUFRLENBQUM7WUFDZCxLQUFLLFFBQVE7Z0JBQ1gsa0JBQWtCLEdBQUcsS0FBSyxDQUFDLGtCQUFrQixDQUFDLEtBQUssQ0FBQyxXQUFXLENBQUMsRUFBRSxrQkFBa0IsRUFBRSxFQUFFLElBQUksS0FBSyxDQUFDLGtCQUFrQixDQUFDO2dCQUNySCxNQUFNO1NBQ1Q7UUFFRCxJQUFJLFFBQVEsR0FBOEIsRUFBRSxDQUFDO1FBQzdDLElBQUksSUFBSSxHQUE4QixFQUFFLENBQUM7UUFDekMsTUFBTSxJQUFJLEdBQTJCLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxLQUFLLENBQUMsV0FBVyxDQUFDLENBQUM7UUFFakYsSUFBSSxJQUFJLEVBQUU7WUFFUixJQUFJLFdBQVcsQ0FBQztZQUNoQixJQUFJLElBQUksQ0FBQyxjQUFjLEVBQUU7Z0JBQ3ZCLE1BQU0sU0FBUyxHQUFHLENBQUMsSUFBSSxJQUFJLEVBQUUsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDO2dCQUV6QyxNQUFNLE1BQU0sR0FBRztvQkFDYixPQUFPLEVBQUUsSUFBSSxDQUFDLGNBQWM7b0JBQzVCLGVBQWUsRUFBRSxHQUFHLFNBQVMsSUFBSSxrQkFBa0IsRUFBRSxDQUFDLFNBQVMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDO2lCQUN2RSxDQUFDO2dCQUVGLFdBQVcsR0FBRyxJQUFJLEdBQUcsQ0FBQyw2QkFBNkIsQ0FBQztvQkFDbEQsTUFBTSxFQUFFLE1BQU07b0JBQ2QsU0FBUyxFQUFFLEVBQUUsb0JBQW9CLEVBQUUsVUFBVSxFQUFFO2lCQUNoRCxDQUFDLENBQUM7YUFDSjtZQUVELElBQUksQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsR0FBRyxFQUFFLElBQUksQ0FBQyxPQUFPLENBQUMsRUFBRTtnQkFDNUQsTUFBTSxLQUFLLENBQUMsV0FBVyxJQUFJLENBQUMsT0FBTyxzQ0FBc0MsR0FBRyxDQUFDLE9BQU8sR0FBRyxDQUFDLENBQUM7YUFDMUY7WUFDRCxNQUFNLFVBQVUsR0FBRyxJQUFLLEdBQVcsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUM7Z0JBQ2hELFVBQVUsRUFBRSxJQUFJLENBQUMsVUFBVTtnQkFDM0IsV0FBVyxFQUFFLFdBQVc7Z0JBQ3hCLE1BQU0sRUFBRSxJQUFJLENBQUMsTUFBTTthQUNwQixDQUFDLENBQUM7WUFFSCxJQUFJO2dCQUNGLE1BQU0sUUFBUSxHQUFHLE1BQU0sVUFBVSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FDNUMsSUFBSSxDQUFDLFVBQVUsSUFBSSxtQkFBbUIsQ0FBQyxJQUFJLENBQUMsVUFBVSxFQUFFLGtCQUFrQixDQUFDLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQztnQkFDekYsUUFBUSxHQUFHO29CQUNULFVBQVUsRUFBRSxVQUFVLENBQUMsTUFBTSxDQUFDLFVBQVU7b0JBQ3hDLE1BQU0sRUFBRSxVQUFVLENBQUMsTUFBTSxDQUFDLE1BQU07b0JBQ2hDLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQztpQkFDckIsQ0FBQztnQkFFRixJQUFJLFdBQWlDLENBQUM7Z0JBQ3RDLElBQUksSUFBSSxDQUFDLFVBQVUsRUFBRTtvQkFDbkIsV0FBVyxHQUFHLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDO2lCQUNqQztxQkFBTSxJQUFJLElBQUksQ0FBQyxXQUFXLEVBQUU7b0JBQzNCLFdBQVcsR0FBRyxJQUFJLENBQUMsV0FBVyxDQUFDO2lCQUNoQztnQkFFRCxJQUFJLFdBQVcsRUFBRTtvQkFDZixJQUFJLEdBQUcsVUFBVSxDQUFDLFFBQVEsRUFBRSxlQUFlLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQztpQkFDM0Q7cUJBQU07b0JBQ0wsSUFBSSxHQUFHLFFBQVEsQ0FBQztpQkFDakI7YUFDRjtZQUFDLE9BQU8sQ0FBQyxFQUFFO2dCQUNWLElBQUksQ0FBQyxJQUFJLENBQUMsd0JBQXdCLElBQUksQ0FBQyxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsd0JBQXdCLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFO29CQUM3RixNQUFNLENBQUMsQ0FBQztpQkFDVDthQUNGO1lBRUQsSUFBSSxJQUFJLENBQUMsa0JBQWtCLEVBQUUsWUFBWSxFQUFFO2dCQUN6QyxrQkFBa0IsR0FBRyxRQUFRLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLFlBQVksQ0FBQyxDQUFDO2FBQ3JFO1NBQ0Y7UUFFRCxNQUFNLE9BQU8sQ0FBQyxTQUFTLEVBQUUsSUFBSSxFQUFFLGtCQUFrQixFQUFFLElBQUksQ0FBQyxDQUFDO0tBQzFEO0lBQUMsT0FBTyxDQUFDLEVBQUU7UUFDVixPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2YsTUFBTSxPQUFPLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQyxPQUFPLElBQUksZ0JBQWdCLEVBQUUsT0FBTyxDQUFDLGFBQWEsRUFBRSxFQUFFLENBQUMsQ0FBQztLQUNuRjtJQUVELFNBQVMsT0FBTyxDQUFDLGNBQXNCLEVBQUUsTUFBYyxFQUFFLGtCQUEwQixFQUFFLElBQVM7UUFDNUYsTUFBTSxZQUFZLEdBQUcsSUFBSSxDQUFDLFNBQVMsQ0FBQztZQUNsQyxNQUFNLEVBQUUsY0FBYztZQUN0QixNQUFNLEVBQUUsTUFBTTtZQUNkLGtCQUFrQixFQUFFLGtCQUFrQjtZQUN0QyxPQUFPLEVBQUUsS0FBSyxDQUFDLE9BQU87WUFDdEIsU0FBUyxFQUFFLEtBQUssQ0FBQyxTQUFTO1lBQzFCLGlCQUFpQixFQUFFLEtBQUssQ0FBQyxpQkFBaUI7WUFDMUMsTUFBTSxFQUFFLEtBQUs7WUFDYixJQUFJLEVBQUUsSUFBSTtTQUNYLENBQUMsQ0FBQztRQUVILE9BQU8sQ0FBQyxHQUFHLENBQUMsWUFBWSxFQUFFLFlBQVksQ0FBQyxDQUFDO1FBRXhDLGlFQUFpRTtRQUNqRSxNQUFNLFNBQVMsR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsS0FBSyxDQUFDLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQztRQUMxRCxNQUFNLGNBQWMsR0FBRztZQUNyQixRQUFRLEVBQUUsU0FBUyxDQUFDLFFBQVE7WUFDNUIsSUFBSSxFQUFFLFNBQVMsQ0FBQyxJQUFJO1lBQ3BCLE1BQU0sRUFBRSxLQUFLO1lBQ2IsT0FBTyxFQUFFLEVBQUUsY0FBYyxFQUFFLEVBQUUsRUFBRSxnQkFBZ0IsRUFBRSxZQUFZLENBQUMsTUFBTSxFQUFFO1NBQ3ZFLENBQUM7UUFFRixPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFO1lBQ3JDLElBQUk7Z0JBQ0YsaUVBQWlFO2dCQUNqRSxNQUFNLE9BQU8sR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLENBQUMsT0FBTyxDQUFDLGNBQWMsRUFBRSxPQUFPLENBQUMsQ0FBQztnQkFDbEUsT0FBTyxDQUFDLEVBQUUsQ0FBQyxPQUFPLEVBQUUsTUFBTSxDQUFDLENBQUM7Z0JBQzVCLE9BQU8sQ0FBQyxLQUFLLENBQUMsWUFBWSxDQUFDLENBQUM7Z0JBQzVCLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQzthQUNmO1lBQUMsT0FBTyxDQUFDLEVBQUU7Z0JBQ1YsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDO2FBQ1g7UUFDSCxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUM7QUFDSCxDQUFDO0FBbEpELDBCQWtKQztBQUVELFNBQVMsVUFBVSxDQUFDLElBQXdCO0lBQzFDLElBQUksQ0FBQyxJQUFJLEVBQUU7UUFBRSxPQUFPLFNBQVMsQ0FBQztLQUFFO0lBQ2hDLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUMxQixDQUFDO0FBRUQsU0FBUyxlQUFlLENBQUMsYUFBdUI7SUFDOUMsT0FBTyxVQUFTLE1BQWM7UUFDNUIsS0FBSyxNQUFNLFlBQVksSUFBSSxhQUFhLEVBQUU7WUFDeEMsSUFBSSxNQUFNLENBQUMsVUFBVSxDQUFDLFlBQVksQ0FBQyxFQUFFO2dCQUNuQyxPQUFPLElBQUksQ0FBQzthQUNiO1NBQ0Y7UUFDRCxPQUFPLEtBQUssQ0FBQztJQUNmLENBQUMsQ0FBQztBQUNKLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1jb25zb2xlICovXG5pbXBvcnQgeyBleGVjU3luYyB9IGZyb20gJ2NoaWxkX3Byb2Nlc3MnO1xuaW1wb3J0ICogYXMgZnMgZnJvbSAnZnMnO1xuaW1wb3J0IHsgam9pbiB9IGZyb20gJ3BhdGgnO1xuLy8gaW1wb3J0IHRoZSBBV1NMYW1iZGEgcGFja2FnZSBleHBsaWNpdGx5LFxuLy8gd2hpY2ggaXMgZ2xvYmFsbHkgYXZhaWxhYmxlIGluIHRoZSBMYW1iZGEgcnVudGltZSxcbi8vIGFzIG90aGVyd2lzZSBsaW5raW5nIHRoaXMgcmVwb3NpdG9yeSB3aXRoIGxpbmstYWxsLnNoXG4vLyBmYWlscyBpbiB0aGUgQ0RLIGFwcCBleGVjdXRlZCB3aXRoIHRzLW5vZGVcbi8qIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBpbXBvcnQvbm8tZXh0cmFuZW91cy1kZXBlbmRlbmNpZXMsaW1wb3J0L25vLXVucmVzb2x2ZWQgKi9cbmltcG9ydCAqIGFzIEFXU0xhbWJkYSBmcm9tICdhd3MtbGFtYmRhJztcbmltcG9ydCB7IEF3c1Nka0NhbGwgfSBmcm9tICcuLi9hd3MtY3VzdG9tLXJlc291cmNlJztcblxuLyoqXG4gKiBTZXJpYWxpemVkIGZvcm0gb2YgdGhlIHBoeXNpY2FsIHJlc291cmNlIGlkIGZvciB1c2UgaW4gdGhlIG9wZXJhdGlvbiBwYXJhbWV0ZXJzXG4gKi9cbmV4cG9ydCBjb25zdCBQSFlTSUNBTF9SRVNPVVJDRV9JRF9SRUZFUkVOQ0UgPSAnUEhZU0lDQUw6UkVTT1VSQ0VJRDonO1xuXG4vKipcbiAqIEZsYXR0ZW5zIGEgbmVzdGVkIG9iamVjdFxuICpcbiAqIEBwYXJhbSBvYmplY3QgdGhlIG9iamVjdCB0byBiZSBmbGF0dGVuZWRcbiAqIEByZXR1cm5zIGEgZmxhdCBvYmplY3Qgd2l0aCBwYXRoIGFzIGtleXNcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGZsYXR0ZW4ob2JqZWN0OiBvYmplY3QpOiB7IFtrZXk6IHN0cmluZ106IGFueSB9IHtcbiAgcmV0dXJuIE9iamVjdC5hc3NpZ24oXG4gICAge30sXG4gICAgLi4uZnVuY3Rpb24gX2ZsYXR0ZW4oY2hpbGQ6IGFueSwgcGF0aDogc3RyaW5nW10gPSBbXSk6IGFueSB7XG4gICAgICByZXR1cm4gW10uY29uY2F0KC4uLk9iamVjdC5rZXlzKGNoaWxkKVxuICAgICAgICAubWFwKGtleSA9PiB7XG4gICAgICAgICAgY29uc3QgY2hpbGRLZXkgPSBCdWZmZXIuaXNCdWZmZXIoY2hpbGRba2V5XSkgPyBjaGlsZFtrZXldLnRvU3RyaW5nKCd1dGY4JykgOiBjaGlsZFtrZXldO1xuICAgICAgICAgIHJldHVybiB0eXBlb2YgY2hpbGRLZXkgPT09ICdvYmplY3QnICYmIGNoaWxkS2V5ICE9PSBudWxsXG4gICAgICAgICAgICA/IF9mbGF0dGVuKGNoaWxkS2V5LCBwYXRoLmNvbmNhdChba2V5XSkpXG4gICAgICAgICAgICA6ICh7IFtwYXRoLmNvbmNhdChba2V5XSkuam9pbignLicpXTogY2hpbGRLZXkgfSk7XG4gICAgICAgIH0pKTtcbiAgICB9KG9iamVjdCksXG4gICk7XG59XG5cbi8qKlxuICogRGVjb2RlcyBlbmNvZGVkIHNwZWNpYWwgdmFsdWVzIChwaHlzaWNhbFJlc291cmNlSWQpXG4gKi9cbmZ1bmN0aW9uIGRlY29kZVNwZWNpYWxWYWx1ZXMob2JqZWN0OiBvYmplY3QsIHBoeXNpY2FsUmVzb3VyY2VJZDogc3RyaW5nKSB7XG4gIHJldHVybiBKU09OLnBhcnNlKEpTT04uc3RyaW5naWZ5KG9iamVjdCksIChfaywgdikgPT4ge1xuICAgIHN3aXRjaCAodikge1xuICAgICAgY2FzZSBQSFlTSUNBTF9SRVNPVVJDRV9JRF9SRUZFUkVOQ0U6XG4gICAgICAgIHJldHVybiBwaHlzaWNhbFJlc291cmNlSWQ7XG4gICAgICBkZWZhdWx0OlxuICAgICAgICByZXR1cm4gdjtcbiAgICB9XG4gIH0pO1xufVxuXG4vKipcbiAqIEZpbHRlcnMgdGhlIGtleXMgb2YgYW4gb2JqZWN0LlxuICovXG5mdW5jdGlvbiBmaWx0ZXJLZXlzKG9iamVjdDogb2JqZWN0LCBwcmVkOiAoa2V5OiBzdHJpbmcpID0+IGJvb2xlYW4pIHtcbiAgcmV0dXJuIE9iamVjdC5lbnRyaWVzKG9iamVjdClcbiAgICAucmVkdWNlKFxuICAgICAgKGFjYywgW2ssIHZdKSA9PiBwcmVkKGspXG4gICAgICAgID8geyAuLi5hY2MsIFtrXTogdiB9XG4gICAgICAgIDogYWNjLFxuICAgICAge30sXG4gICAgKTtcbn1cblxubGV0IGxhdGVzdFNka0luc3RhbGxlZCA9IGZhbHNlO1xuXG5leHBvcnQgZnVuY3Rpb24gZm9yY2VTZGtJbnN0YWxsYXRpb24oKSB7XG4gIGxhdGVzdFNka0luc3RhbGxlZCA9IGZhbHNlO1xufVxuXG4vKipcbiAqIEluc3RhbGxzIGxhdGVzdCBBV1MgU0RLIHYyXG4gKi9cbmZ1bmN0aW9uIGluc3RhbGxMYXRlc3RTZGsoKTogdm9pZCB7XG4gIGNvbnNvbGUubG9nKCdJbnN0YWxsaW5nIGxhdGVzdCBBV1MgU0RLIHYyJyk7XG4gIC8vIEJvdGggSE9NRSBhbmQgLS1wcmVmaXggYXJlIG5lZWRlZCBoZXJlIGJlY2F1c2UgL3RtcCBpcyB0aGUgb25seSB3cml0YWJsZSBsb2NhdGlvblxuICBleGVjU3luYygnSE9NRT0vdG1wIG5wbSBpbnN0YWxsIGF3cy1zZGtAMiAtLXByb2R1Y3Rpb24gLS1uby1wYWNrYWdlLWxvY2sgLS1uby1zYXZlIC0tcHJlZml4IC90bXAnKTtcbiAgbGF0ZXN0U2RrSW5zdGFsbGVkID0gdHJ1ZTtcbn1cblxuLy8gbm8gY3VycmVudGx5IHBhdGNoZWQgc2VydmljZXNcbmNvbnN0IHBhdGNoZWRTZXJ2aWNlczogeyBzZXJ2aWNlTmFtZTogc3RyaW5nOyBhcGlWZXJzaW9uczogc3RyaW5nW10gfVtdID0gW107XG4vKipcbiAqIFBhdGNoZXMgdGhlIEFXUyBTREsgYnkgbG9hZGluZyBzZXJ2aWNlIG1vZGVscyBpbiB0aGUgc2FtZSBtYW5uZXIgYXMgdGhlIGFjdHVhbCBTREtcbiAqL1xuZnVuY3Rpb24gcGF0Y2hTZGsoYXdzU2RrOiBhbnkpOiBhbnkge1xuICBjb25zdCBhcGlMb2FkZXIgPSBhd3NTZGsuYXBpTG9hZGVyO1xuICBwYXRjaGVkU2VydmljZXMuZm9yRWFjaCgoeyBzZXJ2aWNlTmFtZSwgYXBpVmVyc2lvbnMgfSkgPT4ge1xuICAgIGNvbnN0IGxvd2VyU2VydmljZU5hbWUgPSBzZXJ2aWNlTmFtZS50b0xvd2VyQ2FzZSgpO1xuICAgIGlmICghYXdzU2RrLlNlcnZpY2UuaGFzU2VydmljZShsb3dlclNlcnZpY2VOYW1lKSkge1xuICAgICAgYXBpTG9hZGVyLnNlcnZpY2VzW2xvd2VyU2VydmljZU5hbWVdID0ge307XG4gICAgICBhd3NTZGtbc2VydmljZU5hbWVdID0gYXdzU2RrLlNlcnZpY2UuZGVmaW5lU2VydmljZShsb3dlclNlcnZpY2VOYW1lLCBhcGlWZXJzaW9ucyk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGF3c1Nkay5TZXJ2aWNlLmFkZFZlcnNpb25zKGF3c1Nka1tzZXJ2aWNlTmFtZV0sIGFwaVZlcnNpb25zKTtcbiAgICB9XG4gICAgYXBpVmVyc2lvbnMuZm9yRWFjaChhcGlWZXJzaW9uID0+IHtcbiAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShhcGlMb2FkZXIuc2VydmljZXNbbG93ZXJTZXJ2aWNlTmFtZV0sIGFwaVZlcnNpb24sIHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQoKSB7XG4gICAgICAgICAgY29uc3QgbW9kZWxGaWxlUHJlZml4ID0gYGF3cy1zZGstcGF0Y2gvJHtsb3dlclNlcnZpY2VOYW1lfS0ke2FwaVZlcnNpb259YDtcbiAgICAgICAgICBjb25zdCBtb2RlbCA9IEpTT04ucGFyc2UoZnMucmVhZEZpbGVTeW5jKGpvaW4oX19kaXJuYW1lLCBgJHttb2RlbEZpbGVQcmVmaXh9LnNlcnZpY2UuanNvbmApLCAndXRmLTgnKSk7XG4gICAgICAgICAgbW9kZWwucGFnaW5hdG9ycyA9IEpTT04ucGFyc2UoZnMucmVhZEZpbGVTeW5jKGpvaW4oX19kaXJuYW1lLCBgJHttb2RlbEZpbGVQcmVmaXh9LnBhZ2luYXRvcnMuanNvbmApLCAndXRmLTgnKSkucGFnaW5hdGlvbjtcbiAgICAgICAgICByZXR1cm4gbW9kZWw7XG4gICAgICAgIH0sXG4gICAgICAgIGVudW1lcmFibGU6IHRydWUsXG4gICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9KTtcbiAgcmV0dXJuIGF3c1Nkaztcbn1cblxuLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXJlcXVpcmUtaW1wb3J0cywgaW1wb3J0L25vLWV4dHJhbmVvdXMtZGVwZW5kZW5jaWVzICovXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gaGFuZGxlcihldmVudDogQVdTTGFtYmRhLkNsb3VkRm9ybWF0aW9uQ3VzdG9tUmVzb3VyY2VFdmVudCwgY29udGV4dDogQVdTTGFtYmRhLkNvbnRleHQpIHtcbiAgdHJ5IHtcbiAgICBsZXQgQVdTOiBhbnk7XG4gICAgaWYgKCFsYXRlc3RTZGtJbnN0YWxsZWQgJiYgZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLkluc3RhbGxMYXRlc3RBd3NTZGsgPT09ICd0cnVlJykge1xuICAgICAgdHJ5IHtcbiAgICAgICAgaW5zdGFsbExhdGVzdFNkaygpO1xuICAgICAgICBBV1MgPSByZXF1aXJlKCcvdG1wL25vZGVfbW9kdWxlcy9hd3Mtc2RrJyk7XG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIGNvbnNvbGUubG9nKGBGYWlsZWQgdG8gaW5zdGFsbCBsYXRlc3QgQVdTIFNESyB2MjogJHtlfWApO1xuICAgICAgICBBV1MgPSByZXF1aXJlKCdhd3Mtc2RrJyk7IC8vIEZhbGxiYWNrIHRvIHByZS1pbnN0YWxsZWQgdmVyc2lvblxuICAgICAgfVxuICAgIH0gZWxzZSBpZiAobGF0ZXN0U2RrSW5zdGFsbGVkKSB7XG4gICAgICBBV1MgPSByZXF1aXJlKCcvdG1wL25vZGVfbW9kdWxlcy9hd3Mtc2RrJyk7XG4gICAgfSBlbHNlIHtcbiAgICAgIEFXUyA9IHJlcXVpcmUoJ2F3cy1zZGsnKTtcbiAgICB9XG4gICAgdHJ5IHtcbiAgICAgIEFXUyA9IHBhdGNoU2RrKEFXUyk7XG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgY29uc29sZS5sb2coYEZhaWxlZCB0byBwYXRjaCBBV1MgU0RLOiAke2V9LiBQcm9jZWVkaW5nIHdpdGggdGhlIGluc3RhbGxlZCBjb3B5LmApO1xuICAgIH1cblxuICAgIGNvbnNvbGUubG9nKEpTT04uc3RyaW5naWZ5KHsgLi4uZXZlbnQsIFJlc3BvbnNlVVJMOiAnLi4uJyB9KSk7XG4gICAgY29uc29sZS5sb2coJ0FXUyBTREsgVkVSU0lPTjogJyArIEFXUy5WRVJTSU9OKTtcblxuICAgIGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5DcmVhdGUgPSBkZWNvZGVDYWxsKGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5DcmVhdGUpO1xuICAgIGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5VcGRhdGUgPSBkZWNvZGVDYWxsKGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5VcGRhdGUpO1xuICAgIGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5EZWxldGUgPSBkZWNvZGVDYWxsKGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5EZWxldGUpO1xuICAgIC8vIERlZmF1bHQgcGh5c2ljYWwgcmVzb3VyY2UgaWRcbiAgICBsZXQgcGh5c2ljYWxSZXNvdXJjZUlkOiBzdHJpbmc7XG4gICAgc3dpdGNoIChldmVudC5SZXF1ZXN0VHlwZSkge1xuICAgICAgY2FzZSAnQ3JlYXRlJzpcbiAgICAgICAgcGh5c2ljYWxSZXNvdXJjZUlkID0gZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLkNyZWF0ZT8ucGh5c2ljYWxSZXNvdXJjZUlkPy5pZCA/P1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudC5SZXNvdXJjZVByb3BlcnRpZXMuVXBkYXRlPy5waHlzaWNhbFJlc291cmNlSWQ/LmlkID8/XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50LlJlc291cmNlUHJvcGVydGllcy5EZWxldGU/LnBoeXNpY2FsUmVzb3VyY2VJZD8uaWQgPz9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnQuTG9naWNhbFJlc291cmNlSWQ7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnVXBkYXRlJzpcbiAgICAgIGNhc2UgJ0RlbGV0ZSc6XG4gICAgICAgIHBoeXNpY2FsUmVzb3VyY2VJZCA9IGV2ZW50LlJlc291cmNlUHJvcGVydGllc1tldmVudC5SZXF1ZXN0VHlwZV0/LnBoeXNpY2FsUmVzb3VyY2VJZD8uaWQgPz8gZXZlbnQuUGh5c2ljYWxSZXNvdXJjZUlkO1xuICAgICAgICBicmVhaztcbiAgICB9XG5cbiAgICBsZXQgZmxhdERhdGE6IHsgW2tleTogc3RyaW5nXTogc3RyaW5nIH0gPSB7fTtcbiAgICBsZXQgZGF0YTogeyBba2V5OiBzdHJpbmddOiBzdHJpbmcgfSA9IHt9O1xuICAgIGNvbnN0IGNhbGw6IEF3c1Nka0NhbGwgfCB1bmRlZmluZWQgPSBldmVudC5SZXNvdXJjZVByb3BlcnRpZXNbZXZlbnQuUmVxdWVzdFR5cGVdO1xuXG4gICAgaWYgKGNhbGwpIHtcblxuICAgICAgbGV0IGNyZWRlbnRpYWxzO1xuICAgICAgaWYgKGNhbGwuYXNzdW1lZFJvbGVBcm4pIHtcbiAgICAgICAgY29uc3QgdGltZXN0YW1wID0gKG5ldyBEYXRlKCkpLmdldFRpbWUoKTtcblxuICAgICAgICBjb25zdCBwYXJhbXMgPSB7XG4gICAgICAgICAgUm9sZUFybjogY2FsbC5hc3N1bWVkUm9sZUFybixcbiAgICAgICAgICBSb2xlU2Vzc2lvbk5hbWU6IGAke3RpbWVzdGFtcH0tJHtwaHlzaWNhbFJlc291cmNlSWR9YC5zdWJzdHJpbmcoMCwgNjQpLFxuICAgICAgICB9O1xuXG4gICAgICAgIGNyZWRlbnRpYWxzID0gbmV3IEFXUy5DaGFpbmFibGVUZW1wb3JhcnlDcmVkZW50aWFscyh7XG4gICAgICAgICAgcGFyYW1zOiBwYXJhbXMsXG4gICAgICAgICAgc3RzQ29uZmlnOiB7IHN0c1JlZ2lvbmFsRW5kcG9pbnRzOiAncmVnaW9uYWwnIH0sXG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICBpZiAoIU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChBV1MsIGNhbGwuc2VydmljZSkpIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYFNlcnZpY2UgJHtjYWxsLnNlcnZpY2V9IGRvZXMgbm90IGV4aXN0IGluIEFXUyBTREsgdmVyc2lvbiAke0FXUy5WRVJTSU9OfS5gKTtcbiAgICAgIH1cbiAgICAgIGNvbnN0IGF3c1NlcnZpY2UgPSBuZXcgKEFXUyBhcyBhbnkpW2NhbGwuc2VydmljZV0oe1xuICAgICAgICBhcGlWZXJzaW9uOiBjYWxsLmFwaVZlcnNpb24sXG4gICAgICAgIGNyZWRlbnRpYWxzOiBjcmVkZW50aWFscyxcbiAgICAgICAgcmVnaW9uOiBjYWxsLnJlZ2lvbixcbiAgICAgIH0pO1xuXG4gICAgICB0cnkge1xuICAgICAgICBjb25zdCByZXNwb25zZSA9IGF3YWl0IGF3c1NlcnZpY2VbY2FsbC5hY3Rpb25dKFxuICAgICAgICAgIGNhbGwucGFyYW1ldGVycyAmJiBkZWNvZGVTcGVjaWFsVmFsdWVzKGNhbGwucGFyYW1ldGVycywgcGh5c2ljYWxSZXNvdXJjZUlkKSkucHJvbWlzZSgpO1xuICAgICAgICBmbGF0RGF0YSA9IHtcbiAgICAgICAgICBhcGlWZXJzaW9uOiBhd3NTZXJ2aWNlLmNvbmZpZy5hcGlWZXJzaW9uLCAvLyBGb3IgdGVzdCBwdXJwb3NlczogY2hlY2sgaWYgYXBpVmVyc2lvbiB3YXMgY29ycmVjdGx5IHBhc3NlZC5cbiAgICAgICAgICByZWdpb246IGF3c1NlcnZpY2UuY29uZmlnLnJlZ2lvbiwgLy8gRm9yIHRlc3QgcHVycG9zZXM6IGNoZWNrIGlmIHJlZ2lvbiB3YXMgY29ycmVjdGx5IHBhc3NlZC5cbiAgICAgICAgICAuLi5mbGF0dGVuKHJlc3BvbnNlKSxcbiAgICAgICAgfTtcblxuICAgICAgICBsZXQgb3V0cHV0UGF0aHM6IHN0cmluZ1tdIHwgdW5kZWZpbmVkO1xuICAgICAgICBpZiAoY2FsbC5vdXRwdXRQYXRoKSB7XG4gICAgICAgICAgb3V0cHV0UGF0aHMgPSBbY2FsbC5vdXRwdXRQYXRoXTtcbiAgICAgICAgfSBlbHNlIGlmIChjYWxsLm91dHB1dFBhdGhzKSB7XG4gICAgICAgICAgb3V0cHV0UGF0aHMgPSBjYWxsLm91dHB1dFBhdGhzO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG91dHB1dFBhdGhzKSB7XG4gICAgICAgICAgZGF0YSA9IGZpbHRlcktleXMoZmxhdERhdGEsIHN0YXJ0c1dpdGhPbmVPZihvdXRwdXRQYXRocykpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGRhdGEgPSBmbGF0RGF0YTtcbiAgICAgICAgfVxuICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICBpZiAoIWNhbGwuaWdub3JlRXJyb3JDb2Rlc01hdGNoaW5nIHx8ICFuZXcgUmVnRXhwKGNhbGwuaWdub3JlRXJyb3JDb2Rlc01hdGNoaW5nKS50ZXN0KGUuY29kZSkpIHtcbiAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChjYWxsLnBoeXNpY2FsUmVzb3VyY2VJZD8ucmVzcG9uc2VQYXRoKSB7XG4gICAgICAgIHBoeXNpY2FsUmVzb3VyY2VJZCA9IGZsYXREYXRhW2NhbGwucGh5c2ljYWxSZXNvdXJjZUlkLnJlc3BvbnNlUGF0aF07XG4gICAgICB9XG4gICAgfVxuXG4gICAgYXdhaXQgcmVzcG9uZCgnU1VDQ0VTUycsICdPSycsIHBoeXNpY2FsUmVzb3VyY2VJZCwgZGF0YSk7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBjb25zb2xlLmxvZyhlKTtcbiAgICBhd2FpdCByZXNwb25kKCdGQUlMRUQnLCBlLm1lc3NhZ2UgfHwgJ0ludGVybmFsIEVycm9yJywgY29udGV4dC5sb2dTdHJlYW1OYW1lLCB7fSk7XG4gIH1cblxuICBmdW5jdGlvbiByZXNwb25kKHJlc3BvbnNlU3RhdHVzOiBzdHJpbmcsIHJlYXNvbjogc3RyaW5nLCBwaHlzaWNhbFJlc291cmNlSWQ6IHN0cmluZywgZGF0YTogYW55KSB7XG4gICAgY29uc3QgcmVzcG9uc2VCb2R5ID0gSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgU3RhdHVzOiByZXNwb25zZVN0YXR1cyxcbiAgICAgIFJlYXNvbjogcmVhc29uLFxuICAgICAgUGh5c2ljYWxSZXNvdXJjZUlkOiBwaHlzaWNhbFJlc291cmNlSWQsXG4gICAgICBTdGFja0lkOiBldmVudC5TdGFja0lkLFxuICAgICAgUmVxdWVzdElkOiBldmVudC5SZXF1ZXN0SWQsXG4gICAgICBMb2dpY2FsUmVzb3VyY2VJZDogZXZlbnQuTG9naWNhbFJlc291cmNlSWQsXG4gICAgICBOb0VjaG86IGZhbHNlLFxuICAgICAgRGF0YTogZGF0YSxcbiAgICB9KTtcblxuICAgIGNvbnNvbGUubG9nKCdSZXNwb25kaW5nJywgcmVzcG9uc2VCb2R5KTtcblxuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tcmVxdWlyZS1pbXBvcnRzXG4gICAgY29uc3QgcGFyc2VkVXJsID0gcmVxdWlyZSgndXJsJykucGFyc2UoZXZlbnQuUmVzcG9uc2VVUkwpO1xuICAgIGNvbnN0IHJlcXVlc3RPcHRpb25zID0ge1xuICAgICAgaG9zdG5hbWU6IHBhcnNlZFVybC5ob3N0bmFtZSxcbiAgICAgIHBhdGg6IHBhcnNlZFVybC5wYXRoLFxuICAgICAgbWV0aG9kOiAnUFVUJyxcbiAgICAgIGhlYWRlcnM6IHsgJ2NvbnRlbnQtdHlwZSc6ICcnLCAnY29udGVudC1sZW5ndGgnOiByZXNwb25zZUJvZHkubGVuZ3RoIH0sXG4gICAgfTtcblxuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XG4gICAgICB0cnkge1xuICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXJlcXVpcmUtaW1wb3J0c1xuICAgICAgICBjb25zdCByZXF1ZXN0ID0gcmVxdWlyZSgnaHR0cHMnKS5yZXF1ZXN0KHJlcXVlc3RPcHRpb25zLCByZXNvbHZlKTtcbiAgICAgICAgcmVxdWVzdC5vbignZXJyb3InLCByZWplY3QpO1xuICAgICAgICByZXF1ZXN0LndyaXRlKHJlc3BvbnNlQm9keSk7XG4gICAgICAgIHJlcXVlc3QuZW5kKCk7XG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHJlamVjdChlKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxufVxuXG5mdW5jdGlvbiBkZWNvZGVDYWxsKGNhbGw6IHN0cmluZyB8IHVuZGVmaW5lZCkge1xuICBpZiAoIWNhbGwpIHsgcmV0dXJuIHVuZGVmaW5lZDsgfVxuICByZXR1cm4gSlNPTi5wYXJzZShjYWxsKTtcbn1cblxuZnVuY3Rpb24gc3RhcnRzV2l0aE9uZU9mKHNlYXJjaFN0cmluZ3M6IHN0cmluZ1tdKTogKHN0cmluZzogc3RyaW5nKSA9PiBib29sZWFuIHtcbiAgcmV0dXJuIGZ1bmN0aW9uKHN0cmluZzogc3RyaW5nKTogYm9vbGVhbiB7XG4gICAgZm9yIChjb25zdCBzZWFyY2hTdHJpbmcgb2Ygc2VhcmNoU3RyaW5ncykge1xuICAgICAgaWYgKHN0cmluZy5zdGFydHNXaXRoKHNlYXJjaFN0cmluZykpIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBmYWxzZTtcbiAgfTtcbn1cbiJdfQ==
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.assets.json b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.assets.json
index 44941b12cf3c6..989f097f194b0 100644
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.assets.json
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.assets.json
@@ -1,5 +1,5 @@
{
- "version": "30.0.0",
+ "version": "30.1.0",
"files": {
"33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c": {
"source": {
@@ -27,7 +27,7 @@
}
}
},
- "5c5b94db03f045cf89b28c56612a2b112fa3d83037d4f96122b61ebcfaaa1383": {
+ "a9b33d873aac9026db60e46ffd1764d09d46440f81b1ffd7fdb395e54501d620": {
"source": {
"path": "aws-cdk-msk-integ.template.json",
"packaging": "file"
@@ -35,7 +35,7 @@
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "5c5b94db03f045cf89b28c56612a2b112fa3d83037d4f96122b61ebcfaaa1383.json",
+ "objectKey": "a9b33d873aac9026db60e46ffd1764d09d46440f81b1ffd7fdb395e54501d620.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.template.json b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.template.json
index 945483ee06744..8458d0b53265a 100644
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.template.json
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.template.json
@@ -1592,6 +1592,142 @@
}
]
}
+ },
+ "ClusterV332SecurityGroupDDA33760": {
+ "Type": "AWS::EC2::SecurityGroup",
+ "Properties": {
+ "GroupDescription": "MSK security group",
+ "SecurityGroupEgress": [
+ {
+ "CidrIp": "0.0.0.0/0",
+ "Description": "Allow all outbound traffic by default",
+ "IpProtocol": "-1"
+ }
+ ],
+ "VpcId": {
+ "Ref": "VPCB9E5F0B4"
+ }
+ }
+ },
+ "ClusterV332929A761F": {
+ "Type": "AWS::MSK::Cluster",
+ "Properties": {
+ "BrokerNodeGroupInfo": {
+ "ClientSubnets": [
+ {
+ "Ref": "VPCPrivateSubnet1Subnet8BCA10E0"
+ },
+ {
+ "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A"
+ }
+ ],
+ "InstanceType": "kafka.m5.large",
+ "SecurityGroups": [
+ {
+ "Fn::GetAtt": [
+ "ClusterV332SecurityGroupDDA33760",
+ "GroupId"
+ ]
+ }
+ ],
+ "StorageInfo": {
+ "EBSStorageInfo": {
+ "VolumeSize": 1000
+ }
+ }
+ },
+ "ClusterName": "integ-test-v3-3-2",
+ "KafkaVersion": "3.3.2",
+ "NumberOfBrokerNodes": 2,
+ "EncryptionInfo": {
+ "EncryptionInTransit": {
+ "ClientBroker": "TLS",
+ "InCluster": true
+ }
+ },
+ "LoggingInfo": {
+ "BrokerLogs": {
+ "CloudWatchLogs": {
+ "Enabled": false
+ },
+ "Firehose": {
+ "Enabled": false
+ },
+ "S3": {
+ "Bucket": {
+ "Ref": "LoggingBucket1E5A6F3B"
+ },
+ "Enabled": true
+ }
+ }
+ }
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "ClusterV332BootstrapBrokersBootstrapBrokerStringTls06A03A3A": {
+ "Type": "Custom::AWS",
+ "Properties": {
+ "ServiceToken": {
+ "Fn::GetAtt": [
+ "AWS679f53fac002430cb0da5b7982bd22872D164C4C",
+ "Arn"
+ ]
+ },
+ "Create": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"service\":\"Kafka\",\"action\":\"getBootstrapBrokers\",\"parameters\":{\"ClusterArn\":\"",
+ {
+ "Ref": "ClusterV332929A761F"
+ },
+ "\"},\"physicalResourceId\":{\"id\":\"BootstrapBrokers\"}}"
+ ]
+ ]
+ },
+ "Update": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"service\":\"Kafka\",\"action\":\"getBootstrapBrokers\",\"parameters\":{\"ClusterArn\":\"",
+ {
+ "Ref": "ClusterV332929A761F"
+ },
+ "\"},\"physicalResourceId\":{\"id\":\"BootstrapBrokers\"}}"
+ ]
+ ]
+ },
+ "InstallLatestAwsSdk": false
+ },
+ "DependsOn": [
+ "ClusterV332BootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy2EA79A00"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "ClusterV332BootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy2EA79A00": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "kafka:GetBootstrapBrokers",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "ClusterV332929A761F"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "ClusterV332BootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy2EA79A00",
+ "Roles": [
+ {
+ "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2"
+ }
+ ]
+ }
}
},
"Outputs": {
@@ -1677,6 +1813,14 @@
"BootstrapBrokerStringTls"
]
}
+ },
+ "BootstrapBrokers9": {
+ "Value": {
+ "Fn::GetAtt": [
+ "ClusterV332BootstrapBrokersBootstrapBrokerStringTls06A03A3A",
+ "BootstrapBrokerStringTls"
+ ]
+ }
}
},
"Parameters": {
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/cdk.out b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/cdk.out
index ae4b03c54e770..b72fef144f05c 100644
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/cdk.out
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/cdk.out
@@ -1 +1 @@
-{"version":"30.0.0"}
\ No newline at end of file
+{"version":"30.1.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/integ.json b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/integ.json
index 395b83f733032..95562c41ec5e1 100644
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/integ.json
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/integ.json
@@ -1,5 +1,5 @@
{
- "version": "30.0.0",
+ "version": "30.1.0",
"testCases": {
"MskLogging/DefaultTest": {
"stacks": [
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/manifest.json b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/manifest.json
index 451908b83a3d8..2bd8d5d957e8f 100644
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/manifest.json
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/manifest.json
@@ -1,5 +1,5 @@
{
- "version": "30.0.0",
+ "version": "30.1.0",
"artifacts": {
"aws-cdk-msk-integ.assets": {
"type": "cdk:asset-manifest",
@@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5c5b94db03f045cf89b28c56612a2b112fa3d83037d4f96122b61ebcfaaa1383.json",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a9b33d873aac9026db60e46ffd1764d09d46440f81b1ffd7fdb395e54501d620.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
@@ -443,6 +443,36 @@
"data": "BootstrapBrokers8"
}
],
+ "/aws-cdk-msk-integ/Cluster_V3_3_2/SecurityGroup/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "ClusterV332SecurityGroupDDA33760"
+ }
+ ],
+ "/aws-cdk-msk-integ/Cluster_V3_3_2/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "ClusterV332929A761F"
+ }
+ ],
+ "/aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls/Resource/Default": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "ClusterV332BootstrapBrokersBootstrapBrokerStringTls06A03A3A"
+ }
+ ],
+ "/aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls/CustomResourcePolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "ClusterV332BootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy2EA79A00"
+ }
+ ],
+ "/aws-cdk-msk-integ/BootstrapBrokers9": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapBrokers9"
+ }
+ ],
"/aws-cdk-msk-integ/BootstrapVersion": [
{
"type": "aws:cdk:logicalId",
@@ -474,7 +504,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e05a31925a856f753d012d462f51a3f4b884235b0fe9c3cea1b63e4c95fcd2c4.json",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/26ebb083b5aa4c4938dd01e52996de45327a2629e9d6d262659c6f011a7b21a1.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/tree.json b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/tree.json
index e9c8f93dd919c..b18f350eb1a83 100644
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/tree.json
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/tree.json
@@ -1107,7 +1107,7 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.249"
+ "version": "10.1.264"
}
},
"AWS679f53fac002430cb0da5b7982bd2287": {
@@ -2323,6 +2323,197 @@
"version": "0.0.0"
}
},
+ "Cluster_V3_3_2": {
+ "id": "Cluster_V3_3_2",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2",
+ "children": {
+ "SecurityGroup": {
+ "id": "SecurityGroup",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2/SecurityGroup",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2/SecurityGroup/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup",
+ "aws:cdk:cloudformation:props": {
+ "groupDescription": "MSK security group",
+ "securityGroupEgress": [
+ {
+ "cidrIp": "0.0.0.0/0",
+ "description": "Allow all outbound traffic by default",
+ "ipProtocol": "-1"
+ }
+ ],
+ "vpcId": {
+ "Ref": "VPCB9E5F0B4"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-ec2.SecurityGroup",
+ "version": "0.0.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::MSK::Cluster",
+ "aws:cdk:cloudformation:props": {
+ "brokerNodeGroupInfo": {
+ "instanceType": "kafka.m5.large",
+ "clientSubnets": [
+ {
+ "Ref": "VPCPrivateSubnet1Subnet8BCA10E0"
+ },
+ {
+ "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A"
+ }
+ ],
+ "securityGroups": [
+ {
+ "Fn::GetAtt": [
+ "ClusterV332SecurityGroupDDA33760",
+ "GroupId"
+ ]
+ }
+ ],
+ "storageInfo": {
+ "ebsStorageInfo": {
+ "volumeSize": 1000
+ }
+ }
+ },
+ "clusterName": "integ-test-v3-3-2",
+ "kafkaVersion": "3.3.2",
+ "numberOfBrokerNodes": 2,
+ "encryptionInfo": {
+ "encryptionInTransit": {
+ "clientBroker": "TLS",
+ "inCluster": true
+ }
+ },
+ "loggingInfo": {
+ "brokerLogs": {
+ "cloudWatchLogs": {
+ "enabled": false
+ },
+ "firehose": {
+ "enabled": false
+ },
+ "s3": {
+ "enabled": true,
+ "bucket": {
+ "Ref": "LoggingBucket1E5A6F3B"
+ }
+ }
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-msk.CfnCluster",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapBrokersBootstrapBrokerStringTls": {
+ "id": "BootstrapBrokersBootstrapBrokerStringTls",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls",
+ "children": {
+ "Provider": {
+ "id": "Provider",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls/Provider",
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-lambda.SingletonFunction",
+ "version": "0.0.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls/Resource",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls/Resource/Default",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnResource",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CustomResource",
+ "version": "0.0.0"
+ }
+ },
+ "CustomResourcePolicy": {
+ "id": "CustomResourcePolicy",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls/CustomResourcePolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls/CustomResourcePolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "kafka:GetBootstrapBrokers",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "ClusterV332929A761F"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "ClusterV332BootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy2EA79A00",
+ "roles": [
+ {
+ "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.CfnPolicy",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.Policy",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/custom-resources.AwsCustomResource",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-msk.Cluster",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapBrokers9": {
+ "id": "BootstrapBrokers9",
+ "path": "aws-cdk-msk-integ/BootstrapBrokers9",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
+ }
+ },
"BootstrapVersion": {
"id": "BootstrapVersion",
"path": "aws-cdk-msk-integ/BootstrapVersion",
@@ -2358,7 +2549,7 @@
"path": "MskLogging/DefaultTest/Default",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.249"
+ "version": "10.1.264"
}
},
"DeployAssert": {
@@ -2378,7 +2569,7 @@
"path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/SdkProvider/AssertionsProvider",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.249"
+ "version": "10.1.264"
}
}
},
@@ -2450,7 +2641,7 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.249"
+ "version": "10.1.264"
}
},
"BootstrapVersion": {
@@ -2492,7 +2683,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.249"
+ "version": "10.1.264"
}
}
},
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.ts b/packages/@aws-cdk/aws-msk/test/integ.cluster.ts
index 53e29e86d6754..af0e9ddd8677c 100644
--- a/packages/@aws-cdk/aws-msk/test/integ.cluster.ts
+++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.ts
@@ -182,6 +182,20 @@ class FeatureFlagStack extends cdk.Stack {
removalPolicy: cdk.RemovalPolicy.DESTROY,
});
new cdk.CfnOutput(this, 'BootstrapBrokers8', { value: cluster6.bootstrapBrokersTls });
+
+ const cluster7 = new msk.Cluster(this, 'Cluster_V3_3_2', {
+ clusterName: 'integ-test-v3-3-2',
+ kafkaVersion: msk.KafkaVersion.V3_3_2,
+ vpc,
+ logging: {
+ s3: {
+ bucket: this.bucket,
+ },
+ },
+ removalPolicy: cdk.RemovalPolicy.DESTROY,
+ });
+ new cdk.CfnOutput(this, 'BootstrapBrokers9', { value: cluster7.bootstrapBrokersTls });
+
}
}
diff --git a/packages/@aws-cdk/aws-rds/lib/cluster-ref.ts b/packages/@aws-cdk/aws-rds/lib/cluster-ref.ts
index de1f89bd3dafa..c5f5a0155dd2e 100644
--- a/packages/@aws-cdk/aws-rds/lib/cluster-ref.ts
+++ b/packages/@aws-cdk/aws-rds/lib/cluster-ref.ts
@@ -14,6 +14,13 @@ export interface IDatabaseCluster extends IResource, ec2.IConnectable, secretsma
*/
readonly clusterIdentifier: string;
+ /**
+ * The immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP.
+ *
+ * This AWS Region-unique identifier is used in things like IAM authentication policies.
+ */
+ readonly clusterResourceIdentifier: string;
+
/**
* Identifiers of the replicas
*/
@@ -57,6 +64,15 @@ export interface DatabaseClusterAttributes {
*/
readonly clusterIdentifier: string;
+ /**
+ * The immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP.
+ *
+ * This AWS Region-unique identifier is used to grant access to the cluster.
+ *
+ * @default none
+ */
+ readonly clusterResourceIdentifier?: string;
+
/**
* The database port
*
diff --git a/packages/@aws-cdk/aws-rds/lib/cluster.ts b/packages/@aws-cdk/aws-rds/lib/cluster.ts
index 16f72e6193b24..af6b42629f803 100644
--- a/packages/@aws-cdk/aws-rds/lib/cluster.ts
+++ b/packages/@aws-cdk/aws-rds/lib/cluster.ts
@@ -321,6 +321,13 @@ export abstract class DatabaseClusterBase extends Resource implements IDatabaseC
*/
public abstract readonly clusterIdentifier: string;
+ /**
+ * The immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP.
+ *
+ * This AWS Region-unique identifier is used in things like IAM authentication policies.
+ */
+ public abstract readonly clusterResourceIdentifier: string;
+
/**
* Identifiers of the replicas
*/
@@ -557,6 +564,7 @@ class ImportedDatabaseCluster extends DatabaseClusterBase implements IDatabaseCl
public readonly connections: ec2.Connections;
public readonly engine?: IClusterEngine;
+ private readonly _clusterResourceIdentifier?: string;
private readonly _clusterEndpoint?: Endpoint;
private readonly _clusterReadEndpoint?: Endpoint;
private readonly _instanceIdentifiers?: string[];
@@ -566,6 +574,7 @@ class ImportedDatabaseCluster extends DatabaseClusterBase implements IDatabaseCl
super(scope, id);
this.clusterIdentifier = attrs.clusterIdentifier;
+ this._clusterResourceIdentifier = attrs.clusterResourceIdentifier;
const defaultPort = attrs.port ? ec2.Port.tcp(attrs.port) : undefined;
this.connections = new ec2.Connections({
@@ -582,6 +591,13 @@ class ImportedDatabaseCluster extends DatabaseClusterBase implements IDatabaseCl
: undefined;
}
+ public get clusterResourceIdentifier() {
+ if (!this._clusterResourceIdentifier) {
+ throw new Error('Cannot access `clusterResourceIdentifier` of an imported cluster without a clusterResourceIdentifier');
+ }
+ return this._clusterResourceIdentifier;
+ }
+
public get clusterEndpoint() {
if (!this._clusterEndpoint) {
throw new Error('Cannot access `clusterEndpoint` of an imported cluster without an endpoint address and port');
@@ -637,6 +653,7 @@ export class DatabaseCluster extends DatabaseClusterNew {
}
public readonly clusterIdentifier: string;
+ public readonly clusterResourceIdentifier: string;
public readonly clusterEndpoint: Endpoint;
public readonly clusterReadEndpoint: Endpoint;
public readonly connections: ec2.Connections;
@@ -662,6 +679,7 @@ export class DatabaseCluster extends DatabaseClusterNew {
});
this.clusterIdentifier = cluster.ref;
+ this.clusterResourceIdentifier = cluster.attrDbClusterResourceId;
if (secret) {
this.secret = secret.attach(this);
@@ -729,6 +747,7 @@ export interface DatabaseClusterFromSnapshotProps extends DatabaseClusterBasePro
*/
export class DatabaseClusterFromSnapshot extends DatabaseClusterNew {
public readonly clusterIdentifier: string;
+ public readonly clusterResourceIdentifier: string;
public readonly clusterEndpoint: Endpoint;
public readonly clusterReadEndpoint: Endpoint;
public readonly connections: ec2.Connections;
@@ -774,6 +793,7 @@ export class DatabaseClusterFromSnapshot extends DatabaseClusterNew {
});
this.clusterIdentifier = cluster.ref;
+ this.clusterResourceIdentifier = cluster.attrDbClusterResourceId;
if (secret) {
this.secret = secret.attach(this);
diff --git a/packages/@aws-cdk/aws-rds/test/cluster.test.ts b/packages/@aws-cdk/aws-rds/test/cluster.test.ts
index 880a3745efb09..fd60567e0eb44 100644
--- a/packages/@aws-cdk/aws-rds/test/cluster.test.ts
+++ b/packages/@aws-cdk/aws-rds/test/cluster.test.ts
@@ -97,6 +97,7 @@ describe('cluster', () => {
VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['DatabaseSecurityGroup5C91FDCB', 'GroupId'] }],
});
+ expect(stack.resolve(cluster.clusterResourceIdentifier)).toEqual({ 'Fn::GetAtt': ['DatabaseB269D8BB', 'DBClusterResourceId'] });
expect(cluster.instanceIdentifiers).toHaveLength(1);
expect(stack.resolve(cluster.instanceIdentifiers[0])).toEqual({
Ref: 'DatabaseInstance1844F58FD',
@@ -738,6 +739,7 @@ describe('cluster', () => {
clusterIdentifier: 'identifier',
});
+ expect(() => cluster.clusterResourceIdentifier).toThrow(/Cannot access `clusterResourceIdentifier` of an imported cluster/);
expect(() => cluster.clusterEndpoint).toThrow(/Cannot access `clusterEndpoint` of an imported cluster/);
expect(() => cluster.clusterReadEndpoint).toThrow(/Cannot access `clusterReadEndpoint` of an imported cluster/);
expect(() => cluster.instanceIdentifiers).toThrow(/Cannot access `instanceIdentifiers` of an imported cluster/);
@@ -750,6 +752,7 @@ describe('cluster', () => {
const cluster = DatabaseCluster.fromDatabaseClusterAttributes(stack, 'Database', {
clusterEndpointAddress: 'addr',
clusterIdentifier: 'identifier',
+ clusterResourceIdentifier: 'identifier',
instanceEndpointAddresses: ['instance-addr'],
instanceIdentifiers: ['identifier'],
port: 3306,
@@ -759,6 +762,7 @@ describe('cluster', () => {
})],
});
+ expect(cluster.clusterResourceIdentifier).toEqual('identifier');
expect(cluster.clusterEndpoint.socketAddress).toEqual('addr:3306');
expect(cluster.clusterReadEndpoint.socketAddress).toEqual('reader-address:3306');
expect(cluster.instanceIdentifiers).toEqual(['identifier']);
@@ -2091,6 +2095,7 @@ describe('cluster', () => {
Template.fromStack(stack).resourceCountIs('AWS::RDS::DBInstance', 2);
+ expect(stack.resolve(cluster.clusterResourceIdentifier)).toEqual({ 'Fn::GetAtt': ['DatabaseB269D8BB', 'DBClusterResourceId'] });
expect(cluster.instanceIdentifiers).toHaveLength(2);
expect(stack.resolve(cluster.instanceIdentifiers[0])).toEqual({
Ref: 'DatabaseInstance1844F58FD',
diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/aws-cdk-rds-integ.assets.json b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/aws-cdk-rds-integ.assets.json
index 98ea3b7c06a81..4d6cbf25c5121 100644
--- a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/aws-cdk-rds-integ.assets.json
+++ b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/aws-cdk-rds-integ.assets.json
@@ -1,7 +1,7 @@
{
- "version": "20.0.0",
+ "version": "29.0.0",
"files": {
- "0b11338b1fdbc41b36beb545451369de9d176a04762e559c87a3afbe35c7316d": {
+ "b62ee60990b0a14a4b10381d4d26d42ce50c164305fa81b2d9729e116480af0f": {
"source": {
"path": "aws-cdk-rds-integ.template.json",
"packaging": "file"
@@ -9,7 +9,7 @@
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "0b11338b1fdbc41b36beb545451369de9d176a04762e559c87a3afbe35c7316d.json",
+ "objectKey": "b62ee60990b0a14a4b10381d4d26d42ce50c164305fa81b2d9729e116480af0f.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/aws-cdk-rds-integ.template.json b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/aws-cdk-rds-integ.template.json
index 5addaf6c1826d..072548b1fa549 100644
--- a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/aws-cdk-rds-integ.template.json
+++ b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/aws-cdk-rds-integ.template.json
@@ -495,7 +495,6 @@
"DatabaseB269D8BB": {
"Type": "AWS::RDS::DBCluster",
"Properties": {
- "Engine": "aurora",
"CopyTagsToSnapshot": true,
"DBClusterParameterGroupName": {
"Ref": "ParamsA8366201"
@@ -503,6 +502,7 @@
"DBSubnetGroupName": {
"Ref": "DatabaseSubnets56F17B9A"
},
+ "Engine": "aurora",
"KmsKeyId": {
"Fn::GetAtt": [
"DbSecurity381C2C15",
@@ -567,6 +567,70 @@
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
+ },
+ "ClusterIamAccess93AC3DF3": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "ecs-tasks.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "ClusterIamAccessDefaultPolicyA088E4DA": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "rds-db:connect",
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":rds-db:",
+ {
+ "Ref": "AWS::Region"
+ },
+ ":",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":dbuser:",
+ {
+ "Fn::GetAtt": [
+ "DatabaseB269D8BB",
+ "DBClusterResourceId"
+ ]
+ },
+ "/db_user"
+ ]
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "ClusterIamAccessDefaultPolicyA088E4DA",
+ "Roles": [
+ {
+ "Ref": "ClusterIamAccess93AC3DF3"
+ }
+ ]
+ }
}
},
"Parameters": {
diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/cdk.out b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/cdk.out
index 588d7b269d34f..d8b441d447f8a 100644
--- a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/cdk.out
+++ b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/cdk.out
@@ -1 +1 @@
-{"version":"20.0.0"}
\ No newline at end of file
+{"version":"29.0.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/integ.json b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/integ.json
index b32b0de432db8..553cd276a4bd3 100644
--- a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/integ.json
+++ b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/integ.json
@@ -1,5 +1,5 @@
{
- "version": "20.0.0",
+ "version": "29.0.0",
"testCases": {
"integ.cluster": {
"stacks": [
diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/manifest.json b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/manifest.json
index b3f4afaedc9b0..0641f1a9bb191 100644
--- a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/manifest.json
+++ b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/manifest.json
@@ -1,12 +1,6 @@
{
- "version": "20.0.0",
+ "version": "29.0.0",
"artifacts": {
- "Tree": {
- "type": "cdk:tree",
- "properties": {
- "file": "tree.json"
- }
- },
"aws-cdk-rds-integ.assets": {
"type": "cdk:asset-manifest",
"properties": {
@@ -23,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0b11338b1fdbc41b36beb545451369de9d176a04762e559c87a3afbe35c7316d.json",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b62ee60990b0a14a4b10381d4d26d42ce50c164305fa81b2d9729e116480af0f.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
@@ -225,6 +219,18 @@
"data": "DatabaseInstance2AA380DEE"
}
],
+ "/aws-cdk-rds-integ/ClusterIamAccess/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "ClusterIamAccess93AC3DF3"
+ }
+ ],
+ "/aws-cdk-rds-integ/ClusterIamAccess/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "ClusterIamAccessDefaultPolicyA088E4DA"
+ }
+ ],
"/aws-cdk-rds-integ/BootstrapVersion": [
{
"type": "aws:cdk:logicalId",
@@ -239,6 +245,12 @@
]
},
"displayName": "aws-cdk-rds-integ"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
}
}
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/tree.json b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/tree.json
index c8ebaa8dc181b..1b5a2ae9b6bec 100644
--- a/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/tree.json
+++ b/packages/@aws-cdk/aws-rds/test/integ.cluster.js.snapshot/tree.json
@@ -4,14 +4,6 @@
"id": "App",
"path": "",
"children": {
- "Tree": {
- "id": "Tree",
- "path": "Tree",
- "constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
- }
- },
"aws-cdk-rds-integ": {
"id": "aws-cdk-rds-integ",
"path": "aws-cdk-rds-integ",
@@ -91,8 +83,8 @@
"id": "Acl",
"path": "aws-cdk-rds-integ/VPC/PublicSubnet1/Acl",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
}
},
"RouteTable": {
@@ -258,8 +250,8 @@
"id": "Acl",
"path": "aws-cdk-rds-integ/VPC/PublicSubnet2/Acl",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
}
},
"RouteTable": {
@@ -425,8 +417,8 @@
"id": "Acl",
"path": "aws-cdk-rds-integ/VPC/PrivateSubnet1/Acl",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
}
},
"RouteTable": {
@@ -544,8 +536,8 @@
"id": "Acl",
"path": "aws-cdk-rds-integ/VPC/PrivateSubnet2/Acl",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
}
},
"RouteTable": {
@@ -848,7 +840,6 @@
"attributes": {
"aws:cdk:cloudformation:type": "AWS::RDS::DBCluster",
"aws:cdk:cloudformation:props": {
- "engine": "aurora",
"copyTagsToSnapshot": true,
"dbClusterParameterGroupName": {
"Ref": "ParamsA8366201"
@@ -856,6 +847,7 @@
"dbSubnetGroupName": {
"Ref": "DatabaseSubnets56F17B9A"
},
+ "engine": "aurora",
"kmsKeyId": {
"Fn::GetAtt": [
"DbSecurity381C2C15",
@@ -929,17 +921,149 @@
"fqn": "@aws-cdk/aws-rds.DatabaseCluster",
"version": "0.0.0"
}
+ },
+ "ClusterIamAccess": {
+ "id": "ClusterIamAccess",
+ "path": "aws-cdk-rds-integ/ClusterIamAccess",
+ "children": {
+ "ImportClusterIamAccess": {
+ "id": "ImportClusterIamAccess",
+ "path": "aws-cdk-rds-integ/ClusterIamAccess/ImportClusterIamAccess",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "aws-cdk-rds-integ/ClusterIamAccess/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "ecs-tasks.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.CfnRole",
+ "version": "0.0.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "aws-cdk-rds-integ/ClusterIamAccess/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "aws-cdk-rds-integ/ClusterIamAccess/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "rds-db:connect",
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":rds-db:",
+ {
+ "Ref": "AWS::Region"
+ },
+ ":",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":dbuser:",
+ {
+ "Fn::GetAtt": [
+ "DatabaseB269D8BB",
+ "DBClusterResourceId"
+ ]
+ },
+ "/db_user"
+ ]
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "ClusterIamAccessDefaultPolicyA088E4DA",
+ "roles": [
+ {
+ "Ref": "ClusterIamAccess93AC3DF3"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.CfnPolicy",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.Policy",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-iam.Role",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "aws-cdk-rds-integ/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "aws-cdk-rds-integ/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
}
},
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.85"
+ "version": "10.1.216"
}
}
},
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.App",
+ "version": "0.0.0"
}
}
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster.ts b/packages/@aws-cdk/aws-rds/test/integ.cluster.ts
index 09c74af16fecd..1b136ea59a55c 100644
--- a/packages/@aws-cdk/aws-rds/test/integ.cluster.ts
+++ b/packages/@aws-cdk/aws-rds/test/integ.cluster.ts
@@ -1,4 +1,5 @@
import * as ec2 from '@aws-cdk/aws-ec2';
+import * as iam from '@aws-cdk/aws-iam';
import * as kms from '@aws-cdk/aws-kms';
import * as cdk from '@aws-cdk/core';
import { Credentials, DatabaseCluster, DatabaseClusterEngine, ParameterGroup } from '../lib';
@@ -32,4 +33,20 @@ const cluster = new DatabaseCluster(stack, 'Database', {
cluster.connections.allowDefaultPortFromAnyIpv4('Open to the world');
+const role = new iam.Role(stack, 'ClusterIamAccess', {
+ assumedBy: new iam.ServicePrincipal('ecs-tasks.amazonaws.com'),
+});
+const clusterIamAuthArn = stack.formatArn({
+ service: 'rds-db',
+ resource: `dbuser:${cluster.clusterResourceIdentifier}`,
+ resourceName: 'db_user',
+});
+role.addToPolicy(
+ new iam.PolicyStatement({
+ effect: iam.Effect.ALLOW,
+ actions: ['rds-db:connect'],
+ resources: [clusterIamAuthArn],
+ }),
+);
+
app.synth();
diff --git a/packages/@aws-cdk/aws-rds/test/snapshot-handler/index.ts b/packages/@aws-cdk/aws-rds/test/snapshot-handler/index.ts
index 6d5a3c23336cd..4f3d9e7a26b65 100644
--- a/packages/@aws-cdk/aws-rds/test/snapshot-handler/index.ts
+++ b/packages/@aws-cdk/aws-rds/test/snapshot-handler/index.ts
@@ -1,8 +1,8 @@
/* eslint-disable no-console */
-import type { IsCompleteRequest, IsCompleteResponse, OnEventRequest, OnEventResponse } from '@aws-cdk/custom-resources/lib/provider-framework/types';
+import * as AWSCDKAsyncCustomResource from '@aws-cdk/custom-resources/lib/provider-framework/types';
import { RDS } from 'aws-sdk'; // eslint-disable-line import/no-extraneous-dependencies
-export async function onEventHandler(event: OnEventRequest): Promise {
+export async function onEventHandler(event: AWSCDKAsyncCustomResource.OnEventRequest): Promise {
console.log('Event: %j', event);
const rds = new RDS();
@@ -33,7 +33,7 @@ export async function onEventHandler(event: OnEventRequest): Promise {
+export async function isCompleteHandler(event: AWSCDKAsyncCustomResource.IsCompleteRequest): Promise {
console.log('Event: %j', event);
const snapshotStatus = await tryGetClusterSnapshotStatus(event.ResourceProperties.DBClusterSnapshotIdentifier);
diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json
index e3e4f52a79eed..8e2492475ba2c 100644
--- a/packages/@aws-cdk/aws-redshift/package.json
+++ b/packages/@aws-cdk/aws-redshift/package.json
@@ -87,7 +87,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/integ-tests": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"jest": "^27.5.1",
"jsii": "v4.9-next"
},
diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json
index c25d2219a974a..ee825a123eb31 100644
--- a/packages/@aws-cdk/aws-route53/package.json
+++ b/packages/@aws-cdk/aws-route53/package.json
@@ -87,7 +87,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.111",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"jest": "^27.5.1"
},
"dependencies": {
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/README.md b/packages/@aws-cdk/aws-servicecatalogappregistry/README.md
index be09aef037fae..801f2f084b07e 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/README.md
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/README.md
@@ -84,7 +84,27 @@ const associatedApp = new appreg.ApplicationAssociator(app, 'AssociatedApplicati
});
```
-This will create an application `MyAssociatedApplication` with the `TagKey` as `managedBy` and `TagValue` as `CDK_Application_Associator`.
+This will create a stack `MyAssociatedApplicationStack` containing an application `MyAssociatedApplication`
+with the `TagKey` as `managedBy` and `TagValue` as `CDK_Application_Associator`.
+
+By default, the stack will have System Managed Application Manager console URL as its output for the application created.
+If you want to remove the output, then use as shown in the example below:
+
+```ts
+const app = new App();
+const associatedApp = new appreg.ApplicationAssociator(app, 'AssociatedApplication', {
+ applications: [appreg.TargetApplication.createApplicationStack({
+ applicationName: 'MyAssociatedApplication',
+ // 'Application containing stacks deployed via CDK.' is the default
+ applicationDescription: 'Associated Application description',
+ stackName: 'MyAssociatedApplicationStack',
+ // Disables emitting Application Manager url as output
+ emitApplicationManagerUrlAsOutput: false,
+ // AWS Account and Region that are implied by the current CLI configuration is the default
+ env: { account: '123456789012', region: 'us-east-1' },
+ })],
+});
+```
If you want to re-use an existing Application with ARN: `arn:aws:servicecatalog:us-east-1:123456789012:/applications/applicationId`
and want to associate all stacks in the `App` scope to your imported application, then use as shown in the example below:
@@ -99,6 +119,45 @@ const associatedApp = new appreg.ApplicationAssociator(app, 'AssociatedApplicati
});
```
+If you want to associate an Attribute Group with application created by `ApplicationAssociator`, then use as shown in the example below:
+
+```ts
+import * as cdk from "@aws-cdk/core";
+
+const app = new App();
+
+class CustomAppRegistryAttributeGroup extends cdk.Stack {
+ public readonly attributeGroup: appreg.AttributeGroup
+ constructor(scope: Construct, id: string, props?: cdk.StackProps) {
+ super(scope, id, props);
+ const myAttributeGroup = new appreg.AttributeGroup(app, 'MyFirstAttributeGroup', {
+ attributeGroupName: 'MyAttributeGroupName',
+ description: 'Test attribute group',
+ attributes: {},
+ });
+
+ this.attributeGroup = myAttributeGroup;
+ }
+}
+
+const customAttributeGroup = new CustomAppRegistryAttributeGroup(app, 'AppRegistryAttributeGroup');
+
+const associatedApp = new appreg.ApplicationAssociator(app, 'AssociatedApplication', {
+ applications: [appreg.TargetApplication.createApplicationStack({
+ applicationName: 'MyAssociatedApplication',
+ // 'Application containing stacks deployed via CDK.' is the default
+ applicationDescription: 'Associated Application description',
+ stackName: 'MyAssociatedApplicationStack',
+ // AWS Account and Region that are implied by the current CLI configuration is the default
+ env: { account: '123456789012', region: 'us-east-1' },
+ })],
+});
+
+// Associate application to the attribute group.
+customAttributeGroup.attributeGroup.associateWith(associatedApp.appRegistryApplication());
+
+```
+
If you are using CDK Pipelines to deploy your application, the application stacks will be inside Stages, and
ApplicationAssociator will not be able to find them. Call `associateStage` on each Stage object before adding it to the
Pipeline, as shown in the example below:
@@ -191,6 +250,16 @@ declare const attributeGroup: appreg.AttributeGroup;
application.associateAttributeGroup(attributeGroup);
```
+### Associating an attribute group with application
+
+You can associate an application with an attribute group with `associateWith`:
+
+```ts
+declare const application: appreg.Application;
+declare const attributeGroup: appreg.AttributeGroup;
+attributeGroup.associateWith(application);
+```
+
### Associating application with a Stack
You can associate a stack with an application with the `associateStack()` API:
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts
index e596fb573bcc5..bb5abdfed4da8 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts
@@ -100,6 +100,8 @@ abstract class ApplicationBase extends cdk.Resource implements IApplication {
/**
* Associate an attribute group with application
* If the attribute group is already associated, it will ignore duplicate request.
+ *
+ * @deprecated Use `AttributeGroup.associateWith` instead.
*/
public associateAttributeGroup(attributeGroup: IAttributeGroup): void {
if (!this.associatedAttributeGroups.has(attributeGroup.node.addr)) {
@@ -254,7 +256,7 @@ export class Application extends ApplicationBase {
* Application manager URL for the Application.
* @attribute
*/
- public readonly applicationManagerUrl?: cdk.CfnOutput;
+ public readonly applicationManagerUrl?: string;
public readonly applicationArn: string;
public readonly applicationId: string;
public readonly applicationName?: string;
@@ -275,10 +277,8 @@ export class Application extends ApplicationBase {
this.applicationName = props.applicationName;
this.nodeAddress = cdk.Names.nodeUniqueId(application.node);
- this.applicationManagerUrl = new cdk.CfnOutput(this, 'ApplicationManagerUrl', {
- value: `https://${this.env.region}.console.aws.amazon.com/systems-manager/appmanager/application/AWS_AppRegistry_Application-${this.applicationName}`,
- description: 'Application manager url for the application created.',
- });
+ this.applicationManagerUrl =
+ `https://${this.env.region}.console.aws.amazon.com/systems-manager/appmanager/application/AWS_AppRegistry_Application-${this.applicationName}`;
}
protected generateUniqueHash(resourceAddress: string): string {
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/attribute-group.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/attribute-group.ts
index d6dda21fe797d..b7dbfc49d5efa 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/attribute-group.ts
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/attribute-group.ts
@@ -2,9 +2,10 @@ import { CfnResourceShare } from '@aws-cdk/aws-ram';
import * as cdk from '@aws-cdk/core';
import { Names } from '@aws-cdk/core';
import { Construct } from 'constructs';
+import { IApplication } from './application';
import { getPrincipalsforSharing, hashValues, ShareOptions, SharePermission } from './common';
import { InputValidator } from './private/validation';
-import { CfnAttributeGroup } from './servicecatalogappregistry.generated';
+import { CfnAttributeGroup, CfnAttributeGroupAssociation } from './servicecatalogappregistry.generated';
const ATTRIBUTE_GROUP_READ_ONLY_RAM_PERMISSION_ARN = 'arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryAttributeGroupReadOnly';
const ATTRIBUTE_GROUP_ALLOW_ACCESS_RAM_PERMISSION_ARN = 'arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryAttributeGroupAllowAssociation';
@@ -58,6 +59,23 @@ export interface AttributeGroupProps {
abstract class AttributeGroupBase extends cdk.Resource implements IAttributeGroup {
public abstract readonly attributeGroupArn: string;
public abstract readonly attributeGroupId: string;
+ private readonly associatedApplications: Set = new Set();
+
+ /**
+ * Associate an application with attribute group
+ * If the attribute group is already associated, it will ignore duplicate request.
+ */
+ public associateWith(application: IApplication): void {
+ if (!this.associatedApplications.has(application.node.addr)) {
+ const hashId = this.generateUniqueHash(application.node.addr);
+ new CfnAttributeGroupAssociation(this, `ApplicationAttributeGroupAssociation${hashId}`, {
+ application: application.stack === cdk.Stack.of(this) ? application.applicationId : application.applicationName ?? application.applicationId,
+ attributeGroup: this.attributeGroupId,
+ });
+
+ this.associatedApplications.add(application.node.addr);
+ }
+ }
public shareAttributeGroup(shareOptions: ShareOptions): void {
const principals = getPrincipalsforSharing(shareOptions);
@@ -85,6 +103,11 @@ abstract class AttributeGroupBase extends cdk.Resource implements IAttributeGrou
return shareOptions.sharePermission ?? ATTRIBUTE_GROUP_READ_ONLY_RAM_PERMISSION_ARN;
}
}
+
+ /**
+ * Create a unique hash
+ */
+ protected abstract generateUniqueHash(resourceAddress: string): string;
}
/**
@@ -109,6 +132,10 @@ export class AttributeGroup extends AttributeGroupBase implements IAttributeGrou
class Import extends AttributeGroupBase {
public readonly attributeGroupArn = attributeGroupArn;
public readonly attributeGroupId = attributeGroupId!;
+
+ protected generateUniqueHash(resourceAddress: string): string {
+ return hashValues(this.attributeGroupArn, resourceAddress);
+ }
}
return new Import(scope, id, {
@@ -118,6 +145,7 @@ export class AttributeGroup extends AttributeGroupBase implements IAttributeGrou
public readonly attributeGroupArn: string;
public readonly attributeGroupId: string;
+ private readonly nodeAddress: string;
constructor(scope: Construct, id: string, props: AttributeGroupProps) {
super(scope, id);
@@ -132,6 +160,11 @@ export class AttributeGroup extends AttributeGroupBase implements IAttributeGrou
this.attributeGroupArn = attributeGroup.attrArn;
this.attributeGroupId = attributeGroup.attrId;
+ this.nodeAddress = cdk.Names.nodeUniqueId(attributeGroup.node);
+ }
+
+ protected generateUniqueHash(resourceAddress: string): string {
+ return hashValues(this.nodeAddress, resourceAddress);
}
private validateAttributeGroupProps(props: AttributeGroupProps) {
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts
index 7c13bbdf55895..2b6f13db1b0cb 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts
@@ -33,6 +33,13 @@ export interface CreateTargetApplicationOptions extends TargetApplicationCommonO
* @default - Application containing stacks deployed via CDK.
*/
readonly applicationDescription?: string;
+
+ /**
+ * Whether create cloudFormation Output for application manager URL.
+ *
+ * @default - Application containing stacks deployed via CDK.
+ */
+ readonly emitApplicationManagerUrlAsOutput?: boolean;
}
/**
@@ -99,6 +106,8 @@ class CreateTargetApplication extends TargetApplication {
this.applicationOptions.description || 'Stack to create AppRegistry application';
(this.applicationOptions.env as cdk.Environment) =
this.applicationOptions.env || { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION };
+ (this.applicationOptions.emitApplicationManagerUrlAsOutput as boolean) = this.applicationOptions.emitApplicationManagerUrlAsOutput ?? true;
+
const applicationStack = new cdk.Stack(scope, stackId, this.applicationOptions);
const appRegApplication = new Application(applicationStack, 'DefaultCdkApplication', {
applicationName: this.applicationOptions.applicationName,
@@ -106,6 +115,13 @@ class CreateTargetApplication extends TargetApplication {
});
cdk.Tags.of(appRegApplication).add('managedBy', 'CDK_Application_Associator');
+ if (this.applicationOptions.emitApplicationManagerUrlAsOutput) {
+ new cdk.CfnOutput(appRegApplication, 'ApplicationManagerUrl', {
+ value: `https://${appRegApplication.env.region}.console.aws.amazon.com/systems-manager/appmanager/application/AWS_AppRegistry_Application-${appRegApplication.applicationName}`,
+ description: 'System Manager Application Manager URL for the application created.',
+ });
+ }
+
return {
application: appRegApplication,
};
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/application-associator.test.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/application-associator.test.ts
index be0221ab49340..c61cf4f10e6cd 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/application-associator.test.ts
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/application-associator.test.ts
@@ -28,13 +28,73 @@ describe('Scope based Associations with Application within Same Account', () =>
Name: 'MyAssociatedApplication',
Tags: { managedBy: 'CDK_Application_Associator' },
});
+ Template.fromStack(appAssociator.appRegistryApplication().stack).hasOutput('DefaultCdkApplicationApplicationManagerUrl27C138EF', {});
Template.fromStack(anotherStack).resourceCountIs('AWS::ServiceCatalogAppRegistry::ResourceAssociation', 1);
Template.fromStack(anotherStack).hasResourceProperties('AWS::ServiceCatalogAppRegistry::ResourceAssociation', {
Application: 'MyAssociatedApplication',
Resource: { Ref: 'AWS::StackId' },
});
});
+
+ test('ApplicationAssociator with url disabled will not create cfn output', () => {
+ const appAssociator = new appreg.ApplicationAssociator(app, 'MyApplication', {
+ applications: [appreg.TargetApplication.createApplicationStack({
+ applicationName: 'MyAssociatedApplication',
+ stackName: 'MyAssociatedApplicationStack',
+ emitApplicationManagerUrlAsOutput: false,
+ })],
+ });
+
+ const anotherStack = new AppRegistrySampleStack(app, 'SampleStack');
+ Template.fromStack(appAssociator.appRegistryApplication().stack).resourceCountIs('AWS::ServiceCatalogAppRegistry::Application', 1);
+ Template.fromStack(appAssociator.appRegistryApplication().stack).hasResourceProperties('AWS::ServiceCatalogAppRegistry::Application', {
+ Name: 'MyAssociatedApplication',
+ Tags: { managedBy: 'CDK_Application_Associator' },
+ });
+
+ expect(
+ Template.fromStack(appAssociator.appRegistryApplication().stack)
+ .findOutputs('*', {}),
+ ).toEqual({});
+ Template.fromStack(anotherStack).resourceCountIs('AWS::ServiceCatalogAppRegistry::ResourceAssociation', 1);
+ Template.fromStack(anotherStack).hasResourceProperties('AWS::ServiceCatalogAppRegistry::ResourceAssociation', {
+ Application: 'MyAssociatedApplication',
+ Resource: { Ref: 'AWS::StackId' },
+ });
+ });
+});
+
+describe('Associate attribute group with Application', () => {
+ let app: cdk.App;
+ beforeEach(() => {
+ app = new cdk.App({
+ context: {
+ '@aws-cdk/core:newStyleStackSynthesis': false,
+ },
+ });
+ });
+
+ test('Associate Attribute Group with application created by ApplicationAssociator', () => {
+
+ const customAttributeGroup = new CustomAppRegistryAttributeGroup(app, 'AppRegistryAttributeGroup');
+
+ const appAssociator = new appreg.ApplicationAssociator(app, 'TestApplication', {
+ applications: [appreg.TargetApplication.createApplicationStack({
+ applicationName: 'TestAssociatedApplication',
+ stackName: 'TestAssociatedApplicationStack',
+ })],
+ });
+
+ customAttributeGroup.attributeGroup.associateWith(appAssociator.appRegistryApplication());
+ Template.fromStack(customAttributeGroup.attributeGroup.stack).resourceCountIs('AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation', 1);
+ Template.fromStack(customAttributeGroup.attributeGroup.stack).hasResourceProperties('AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation', {
+ Application: 'TestAssociatedApplication',
+ AttributeGroup: { 'Fn::GetAtt': ['MyFirstAttributeGroupDBC21379', 'Id'] },
+ });
+
+ });
});
+
describe('Scope based Associations with Application with Cross Region/Account', () => {
let app: cdk.App;
beforeEach(() => {
@@ -61,6 +121,28 @@ describe('Scope based Associations with Application with Cross Region/Account',
Template.fromStack(nestedStack).resourceCountIs('AWS::ServiceCatalogAppRegistry::ResourceAssociation', 1);
});
+ test('ApplicationAssociator disables cfn output', () => {
+ const appAssociator = new appreg.ApplicationAssociator(app, 'MyApplication', {
+ applications: [appreg.TargetApplication.createApplicationStack({
+ applicationName: 'MyAssociatedApplication',
+ stackName: 'MyAssociatedApplicationStack',
+ emitApplicationManagerUrlAsOutput: false,
+ })],
+ });
+ const firstStack = new cdk.Stack(app, 'testStack', {
+ env: { account: 'account2', region: 'region' },
+ });
+ const nestedStack = new cdk.Stack(firstStack, 'MyFirstStack', {
+ env: { account: 'account2', region: 'region' },
+ });
+
+ expect(
+ Template.fromStack(appAssociator.appRegistryApplication().stack).findOutputs('*', {}),
+ ).toEqual({});
+ Template.fromStack(firstStack).resourceCountIs('AWS::ServiceCatalogAppRegistry::ResourceAssociation', 1);
+ Template.fromStack(nestedStack).resourceCountIs('AWS::ServiceCatalogAppRegistry::ResourceAssociation', 1);
+ });
+
test('ApplicationAssociator creation failed when neither Application name nor ARN is provided', () => {
expect(() => {
new appreg.ApplicationAssociator(app, 'MyApplication', {
@@ -155,6 +237,7 @@ describe('Scope based Associations with Application with Cross Region/Account',
associateStage: true,
});
app.synth();
+ Template.fromStack(application.appRegistryApplication().stack).hasOutput('DefaultCdkApplicationApplicationManagerUrl27C138EF', {});
Template.fromStack(pipelineStack).resourceCountIs('AWS::ServiceCatalogAppRegistry::ResourceAssociation', 1);
});
});
@@ -211,3 +294,18 @@ class AppRegistrySampleStack extends cdk.Stack {
super(scope, id, props);
}
}
+
+class CustomAppRegistryAttributeGroup extends cdk.Stack {
+ public readonly attributeGroup: appreg.AttributeGroup;
+
+ constructor(scope: Construct, id: string, props?: cdk.StackProps) {
+ super(scope, id, props);
+ const myAttributeGroup = new appreg.AttributeGroup(this, 'MyFirstAttributeGroup', {
+ attributeGroupName: 'MyFirstAttributeGroupName',
+ description: 'Test attribute group',
+ attributes: {},
+ });
+
+ this.attributeGroup = myAttributeGroup;
+ }
+}
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/application.test.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/application.test.ts
index 04349d3d33bd5..f78afa9d3ca3c 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/application.test.ts
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/application.test.ts
@@ -39,8 +39,7 @@ describe('Application', () => {
description: description,
});
- Template.fromStack(stack).hasOutput('MyApplicationApplicationManagerUrlB79EF34D', {});
- expect(application.applicationManagerUrl?.value).toContain('AWS_AppRegistry_Application-testApplication');
+ expect(application.applicationManagerUrl).toContain('AWS_AppRegistry_Application-testApplication');
Template.fromStack(stack).hasResourceProperties('AWS::ServiceCatalogAppRegistry::Application', {
Description: description,
});
@@ -256,7 +255,7 @@ describe('Application', () => {
Template.fromStack(stack).hasResourceProperties('AWS::RAM::ResourceShare', {
AllowExternalPrincipals: false,
- Name: 'RAMShare5bb637032063',
+ Name: 'RAMSharee6e0e560e6f8',
Principals: ['arn:aws:organizations::123456789012:organization/o-70oi5564q1'],
ResourceArns: [{ 'Fn::GetAtt': ['MyApplication5C63EC1D', 'Arn'] }],
PermissionArns: ['arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryApplicationReadOnly'],
@@ -270,7 +269,7 @@ describe('Application', () => {
Template.fromStack(stack).hasResourceProperties('AWS::RAM::ResourceShare', {
AllowExternalPrincipals: false,
- Name: 'RAMShare5bb637032063',
+ Name: 'RAMSharee6e0e560e6f8',
Principals: ['123456789012'],
ResourceArns: [{ 'Fn::GetAtt': ['MyApplication5C63EC1D', 'Arn'] }],
PermissionArns: ['arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryApplicationReadOnly'],
@@ -286,7 +285,7 @@ describe('Application', () => {
Template.fromStack(stack).hasResourceProperties('AWS::RAM::ResourceShare', {
AllowExternalPrincipals: false,
- Name: 'RAMShare5bb637032063',
+ Name: 'RAMSharee6e0e560e6f8',
Principals: ['arn:aws:iam::123456789012:role/myRole'],
ResourceArns: [{ 'Fn::GetAtt': ['MyApplication5C63EC1D', 'Arn'] }],
PermissionArns: ['arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryApplicationReadOnly'],
@@ -302,7 +301,7 @@ describe('Application', () => {
Template.fromStack(stack).hasResourceProperties('AWS::RAM::ResourceShare', {
AllowExternalPrincipals: false,
- Name: 'RAMShare5bb637032063',
+ Name: 'RAMSharee6e0e560e6f8',
Principals: ['arn:aws:iam::123456789012:user/myUser'],
ResourceArns: [{ 'Fn::GetAtt': ['MyApplication5C63EC1D', 'Arn'] }],
PermissionArns: ['arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryApplicationReadOnly'],
@@ -317,7 +316,7 @@ describe('Application', () => {
Template.fromStack(stack).hasResourceProperties('AWS::RAM::ResourceShare', {
AllowExternalPrincipals: false,
- Name: 'RAMShare5bb637032063',
+ Name: 'RAMSharee6e0e560e6f8',
Principals: ['arn:aws:organizations::123456789012:organization/o-70oi5564q1'],
ResourceArns: [{ 'Fn::GetAtt': ['MyApplication5C63EC1D', 'Arn'] }],
PermissionArns: ['arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryApplicationReadOnly'],
@@ -332,7 +331,7 @@ describe('Application', () => {
Template.fromStack(stack).hasResourceProperties('AWS::RAM::ResourceShare', {
AllowExternalPrincipals: false,
- Name: 'RAMShare5bb637032063',
+ Name: 'RAMSharee6e0e560e6f8',
Principals: ['arn:aws:organizations::123456789012:organization/o-70oi5564q1'],
ResourceArns: [{ 'Fn::GetAtt': ['MyApplication5C63EC1D', 'Arn'] }],
PermissionArns: ['arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryApplicationAllowAssociation'],
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/attribute-group.test.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/attribute-group.test.ts
index 5230071cd50f1..8d7a984cf48a9 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/attribute-group.test.ts
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/attribute-group.test.ts
@@ -176,6 +176,30 @@ describe('Attribute Group', () => {
});
});
+ describe('Associate application to an attribute group', () => {
+ let attributeGroup: appreg.AttributeGroup;
+
+ beforeEach(() => {
+ attributeGroup = new appreg.AttributeGroup(stack, 'MyAttributeGroupForAssociation', {
+ attributeGroupName: 'MyAttributeGroupForAssociation',
+ attributes: {},
+ });
+ });
+
+ test('Associate an application to an attribute group', () => {
+ const application = new appreg.Application(stack, 'MyApplication', {
+ applicationName: 'MyTestApplication',
+ });
+ attributeGroup.associateWith(application);
+ Template.fromStack(stack).hasResourceProperties('AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation', {
+ Application: { 'Fn::GetAtt': ['MyApplication5C63EC1D', 'Id'] },
+ AttributeGroup: { 'Fn::GetAtt': ['MyAttributeGroupForAssociation6B3E1329', 'Id'] },
+ });
+
+ });
+
+ });
+
describe('Resource sharing of an attribute group', () => {
let attributeGroup: appreg.AttributeGroup;
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociator-d50dd3259875-Stack.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociator-d50dd3259875-Stack.assets.json
new file mode 100644
index 0000000000000..05f672f226537
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociator-d50dd3259875-Stack.assets.json
@@ -0,0 +1,20 @@
+{
+ "version": "30.1.0",
+ "files": {
+ "2669d20378c55153134983ffc6c70d7d39f75ab888356d2fbf04e21c11531590": {
+ "source": {
+ "path": "ApplicationAssociator-d50dd3259875-Stack.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "828800149827-us-east-2": {
+ "bucketName": "cdk-hnb659fds-assets-828800149827-us-east-2",
+ "objectKey": "2669d20378c55153134983ffc6c70d7d39f75ab888356d2fbf04e21c11531590.json",
+ "region": "us-east-2",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::828800149827:role/cdk-hnb659fds-file-publishing-role-828800149827-us-east-2"
+ }
+ }
+ }
+ },
+ "dockerImages": {}
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociator-d50dd3259875-Stack.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociator-d50dd3259875-Stack.template.json
new file mode 100644
index 0000000000000..5bdc6537a2390
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociator-d50dd3259875-Stack.template.json
@@ -0,0 +1,64 @@
+{
+ "Description": "Stack to create AppRegistry application",
+ "Resources": {
+ "DefaultCdkApplication4573D5A3": {
+ "Type": "AWS::ServiceCatalogAppRegistry::Application",
+ "Properties": {
+ "Name": "AppRegistryAssociatedApplication",
+ "Description": "Application containing stacks deployed via CDK.",
+ "Tags": {
+ "managedBy": "CDK_Application_Associator"
+ }
+ }
+ },
+ "AppRegistryAssociation": {
+ "Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
+ "Properties": {
+ "Application": {
+ "Fn::GetAtt": [
+ "DefaultCdkApplication4573D5A3",
+ "Id"
+ ]
+ },
+ "Resource": {
+ "Ref": "AWS::StackId"
+ },
+ "ResourceType": "CFN_STACK"
+ }
+ }
+ },
+ "Parameters": {
+ "BootstrapVersion": {
+ "Type": "AWS::SSM::Parameter::Value",
+ "Default": "/cdk-bootstrap/hnb659fds/version",
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
+ }
+ },
+ "Rules": {
+ "CheckBootstrapVersion": {
+ "Assertions": [
+ {
+ "Assert": {
+ "Fn::Not": [
+ {
+ "Fn::Contains": [
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ {
+ "Ref": "BootstrapVersion"
+ }
+ ]
+ }
+ ]
+ },
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json
new file mode 100644
index 0000000000000..0838d8b3519fd
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "30.1.0",
+ "files": {
+ "19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc": {
+ "source": {
+ "path": "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc.json",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
+ }
+ }
+ }
+ },
+ "dockerImages": {}
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.template.json
new file mode 100644
index 0000000000000..ecc817b74774a
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.template.json
@@ -0,0 +1,48 @@
+{
+ "Resources": {
+ "AppRegistryAssociation": {
+ "Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
+ "Properties": {
+ "Application": "AppRegistryAssociatedApplication",
+ "Resource": {
+ "Ref": "AWS::StackId"
+ },
+ "ResourceType": "CFN_STACK"
+ }
+ }
+ },
+ "Parameters": {
+ "BootstrapVersion": {
+ "Type": "AWS::SSM::Parameter::Value",
+ "Default": "/cdk-bootstrap/hnb659fds/version",
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
+ }
+ },
+ "Rules": {
+ "CheckBootstrapVersion": {
+ "Assertions": [
+ {
+ "Assert": {
+ "Fn::Not": [
+ {
+ "Fn::Contains": [
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ {
+ "Ref": "BootstrapVersion"
+ }
+ ]
+ }
+ ]
+ },
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/cdk.out b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/cdk.out
new file mode 100644
index 0000000000000..b72fef144f05c
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"30.1.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integ-servicecatalogappregistry-application.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integ-servicecatalogappregistry-application.assets.json
new file mode 100644
index 0000000000000..648f760e7b33c
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integ-servicecatalogappregistry-application.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "30.1.0",
+ "files": {
+ "19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc": {
+ "source": {
+ "path": "integ-servicecatalogappregistry-application.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc.json",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
+ }
+ }
+ }
+ },
+ "dockerImages": {}
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integ-servicecatalogappregistry-application.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integ-servicecatalogappregistry-application.template.json
new file mode 100644
index 0000000000000..ecc817b74774a
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integ-servicecatalogappregistry-application.template.json
@@ -0,0 +1,48 @@
+{
+ "Resources": {
+ "AppRegistryAssociation": {
+ "Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
+ "Properties": {
+ "Application": "AppRegistryAssociatedApplication",
+ "Resource": {
+ "Ref": "AWS::StackId"
+ },
+ "ResourceType": "CFN_STACK"
+ }
+ }
+ },
+ "Parameters": {
+ "BootstrapVersion": {
+ "Type": "AWS::SSM::Parameter::Value",
+ "Default": "/cdk-bootstrap/hnb659fds/version",
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
+ }
+ },
+ "Rules": {
+ "CheckBootstrapVersion": {
+ "Assertions": [
+ {
+ "Assert": {
+ "Fn::Not": [
+ {
+ "Fn::Contains": [
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ {
+ "Ref": "BootstrapVersion"
+ }
+ ]
+ }
+ ]
+ },
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integ.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integ.json
new file mode 100644
index 0000000000000..5b9d9dca1ae87
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "30.1.0",
+ "testCases": {
+ "ApplicationAssociatorTest/DefaultTest": {
+ "stacks": [
+ "integ-servicecatalogappregistry-application"
+ ],
+ "assertionStack": "ApplicationAssociatorTest/DefaultTest/DeployAssert",
+ "assertionStackName": "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json
new file mode 100644
index 0000000000000..93889acb4f6e0
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "30.1.0",
+ "files": {
+ "19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc": {
+ "source": {
+ "path": "integservicecatalogappregistryapplicationresourcesStack4399A149.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc.json",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
+ }
+ }
+ }
+ },
+ "dockerImages": {}
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.template.json
new file mode 100644
index 0000000000000..ecc817b74774a
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.template.json
@@ -0,0 +1,48 @@
+{
+ "Resources": {
+ "AppRegistryAssociation": {
+ "Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
+ "Properties": {
+ "Application": "AppRegistryAssociatedApplication",
+ "Resource": {
+ "Ref": "AWS::StackId"
+ },
+ "ResourceType": "CFN_STACK"
+ }
+ }
+ },
+ "Parameters": {
+ "BootstrapVersion": {
+ "Type": "AWS::SSM::Parameter::Value",
+ "Default": "/cdk-bootstrap/hnb659fds/version",
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
+ }
+ },
+ "Rules": {
+ "CheckBootstrapVersion": {
+ "Assertions": [
+ {
+ "Assert": {
+ "Fn::Not": [
+ {
+ "Fn::Contains": [
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ {
+ "Ref": "BootstrapVersion"
+ }
+ ]
+ }
+ ]
+ },
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/manifest.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/manifest.json
new file mode 100644
index 0000000000000..f12eb72323dee
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/manifest.json
@@ -0,0 +1,250 @@
+{
+ "version": "30.1.0",
+ "artifacts": {
+ "integservicecatalogappregistryapplicationresourcesStack4399A149.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "integservicecatalogappregistryapplicationresourcesStack4399A149": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "integservicecatalogappregistryapplicationresourcesStack4399A149.template.json",
+ "validateOnSynth": false,
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "integservicecatalogappregistryapplicationresourcesStack4399A149.assets"
+ ],
+ "lookupRole": {
+ "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
+ "requiresBootstrapStackVersion": 8,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "dependencies": [
+ "ApplicationAssociator-d50dd3259875-Stack",
+ "integservicecatalogappregistryapplicationresourcesStack4399A149.assets"
+ ],
+ "metadata": {
+ "/integ-servicecatalogappregistry-application/resourcesStack": [
+ {
+ "type": "aws:cdk:warning",
+ "data": "Environment agnostic stack determined, AppRegistry association might not work as expected in case you deploy cross-region or cross-account stack."
+ }
+ ],
+ "/integ-servicecatalogappregistry-application/resourcesStack/AppRegistryAssociation": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "AppRegistryAssociation"
+ }
+ ],
+ "/integ-servicecatalogappregistry-application/resourcesStack/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/integ-servicecatalogappregistry-application/resourcesStack/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "integ-servicecatalogappregistry-application/resourcesStack"
+ },
+ "integ-servicecatalogappregistry-application.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "integ-servicecatalogappregistry-application.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "integ-servicecatalogappregistry-application": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "integ-servicecatalogappregistry-application.template.json",
+ "validateOnSynth": false,
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "integ-servicecatalogappregistry-application.assets"
+ ],
+ "lookupRole": {
+ "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
+ "requiresBootstrapStackVersion": 8,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "dependencies": [
+ "ApplicationAssociator-d50dd3259875-Stack",
+ "integ-servicecatalogappregistry-application.assets"
+ ],
+ "metadata": {
+ "/integ-servicecatalogappregistry-application": [
+ {
+ "type": "aws:cdk:warning",
+ "data": "Environment agnostic stack determined, AppRegistry association might not work as expected in case you deploy cross-region or cross-account stack."
+ }
+ ],
+ "/integ-servicecatalogappregistry-application/AppRegistryAssociation": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "AppRegistryAssociation"
+ }
+ ],
+ "/integ-servicecatalogappregistry-application/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/integ-servicecatalogappregistry-application/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "integ-servicecatalogappregistry-application"
+ },
+ "ApplicationAssociator-d50dd3259875-Stack.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "ApplicationAssociator-d50dd3259875-Stack.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "ApplicationAssociator-d50dd3259875-Stack": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://828800149827/us-east-2",
+ "properties": {
+ "templateFile": "ApplicationAssociator-d50dd3259875-Stack.template.json",
+ "validateOnSynth": false,
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::828800149827:role/cdk-hnb659fds-deploy-role-828800149827-us-east-2",
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::828800149827:role/cdk-hnb659fds-cfn-exec-role-828800149827-us-east-2",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-828800149827-us-east-2/2669d20378c55153134983ffc6c70d7d39f75ab888356d2fbf04e21c11531590.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "ApplicationAssociator-d50dd3259875-Stack.assets"
+ ],
+ "lookupRole": {
+ "arn": "arn:${AWS::Partition}:iam::828800149827:role/cdk-hnb659fds-lookup-role-828800149827-us-east-2",
+ "requiresBootstrapStackVersion": 8,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "dependencies": [
+ "ApplicationAssociator-d50dd3259875-Stack.assets"
+ ],
+ "metadata": {
+ "/ApplicationAssociator-d50dd3259875-Stack/DefaultCdkApplication/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "DefaultCdkApplication4573D5A3"
+ }
+ ],
+ "/ApplicationAssociator-d50dd3259875-Stack/AppRegistryAssociation": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "AppRegistryAssociation"
+ }
+ ],
+ "/ApplicationAssociator-d50dd3259875-Stack/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/ApplicationAssociator-d50dd3259875-Stack/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "ApplicationAssociator-d50dd3259875-Stack"
+ },
+ "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.template.json",
+ "validateOnSynth": false,
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets"
+ ],
+ "lookupRole": {
+ "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
+ "requiresBootstrapStackVersion": 8,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "dependencies": [
+ "ApplicationAssociator-d50dd3259875-Stack",
+ "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets"
+ ],
+ "metadata": {
+ "/ApplicationAssociatorTest/DefaultTest/DeployAssert": [
+ {
+ "type": "aws:cdk:warning",
+ "data": "Environment agnostic stack determined, AppRegistry association might not work as expected in case you deploy cross-region or cross-account stack."
+ }
+ ],
+ "/ApplicationAssociatorTest/DefaultTest/DeployAssert/AppRegistryAssociation": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "AppRegistryAssociation"
+ }
+ ],
+ "/ApplicationAssociatorTest/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/ApplicationAssociatorTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "ApplicationAssociatorTest/DefaultTest/DeployAssert"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/tree.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/tree.json
new file mode 100644
index 0000000000000..48e6d11ac8d14
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.js.snapshot/tree.json
@@ -0,0 +1,266 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "integ-servicecatalogappregistry-application": {
+ "id": "integ-servicecatalogappregistry-application",
+ "path": "integ-servicecatalogappregistry-application",
+ "children": {
+ "resourcesStack": {
+ "id": "resourcesStack",
+ "path": "integ-servicecatalogappregistry-application/resourcesStack",
+ "children": {
+ "AppRegistryAssociation": {
+ "id": "AppRegistryAssociation",
+ "path": "integ-servicecatalogappregistry-application/resourcesStack/AppRegistryAssociation",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
+ "aws:cdk:cloudformation:props": {
+ "application": "AppRegistryAssociatedApplication",
+ "resource": {
+ "Ref": "AWS::StackId"
+ },
+ "resourceType": "CFN_STACK"
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-servicecatalogappregistry.CfnResourceAssociation",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "integ-servicecatalogappregistry-application/resourcesStack/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "integ-servicecatalogappregistry-application/resourcesStack/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ },
+ "AppRegistryAssociation": {
+ "id": "AppRegistryAssociation",
+ "path": "integ-servicecatalogappregistry-application/AppRegistryAssociation",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
+ "aws:cdk:cloudformation:props": {
+ "application": "AppRegistryAssociatedApplication",
+ "resource": {
+ "Ref": "AWS::StackId"
+ },
+ "resourceType": "CFN_STACK"
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-servicecatalogappregistry.CfnResourceAssociation",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "integ-servicecatalogappregistry-application/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "integ-servicecatalogappregistry-application/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ },
+ "RegisterCdkApplication": {
+ "id": "RegisterCdkApplication",
+ "path": "RegisterCdkApplication",
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-servicecatalogappregistry.ApplicationAssociator",
+ "version": "0.0.0"
+ }
+ },
+ "ApplicationAssociator-d50dd3259875-Stack": {
+ "id": "ApplicationAssociator-d50dd3259875-Stack",
+ "path": "ApplicationAssociator-d50dd3259875-Stack",
+ "children": {
+ "DefaultCdkApplication": {
+ "id": "DefaultCdkApplication",
+ "path": "ApplicationAssociator-d50dd3259875-Stack/DefaultCdkApplication",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "ApplicationAssociator-d50dd3259875-Stack/DefaultCdkApplication/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::ServiceCatalogAppRegistry::Application",
+ "aws:cdk:cloudformation:props": {
+ "name": "AppRegistryAssociatedApplication",
+ "description": "Application containing stacks deployed via CDK.",
+ "tags": {
+ "managedBy": "CDK_Application_Associator"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-servicecatalogappregistry.CfnApplication",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-servicecatalogappregistry.Application",
+ "version": "0.0.0"
+ }
+ },
+ "AppRegistryAssociation": {
+ "id": "AppRegistryAssociation",
+ "path": "ApplicationAssociator-d50dd3259875-Stack/AppRegistryAssociation",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
+ "aws:cdk:cloudformation:props": {
+ "application": {
+ "Fn::GetAtt": [
+ "DefaultCdkApplication4573D5A3",
+ "Id"
+ ]
+ },
+ "resource": {
+ "Ref": "AWS::StackId"
+ },
+ "resourceType": "CFN_STACK"
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-servicecatalogappregistry.CfnResourceAssociation",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "ApplicationAssociator-d50dd3259875-Stack/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "ApplicationAssociator-d50dd3259875-Stack/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ },
+ "ApplicationAssociatorTest": {
+ "id": "ApplicationAssociatorTest",
+ "path": "ApplicationAssociatorTest",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "ApplicationAssociatorTest/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "ApplicationAssociatorTest/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.1.252"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "ApplicationAssociatorTest/DefaultTest/DeployAssert",
+ "children": {
+ "AppRegistryAssociation": {
+ "id": "AppRegistryAssociation",
+ "path": "ApplicationAssociatorTest/DefaultTest/DeployAssert/AppRegistryAssociation",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
+ "aws:cdk:cloudformation:props": {
+ "application": "AppRegistryAssociatedApplication",
+ "resource": {
+ "Ref": "AWS::StackId"
+ },
+ "resourceType": "CFN_STACK"
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/aws-servicecatalogappregistry.CfnResourceAssociation",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "ApplicationAssociatorTest/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "ApplicationAssociatorTest/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests.IntegTestCase",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests.IntegTest",
+ "version": "0.0.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.1.252"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.App",
+ "version": "0.0.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.ts
new file mode 100644
index 0000000000000..67d35fe3cb2a5
--- /dev/null
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.disable-url.ts
@@ -0,0 +1,21 @@
+import * as cdk from '@aws-cdk/core';
+import * as integ from '@aws-cdk/integ-tests';
+import * as appreg from '../lib';
+
+const app = new cdk.App();
+const stack = new cdk.Stack(app, 'integ-servicecatalogappregistry-application');
+
+new appreg.ApplicationAssociator(app, 'RegisterCdkApplication', {
+ applications: [appreg.TargetApplication.createApplicationStack({
+ applicationName: 'AppRegistryAssociatedApplication',
+ emitApplicationManagerUrlAsOutput: false,
+ })],
+});
+
+new cdk.Stack(stack, 'resourcesStack');
+
+new integ.IntegTest(app, 'ApplicationAssociatorTest', {
+ testCases: [stack],
+});
+
+app.synth();
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.assets.json
index 3ee606db647f9..9081ac09e1a15 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.assets.json
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.assets.json
@@ -1,7 +1,7 @@
{
"version": "30.1.0",
"files": {
- "6a426aab2239a5fb580c074adbf5b8e3acefa04209423d2b53989c73aed3f95b": {
+ "2332c6df6777cc571585060fa4888d6d3b9ef548aa00dcbfc53fbdde386d7591": {
"source": {
"path": "integ-servicecatalogappregistry-application.template.json",
"packaging": "file"
@@ -9,7 +9,7 @@
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "6a426aab2239a5fb580c074adbf5b8e3acefa04209423d2b53989c73aed3f95b.json",
+ "objectKey": "2332c6df6777cc571585060fa4888d6d3b9ef548aa00dcbfc53fbdde386d7591.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.template.json
index 7cdff29059dd2..9fcf50e708a56 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.template.json
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.template.json
@@ -3,8 +3,8 @@
"TestApplication2FBC585F": {
"Type": "AWS::ServiceCatalogAppRegistry::Application",
"Properties": {
- "Name": "MyTestApplication",
- "Description": "Test application description"
+ "Name": "TestApplication",
+ "Description": "My application description"
}
},
"TestApplicationResourceAssociationd232b63e52a8414E905D": {
@@ -39,10 +39,10 @@
}
}
},
- "TestApplicationRAMShare3dc6227daec11BF3E108": {
+ "TestApplicationRAMSharead8ba81b8cdd40199FD1": {
"Type": "AWS::RAM::ResourceShare",
"Properties": {
- "Name": "RAMShare3dc6227daec1",
+ "Name": "RAMSharead8ba81b8cdd",
"AllowExternalPrincipals": false,
"PermissionArns": [
"arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryApplicationReadOnly"
@@ -121,23 +121,6 @@
}
}
},
- "Outputs": {
- "TestApplicationApplicationManagerUrlE1058321": {
- "Description": "Application manager url for the application created.",
- "Value": {
- "Fn::Join": [
- "",
- [
- "https://",
- {
- "Ref": "AWS::Region"
- },
- ".console.aws.amazon.com/systems-manager/appmanager/application/AWS_AppRegistry_Application-MyTestApplication"
- ]
- ]
- }
- }
- },
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value",
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/manifest.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/manifest.json
index ebeb0546e09c7..689db41c3804f 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/manifest.json
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/manifest.json
@@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6a426aab2239a5fb580c074adbf5b8e3acefa04209423d2b53989c73aed3f95b.json",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2332c6df6777cc571585060fa4888d6d3b9ef548aa00dcbfc53fbdde386d7591.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
@@ -39,12 +39,6 @@
"data": "TestApplication2FBC585F"
}
],
- "/integ-servicecatalogappregistry-application/TestApplication/ApplicationManagerUrl": [
- {
- "type": "aws:cdk:logicalId",
- "data": "TestApplicationApplicationManagerUrlE1058321"
- }
- ],
"/integ-servicecatalogappregistry-application/TestApplication/ResourceAssociationd232b63e52a8": [
{
"type": "aws:cdk:logicalId",
@@ -57,10 +51,10 @@
"data": "TestApplicationAttributeGroupAssociation4ba7f5842818B8EE1C6F"
}
],
- "/integ-servicecatalogappregistry-application/TestApplication/RAMShare3dc6227daec1": [
+ "/integ-servicecatalogappregistry-application/TestApplication/RAMSharead8ba81b8cdd": [
{
"type": "aws:cdk:logicalId",
- "data": "TestApplicationRAMShare3dc6227daec11BF3E108"
+ "data": "TestApplicationRAMSharead8ba81b8cdd40199FD1"
}
],
"/integ-servicecatalogappregistry-application/TestAttributeGroup/Resource": [
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/tree.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/tree.json
index 692d8cdf23ff4..ef111bc49a7b8 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/tree.json
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/tree.json
@@ -18,8 +18,8 @@
"attributes": {
"aws:cdk:cloudformation:type": "AWS::ServiceCatalogAppRegistry::Application",
"aws:cdk:cloudformation:props": {
- "name": "MyTestApplication",
- "description": "Test application description"
+ "name": "TestApplication",
+ "description": "My application description"
}
},
"constructInfo": {
@@ -27,14 +27,6 @@
"version": "0.0.0"
}
},
- "ApplicationManagerUrl": {
- "id": "ApplicationManagerUrl",
- "path": "integ-servicecatalogappregistry-application/TestApplication/ApplicationManagerUrl",
- "constructInfo": {
- "fqn": "@aws-cdk/core.CfnOutput",
- "version": "0.0.0"
- }
- },
"ResourceAssociationd232b63e52a8": {
"id": "ResourceAssociationd232b63e52a8",
"path": "integ-servicecatalogappregistry-application/TestApplication/ResourceAssociationd232b63e52a8",
@@ -83,13 +75,13 @@
"version": "0.0.0"
}
},
- "RAMShare3dc6227daec1": {
- "id": "RAMShare3dc6227daec1",
- "path": "integ-servicecatalogappregistry-application/TestApplication/RAMShare3dc6227daec1",
+ "RAMSharead8ba81b8cdd": {
+ "id": "RAMSharead8ba81b8cdd",
+ "path": "integ-servicecatalogappregistry-application/TestApplication/RAMSharead8ba81b8cdd",
"attributes": {
"aws:cdk:cloudformation:type": "AWS::RAM::ResourceShare",
"aws:cdk:cloudformation:props": {
- "name": "RAMShare3dc6227daec1",
+ "name": "RAMSharead8ba81b8cdd",
"allowExternalPrincipals": false,
"permissionArns": [
"arn:aws:ram::aws:permission/AWSRAMPermissionServiceCatalogAppRegistryApplicationReadOnly"
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts
index bc6d61f9f0ce9..9635a126e2b05 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts
@@ -6,8 +6,8 @@ const app = new cdk.App();
const stack = new cdk.Stack(app, 'integ-servicecatalogappregistry-application');
const application = new appreg.Application(stack, 'TestApplication', {
- applicationName: 'MyTestApplication',
- description: 'Test application description',
+ applicationName: 'TestApplication',
+ description: 'My application description',
});
const attributeGroup = new appreg.AttributeGroup(stack, 'TestAttributeGroup', {
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/cdk.out b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/cdk.out
index 145739f539580..b72fef144f05c 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/cdk.out
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/cdk.out
@@ -1 +1 @@
-{"version":"22.0.0"}
\ No newline at end of file
+{"version":"30.1.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ-servicecatalogappregistry-attribute-group.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ-servicecatalogappregistry-attribute-group.assets.json
index 1aebd71d38d63..7f5d7d67860d6 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ-servicecatalogappregistry-attribute-group.assets.json
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ-servicecatalogappregistry-attribute-group.assets.json
@@ -1,7 +1,7 @@
{
- "version": "22.0.0",
+ "version": "30.1.0",
"files": {
- "3dece22dad73361a79cb380f2880362a20ffc5c0cc75ddc6707e26b5a88cf93f": {
+ "9d37fdefa4311937f8f73f9556f1d9a03a2874545a0a262fd42bfde3823ab551": {
"source": {
"path": "integ-servicecatalogappregistry-attribute-group.template.json",
"packaging": "file"
@@ -9,7 +9,7 @@
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "3dece22dad73361a79cb380f2880362a20ffc5c0cc75ddc6707e26b5a88cf93f.json",
+ "objectKey": "9d37fdefa4311937f8f73f9556f1d9a03a2874545a0a262fd42bfde3823ab551.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ-servicecatalogappregistry-attribute-group.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ-servicecatalogappregistry-attribute-group.template.json
index 08a8494f334c7..58e8215d70828 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ-servicecatalogappregistry-attribute-group.template.json
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ-servicecatalogappregistry-attribute-group.template.json
@@ -15,8 +15,8 @@
"beta": "time2"
}
},
- "Name": "myAttributeGroupTest",
- "Description": "my attribute group description"
+ "Name": "myFirstAttributeGroup",
+ "Description": "test attribute group description"
}
},
"TestAttributeGroupRAMSharec67f7d80e5baA10EFB4E": {
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ.json
index a50a65615f05b..1c5f8dae6c42d 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ.json
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/integ.json
@@ -1,5 +1,5 @@
{
- "version": "22.0.0",
+ "version": "30.1.0",
"testCases": {
"integ.attribute-group": {
"stacks": [
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/manifest.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/manifest.json
index edce9703115a8..a894caeb670cf 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/manifest.json
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/manifest.json
@@ -1,5 +1,5 @@
{
- "version": "22.0.0",
+ "version": "30.1.0",
"artifacts": {
"integ-servicecatalogappregistry-attribute-group.assets": {
"type": "cdk:asset-manifest",
@@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3dece22dad73361a79cb380f2880362a20ffc5c0cc75ddc6707e26b5a88cf93f.json",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9d37fdefa4311937f8f73f9556f1d9a03a2874545a0a262fd42bfde3823ab551.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/tree.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/tree.json
index 83ac3d2034037..3f1adfd676bd6 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/tree.json
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.js.snapshot/tree.json
@@ -30,8 +30,8 @@
"beta": "time2"
}
},
- "name": "myAttributeGroupTest",
- "description": "my attribute group description"
+ "name": "myFirstAttributeGroup",
+ "description": "test attribute group description"
}
},
"constructInfo": {
@@ -228,7 +228,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.189"
+ "version": "10.1.252"
}
}
},
diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.ts
index 6d5ccb59b8ef2..10835b204bdfe 100644
--- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.ts
+++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.attribute-group.ts
@@ -6,8 +6,8 @@ const app = new cdk.App();
const stack = new cdk.Stack(app, 'integ-servicecatalogappregistry-attribute-group');
const attributeGroup = new appreg.AttributeGroup(stack, 'TestAttributeGroup', {
- attributeGroupName: 'myAttributeGroupTest',
- description: 'my attribute group description',
+ attributeGroupName: 'myFirstAttributeGroup',
+ description: 'test attribute group description',
attributes: {
stage: 'alpha',
teamMembers: [
diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json
index 1e2ebe4bbb600..956caa11e3d0e 100644
--- a/packages/@aws-cdk/aws-sqs/package.json
+++ b/packages/@aws-cdk/aws-sqs/package.json
@@ -88,7 +88,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"jest": "^27.5.1"
},
"dependencies": {
diff --git a/packages/@aws-cdk/aws-ssm/README.md b/packages/@aws-cdk/aws-ssm/README.md
index 7c8fdbb9bd003..477403d78224a 100644
--- a/packages/@aws-cdk/aws-ssm/README.md
+++ b/packages/@aws-cdk/aws-ssm/README.md
@@ -125,7 +125,26 @@ new ssm.StringParameter(this, 'Parameter', {
});
```
-[creating SSM parameters](test/integ.parameter.lit.ts)
+```ts
+// Create a new SSM Parameter holding a String
+const param = new ssm.StringParameter(stack, 'StringParameter', {
+ // description: 'Some user-friendly description',
+ // name: 'ParameterName',
+ stringValue: 'Initial parameter value',
+ // allowedPattern: '.*',
+});
+
+// Grant read access to some Role
+param.grantRead(role);
+
+// Create a new SSM Parameter holding a StringList
+const listParameter = new ssm.StringListParameter(stack, 'StringListParameter', {
+ // description: 'Some user-friendly description',
+ // name: 'ParameterName',
+ stringListValue: ['Initial parameter value A', 'Initial parameter value B'],
+ // allowedPattern: '.*',
+});
+```
When specifying an `allowedPattern`, the values provided as string literals
are validated against the pattern and an exception is raised if a value
diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle/index.js b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle/index.js
similarity index 100%
rename from packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle/index.js
rename to packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle/index.js
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/asset.d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.bundle/index.js b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/asset.d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.bundle/index.js
deleted file mode 100644
index a9e7e7241efc7..0000000000000
--- a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/asset.d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.bundle/index.js
+++ /dev/null
@@ -1,669 +0,0 @@
-"use strict";
-var __create = Object.create;
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getProtoOf = Object.getPrototypeOf;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
- mod
-));
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
-
-// lib/assertions/providers/lambda-handler/index.ts
-var lambda_handler_exports = {};
-__export(lambda_handler_exports, {
- handler: () => handler
-});
-module.exports = __toCommonJS(lambda_handler_exports);
-
-// ../assertions/lib/matcher.ts
-var Matcher = class {
- static isMatcher(x) {
- return x && x instanceof Matcher;
- }
-};
-var MatchResult = class {
- constructor(target) {
- this.failures = [];
- this.captures = /* @__PURE__ */ new Map();
- this.finalized = false;
- this.target = target;
- }
- push(matcher, path, message) {
- return this.recordFailure({ matcher, path, message });
- }
- recordFailure(failure) {
- this.failures.push(failure);
- return this;
- }
- hasFailed() {
- return this.failures.length !== 0;
- }
- get failCount() {
- return this.failures.length;
- }
- compose(id, inner) {
- const innerF = inner.failures;
- this.failures.push(...innerF.map((f) => {
- return { path: [id, ...f.path], message: f.message, matcher: f.matcher };
- }));
- inner.captures.forEach((vals, capture) => {
- vals.forEach((value) => this.recordCapture({ capture, value }));
- });
- return this;
- }
- finished() {
- if (this.finalized) {
- return this;
- }
- if (this.failCount === 0) {
- this.captures.forEach((vals, cap) => cap._captured.push(...vals));
- }
- this.finalized = true;
- return this;
- }
- toHumanStrings() {
- return this.failures.map((r) => {
- const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`;
- return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`;
- });
- }
- recordCapture(options) {
- let values = this.captures.get(options.capture);
- if (values === void 0) {
- values = [];
- }
- values.push(options.value);
- this.captures.set(options.capture, values);
- }
-};
-
-// ../assertions/lib/private/matchers/absent.ts
-var AbsentMatch = class extends Matcher {
- constructor(name) {
- super();
- this.name = name;
- }
- test(actual) {
- const result = new MatchResult(actual);
- if (actual !== void 0) {
- result.recordFailure({
- matcher: this,
- path: [],
- message: `Received ${actual}, but key should be absent`
- });
- }
- return result;
- }
-};
-
-// ../assertions/lib/private/type.ts
-function getType(obj) {
- return Array.isArray(obj) ? "array" : typeof obj;
-}
-
-// ../assertions/lib/match.ts
-var Match = class {
- static absent() {
- return new AbsentMatch("absent");
- }
- static arrayWith(pattern) {
- return new ArrayMatch("arrayWith", pattern);
- }
- static arrayEquals(pattern) {
- return new ArrayMatch("arrayEquals", pattern, { subsequence: false });
- }
- static exact(pattern) {
- return new LiteralMatch("exact", pattern, { partialObjects: false });
- }
- static objectLike(pattern) {
- return new ObjectMatch("objectLike", pattern);
- }
- static objectEquals(pattern) {
- return new ObjectMatch("objectEquals", pattern, { partial: false });
- }
- static not(pattern) {
- return new NotMatch("not", pattern);
- }
- static serializedJson(pattern) {
- return new SerializedJson("serializedJson", pattern);
- }
- static anyValue() {
- return new AnyMatch("anyValue");
- }
- static stringLikeRegexp(pattern) {
- return new StringLikeRegexpMatch("stringLikeRegexp", pattern);
- }
-};
-var LiteralMatch = class extends Matcher {
- constructor(name, pattern, options = {}) {
- super();
- this.name = name;
- this.pattern = pattern;
- this.partialObjects = options.partialObjects ?? false;
- if (Matcher.isMatcher(this.pattern)) {
- throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply.");
- }
- }
- test(actual) {
- if (Array.isArray(this.pattern)) {
- return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual);
- }
- if (typeof this.pattern === "object") {
- return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual);
- }
- const result = new MatchResult(actual);
- if (typeof this.pattern !== typeof actual) {
- result.recordFailure({
- matcher: this,
- path: [],
- message: `Expected type ${typeof this.pattern} but received ${getType(actual)}`
- });
- return result;
- }
- if (actual !== this.pattern) {
- result.recordFailure({
- matcher: this,
- path: [],
- message: `Expected ${this.pattern} but received ${actual}`
- });
- }
- return result;
- }
-};
-var ArrayMatch = class extends Matcher {
- constructor(name, pattern, options = {}) {
- super();
- this.name = name;
- this.pattern = pattern;
- this.subsequence = options.subsequence ?? true;
- this.partialObjects = options.partialObjects ?? false;
- }
- test(actual) {
- if (!Array.isArray(actual)) {
- return new MatchResult(actual).recordFailure({
- matcher: this,
- path: [],
- message: `Expected type array but received ${getType(actual)}`
- });
- }
- if (!this.subsequence && this.pattern.length !== actual.length) {
- return new MatchResult(actual).recordFailure({
- matcher: this,
- path: [],
- message: `Expected array of length ${this.pattern.length} but received ${actual.length}`
- });
- }
- let patternIdx = 0;
- let actualIdx = 0;
- const result = new MatchResult(actual);
- while (patternIdx < this.pattern.length && actualIdx < actual.length) {
- const patternElement = this.pattern[patternIdx];
- const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects });
- const matcherName = matcher.name;
- if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) {
- throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`);
- }
- const innerResult = matcher.test(actual[actualIdx]);
- if (!this.subsequence || !innerResult.hasFailed()) {
- result.compose(`[${actualIdx}]`, innerResult);
- patternIdx++;
- actualIdx++;
- } else {
- actualIdx++;
- }
- }
- for (; patternIdx < this.pattern.length; patternIdx++) {
- const pattern = this.pattern[patternIdx];
- const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `;
- result.recordFailure({
- matcher: this,
- path: [],
- message: `Missing element${element}at pattern index ${patternIdx}`
- });
- }
- return result;
- }
-};
-var ObjectMatch = class extends Matcher {
- constructor(name, pattern, options = {}) {
- super();
- this.name = name;
- this.pattern = pattern;
- this.partial = options.partial ?? true;
- }
- test(actual) {
- if (typeof actual !== "object" || Array.isArray(actual)) {
- return new MatchResult(actual).recordFailure({
- matcher: this,
- path: [],
- message: `Expected type object but received ${getType(actual)}`
- });
- }
- const result = new MatchResult(actual);
- if (!this.partial) {
- for (const a of Object.keys(actual)) {
- if (!(a in this.pattern)) {
- result.recordFailure({
- matcher: this,
- path: [`/${a}`],
- message: "Unexpected key"
- });
- }
- }
- }
- for (const [patternKey, patternVal] of Object.entries(this.pattern)) {
- if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) {
- result.recordFailure({
- matcher: this,
- path: [`/${patternKey}`],
- message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}`
- });
- continue;
- }
- const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial });
- const inner = matcher.test(actual[patternKey]);
- result.compose(`/${patternKey}`, inner);
- }
- return result;
- }
-};
-var SerializedJson = class extends Matcher {
- constructor(name, pattern) {
- super();
- this.name = name;
- this.pattern = pattern;
- }
- test(actual) {
- const result = new MatchResult(actual);
- if (getType(actual) !== "string") {
- result.recordFailure({
- matcher: this,
- path: [],
- message: `Expected JSON as a string but found ${getType(actual)}`
- });
- return result;
- }
- let parsed;
- try {
- parsed = JSON.parse(actual);
- } catch (err) {
- if (err instanceof SyntaxError) {
- result.recordFailure({
- matcher: this,
- path: [],
- message: `Invalid JSON string: ${actual}`
- });
- return result;
- } else {
- throw err;
- }
- }
- const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern);
- const innerResult = matcher.test(parsed);
- result.compose(`(${this.name})`, innerResult);
- return result;
- }
-};
-var NotMatch = class extends Matcher {
- constructor(name, pattern) {
- super();
- this.name = name;
- this.pattern = pattern;
- }
- test(actual) {
- const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern);
- const innerResult = matcher.test(actual);
- const result = new MatchResult(actual);
- if (innerResult.failCount === 0) {
- result.recordFailure({
- matcher: this,
- path: [],
- message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}`
- });
- }
- return result;
- }
-};
-var AnyMatch = class extends Matcher {
- constructor(name) {
- super();
- this.name = name;
- }
- test(actual) {
- const result = new MatchResult(actual);
- if (actual == null) {
- result.recordFailure({
- matcher: this,
- path: [],
- message: "Expected a value but found none"
- });
- }
- return result;
- }
-};
-var StringLikeRegexpMatch = class extends Matcher {
- constructor(name, pattern) {
- super();
- this.name = name;
- this.pattern = pattern;
- }
- test(actual) {
- const result = new MatchResult(actual);
- const regex = new RegExp(this.pattern, "gm");
- if (typeof actual !== "string") {
- result.recordFailure({
- matcher: this,
- path: [],
- message: `Expected a string, but got '${typeof actual}'`
- });
- }
- if (!regex.test(actual)) {
- result.recordFailure({
- matcher: this,
- path: [],
- message: `String '${actual}' did not match pattern '${this.pattern}'`
- });
- }
- return result;
- }
-};
-
-// lib/assertions/providers/lambda-handler/base.ts
-var https = __toESM(require("https"));
-var url = __toESM(require("url"));
-var CustomResourceHandler = class {
- constructor(event, context) {
- this.event = event;
- this.context = context;
- this.timedOut = false;
- this.timeout = setTimeout(async () => {
- await this.respond({
- status: "FAILED",
- reason: "Lambda Function Timeout",
- data: this.context.logStreamName
- });
- this.timedOut = true;
- }, context.getRemainingTimeInMillis() - 1200);
- this.event = event;
- this.physicalResourceId = extractPhysicalResourceId(event);
- }
- async handle() {
- try {
- const response = await this.processEvent(this.event.ResourceProperties);
- return response;
- } catch (e) {
- console.log(e);
- throw e;
- } finally {
- clearTimeout(this.timeout);
- }
- }
- respond(response) {
- if (this.timedOut) {
- return;
- }
- const cfResponse = {
- Status: response.status,
- Reason: response.reason,
- PhysicalResourceId: this.physicalResourceId,
- StackId: this.event.StackId,
- RequestId: this.event.RequestId,
- LogicalResourceId: this.event.LogicalResourceId,
- NoEcho: false,
- Data: response.data
- };
- const responseBody = JSON.stringify(cfResponse);
- console.log("Responding to CloudFormation", responseBody);
- const parsedUrl = url.parse(this.event.ResponseURL);
- const requestOptions = {
- hostname: parsedUrl.hostname,
- path: parsedUrl.path,
- method: "PUT",
- headers: { "content-type": "", "content-length": responseBody.length }
- };
- return new Promise((resolve, reject) => {
- try {
- const request2 = https.request(requestOptions, resolve);
- request2.on("error", reject);
- request2.write(responseBody);
- request2.end();
- } catch (e) {
- reject(e);
- }
- });
- }
-};
-function extractPhysicalResourceId(event) {
- switch (event.RequestType) {
- case "Create":
- return event.LogicalResourceId;
- case "Update":
- case "Delete":
- return event.PhysicalResourceId;
- }
-}
-
-// lib/assertions/providers/lambda-handler/assertion.ts
-var AssertionHandler = class extends CustomResourceHandler {
- async processEvent(request2) {
- let actual = decodeCall(request2.actual);
- const expected = decodeCall(request2.expected);
- let result;
- const matcher = new MatchCreator(expected).getMatcher();
- console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`);
- const matchResult = matcher.test(actual);
- matchResult.finished();
- if (matchResult.hasFailed()) {
- result = {
- failed: true,
- assertion: JSON.stringify({
- status: "fail",
- message: [
- ...matchResult.toHumanStrings(),
- JSON.stringify(matchResult.target, void 0, 2)
- ].join("\n")
- })
- };
- if (request2.failDeployment) {
- throw new Error(result.assertion);
- }
- } else {
- result = {
- assertion: JSON.stringify({
- status: "success"
- })
- };
- }
- return result;
- }
-};
-var MatchCreator = class {
- constructor(obj) {
- this.parsedObj = {
- matcher: obj
- };
- }
- getMatcher() {
- try {
- const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) {
- const nested = Object.keys(v)[0];
- switch (nested) {
- case "$ArrayWith":
- return Match.arrayWith(v[nested]);
- case "$ObjectLike":
- return Match.objectLike(v[nested]);
- case "$StringLike":
- return Match.stringLikeRegexp(v[nested]);
- default:
- return v;
- }
- });
- if (Matcher.isMatcher(final.matcher)) {
- return final.matcher;
- }
- return Match.exact(final.matcher);
- } catch {
- return Match.exact(this.parsedObj.matcher);
- }
- }
-};
-function decodeCall(call) {
- if (!call) {
- return void 0;
- }
- try {
- const parsed = JSON.parse(call);
- return parsed;
- } catch (e) {
- return call;
- }
-}
-
-// lib/assertions/providers/lambda-handler/utils.ts
-function decode(object) {
- return JSON.parse(JSON.stringify(object), (_k, v) => {
- switch (v) {
- case "TRUE:BOOLEAN":
- return true;
- case "FALSE:BOOLEAN":
- return false;
- default:
- return v;
- }
- });
-}
-
-// lib/assertions/providers/lambda-handler/sdk.ts
-function flatten(object) {
- return Object.assign(
- {},
- ...function _flatten(child, path = []) {
- return [].concat(...Object.keys(child).map((key) => {
- let childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key];
- if (typeof childKey === "string") {
- childKey = isJsonString(childKey);
- }
- return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey };
- }));
- }(object)
- );
-}
-var AwsApiCallHandler = class extends CustomResourceHandler {
- async processEvent(request2) {
- const AWS = require("aws-sdk");
- console.log(`AWS SDK VERSION: ${AWS.VERSION}`);
- if (!Object.prototype.hasOwnProperty.call(AWS, request2.service)) {
- throw Error(`Service ${request2.service} does not exist in AWS SDK version ${AWS.VERSION}.`);
- }
- const service = new AWS[request2.service]();
- const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise();
- console.log(`SDK response received ${JSON.stringify(response)}`);
- delete response.ResponseMetadata;
- const respond = {
- apiCallResponse: response
- };
- const flatData = {
- ...flatten(respond)
- };
- const resp = request2.flattenResponse === "true" ? flatData : respond;
- console.log(`Returning result ${JSON.stringify(resp)}`);
- return resp;
- }
-};
-function isJsonString(value) {
- try {
- return JSON.parse(value);
- } catch {
- return value;
- }
-}
-
-// lib/assertions/providers/lambda-handler/types.ts
-var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals";
-var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall";
-
-// lib/assertions/providers/lambda-handler/index.ts
-async function handler(event, context) {
- console.log(`Event: ${JSON.stringify({ ...event, ResponseURL: "..." })}`);
- const provider = createResourceHandler(event, context);
- try {
- if (event.RequestType === "Delete") {
- await provider.respond({
- status: "SUCCESS",
- reason: "OK"
- });
- return;
- }
- const result = await provider.handle();
- const actualPath = event.ResourceProperties.actualPath;
- const actual = actualPath ? result[`apiCallResponse.${actualPath}`] : result.apiCallResponse;
- if ("expected" in event.ResourceProperties) {
- const assertion = new AssertionHandler({
- ...event,
- ResourceProperties: {
- ServiceToken: event.ServiceToken,
- actual,
- expected: event.ResourceProperties.expected
- }
- }, context);
- try {
- const assertionResult = await assertion.handle();
- await provider.respond({
- status: "SUCCESS",
- reason: "OK",
- data: {
- ...assertionResult,
- ...result
- }
- });
- return;
- } catch (e) {
- await provider.respond({
- status: "FAILED",
- reason: e.message ?? "Internal Error"
- });
- return;
- }
- }
- await provider.respond({
- status: "SUCCESS",
- reason: "OK",
- data: result
- });
- } catch (e) {
- await provider.respond({
- status: "FAILED",
- reason: e.message ?? "Internal Error"
- });
- return;
- }
- return;
-}
-function createResourceHandler(event, context) {
- if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) {
- return new AwsApiCallHandler(event, context);
- } else if (event.ResourceType.startsWith(ASSERT_RESOURCE_TYPE)) {
- return new AssertionHandler(event, context);
- } else {
- throw new Error(`Unsupported resource type "${event.ResourceType}`);
- }
-}
-// Annotate the CommonJS export names for ESM import in node:
-0 && (module.exports = {
- handler
-});
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/base.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/base.assets.json
index 9f0c6525d7f91..2b0406276e727 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/base.assets.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/base.assets.json
@@ -1,5 +1,5 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"files": {
"1caf5ea1b3cc1aedc4ec46feb2680836eae5804fa1ae1d8a572944636e88531b": {
"source": {
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/cdk.out b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/cdk.out
index 8ecc185e9dbee..b72fef144f05c 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/cdk.out
+++ b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/cdk.out
@@ -1 +1 @@
-{"version":"21.0.0"}
\ No newline at end of file
+{"version":"30.1.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/integ.json b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/integ.json
index 1e9ee364aca3e..aebe2612de860 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/integ.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/integ.json
@@ -1,5 +1,5 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"testCases": {
"ssm-string-param/DefaultTest": {
"stacks": [
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/list-param.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/list-param.assets.json
index 47303559bc7be..511467ae0901c 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/list-param.assets.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/list-param.assets.json
@@ -1,5 +1,5 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"files": {
"f21f04e61fc048db023578e8c9bdab9b7f45992bd3d533bcf7fb9eb87991bc95": {
"source": {
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/manifest.json b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/manifest.json
index d8e0de9e54959..719162cd30161 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/manifest.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/manifest.json
@@ -1,5 +1,5 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"artifacts": {
"base.assets": {
"type": "cdk:asset-manifest",
@@ -178,7 +178,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3fdd4225944766d24a4a35fa88db2febd8e7f28bd8ea992c8972583ca24d0b9a.json",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b707a28540181bd09e120c895fa139b9bf644835095f79f29045b5281a61ff9b.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/ssmstringparamDefaultTestDeployAssert9C612E37.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/ssmstringparamDefaultTestDeployAssert9C612E37.assets.json
index edc04ad32c05b..03bae5afdafd5 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/ssmstringparamDefaultTestDeployAssert9C612E37.assets.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/ssmstringparamDefaultTestDeployAssert9C612E37.assets.json
@@ -1,20 +1,20 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"files": {
- "d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb": {
+ "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28": {
"source": {
- "path": "asset.d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.bundle",
+ "path": "asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.zip",
+ "objectKey": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
- "3fdd4225944766d24a4a35fa88db2febd8e7f28bd8ea992c8972583ca24d0b9a": {
+ "b707a28540181bd09e120c895fa139b9bf644835095f79f29045b5281a61ff9b": {
"source": {
"path": "ssmstringparamDefaultTestDeployAssert9C612E37.template.json",
"packaging": "file"
@@ -22,7 +22,7 @@
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "3fdd4225944766d24a4a35fa88db2febd8e7f28bd8ea992c8972583ca24d0b9a.json",
+ "objectKey": "b707a28540181bd09e120c895fa139b9bf644835095f79f29045b5281a61ff9b.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/ssmstringparamDefaultTestDeployAssert9C612E37.template.json b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/ssmstringparamDefaultTestDeployAssert9C612E37.template.json
index f0328cc7a02d6..c724787b3ce7a 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/ssmstringparamDefaultTestDeployAssert9C612E37.template.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.list-parameter.js.snapshot/ssmstringparamDefaultTestDeployAssert9C612E37.template.json
@@ -26,7 +26,7 @@
]
},
"flattenResponse": "false",
- "salt": "1663960575818"
+ "salt": "1677705112870"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
@@ -80,7 +80,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
- "S3Key": "d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.zip"
+ "S3Key": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip"
},
"Timeout": 120,
"Handler": "index.handler",
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdk.out b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdk.out
index 588d7b269d34f..b72fef144f05c 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdk.out
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdk.out
@@ -1 +1 @@
-{"version":"20.0.0"}
\ No newline at end of file
+{"version":"30.1.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.assets.json
new file mode 100644
index 0000000000000..764a6d46160e1
--- /dev/null
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "30.1.0",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
+ }
+ }
+ }
+ },
+ "dockerImages": {}
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.template.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.template.json
new file mode 100644
index 0000000000000..ad9d0fb73d1dd
--- /dev/null
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.template.json
@@ -0,0 +1,36 @@
+{
+ "Parameters": {
+ "BootstrapVersion": {
+ "Type": "AWS::SSM::Parameter::Value",
+ "Default": "/cdk-bootstrap/hnb659fds/version",
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
+ }
+ },
+ "Rules": {
+ "CheckBootstrapVersion": {
+ "Assertions": [
+ {
+ "Assert": {
+ "Fn::Not": [
+ {
+ "Fn::Contains": [
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ {
+ "Ref": "BootstrapVersion"
+ }
+ ]
+ }
+ ]
+ },
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/integ-parameter-arns.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/integ-parameter-arns.assets.json
index d74374938ea2e..48bdfe13582a6 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/integ-parameter-arns.assets.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/integ-parameter-arns.assets.json
@@ -1,5 +1,5 @@
{
- "version": "20.0.0",
+ "version": "30.1.0",
"files": {
"ab8a821f2d4347b885e1e7bdf551140408b2750fbafbac4513181d12253510be": {
"source": {
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/integ.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/integ.json
index 19eada241a4ca..7ce3e8ca1c0c5 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/integ.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/integ.json
@@ -1,14 +1,12 @@
{
- "version": "20.0.0",
+ "version": "30.1.0",
"testCases": {
- "integ.parameter-arns": {
+ "cdk-integ-ssm-parameter-arns/DefaultTest": {
"stacks": [
"integ-parameter-arns"
],
- "diffAssets": false,
- "stackUpdateWorkflow": true
+ "assertionStack": "cdk-integ-ssm-parameter-arns/DefaultTest/DeployAssert",
+ "assertionStackName": "cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49"
}
- },
- "synthContext": {},
- "enableLookups": false
+ }
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/manifest.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/manifest.json
index 5c02e6d204a32..8256affd97ded 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/manifest.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/manifest.json
@@ -1,12 +1,6 @@
{
- "version": "20.0.0",
+ "version": "30.1.0",
"artifacts": {
- "Tree": {
- "type": "cdk:tree",
- "properties": {
- "file": "tree.json"
- }
- },
"integ-parameter-arns.assets": {
"type": "cdk:asset-manifest",
"properties": {
@@ -155,6 +149,59 @@
]
},
"displayName": "integ-parameter-arns"
+ },
+ "cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.template.json",
+ "validateOnSynth": false,
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.assets"
+ ],
+ "lookupRole": {
+ "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
+ "requiresBootstrapStackVersion": 8,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "dependencies": [
+ "cdkintegssmparameterarnsDefaultTestDeployAssertE4B86A49.assets"
+ ],
+ "metadata": {
+ "/cdk-integ-ssm-parameter-arns/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/cdk-integ-ssm-parameter-arns/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "cdk-integ-ssm-parameter-arns/DefaultTest/DeployAssert"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
}
}
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/tree.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/tree.json
index 2b744d57fcbe2..4d63b893e3801 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/tree.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.js.snapshot/tree.json
@@ -4,14 +4,6 @@
"id": "App",
"path": "",
"children": {
- "Tree": {
- "id": "Tree",
- "path": "Tree",
- "constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
- }
- },
"integ-parameter-arns": {
"id": "integ-parameter-arns",
"path": "integ-parameter-arns",
@@ -20,8 +12,8 @@
"id": "ParameterNameParameter",
"path": "integ-parameter-arns/ParameterNameParameter",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
}
},
"StringAutogen": {
@@ -247,76 +239,154 @@
"id": "StringAutogenArn",
"path": "integ-parameter-arns/StringAutogenArn",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
}
},
"StringSimpleArn": {
"id": "StringSimpleArn",
"path": "integ-parameter-arns/StringSimpleArn",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
}
},
"StringPathArn": {
"id": "StringPathArn",
"path": "integ-parameter-arns/StringPathArn",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
}
},
"ListAutogenArn": {
"id": "ListAutogenArn",
"path": "integ-parameter-arns/ListAutogenArn",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
}
},
"ListSimpleArn": {
"id": "ListSimpleArn",
"path": "integ-parameter-arns/ListSimpleArn",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
}
},
"ListPathArn": {
"id": "ListPathArn",
"path": "integ-parameter-arns/ListPathArn",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
}
},
"ParameterizedSimpleArn": {
"id": "ParameterizedSimpleArn",
"path": "integ-parameter-arns/ParameterizedSimpleArn",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
}
},
"ParameterizedNonSimpleArn": {
"id": "ParameterizedNonSimpleArn",
"path": "integ-parameter-arns/ParameterizedNonSimpleArn",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "integ-parameter-arns/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "integ-parameter-arns/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
}
}
},
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ },
+ "cdk-integ-ssm-parameter-arns": {
+ "id": "cdk-integ-ssm-parameter-arns",
+ "path": "cdk-integ-ssm-parameter-arns",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "cdk-integ-ssm-parameter-arns/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "cdk-integ-ssm-parameter-arns/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.1.264"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "cdk-integ-ssm-parameter-arns/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "cdk-integ-ssm-parameter-arns/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "cdk-integ-ssm-parameter-arns/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests.IntegTestCase",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests.IntegTest",
+ "version": "0.0.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.85"
+ "version": "10.1.264"
}
}
},
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.App",
+ "version": "0.0.0"
}
}
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.ts b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.ts
index 277e06557ba6d..6d14c352f1350 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.ts
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-arns.ts
@@ -1,5 +1,5 @@
-/* eslint-disable max-len */
import { App, CfnOutput, CfnParameter, Stack } from '@aws-cdk/core';
+import { IntegTest } from '@aws-cdk/integ-tests';
import * as ssm from '../lib';
const app = new App();
@@ -22,4 +22,6 @@ for (const p of params) {
new CfnOutput(stack, `${p.node.id}Arn`, { value: p.parameterArn });
}
-app.synth();
+new IntegTest(app, 'cdk-integ-ssm-parameter-arns', {
+ testCases: [stack],
+});
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle/index.js b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle/index.js
new file mode 100644
index 0000000000000..4264087b9aab2
--- /dev/null
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle/index.js
@@ -0,0 +1,1204 @@
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// lib/assertions/providers/lambda-handler/index.ts
+var lambda_handler_exports = {};
+__export(lambda_handler_exports, {
+ handler: () => handler,
+ isComplete: () => isComplete,
+ onTimeout: () => onTimeout
+});
+module.exports = __toCommonJS(lambda_handler_exports);
+
+// ../assertions/lib/matcher.ts
+var Matcher = class {
+ /**
+ * Check whether the provided object is a subtype of the `IMatcher`.
+ */
+ static isMatcher(x) {
+ return x && x instanceof Matcher;
+ }
+};
+var MatchResult = class {
+ constructor(target) {
+ this.failuresHere = /* @__PURE__ */ new Map();
+ this.captures = /* @__PURE__ */ new Map();
+ this.finalized = false;
+ this.innerMatchFailures = /* @__PURE__ */ new Map();
+ this._hasFailed = false;
+ this._failCount = 0;
+ this._cost = 0;
+ this.target = target;
+ }
+ /**
+ * DEPRECATED
+ * @deprecated use recordFailure()
+ */
+ push(matcher, path, message) {
+ return this.recordFailure({ matcher, path, message });
+ }
+ /**
+ * Record a new failure into this result at a specific path.
+ */
+ recordFailure(failure) {
+ const failKey = failure.path.join(".");
+ let list = this.failuresHere.get(failKey);
+ if (!list) {
+ list = [];
+ this.failuresHere.set(failKey, list);
+ }
+ this._failCount += 1;
+ this._cost += failure.cost ?? 1;
+ list.push(failure);
+ this._hasFailed = true;
+ return this;
+ }
+ /** Whether the match is a success */
+ get isSuccess() {
+ return !this._hasFailed;
+ }
+ /** Does the result contain any failures. If not, the result is a success */
+ hasFailed() {
+ return this._hasFailed;
+ }
+ /** The number of failures */
+ get failCount() {
+ return this._failCount;
+ }
+ /** The cost of the failures so far */
+ get failCost() {
+ return this._cost;
+ }
+ /**
+ * Compose the results of a previous match as a subtree.
+ * @param id the id of the parent tree.
+ */
+ compose(id, inner) {
+ if (inner.hasFailed()) {
+ this._hasFailed = true;
+ this._failCount += inner.failCount;
+ this._cost += inner._cost;
+ this.innerMatchFailures.set(id, inner);
+ }
+ inner.captures.forEach((vals, capture) => {
+ vals.forEach((value) => this.recordCapture({ capture, value }));
+ });
+ return this;
+ }
+ /**
+ * Prepare the result to be analyzed.
+ * This API *must* be called prior to analyzing these results.
+ */
+ finished() {
+ if (this.finalized) {
+ return this;
+ }
+ if (this.failCount === 0) {
+ this.captures.forEach((vals, cap) => cap._captured.push(...vals));
+ }
+ this.finalized = true;
+ return this;
+ }
+ /**
+ * Render the failed match in a presentable way
+ *
+ * Prefer using `renderMismatch` over this method. It is left for backwards
+ * compatibility for test suites that expect it, but `renderMismatch()` will
+ * produce better output.
+ */
+ toHumanStrings() {
+ const failures = new Array();
+ debugger;
+ recurse(this, []);
+ return failures.map((r) => {
+ const loc = r.path.length === 0 ? "" : ` at /${r.path.join("/")}`;
+ return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`;
+ });
+ function recurse(x, prefix) {
+ for (const fail of Array.from(x.failuresHere.values()).flat()) {
+ failures.push({
+ matcher: fail.matcher,
+ message: fail.message,
+ path: [...prefix, ...fail.path]
+ });
+ }
+ for (const [key, inner] of x.innerMatchFailures.entries()) {
+ recurse(inner, [...prefix, key]);
+ }
+ }
+ }
+ /**
+ * Do a deep render of the match result, showing the structure mismatches in context
+ */
+ renderMismatch() {
+ if (!this.hasFailed()) {
+ return "";
+ }
+ const parts = new Array();
+ const indents = new Array();
+ emitFailures(this, "");
+ recurse(this);
+ return moveMarkersToFront(parts.join("").trimEnd());
+ function emit(x) {
+ if (x === void 0) {
+ debugger;
+ }
+ parts.push(x.replace(/\n/g, `
+${indents.join("")}`));
+ }
+ function emitFailures(r, path, scrapSet) {
+ for (const fail of r.failuresHere.get(path) ?? []) {
+ emit(`!! ${fail.message}
+`);
+ }
+ scrapSet == null ? void 0 : scrapSet.delete(path);
+ }
+ function recurse(r) {
+ const remainingFailures = new Set(Array.from(r.failuresHere.keys()).filter((x) => x !== ""));
+ if (Array.isArray(r.target)) {
+ indents.push(" ");
+ emit("[\n");
+ for (const [first, i] of enumFirst(range(r.target.length))) {
+ if (!first) {
+ emit(",\n");
+ }
+ emitFailures(r, `${i}`, remainingFailures);
+ const innerMatcher = r.innerMatchFailures.get(`${i}`);
+ if (innerMatcher) {
+ emitFailures(innerMatcher, "");
+ recurseComparingValues(innerMatcher, r.target[i]);
+ } else {
+ emit(renderAbridged(r.target[i]));
+ }
+ }
+ emitRemaining();
+ indents.pop();
+ emit("\n]");
+ return;
+ }
+ if (r.target && typeof r.target === "object") {
+ indents.push(" ");
+ emit("{\n");
+ const keys = Array.from(/* @__PURE__ */ new Set([
+ ...Object.keys(r.target),
+ ...Array.from(remainingFailures)
+ ])).sort();
+ for (const [first, key] of enumFirst(keys)) {
+ if (!first) {
+ emit(",\n");
+ }
+ emitFailures(r, key, remainingFailures);
+ const innerMatcher = r.innerMatchFailures.get(key);
+ if (innerMatcher) {
+ emitFailures(innerMatcher, "");
+ emit(`${jsonify(key)}: `);
+ recurseComparingValues(innerMatcher, r.target[key]);
+ } else {
+ emit(`${jsonify(key)}: `);
+ emit(renderAbridged(r.target[key]));
+ }
+ }
+ emitRemaining();
+ indents.pop();
+ emit("\n}");
+ return;
+ }
+ emitRemaining();
+ emit(jsonify(r.target));
+ function emitRemaining() {
+ if (remainingFailures.size > 0) {
+ emit("\n");
+ }
+ for (const key of remainingFailures) {
+ emitFailures(r, key);
+ }
+ }
+ }
+ function recurseComparingValues(inner, actualValue) {
+ if (inner.target === actualValue) {
+ return recurse(inner);
+ }
+ emit(renderAbridged(actualValue));
+ emit(" <*> ");
+ recurse(inner);
+ }
+ function renderAbridged(x) {
+ if (Array.isArray(x)) {
+ switch (x.length) {
+ case 0:
+ return "[]";
+ case 1:
+ return `[ ${renderAbridged(x[0])} ]`;
+ case 2:
+ if (x.every((e) => ["number", "boolean", "string"].includes(typeof e))) {
+ return `[ ${x.map(renderAbridged).join(", ")} ]`;
+ }
+ return "[ ... ]";
+ default:
+ return "[ ... ]";
+ }
+ }
+ if (x && typeof x === "object") {
+ const keys = Object.keys(x);
+ switch (keys.length) {
+ case 0:
+ return "{}";
+ case 1:
+ return `{ ${JSON.stringify(keys[0])}: ${renderAbridged(x[keys[0]])} }`;
+ default:
+ return "{ ... }";
+ }
+ }
+ return jsonify(x);
+ }
+ function jsonify(x) {
+ return JSON.stringify(x) ?? "undefined";
+ }
+ function moveMarkersToFront(x) {
+ const re = /^(\s+)!!/gm;
+ return x.replace(re, (_, spaces) => `!!${spaces.substring(0, spaces.length - 2)}`);
+ }
+ }
+ /**
+ * Record a capture against in this match result.
+ */
+ recordCapture(options) {
+ let values = this.captures.get(options.capture);
+ if (values === void 0) {
+ values = [];
+ }
+ values.push(options.value);
+ this.captures.set(options.capture, values);
+ }
+};
+function* range(n) {
+ for (let i = 0; i < n; i++) {
+ yield i;
+ }
+}
+function* enumFirst(xs) {
+ let first = true;
+ for (const x of xs) {
+ yield [first, x];
+ first = false;
+ }
+}
+
+// ../assertions/lib/private/matchers/absent.ts
+var AbsentMatch = class extends Matcher {
+ constructor(name) {
+ super();
+ this.name = name;
+ }
+ test(actual) {
+ const result = new MatchResult(actual);
+ if (actual !== void 0) {
+ result.recordFailure({
+ matcher: this,
+ path: [],
+ message: `Received ${actual}, but key should be absent`
+ });
+ }
+ return result;
+ }
+};
+
+// ../assertions/lib/private/sorting.ts
+function sortKeyComparator(keyFn) {
+ return (a, b) => {
+ const ak = keyFn(a);
+ const bk = keyFn(b);
+ for (let i = 0; i < ak.length && i < bk.length; i++) {
+ const av = ak[i];
+ const bv = bk[i];
+ let diff = 0;
+ if (typeof av === "number" && typeof bv === "number") {
+ diff = av - bv;
+ } else if (typeof av === "string" && typeof bv === "string") {
+ diff = av.localeCompare(bv);
+ }
+ if (diff !== 0) {
+ return diff;
+ }
+ }
+ return bk.length - ak.length;
+ };
+}
+
+// ../assertions/lib/private/sparse-matrix.ts
+var SparseMatrix = class {
+ constructor() {
+ this.matrix = /* @__PURE__ */ new Map();
+ }
+ get(row, col) {
+ var _a;
+ return (_a = this.matrix.get(row)) == null ? void 0 : _a.get(col);
+ }
+ row(row) {
+ var _a;
+ return Array.from(((_a = this.matrix.get(row)) == null ? void 0 : _a.entries()) ?? []);
+ }
+ set(row, col, value) {
+ let r = this.matrix.get(row);
+ if (!r) {
+ r = /* @__PURE__ */ new Map();
+ this.matrix.set(row, r);
+ }
+ r.set(col, value);
+ }
+};
+
+// ../assertions/lib/private/type.ts
+function getType(obj) {
+ return Array.isArray(obj) ? "array" : typeof obj;
+}
+
+// ../assertions/lib/match.ts
+var Match = class {
+ /**
+ * Use this matcher in the place of a field's value, if the field must not be present.
+ */
+ static absent() {
+ return new AbsentMatch("absent");
+ }
+ /**
+ * Matches the specified pattern with the array found in the same relative path of the target.
+ * The set of elements (or matchers) must be in the same order as would be found.
+ * @param pattern the pattern to match
+ */
+ static arrayWith(pattern) {
+ return new ArrayMatch("arrayWith", pattern);
+ }
+ /**
+ * Matches the specified pattern with the array found in the same relative path of the target.
+ * The set of elements (or matchers) must match exactly and in order.
+ * @param pattern the pattern to match
+ */
+ static arrayEquals(pattern) {
+ return new ArrayMatch("arrayEquals", pattern, { subsequence: false });
+ }
+ /**
+ * Deep exact matching of the specified pattern to the target.
+ * @param pattern the pattern to match
+ */
+ static exact(pattern) {
+ return new LiteralMatch("exact", pattern, { partialObjects: false });
+ }
+ /**
+ * Matches the specified pattern to an object found in the same relative path of the target.
+ * The keys and their values (or matchers) must be present in the target but the target can be a superset.
+ * @param pattern the pattern to match
+ */
+ static objectLike(pattern) {
+ return new ObjectMatch("objectLike", pattern);
+ }
+ /**
+ * Matches the specified pattern to an object found in the same relative path of the target.
+ * The keys and their values (or matchers) must match exactly with the target.
+ * @param pattern the pattern to match
+ */
+ static objectEquals(pattern) {
+ return new ObjectMatch("objectEquals", pattern, { partial: false });
+ }
+ /**
+ * Matches any target which does NOT follow the specified pattern.
+ * @param pattern the pattern to NOT match
+ */
+ static not(pattern) {
+ return new NotMatch("not", pattern);
+ }
+ /**
+ * Matches any string-encoded JSON and applies the specified pattern after parsing it.
+ * @param pattern the pattern to match after parsing the encoded JSON.
+ */
+ static serializedJson(pattern) {
+ return new SerializedJson("serializedJson", pattern);
+ }
+ /**
+ * Matches any non-null value at the target.
+ */
+ static anyValue() {
+ return new AnyMatch("anyValue");
+ }
+ /**
+ * Matches targets according to a regular expression
+ */
+ static stringLikeRegexp(pattern) {
+ return new StringLikeRegexpMatch("stringLikeRegexp", pattern);
+ }
+};
+var LiteralMatch = class extends Matcher {
+ constructor(name, pattern, options = {}) {
+ super();
+ this.name = name;
+ this.pattern = pattern;
+ this.partialObjects = options.partialObjects ?? false;
+ if (Matcher.isMatcher(this.pattern)) {
+ throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply.");
+ }
+ }
+ test(actual) {
+ if (Array.isArray(this.pattern)) {
+ return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual);
+ }
+ if (typeof this.pattern === "object") {
+ return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual);
+ }
+ const result = new MatchResult(actual);
+ if (typeof this.pattern !== typeof actual) {
+ result.recordFailure({
+ matcher: this,
+ path: [],
+ message: `Expected type ${typeof this.pattern} but received ${getType(actual)}`
+ });
+ return result;
+ }
+ if (actual !== this.pattern) {
+ result.recordFailure({
+ matcher: this,
+ path: [],
+ message: `Expected ${this.pattern} but received ${actual}`
+ });
+ }
+ return result;
+ }
+};
+var ArrayMatch = class extends Matcher {
+ constructor(name, pattern, options = {}) {
+ super();
+ this.name = name;
+ this.pattern = pattern;
+ this.subsequence = options.subsequence ?? true;
+ this.partialObjects = options.partialObjects ?? false;
+ }
+ test(actual) {
+ if (!Array.isArray(actual)) {
+ return new MatchResult(actual).recordFailure({
+ matcher: this,
+ path: [],
+ message: `Expected type array but received ${getType(actual)}`
+ });
+ }
+ return this.subsequence ? this.testSubsequence(actual) : this.testFullArray(actual);
+ }
+ testFullArray(actual) {
+ const result = new MatchResult(actual);
+ let i = 0;
+ for (; i < this.pattern.length && i < actual.length; i++) {
+ const patternElement = this.pattern[i];
+ const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects });
+ const innerResult = matcher.test(actual[i]);
+ result.compose(`${i}`, innerResult);
+ }
+ if (i < this.pattern.length) {
+ result.recordFailure({
+ matcher: this,
+ message: `Not enough elements in array (expecting ${this.pattern.length}, got ${actual.length})`,
+ path: [`${i}`]
+ });
+ }
+ if (i < actual.length) {
+ result.recordFailure({
+ matcher: this,
+ message: `Too many elements in array (expecting ${this.pattern.length}, got ${actual.length})`,
+ path: [`${i}`]
+ });
+ }
+ return result;
+ }
+ testSubsequence(actual) {
+ const result = new MatchResult(actual);
+ let patternIdx = 0;
+ let actualIdx = 0;
+ const matches = new SparseMatrix();
+ while (patternIdx < this.pattern.length && actualIdx < actual.length) {
+ const patternElement = this.pattern[patternIdx];
+ const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects });
+ const matcherName = matcher.name;
+ if (matcherName == "absent" || matcherName == "anyValue") {
+ throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`);
+ }
+ const innerResult = matcher.test(actual[actualIdx]);
+ matches.set(patternIdx, actualIdx, innerResult);
+ actualIdx++;
+ if (innerResult.isSuccess) {
+ result.compose(`${actualIdx}`, innerResult);
+ patternIdx++;
+ }
+ }
+ if (patternIdx < this.pattern.length) {
+ for (let spi = 0; spi < patternIdx; spi++) {
+ const foundMatch = matches.row(spi).find(([, r]) => r.isSuccess);
+ if (!foundMatch) {
+ continue;
+ }
+ const [index] = foundMatch;
+ result.compose(`${index}`, new MatchResult(actual[index]).recordFailure({
+ matcher: this,
+ message: `arrayWith pattern ${spi} matched here`,
+ path: [],
+ cost: 0
+ // This is an informational message so it would be unfair to assign it cost
+ }));
+ }
+ const failedMatches = matches.row(patternIdx);
+ failedMatches.sort(sortKeyComparator(([i, r]) => [r.failCost, i]));
+ if (failedMatches.length > 0) {
+ const [index, innerResult] = failedMatches[0];
+ result.recordFailure({
+ matcher: this,
+ message: `Could not match arrayWith pattern ${patternIdx}. This is the closest match`,
+ path: [`${index}`],
+ cost: 0
+ // Informational message
+ });
+ result.compose(`${index}`, innerResult);
+ } else {
+ result.recordFailure({
+ matcher: this,
+ message: `Could not match arrayWith pattern ${patternIdx}. No more elements to try`,
+ path: [`${actual.length}`]
+ });
+ }
+ }
+ return result;
+ }
+};
+var ObjectMatch = class extends Matcher {
+ constructor(name, pattern, options = {}) {
+ super();
+ this.name = name;
+ this.pattern = pattern;
+ this.partial = options.partial ?? true;
+ }
+ test(actual) {
+ if (typeof actual !== "object" || Array.isArray(actual)) {
+ return new MatchResult(actual).recordFailure({
+ matcher: this,
+ path: [],
+ message: `Expected type object but received ${getType(actual)}`
+ });
+ }
+ const result = new MatchResult(actual);
+ if (!this.partial) {
+ for (const a of Object.keys(actual)) {
+ if (!(a in this.pattern)) {
+ result.recordFailure({
+ matcher: this,
+ path: [a],
+ message: `Unexpected key ${a}`
+ });
+ }
+ }
+ }
+ for (const [patternKey, patternVal] of Object.entries(this.pattern)) {
+ if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) {
+ result.recordFailure({
+ matcher: this,
+ path: [patternKey],
+ message: `Missing key '${patternKey}'`
+ });
+ continue;
+ }
+ const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial });
+ const inner = matcher.test(actual[patternKey]);
+ result.compose(patternKey, inner);
+ }
+ return result;
+ }
+};
+var SerializedJson = class extends Matcher {
+ constructor(name, pattern) {
+ super();
+ this.name = name;
+ this.pattern = pattern;
+ }
+ test(actual) {
+ if (getType(actual) !== "string") {
+ return new MatchResult(actual).recordFailure({
+ matcher: this,
+ path: [],
+ message: `Expected JSON as a string but found ${getType(actual)}`
+ });
+ }
+ let parsed;
+ try {
+ parsed = JSON.parse(actual);
+ } catch (err) {
+ if (err instanceof SyntaxError) {
+ return new MatchResult(actual).recordFailure({
+ matcher: this,
+ path: [],
+ message: `Invalid JSON string: ${actual}`
+ });
+ } else {
+ throw err;
+ }
+ }
+ const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern);
+ const innerResult = matcher.test(parsed);
+ if (innerResult.hasFailed()) {
+ innerResult.recordFailure({
+ matcher: this,
+ path: [],
+ message: "Encoded JSON value does not match"
+ });
+ }
+ return innerResult;
+ }
+};
+var NotMatch = class extends Matcher {
+ constructor(name, pattern) {
+ super();
+ this.name = name;
+ this.pattern = pattern;
+ }
+ test(actual) {
+ const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern);
+ const innerResult = matcher.test(actual);
+ const result = new MatchResult(actual);
+ if (innerResult.failCount === 0) {
+ result.recordFailure({
+ matcher: this,
+ path: [],
+ message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}`
+ });
+ }
+ return result;
+ }
+};
+var AnyMatch = class extends Matcher {
+ constructor(name) {
+ super();
+ this.name = name;
+ }
+ test(actual) {
+ const result = new MatchResult(actual);
+ if (actual == null) {
+ result.recordFailure({
+ matcher: this,
+ path: [],
+ message: "Expected a value but found none"
+ });
+ }
+ return result;
+ }
+};
+var StringLikeRegexpMatch = class extends Matcher {
+ constructor(name, pattern) {
+ super();
+ this.name = name;
+ this.pattern = pattern;
+ }
+ test(actual) {
+ const result = new MatchResult(actual);
+ const regex = new RegExp(this.pattern, "gm");
+ if (typeof actual !== "string") {
+ result.recordFailure({
+ matcher: this,
+ path: [],
+ message: `Expected a string, but got '${typeof actual}'`
+ });
+ }
+ if (!regex.test(actual)) {
+ result.recordFailure({
+ matcher: this,
+ path: [],
+ message: `String '${actual}' did not match pattern '${this.pattern}'`
+ });
+ }
+ return result;
+ }
+};
+
+// lib/assertions/providers/lambda-handler/base.ts
+var https = __toESM(require("https"));
+var url = __toESM(require("url"));
+var AWS = __toESM(require("aws-sdk"));
+var CustomResourceHandler = class {
+ constructor(event, context) {
+ this.event = event;
+ this.context = context;
+ this.timedOut = false;
+ this.timeout = setTimeout(async () => {
+ await this.respond({
+ status: "FAILED",
+ reason: "Lambda Function Timeout",
+ data: this.context.logStreamName
+ });
+ this.timedOut = true;
+ }, context.getRemainingTimeInMillis() - 1200);
+ this.event = event;
+ this.physicalResourceId = extractPhysicalResourceId(event);
+ }
+ /**
+ * Handles executing the custom resource event. If `stateMachineArn` is present
+ * in the props then trigger the waiter statemachine
+ */
+ async handle() {
+ try {
+ if ("stateMachineArn" in this.event.ResourceProperties) {
+ const req = {
+ stateMachineArn: this.event.ResourceProperties.stateMachineArn,
+ name: this.event.RequestId,
+ input: JSON.stringify(this.event)
+ };
+ await this.startExecution(req);
+ return;
+ } else {
+ const response = await this.processEvent(this.event.ResourceProperties);
+ return response;
+ }
+ } catch (e) {
+ console.log(e);
+ throw e;
+ } finally {
+ clearTimeout(this.timeout);
+ }
+ }
+ /**
+ * Handle async requests from the waiter state machine
+ */
+ async handleIsComplete() {
+ try {
+ const result = await this.processEvent(this.event.ResourceProperties);
+ return result;
+ } catch (e) {
+ console.log(e);
+ return;
+ } finally {
+ clearTimeout(this.timeout);
+ }
+ }
+ /**
+ * Start a step function state machine which will wait for the request
+ * to be successful.
+ */
+ async startExecution(req) {
+ try {
+ const sfn = new AWS.StepFunctions();
+ await sfn.startExecution(req).promise();
+ } finally {
+ clearTimeout(this.timeout);
+ }
+ }
+ respond(response) {
+ if (this.timedOut) {
+ return;
+ }
+ const cfResponse = {
+ Status: response.status,
+ Reason: response.reason,
+ PhysicalResourceId: this.physicalResourceId,
+ StackId: this.event.StackId,
+ RequestId: this.event.RequestId,
+ LogicalResourceId: this.event.LogicalResourceId,
+ NoEcho: false,
+ Data: response.data
+ };
+ const responseBody = JSON.stringify(cfResponse);
+ console.log("Responding to CloudFormation", responseBody);
+ const parsedUrl = url.parse(this.event.ResponseURL);
+ const requestOptions = {
+ hostname: parsedUrl.hostname,
+ path: parsedUrl.path,
+ method: "PUT",
+ headers: { "content-type": "", "content-length": responseBody.length }
+ };
+ return new Promise((resolve, reject) => {
+ try {
+ const request2 = https.request(requestOptions, resolve);
+ request2.on("error", reject);
+ request2.write(responseBody);
+ request2.end();
+ } catch (e) {
+ reject(e);
+ } finally {
+ clearTimeout(this.timeout);
+ }
+ });
+ }
+};
+function extractPhysicalResourceId(event) {
+ switch (event.RequestType) {
+ case "Create":
+ return event.LogicalResourceId;
+ case "Update":
+ case "Delete":
+ return event.PhysicalResourceId;
+ }
+}
+
+// lib/assertions/providers/lambda-handler/assertion.ts
+var AssertionHandler = class extends CustomResourceHandler {
+ async processEvent(request2) {
+ let actual = decodeCall(request2.actual);
+ const expected = decodeCall(request2.expected);
+ let result;
+ const matcher = new MatchCreator(expected).getMatcher();
+ console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`);
+ const matchResult = matcher.test(actual);
+ matchResult.finished();
+ if (matchResult.hasFailed()) {
+ result = {
+ failed: true,
+ assertion: JSON.stringify({
+ status: "fail",
+ message: matchResult.renderMismatch()
+ })
+ };
+ if (request2.failDeployment) {
+ throw new Error(result.assertion);
+ }
+ } else {
+ result = {
+ assertion: JSON.stringify({
+ status: "success"
+ })
+ };
+ }
+ return result;
+ }
+};
+var MatchCreator = class {
+ constructor(obj) {
+ this.parsedObj = {
+ matcher: obj
+ };
+ }
+ /**
+ * Return a Matcher that can be tested against the actual results.
+ * This will convert the encoded matchers into their corresponding
+ * assertions matcher.
+ *
+ * For example:
+ *
+ * ExpectedResult.objectLike({
+ * Messages: [{
+ * Body: Match.objectLike({
+ * Elements: Match.arrayWith([{ Asdf: 3 }]),
+ * Payload: Match.serializedJson({ key: 'value' }),
+ * }),
+ * }],
+ * });
+ *
+ * Will be encoded as:
+ * {
+ * $ObjectLike: {
+ * Messages: [{
+ * Body: {
+ * $ObjectLike: {
+ * Elements: {
+ * $ArrayWith: [{ Asdf: 3 }],
+ * },
+ * Payload: {
+ * $SerializedJson: { key: 'value' }
+ * }
+ * },
+ * },
+ * }],
+ * },
+ * }
+ *
+ * Which can then be parsed by this function. For each key (recursively)
+ * the parser will check if the value has one of the encoded matchers as a key
+ * and if so, it will set the value as the Matcher. So,
+ *
+ * {
+ * Body: {
+ * $ObjectLike: {
+ * Elements: {
+ * $ArrayWith: [{ Asdf: 3 }],
+ * },
+ * Payload: {
+ * $SerializedJson: { key: 'value' }
+ * }
+ * },
+ * },
+ * }
+ *
+ * Will be converted to
+ * {
+ * Body: Match.objectLike({
+ * Elements: Match.arrayWith([{ Asdf: 3 }]),
+ * Payload: Match.serializedJson({ key: 'value' }),
+ * }),
+ * }
+ */
+ getMatcher() {
+ try {
+ const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) {
+ const nested = Object.keys(v)[0];
+ switch (nested) {
+ case "$ArrayWith":
+ return Match.arrayWith(v[nested]);
+ case "$ObjectLike":
+ return Match.objectLike(v[nested]);
+ case "$StringLike":
+ return Match.stringLikeRegexp(v[nested]);
+ case "$SerializedJson":
+ return Match.serializedJson(v[nested]);
+ default:
+ return v;
+ }
+ });
+ if (Matcher.isMatcher(final.matcher)) {
+ return final.matcher;
+ }
+ return Match.exact(final.matcher);
+ } catch {
+ return Match.exact(this.parsedObj.matcher);
+ }
+ }
+};
+function decodeCall(call) {
+ if (!call) {
+ return void 0;
+ }
+ try {
+ const parsed = JSON.parse(call);
+ return parsed;
+ } catch (e) {
+ return call;
+ }
+}
+
+// lib/assertions/providers/lambda-handler/utils.ts
+function decode(object) {
+ return JSON.parse(JSON.stringify(object), (_k, v) => {
+ switch (v) {
+ case "TRUE:BOOLEAN":
+ return true;
+ case "FALSE:BOOLEAN":
+ return false;
+ default:
+ return v;
+ }
+ });
+}
+
+// lib/assertions/providers/lambda-handler/sdk.ts
+function flatten(object) {
+ return Object.assign(
+ {},
+ ...function _flatten(child, path = []) {
+ return [].concat(...Object.keys(child).map((key) => {
+ let childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key];
+ if (typeof childKey === "string") {
+ childKey = isJsonString(childKey);
+ }
+ return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey };
+ }));
+ }(object)
+ );
+}
+var AwsApiCallHandler = class extends CustomResourceHandler {
+ async processEvent(request2) {
+ const AWS2 = require("aws-sdk");
+ console.log(`AWS SDK VERSION: ${AWS2.VERSION}`);
+ if (!Object.prototype.hasOwnProperty.call(AWS2, request2.service)) {
+ throw Error(`Service ${request2.service} does not exist in AWS SDK version ${AWS2.VERSION}.`);
+ }
+ const service = new AWS2[request2.service]();
+ const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise();
+ console.log(`SDK response received ${JSON.stringify(response)}`);
+ delete response.ResponseMetadata;
+ const respond = {
+ apiCallResponse: response
+ };
+ const flatData = {
+ ...flatten(respond)
+ };
+ let resp = respond;
+ if (request2.outputPaths) {
+ resp = filterKeys(flatData, request2.outputPaths);
+ } else if (request2.flattenResponse === "true") {
+ resp = flatData;
+ }
+ console.log(`Returning result ${JSON.stringify(resp)}`);
+ return resp;
+ }
+};
+function filterKeys(object, searchStrings) {
+ return Object.entries(object).reduce((filteredObject, [key, value]) => {
+ for (const searchString of searchStrings) {
+ if (key.startsWith(`apiCallResponse.${searchString}`)) {
+ filteredObject[key] = value;
+ }
+ }
+ return filteredObject;
+ }, {});
+}
+function isJsonString(value) {
+ try {
+ return JSON.parse(value);
+ } catch {
+ return value;
+ }
+}
+
+// lib/assertions/providers/lambda-handler/types.ts
+var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals";
+var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall";
+
+// lib/assertions/providers/lambda-handler/index.ts
+async function handler(event, context) {
+ console.log(`Event: ${JSON.stringify({ ...event, ResponseURL: "..." })}`);
+ const provider = createResourceHandler(event, context);
+ try {
+ if (event.RequestType === "Delete") {
+ await provider.respond({
+ status: "SUCCESS",
+ reason: "OK"
+ });
+ return;
+ }
+ const result = await provider.handle();
+ if ("stateMachineArn" in event.ResourceProperties) {
+ console.info('Found "stateMachineArn", waiter statemachine started');
+ return;
+ } else if ("expected" in event.ResourceProperties) {
+ console.info('Found "expected", testing assertions');
+ const actualPath = event.ResourceProperties.actualPath;
+ const actual = actualPath ? result[`apiCallResponse.${actualPath}`] : result.apiCallResponse;
+ const assertion = new AssertionHandler({
+ ...event,
+ ResourceProperties: {
+ ServiceToken: event.ServiceToken,
+ actual,
+ expected: event.ResourceProperties.expected
+ }
+ }, context);
+ try {
+ const assertionResult = await assertion.handle();
+ await provider.respond({
+ status: "SUCCESS",
+ reason: "OK",
+ // return both the result of the API call _and_ the assertion results
+ data: {
+ ...assertionResult,
+ ...result
+ }
+ });
+ return;
+ } catch (e) {
+ await provider.respond({
+ status: "FAILED",
+ reason: e.message ?? "Internal Error"
+ });
+ return;
+ }
+ }
+ await provider.respond({
+ status: "SUCCESS",
+ reason: "OK",
+ data: result
+ });
+ } catch (e) {
+ await provider.respond({
+ status: "FAILED",
+ reason: e.message ?? "Internal Error"
+ });
+ return;
+ }
+ return;
+}
+async function onTimeout(timeoutEvent) {
+ const isCompleteRequest = JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage);
+ const provider = createResourceHandler(isCompleteRequest, standardContext);
+ await provider.respond({
+ status: "FAILED",
+ reason: "Operation timed out: " + JSON.stringify(isCompleteRequest)
+ });
+}
+async function isComplete(event, context) {
+ console.log(`Event: ${JSON.stringify({ ...event, ResponseURL: "..." })}`);
+ const provider = createResourceHandler(event, context);
+ try {
+ const result = await provider.handleIsComplete();
+ const actualPath = event.ResourceProperties.actualPath;
+ if (result) {
+ const actual = actualPath ? result[`apiCallResponse.${actualPath}`] : result.apiCallResponse;
+ if ("expected" in event.ResourceProperties) {
+ const assertion = new AssertionHandler({
+ ...event,
+ ResourceProperties: {
+ ServiceToken: event.ServiceToken,
+ actual,
+ expected: event.ResourceProperties.expected
+ }
+ }, context);
+ const assertionResult = await assertion.handleIsComplete();
+ if (!(assertionResult == null ? void 0 : assertionResult.failed)) {
+ await provider.respond({
+ status: "SUCCESS",
+ reason: "OK",
+ data: {
+ ...assertionResult,
+ ...result
+ }
+ });
+ return;
+ } else {
+ console.log(`Assertion Failed: ${JSON.stringify(assertionResult)}`);
+ throw new Error(JSON.stringify(event));
+ }
+ }
+ await provider.respond({
+ status: "SUCCESS",
+ reason: "OK",
+ data: result
+ });
+ } else {
+ console.log("No result");
+ throw new Error(JSON.stringify(event));
+ }
+ return;
+ } catch (e) {
+ console.log(e);
+ throw new Error(JSON.stringify(event));
+ }
+}
+function createResourceHandler(event, context) {
+ if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) {
+ return new AwsApiCallHandler(event, context);
+ } else if (event.ResourceType.startsWith(ASSERT_RESOURCE_TYPE)) {
+ return new AssertionHandler(event, context);
+ } else {
+ throw new Error(`Unsupported resource type "${event.ResourceType}`);
+ }
+}
+var standardContext = {
+ getRemainingTimeInMillis: () => 9e4
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ handler,
+ isComplete,
+ onTimeout
+});
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/cdk.out b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/cdk.out
index 8ecc185e9dbee..b72fef144f05c 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/cdk.out
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/cdk.out
@@ -1 +1 @@
-{"version":"21.0.0"}
\ No newline at end of file
+{"version":"30.1.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/integ.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/integ.json
index 37dd1517a09fc..4516309b36851 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/integ.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/integ.json
@@ -1,5 +1,5 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"testCases": {
"SSMParameterStoreTest/DefaultTest": {
"stacks": [
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/manifest.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/manifest.json
index b3dea0254e5ea..25ba4d8cba2d5 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/manifest.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/manifest.json
@@ -1,12 +1,6 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"artifacts": {
- "Tree": {
- "type": "cdk:tree",
- "properties": {
- "file": "tree.json"
- }
- },
"sspms-creating.assets": {
"type": "cdk:asset-manifest",
"properties": {
@@ -23,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/774681e523ca39cdb798d74ea486ac7874030c04a36debc6a623f24afe196859.json",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e66d9c468deb11a6edb4850fee05e856d6fef6c50e5ba763bdfbc3bb6d21cd72.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
@@ -160,7 +154,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ed82f3ce48345002448971161c8bd7594b2f548f56641b70afb2f4688e4c0aef.json",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1201c40c53533a2b464021ee0d0d5d7a5bbfa71e6a9498a3e90fe8e46745a10.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
@@ -209,6 +203,12 @@
]
},
"displayName": "sspms-cleanup"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
}
}
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-cleanup.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-cleanup.assets.json
index dd2d2b82e2cc2..948760a544bd0 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-cleanup.assets.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-cleanup.assets.json
@@ -1,20 +1,20 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"files": {
- "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": {
+ "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28": {
"source": {
- "path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle",
+ "path": "asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip",
+ "objectKey": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
- "ed82f3ce48345002448971161c8bd7594b2f548f56641b70afb2f4688e4c0aef": {
+ "c1201c40c53533a2b464021ee0d0d5d7a5bbfa71e6a9498a3e90fe8e46745a10": {
"source": {
"path": "sspms-cleanup.template.json",
"packaging": "file"
@@ -22,7 +22,7 @@
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "ed82f3ce48345002448971161c8bd7594b2f548f56641b70afb2f4688e4c0aef.json",
+ "objectKey": "c1201c40c53533a2b464021ee0d0d5d7a5bbfa71e6a9498a3e90fe8e46745a10.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-cleanup.template.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-cleanup.template.json
index a2af3eeea9e3d..73cdbb183a469 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-cleanup.template.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-cleanup.template.json
@@ -15,7 +15,7 @@
"Name": "/My/Secret/Parameter"
},
"flattenResponse": "false",
- "salt": "1666616854742"
+ "salt": "1677705111898"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
@@ -69,7 +69,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
- "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip"
+ "S3Key": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip"
},
"Timeout": 120,
"Handler": "index.handler",
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-creating.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-creating.assets.json
index 58c023eab8e3b..31639a1b4f194 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-creating.assets.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-creating.assets.json
@@ -1,20 +1,20 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"files": {
- "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": {
+ "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28": {
"source": {
- "path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle",
+ "path": "asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip",
+ "objectKey": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
- "774681e523ca39cdb798d74ea486ac7874030c04a36debc6a623f24afe196859": {
+ "e66d9c468deb11a6edb4850fee05e856d6fef6c50e5ba763bdfbc3bb6d21cd72": {
"source": {
"path": "sspms-creating.template.json",
"packaging": "file"
@@ -22,7 +22,7 @@
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
- "objectKey": "774681e523ca39cdb798d74ea486ac7874030c04a36debc6a623f24afe196859.json",
+ "objectKey": "e66d9c468deb11a6edb4850fee05e856d6fef6c50e5ba763bdfbc3bb6d21cd72.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-creating.template.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-creating.template.json
index 5300480f9984b..0529d02721822 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-creating.template.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-creating.template.json
@@ -25,7 +25,7 @@
"Value": "Abc123"
},
"flattenResponse": "false",
- "salt": "1666616854737"
+ "salt": "1677705111893"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
@@ -79,7 +79,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
- "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip"
+ "S3Key": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip"
},
"Timeout": 120,
"Handler": "index.handler",
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-using.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-using.assets.json
index 5b3b30e94ddf0..b4b1027289319 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-using.assets.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/sspms-using.assets.json
@@ -1,5 +1,5 @@
{
- "version": "21.0.0",
+ "version": "30.1.0",
"files": {
"f6e392d82be8514b35d4085f6ff4e3df808815b1cf4cc7a119cb67ace46e03b9": {
"source": {
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/tree.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/tree.json
index 89b9dbbcb8d05..f6ad39fb45a21 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/tree.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.js.snapshot/tree.json
@@ -4,14 +4,6 @@
"id": "App",
"path": "",
"children": {
- "Tree": {
- "id": "Tree",
- "path": "Tree",
- "constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.133"
- }
- },
"sspms-creating": {
"id": "sspms-creating",
"path": "sspms-creating",
@@ -55,7 +47,7 @@
"path": "sspms-creating/SecureParam/SdkProvider/AssertionsProvider",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.133"
+ "version": "10.1.264"
}
}
},
@@ -119,7 +111,23 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.133"
+ "version": "10.1.264"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sspms-creating/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sspms-creating/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
}
}
},
@@ -195,6 +203,22 @@
"fqn": "@aws-cdk/core.CfnResource",
"version": "0.0.0"
}
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sspms-using/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sspms-using/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
}
},
"constructInfo": {
@@ -219,7 +243,7 @@
"path": "sspms-cleanup/AwsApiCallSSMdeleteParameter/SdkProvider/AssertionsProvider",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.133"
+ "version": "10.1.264"
}
}
},
@@ -283,7 +307,23 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.133"
+ "version": "10.1.264"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sspms-cleanup/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sspms-cleanup/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
}
}
},
@@ -305,7 +345,7 @@
"path": "SSMParameterStoreTest/DefaultTest/Default",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.133"
+ "version": "10.1.264"
}
}
},
@@ -319,6 +359,14 @@
"fqn": "@aws-cdk/integ-tests.IntegTest",
"version": "0.0.0"
}
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.1.264"
+ }
}
},
"constructInfo": {
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.ts b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.ts
index 7386e9ff03fef..a345c3c761b01 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.ts
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter-store-string.ts
@@ -98,5 +98,3 @@ const integTest = new integ.IntegTest(app, 'SSMParameterStoreTest', {
integTest.assertions.awsApiCall('SSM', 'deleteParameter', {
Name: SECURE_PARAM_NAME,
});
-
-app.synth();
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/SSM-Parameter.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/SSM-Parameter.assets.json
similarity index 96%
rename from packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/SSM-Parameter.assets.json
rename to packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/SSM-Parameter.assets.json
index 5e8efc26c5d8e..5084653c99fbd 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/SSM-Parameter.assets.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/SSM-Parameter.assets.json
@@ -1,5 +1,5 @@
{
- "version": "20.0.0",
+ "version": "30.1.0",
"files": {
"22116adb80d8a58634b45b5916a99c2ef23e56479f377bb32f8b4f18dbae3aad": {
"source": {
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/SSM-Parameter.template.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/SSM-Parameter.template.json
similarity index 100%
rename from packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/SSM-Parameter.template.json
rename to packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/SSM-Parameter.template.json
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/cdk.out b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/cdk.out
new file mode 100644
index 0000000000000..b72fef144f05c
--- /dev/null
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"30.1.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/cdkintegssmparameterDefaultTestDeployAssert8D247A87.assets.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/cdkintegssmparameterDefaultTestDeployAssert8D247A87.assets.json
new file mode 100644
index 0000000000000..f35a9d3747dc7
--- /dev/null
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/cdkintegssmparameterDefaultTestDeployAssert8D247A87.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "30.1.0",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "cdkintegssmparameterDefaultTestDeployAssert8D247A87.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
+ }
+ }
+ }
+ },
+ "dockerImages": {}
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/cdkintegssmparameterDefaultTestDeployAssert8D247A87.template.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/cdkintegssmparameterDefaultTestDeployAssert8D247A87.template.json
new file mode 100644
index 0000000000000..ad9d0fb73d1dd
--- /dev/null
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/cdkintegssmparameterDefaultTestDeployAssert8D247A87.template.json
@@ -0,0 +1,36 @@
+{
+ "Parameters": {
+ "BootstrapVersion": {
+ "Type": "AWS::SSM::Parameter::Value",
+ "Default": "/cdk-bootstrap/hnb659fds/version",
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
+ }
+ },
+ "Rules": {
+ "CheckBootstrapVersion": {
+ "Assertions": [
+ {
+ "Assert": {
+ "Fn::Not": [
+ {
+ "Fn::Contains": [
+ [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5"
+ ],
+ {
+ "Ref": "BootstrapVersion"
+ }
+ ]
+ }
+ ]
+ },
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/integ.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/integ.json
new file mode 100644
index 0000000000000..f9dbe6b59729b
--- /dev/null
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "30.1.0",
+ "testCases": {
+ "cdk-integ-ssm-parameter/DefaultTest": {
+ "stacks": [
+ "SSM-Parameter"
+ ],
+ "assertionStack": "cdk-integ-ssm-parameter/DefaultTest/DeployAssert",
+ "assertionStackName": "cdkintegssmparameterDefaultTestDeployAssert8D247A87"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/manifest.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/manifest.json
similarity index 57%
rename from packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/manifest.json
rename to packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/manifest.json
index 0f8354281923f..31a6b259ead0c 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/manifest.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/manifest.json
@@ -1,12 +1,6 @@
{
- "version": "20.0.0",
+ "version": "30.1.0",
"artifacts": {
- "Tree": {
- "type": "cdk:tree",
- "properties": {
- "file": "tree.json"
- }
- },
"SSM-Parameter.assets": {
"type": "cdk:asset-manifest",
"properties": {
@@ -89,6 +83,59 @@
]
},
"displayName": "SSM-Parameter"
+ },
+ "cdkintegssmparameterDefaultTestDeployAssert8D247A87.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "cdkintegssmparameterDefaultTestDeployAssert8D247A87.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "cdkintegssmparameterDefaultTestDeployAssert8D247A87": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "cdkintegssmparameterDefaultTestDeployAssert8D247A87.template.json",
+ "validateOnSynth": false,
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "cdkintegssmparameterDefaultTestDeployAssert8D247A87.assets"
+ ],
+ "lookupRole": {
+ "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
+ "requiresBootstrapStackVersion": 8,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "dependencies": [
+ "cdkintegssmparameterDefaultTestDeployAssert8D247A87.assets"
+ ],
+ "metadata": {
+ "/cdk-integ-ssm-parameter/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/cdk-integ-ssm-parameter/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "cdk-integ-ssm-parameter/DefaultTest/DeployAssert"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
}
}
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/tree.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/tree.json
similarity index 69%
rename from packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/tree.json
rename to packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/tree.json
index 4ccbfdde520d6..2b95bc53da505 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/tree.json
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter.js.snapshot/tree.json
@@ -4,14 +4,6 @@
"id": "App",
"path": "",
"children": {
- "Tree": {
- "id": "Tree",
- "path": "Tree",
- "constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
- }
- },
"SSM-Parameter": {
"id": "SSM-Parameter",
"path": "SSM-Parameter",
@@ -20,6 +12,14 @@
"id": "UserRole",
"path": "SSM-Parameter/UserRole",
"children": {
+ "ImportUserRole": {
+ "id": "ImportUserRole",
+ "path": "SSM-Parameter/UserRole/ImportUserRole",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Resource",
+ "version": "0.0.0"
+ }
+ },
"Resource": {
"id": "Resource",
"path": "SSM-Parameter/UserRole/Resource",
@@ -186,28 +186,106 @@
"id": "StringListOutput",
"path": "SSM-Parameter/StringListOutput",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
}
},
"ParamArn": {
"id": "ParamArn",
"path": "SSM-Parameter/ParamArn",
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.CfnOutput",
+ "version": "0.0.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "SSM-Parameter/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "SSM-Parameter/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ },
+ "cdk-integ-ssm-parameter": {
+ "id": "cdk-integ-ssm-parameter",
+ "path": "cdk-integ-ssm-parameter",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "cdk-integ-ssm-parameter/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "cdk-integ-ssm-parameter/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.1.264"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "cdk-integ-ssm-parameter/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "cdk-integ-ssm-parameter/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnParameter",
+ "version": "0.0.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "cdk-integ-ssm-parameter/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.CfnRule",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/core.Stack",
+ "version": "0.0.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests.IntegTestCase",
+ "version": "0.0.0"
}
}
},
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests.IntegTest",
+ "version": "0.0.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
- "version": "10.1.85"
+ "version": "10.1.264"
}
}
},
"constructInfo": {
- "fqn": "constructs.Construct",
- "version": "10.1.85"
+ "fqn": "@aws-cdk/core.App",
+ "version": "0.0.0"
}
}
}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/cdk.out b/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/cdk.out
deleted file mode 100644
index 588d7b269d34f..0000000000000
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/cdk.out
+++ /dev/null
@@ -1 +0,0 @@
-{"version":"20.0.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/integ.json b/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/integ.json
deleted file mode 100644
index 8a8bfa258d831..0000000000000
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.js.snapshot/integ.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "version": "20.0.0",
- "testCases": {
- "integ.parameter.lit": {
- "stacks": [
- "SSM-Parameter"
- ],
- "diffAssets": false,
- "stackUpdateWorkflow": true
- }
- },
- "synthContext": {},
- "enableLookups": false
-}
\ No newline at end of file
diff --git a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.ts b/packages/@aws-cdk/aws-ssm/test/integ.parameter.ts
similarity index 67%
rename from packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.ts
rename to packages/@aws-cdk/aws-ssm/test/integ.parameter.ts
index 211d7b8e77daf..db8315792696b 100644
--- a/packages/@aws-cdk/aws-ssm/test/integ.parameter.lit.ts
+++ b/packages/@aws-cdk/aws-ssm/test/integ.parameter.ts
@@ -1,5 +1,6 @@
import * as iam from '@aws-cdk/aws-iam';
import * as cdk from '@aws-cdk/core';
+import { IntegTest } from '@aws-cdk/integ-tests';
import * as ssm from '../lib';
const app = new cdk.App();
@@ -9,26 +10,15 @@ const role = new iam.Role(stack, 'UserRole', {
assumedBy: new iam.AccountRootPrincipal(),
});
-/// !show
-// Create a new SSM Parameter holding a String
const param = new ssm.StringParameter(stack, 'StringParameter', {
- // description: 'Some user-friendly description',
- // name: 'ParameterName',
stringValue: 'Initial parameter value',
- // allowedPattern: '.*',
});
-// Grant read access to some Role
param.grantRead(role);
-// Create a new SSM Parameter holding a StringList
const listParameter = new ssm.StringListParameter(stack, 'StringListParameter', {
- // description: 'Some user-friendly description',
- // name: 'ParameterName',
stringListValue: ['Initial parameter value A', 'Initial parameter value B'],
- // allowedPattern: '.*',
});
-/// !hide
new cdk.CfnOutput(stack, 'StringListOutput', {
value: cdk.Fn.join('+', listParameter.stringListValue),
@@ -38,4 +28,6 @@ new cdk.CfnOutput(stack, 'ParamArn', {
value: param.parameterArn,
});
-app.synth();
+new IntegTest(app, 'cdk-integ-ssm-parameter', {
+ testCases: [stack],
+});
diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.ts
index c2d1d50ff52a1..5e8d36fea46dd 100644
--- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.ts
+++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.ts
@@ -6,8 +6,7 @@ import * as sfn from '@aws-cdk/aws-stepfunctions';
import * as cdk from '@aws-cdk/core';
import { Aws } from '@aws-cdk/core';
import * as integ from '@aws-cdk/integ-tests';
-import { EmrContainersStartJobRun } from '../../lib';
-import { ReleaseLabel, VirtualClusterInput } from '../../lib/emrcontainers/start-job-run';
+import { EmrContainersStartJobRun, ReleaseLabel, VirtualClusterInput } from '../../lib';
/**
* Stack verification steps:
diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.ts
index c0452c792b799..2d1bceabc6507 100644
--- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.ts
+++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.ts
@@ -2,8 +2,7 @@ import { Key } from '@aws-cdk/aws-kms';
import { Bucket, BucketEncryption } from '@aws-cdk/aws-s3';
import { StateMachine } from '@aws-cdk/aws-stepfunctions';
import { App, CfnOutput, RemovalPolicy, Stack } from '@aws-cdk/core';
-import { S3Location } from '../../lib';
-import { SageMakerCreateTrainingJob } from '../../lib/sagemaker/create-training-job';
+import { S3Location, SageMakerCreateTrainingJob } from '../../lib';
/*
* Creates a state machine with a task state to create a training job in AWS SageMaker
diff --git a/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json b/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json
index 68943a9a3498b..3043bc2589cdd 100644
--- a/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json
+++ b/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json
@@ -7701,9 +7701,9 @@
"Arn": "The Amazon Resource Number (ARN) of the activated extension, in this account and Region.",
"Ref": "`Ref` returns the Amazon Resource Number (ARN) of the activated extension, in this account and Region.\n\n`{ \"Ref\": \"arn:aws:cloudformation:us-east-1:123456789013:type/resource/My-Example\" }`"
},
- "description": "Activates a public third-party extension, making it available for use in stack templates. For more information, see [Using public extensions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html) in the *AWS CloudFormation User Guide* .\n\nOnce you have activated a public third-party extension in your account and region, use [SetTypeConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html) to specify configuration properties for the extension. For more information, see [Configuring extensions at the account level](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration) in the *CloudFormation User Guide* .",
+ "description": "Activates a public third-party extension, making it available for use in stack templates. For more information, see [Using public extensions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html) in the *AWS CloudFormation User Guide* .\n\nOnce you have activated a public third-party extension in your account and Region, use [SetTypeConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html) to specify configuration properties for the extension. For more information, see [Configuring extensions at the account level](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-register.html#registry-set-configuration) in the *CloudFormation User Guide* .",
"properties": {
- "AutoUpdate": "Whether to automatically update the extension in this account and region when a new *minor* version is published by the extension publisher. Major versions released by the publisher must be manually updated.\n\nThe default is `true` .",
+ "AutoUpdate": "Whether to automatically update the extension in this account and Region when a new *minor* version is published by the extension publisher. Major versions released by the publisher must be manually updated.\n\nThe default is `true` .",
"ExecutionRoleArn": "The name of the IAM execution role to use to activate the extension.",
"LoggingConfig": "Specifies logging configuration information for an extension.",
"MajorVersion": "The major version of this extension you want to activate, if multiple major versions are available. The default is the latest major version. CloudFormation uses the latest available *minor* version of the major version selected.\n\nYou can specify `MajorVersion` or `VersionBump` , but not both.",
@@ -7711,7 +7711,7 @@
"PublisherId": "The ID of the extension publisher.\n\nConditional: You must specify `PublicTypeArn` , or `TypeName` , `Type` , and `PublisherId` .",
"Type": "The extension type.\n\nConditional: You must specify `PublicTypeArn` , or `TypeName` , `Type` , and `PublisherId` .",
"TypeName": "The name of the extension.\n\nConditional: You must specify `PublicTypeArn` , or `TypeName` , `Type` , and `PublisherId` .",
- "TypeNameAlias": "An alias to assign to the public extension, in this account and region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.\n\nAn extension alias must be unique within a given account and region. You can activate the same public resource multiple times in the same account and region, using different type name aliases.",
+ "TypeNameAlias": "An alias to assign to the public extension, in this account and Region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.\n\nAn extension alias must be unique within a given account and Region. You can activate the same public resource multiple times in the same account and Region, using different type name aliases.",
"VersionBump": "Manually updates a previously-activated type to a new major or minor version, if available. You can also use this parameter to update the value of `AutoUpdate` .\n\n- `MAJOR` : CloudFormation updates the extension to the newest major version, if one is available.\n- `MINOR` : CloudFormation updates the extension to the newest minor version, if one is available."
}
},
@@ -14647,7 +14647,7 @@
"SourceDestCheck": "Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is `true` , source/destination checks are enabled; otherwise, they are disabled. The default value is `true` . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.",
"SsmAssociations": "The SSM [document](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html) and parameter values in AWS Systems Manager to associate with this instance. To use this property, you must specify an IAM instance profile role for the instance. For more information, see [Create an IAM instance profile for Systems Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-configuring-access-role.html) in the *AWS Systems Manager User Guide* .\n\n> You can currently associate only one document with an instance.",
"SubnetId": "[EC2-VPC] The ID of the subnet to launch the instance into.\n\nIf you specify a network interface, you must specify any subnets as part of the network interface.",
- "Tags": "The tags to add to the instance. These tags are not applied to the EBS volumes, such as the root volume.",
+ "Tags": "The tags to add to the instance. These tags are not applied to the EBS volumes, such as the root volume, unless [PropagateTagsToVolumeOnCreation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-propagatetagstovolumeoncreation) is `true` .",
"Tenancy": "The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of `dedicated` runs on single-tenant hardware.",
"UserData": "The user data script to make available to the instance. User data is limited to 16 KB. You must provide base64-encoded text. For more information, see [Fn::Base64](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-base64.html) .\n\nUser data runs only at instance launch. For more information, see [Run commands on your Linux instance at launch](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) and [Run commands on your Windows instance at launch](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html) .",
"Volumes": "The volumes to attach to the instance."
@@ -15812,7 +15812,7 @@
},
"description": "Specifies a security group. To create a security group, use the [VpcId](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2-securitygroup-vpcid) property to specify the VPC for which to create the security group.\n\nThis type supports updates. For more information about updating stacks, see [AWS CloudFormation Stacks Updates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html) .\n\n> To cross-reference two security groups in the ingress and egress rules of those security groups, use the [AWS::EC2::SecurityGroupEgress](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-security-group-egress.html) and [AWS::EC2::SecurityGroupIngress](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-security-group-ingress.html) resources to define your rules. Do not use the embedded ingress and egress rules in the `AWS::EC2::SecurityGroup` . Doing so creates a circular dependency, which AWS CloudFormation doesn't allow.",
"properties": {
- "GroupDescription": "A description for the security group. This is informational only.\n\nConstraints: Up to 255 characters in length\n\nConstraints for EC2-Classic: ASCII characters\n\nConstraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*",
+ "GroupDescription": "A description for the security group.\n\nConstraints: Up to 255 characters in length\n\nConstraints for EC2-Classic: ASCII characters\n\nConstraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*",
"GroupName": "The name of the security group.\n\nConstraints: Up to 255 characters in length. Cannot start with `sg-` .\n\nConstraints for EC2-Classic: ASCII characters\n\nConstraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*",
"SecurityGroupEgress": "[VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.",
"SecurityGroupIngress": "The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.",
@@ -16674,7 +16674,7 @@
"AWS::EC2::VPCEndpointService": {
"attributes": {
"Ref": "`Ref` returns the ID of the VPC endpoint service configuration.",
- "ServiceId": ""
+ "ServiceId": "The ID of the endpoint service."
},
"description": "Creates a VPC endpoint service configuration to which service consumers ( AWS accounts, users, and IAM roles) can connect.\n\nTo create an endpoint service configuration, you must first create one of the following for your service:\n\n- A [Network Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) . Service consumers connect to your service using an interface endpoint.\n- A [Gateway Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/introduction.html) . Service consumers connect to your service using a Gateway Load Balancer endpoint.\n\nFor more information, see the [AWS PrivateLink User Guide](https://docs.aws.amazon.com/vpc/latest/privatelink/) .",
"properties": {
@@ -30782,7 +30782,7 @@
"Id": "The event source mapping's ID.",
"Ref": "`Ref` returns the mapping's ID."
},
- "description": "The `AWS::Lambda::EventSourceMapping` resource creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.\n\nFor details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source.\n\n- [Configuring a Dynamo DB stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping)\n- [Configuring a Kinesis stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping)\n- [Configuring an SQS queue as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource)\n- [Configuring an MQ broker as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping)\n- [Configuring MSK as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html)\n- [Configuring Self-Managed Apache Kafka as an event source](https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html)",
+ "description": "The `AWS::Lambda::EventSourceMapping` resource creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.\n\nFor details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source.\n\n- [Configuring a Dynamo DB stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping)\n- [Configuring a Kinesis stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping)\n- [Configuring an SQS queue as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource)\n- [Configuring an MQ broker as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping)\n- [Configuring MSK as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html)\n- [Configuring Self-Managed Apache Kafka as an event source](https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html)\n- [Configuring Amazon DocumentDB as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html)",
"properties": {
"AmazonManagedKafkaEventSourceConfig": "Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.",
"BatchSize": "The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).\n\n- *Amazon Kinesis* \u2013 Default 100. Max 10,000.\n- *Amazon DynamoDB Streams* \u2013 Default 100. Max 10,000.\n- *Amazon Simple Queue Service* \u2013 Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.\n- *Amazon Managed Streaming for Apache Kafka* \u2013 Default 100. Max 10,000.\n- *Self-managed Apache Kafka* \u2013 Default 100. Max 10,000.\n- *Amazon MQ (ActiveMQ and RabbitMQ)* \u2013 Default 100. Max 10,000.\n- *DocumentDB* \u2013 Default 100. Max 10,000.",
@@ -30794,7 +30794,7 @@
"FilterCriteria": "An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html) .",
"FunctionName": "The name of the Lambda function.\n\n**Name formats** - *Function name* \u2013 `MyFunction` .\n- *Function ARN* \u2013 `arn:aws:lambda:us-west-2:123456789012:function:MyFunction` .\n- *Version or Alias ARN* \u2013 `arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD` .\n- *Partial ARN* \u2013 `123456789012:function:MyFunction` .\n\nThe length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.",
"FunctionResponseTypes": "(Streams and SQS) A list of current response type enums applied to the event source mapping.\n\nValid Values: `ReportBatchItemFailures`",
- "MaximumBatchingWindowInSeconds": "The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.\n\n*Default ( Kinesis , DynamoDB , Amazon SQS event sources)* : 0\n\n*Default ( Amazon MSK , Kafka, Amazon MQ event sources)* : 500 ms\n\n*Related setting:* When you set `BatchSize` to a value greater than 10, you must set `MaximumBatchingWindowInSeconds` to at least 1.",
+ "MaximumBatchingWindowInSeconds": "The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.\n\n*Default ( Kinesis , DynamoDB , Amazon SQS event sources)* : 0\n\n*Default ( Amazon MSK , Kafka, Amazon MQ , Amazon DocumentDB event sources)* : 500 ms\n\n*Related setting:* When you set `BatchSize` to a value greater than 10, you must set `MaximumBatchingWindowInSeconds` to at least 1.",
"MaximumRecordAgeInSeconds": "(Streams only) Discard records older than the specified age. The default value is -1,\nwhich sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.",
"MaximumRetryAttempts": "(Streams only) Discard records after the specified number of retries. The default value is -1,\nwhich sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.",
"ParallelizationFactor": "(Streams only) The number of batches to process concurrently from each shard. The default value is 1.",
@@ -37067,7 +37067,7 @@
"PeeringId": "The ID of the transit gateway peering.",
"ProposedSegmentChange": "This property is read-only. Values can't be assigned to it.",
"Tags": "The list of key-value pairs associated with the transit gateway route table attachment.",
- "TransitGatewayRouteTableArn": "The ARN of the transit gateway attachment route table, using the format: `\"TransitGatewayRouteTableArn\": \"arn:aws:ec2:us-west-2: *AccountId* :transit-gateway-route-table/ *tgw-rtb-xxxxxxxxxxx* \"` . For example, `\"TransitGatewayRouteTableArn\": \"arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456\"` ."
+ "TransitGatewayRouteTableArn": "The ARN of the transit gateway attachment route table. For example, `\"TransitGatewayRouteTableArn\": \"arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456\"` ."
}
},
"AWS::NetworkManager::TransitGatewayRouteTableAttachment.ProposedSegmentChange": {
@@ -39561,7 +39561,7 @@
},
"AWS::Pipes::Pipe.FilterCriteria": {
"attributes": {},
- "description": "The collection of event patterns used to filter events. For more information, see [Events and Event Patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) in the *Amazon EventBridge User Guide* .",
+ "description": "The collection of event patterns used to filter events.\n\nTo remove a filter, specify a `FilterCriteria` object with an empty array of `Filter` objects.\n\nFor more information, see [Events and Event Patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) in the *Amazon EventBridge User Guide* .",
"properties": {
"Filters": "The event patterns."
}
@@ -39602,7 +39602,7 @@
"description": "The parameters required to set up enrichment on your pipe.",
"properties": {
"HttpParameters": "Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge ApiDestination.\n\nIf you specify an API Gateway REST API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.",
- "InputTemplate": "Valid JSON text passed to the enrichment. In this case, nothing from the event itself is passed to the enrichment. For more information, see [The JavaScript Object Notation (JSON) Data Interchange Format](https://docs.aws.amazon.com/http://www.rfc-editor.org/rfc/rfc7159.txt) ."
+ "InputTemplate": "Valid JSON text passed to the enrichment. In this case, nothing from the event itself is passed to the enrichment. For more information, see [The JavaScript Object Notation (JSON) Data Interchange Format](https://docs.aws.amazon.com/http://www.rfc-editor.org/rfc/rfc7159.txt) .\n\nTo remove an input template, specify an empty string."
}
},
"AWS::Pipes::Pipe.PipeSourceActiveMQBrokerParameters": {
@@ -39662,7 +39662,7 @@
"properties": {
"ActiveMQBrokerParameters": "The parameters for using an Active MQ broker as a source.",
"DynamoDBStreamParameters": "The parameters for using a DynamoDB stream as a source.",
- "FilterCriteria": "The collection of event patterns used to filter events. For more information, see [Events and Event Patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) in the *Amazon EventBridge User Guide* .",
+ "FilterCriteria": "The collection of event patterns used to filter events.\n\nTo remove a filter, specify a `FilterCriteria` object with an empty array of `Filter` objects.\n\nFor more information, see [Events and Event Patterns](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) in the *Amazon EventBridge User Guide* .",
"KinesisStreamParameters": "The parameters for using a Kinesis stream as a source.",
"ManagedStreamingKafkaParameters": "The parameters for using an MSK stream as a source.",
"RabbitMQBrokerParameters": "The parameters for using a Rabbit MQ broker as a source.",
@@ -39789,7 +39789,7 @@
"EcsTaskParameters": "The parameters for using an Amazon ECS task as a target.",
"EventBridgeEventBusParameters": "The parameters for using an EventBridge event bus as a target.",
"HttpParameters": "These are custom parameter to be used when the target is an API Gateway REST APIs or EventBridge ApiDestinations.",
- "InputTemplate": "Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see [The JavaScript Object Notation (JSON) Data Interchange Format](https://docs.aws.amazon.com/http://www.rfc-editor.org/rfc/rfc7159.txt) .",
+ "InputTemplate": "Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see [The JavaScript Object Notation (JSON) Data Interchange Format](https://docs.aws.amazon.com/http://www.rfc-editor.org/rfc/rfc7159.txt) .\n\nTo remove an input template, specify an empty string.",
"KinesisStreamParameters": "The parameters for using a Kinesis stream as a source.",
"LambdaFunctionParameters": "The parameters for using a Lambda function as a target.",
"RedshiftDataParameters": "These are custom parameters to be used when the target is a Amazon Redshift cluster to invoke the Amazon Redshift Data API BatchExecuteStatement.",
@@ -41837,18 +41837,18 @@
},
"AWS::RedshiftServerless::Namespace": {
"attributes": {
- "Namespace": "Returns the `Namespace` value.",
- "Namespace.AdminUsername": "",
- "Namespace.CreationDate": "",
- "Namespace.DbName": "",
- "Namespace.DefaultIamRoleArn": "",
- "Namespace.IamRoles": "",
- "Namespace.KmsKeyId": "",
- "Namespace.LogExports": "",
- "Namespace.NamespaceArn": "",
- "Namespace.NamespaceId": "",
- "Namespace.NamespaceName": "",
- "Namespace.Status": "",
+ "Namespace": "The collection of computing resources from which an endpoint is created.",
+ "Namespace.AdminUsername": "The username of the administrator for the first database created in the namespace.",
+ "Namespace.CreationDate": "The date of when the namespace was created.",
+ "Namespace.DbName": "The name of the first database created in the namespace.",
+ "Namespace.DefaultIamRoleArn": "The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace.",
+ "Namespace.IamRoles": "A list of IAM roles to associate with the namespace.",
+ "Namespace.KmsKeyId": "The ID of the AWS Key Management Service key used to encrypt your data.",
+ "Namespace.LogExports": "The types of logs the namespace can export. Available export types are `User log` , `Connection log` , and `User activity log` .",
+ "Namespace.NamespaceArn": "The Amazon Resource Name (ARN) associated with a namespace.",
+ "Namespace.NamespaceId": "The unique identifier of a namespace.",
+ "Namespace.NamespaceName": "The name of the namespace. Must be between 3-64 alphanumeric characters in lowercase, and it cannot be a reserved word. A list of reserved words can be found in [Reserved Words](https://docs.aws.amazon.com//redshift/latest/dg/r_pg_keywords.html) in the Amazon Redshift Database Developer Guide.",
+ "Namespace.Status": "The status of the namespace.",
"Ref": "When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the NamespaceName, such as `sample-namespace.` For more information about using the Ref function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) ."
},
"description": "A collection of database objects and users.",
@@ -41862,7 +41862,7 @@
"IamRoles": "A list of IAM roles to associate with the namespace.",
"KmsKeyId": "The ID of the AWS Key Management Service key used to encrypt your data.",
"LogExports": "The types of logs the namespace can export. Available export types are `userlog` , `connectionlog` , and `useractivitylog` .",
- "NamespaceName": "The name of the namespace.",
+ "NamespaceName": "The name of the namespace. Must be between 3-64 alphanumeric characters in lowercase, and it cannot be a reserved word. A list of reserved words can be found in [Reserved Words](https://docs.aws.amazon.com//redshift/latest/dg/r_pg_keywords.html) in the Amazon Redshift Database Developer Guide.",
"Tags": "The map of the key-value pairs used to tag the namespace."
}
},
@@ -41887,22 +41887,22 @@
"attributes": {
"Ref": "When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the WorkgroupName, such as `sample-workgroup.` For more information about using the Ref function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) .",
"Workgroup": "Returns the `Workgroup` value.",
- "Workgroup.BaseCapacity": "",
+ "Workgroup.BaseCapacity": "The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs).",
"Workgroup.ConfigParameters": "",
- "Workgroup.CreationDate": "",
+ "Workgroup.CreationDate": "The creation date of the workgroup.",
"Workgroup.Endpoint": "",
- "Workgroup.Endpoint.Address": "",
- "Workgroup.Endpoint.Port": "",
+ "Workgroup.Endpoint.Address": "The DNS address of the VPC endpoint.",
+ "Workgroup.Endpoint.Port": "The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.",
"Workgroup.Endpoint.VpcEndpoints": "",
- "Workgroup.EnhancedVpcRouting": "",
- "Workgroup.NamespaceName": "",
- "Workgroup.PubliclyAccessible": "",
- "Workgroup.SecurityGroupIds": "",
- "Workgroup.Status": "",
- "Workgroup.SubnetIds": "",
- "Workgroup.WorkgroupArn": "",
- "Workgroup.WorkgroupId": "",
- "Workgroup.WorkgroupName": ""
+ "Workgroup.EnhancedVpcRouting": "The value that specifies whether to enable enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC.",
+ "Workgroup.NamespaceName": "The namespace the workgroup is associated with.",
+ "Workgroup.PubliclyAccessible": "A value that specifies whether the workgroup can be accessible from a public network.",
+ "Workgroup.SecurityGroupIds": "An array of security group IDs to associate with the workgroup.",
+ "Workgroup.Status": "The status of the workgroup.",
+ "Workgroup.SubnetIds": "An array of subnet IDs the workgroup is associated with.",
+ "Workgroup.WorkgroupArn": "The Amazon Resource Name (ARN) that links to the workgroup.",
+ "Workgroup.WorkgroupId": "The unique identifier of the workgroup.",
+ "Workgroup.WorkgroupName": "The name of the workgroup."
},
"description": "The collection of compute resources in Amazon Redshift Serverless.",
"properties": {
@@ -41985,7 +41985,7 @@
"StageName": "The name of the API Gateway stage. The name defaults to `prod` .",
"VpcLinkId": "The `VpcLink` ID of the API Gateway proxy."
},
- "description": "Creates an AWS Migration Hub Refactor Spaces application. The account that owns the environment also owns the applications created inside the environment, regardless of the account that creates the application. Refactor Spaces provisions an Amazon API Gateway , API Gateway VPC link, and Network Load Balancer for the application proxy inside your account.",
+ "description": "Creates an AWS Migration Hub Refactor Spaces application. The account that owns the environment also owns the applications created inside the environment, regardless of the account that creates the application. Refactor Spaces provisions an Amazon API Gateway , API Gateway VPC link, and Network Load Balancer for the application proxy inside your account.\n\nIn environments created with a `CreateEnvironmentRequest$NetworkFabricType` of `NONE` you need to configure [VPC to VPC connectivity](https://docs.aws.amazon.com/whitepapers/latest/aws-vpc-connectivity-options/amazon-vpc-to-amazon-vpc-connectivity-options.html) between your service VPC and the application proxy VPC to route traffic through the application proxy to a service with a private URL endpoint. For more information, see [Create an application](https://docs.aws.amazon.com/migrationhub-refactor-spaces/latest/userguide/getting-started-create-application.html) in the *Refactor Spaces User Guide* .",
"properties": {
"ApiGatewayProxy": "The endpoint URL of the Amazon API Gateway proxy.",
"EnvironmentIdentifier": "The unique identifier of the environment.",
@@ -42010,7 +42010,7 @@
"Ref": "`Ref` returns the ID of the environment, for example, `env-1234654123` .",
"TransitGatewayId": "The ID of the AWS Transit Gateway set up by the environment."
},
- "description": "Creates an AWS Migration Hub Refactor Spaces environment. The caller owns the environment resource, and all Refactor Spaces applications, services, and routes created within the environment. They are referred to as the *environment owner* . The environment owner has cross-account visibility and control of Refactor Spaces resources that are added to the environment by other accounts that the environment is shared with. When creating an environment, Refactor Spaces provisions a transit gateway in your account.",
+ "description": "Creates an AWS Migration Hub Refactor Spaces environment. The caller owns the environment resource, and all Refactor Spaces applications, services, and routes created within the environment. They are referred to as the *environment owner* . The environment owner has cross-account visibility and control of Refactor Spaces resources that are added to the environment by other accounts that the environment is shared with.\n\nWhen creating an environment with a `CreateEnvironmentRequest$NetworkFabricType` of `TRANSIT_GATEWAY` , Refactor Spaces provisions a transit gateway to enable services in VPCs to communicate directly across accounts. If `CreateEnvironmentRequest$NetworkFabricType` is `NONE` , Refactor Spaces does not create a transit gateway and you must use your network infrastructure to route traffic to services with private URL endpoints.",
"properties": {
"Description": "A description of the environment.",
"Name": "The name of the environment.",
@@ -42497,12 +42497,12 @@
"CrlId": "The unique primary identifier of the Crl",
"Ref": "`Ref` returns `CrlId` ."
},
- "description": "The state of the certificate revocation list (CRL) after a read or write operation.",
+ "description": "Imports the certificate revocation list (CRL). A CRL is a list of certificates that have been revoked by the issuing certificate Authority (CA). IAM Roles Anywhere validates against the CRL before issuing credentials.\n\n*Required permissions:* `rolesanywhere:ImportCrl` .",
"properties": {
- "CrlData": "The revocation record for a certificate, following the x509 v3 standard.",
- "Enabled": "Indicates whether the certificate revocation list (CRL) is enabled.",
+ "CrlData": "The x509 v3 specified certificate revocation list (CRL).",
+ "Enabled": "Specifies whether the certificate revocation list (CRL) is enabled.",
"Name": "The name of the certificate revocation list (CRL).",
- "Tags": "A list of tags to attach to the CRL.",
+ "Tags": "A list of tags to attach to the certificate revocation list (CRL).",
"TrustAnchorArn": "The ARN of the TrustAnchor the certificate revocation list (CRL) will provide revocation for."
}
},
@@ -42521,21 +42521,21 @@
"RequireInstanceProperties": "Specifies whether instance properties are required in temporary credential requests with this profile.",
"RoleArns": "A list of IAM role ARNs. During `CreateSession` , if a matching role ARN is provided, the properties in this profile will be applied to the intersection session policy.",
"SessionPolicy": "A session policy that applies to the trust boundary of the vended session credentials.",
- "Tags": "A list of tags to attach to the profile."
+ "Tags": "A list of Tags."
}
},
"AWS::RolesAnywhere::TrustAnchor": {
"attributes": {
"Ref": "`Ref` returns `TrustAnchorId` .",
"TrustAnchorArn": "The ARN of the trust anchor.",
- "TrustAnchorId": "The unique primary identifier of the TrustAnchor"
+ "TrustAnchorId": "The unique identifier of the trust anchor."
},
- "description": "The state of the trust anchor after a read or write operation.",
+ "description": "Creates a trust anchor to establish trust between IAM Roles Anywhere and your certificate authority (CA). You can define a trust anchor as a reference to an AWS Private Certificate Authority ( AWS Private CA ) or by uploading a CA certificate. Your AWS workloads can authenticate with the trust anchor using certificates issued by the CA in exchange for temporary AWS credentials.\n\n*Required permissions:* `rolesanywhere:CreateTrustAnchor` .",
"properties": {
"Enabled": "Indicates whether the trust anchor is enabled.",
"Name": "The name of the trust anchor.",
"Source": "The trust anchor type and its related certificate data.",
- "Tags": "A list of tags to attach to the trust anchor."
+ "Tags": ""
}
},
"AWS::RolesAnywhere::TrustAnchor.Source": {
@@ -42543,14 +42543,14 @@
"description": "The trust anchor type and its related certificate data.",
"properties": {
"SourceData": "The data field of the trust anchor depending on its type.",
- "SourceType": "The type of the trust anchor."
+ "SourceType": "The type of the TrustAnchor.\n\n> `AWS_ACM_PCA` is not an allowed value in your region."
}
},
"AWS::RolesAnywhere::TrustAnchor.SourceData": {
"attributes": {},
"description": "The data field of the trust anchor depending on its type.",
"properties": {
- "AcmPcaArn": "The root certificate of the AWS Private Certificate Authority specified by this ARN is used in trust validation for temporary credential requests. Included for trust anchors of type `AWS_ACM_PCA` .",
+ "AcmPcaArn": "The root certificate of the AWS Private Certificate Authority specified by this ARN is used in trust validation for temporary credential requests. Included for trust anchors of type `AWS_ACM_PCA` .\n\n> This field is not supported in your region.",
"X509CertificateData": "The PEM-encoded data for the certificate anchor. Included for trust anchors of type `CERTIFICATE_BUNDLE` ."
}
},
diff --git a/packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES
index 1f2953d2f4c71..985d70ffb6f69 100644
--- a/packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES
+++ b/packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES
@@ -1,6 +1,6 @@
The @aws-cdk/cli-lib package includes the following third-party software/licensing:
-** @jsii/check-node@1.75.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.75.0 | Apache-2.0
+** @jsii/check-node@1.76.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.76.0 | Apache-2.0
jsii
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -268,7 +268,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
----------------
-** aws-sdk@2.1317.0 - https://www.npmjs.com/package/aws-sdk/v/2.1317.0 | Apache-2.0
+** aws-sdk@2.1325.0 - https://www.npmjs.com/package/aws-sdk/v/2.1325.0 | Apache-2.0
AWS SDK for JavaScript
Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -2475,7 +2475,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
----------------
-** raw-body@2.5.1 - https://www.npmjs.com/package/raw-body/v/2.5.1 | MIT
+** raw-body@2.5.2 - https://www.npmjs.com/package/raw-body/v/2.5.2 | MIT
The MIT License (MIT)
Copyright (c) 2013-2014 Jonathan Ong
@@ -2545,7 +2545,7 @@ IN THE SOFTWARE.
----------------
-** readable-stream@2.3.7 - https://www.npmjs.com/package/readable-stream/v/2.3.7 | MIT
+** readable-stream@2.3.8 - https://www.npmjs.com/package/readable-stream/v/2.3.8 | MIT
Node.js is licensed for use as follows:
"""
@@ -2597,7 +2597,7 @@ IN THE SOFTWARE.
----------------
-** readable-stream@3.6.0 - https://www.npmjs.com/package/readable-stream/v/3.6.0 | MIT
+** readable-stream@3.6.1 - https://www.npmjs.com/package/readable-stream/v/3.6.1 | MIT
Node.js is licensed for use as follows:
"""
diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json
index 5a63f16d1761d..d658fde13d02a 100644
--- a/packages/@aws-cdk/core/package.json
+++ b/packages/@aws-cdk/core/package.json
@@ -191,7 +191,7 @@
"@types/jest": "^27.5.2",
"@types/lodash": "^4.14.191",
"@types/minimatch": "^3.0.5",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"@types/sinon": "^9.0.11",
"fast-check": "^2.25.0",
"jest": "^27.5.1",
diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json
index 43d88f5e7a823..b34bdc5705359 100644
--- a/packages/@aws-cdk/custom-resources/package.json
+++ b/packages/@aws-cdk/custom-resources/package.json
@@ -93,7 +93,7 @@
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.5.2",
"@types/sinon": "^9.0.11",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"aws-sdk-mock": "5.6.0",
"fs-extra": "^9.1.0",
"nock": "^13.3.0",
diff --git a/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES b/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES
index 2df6fb89cca98..07e1b9bd0b3a4 100644
--- a/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES
+++ b/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES
@@ -156,7 +156,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
----------------
-** aws-sdk@2.1325.0 - https://www.npmjs.com/package/aws-sdk/v/2.1325.0 | Apache-2.0
+** aws-sdk@2.1329.0 - https://www.npmjs.com/package/aws-sdk/v/2.1329.0 | Apache-2.0
AWS SDK for JavaScript
Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
diff --git a/packages/@aws-cdk/integ-tests/package.json b/packages/@aws-cdk/integ-tests/package.json
index 26955f48c4e18..99d0450dd9184 100644
--- a/packages/@aws-cdk/integ-tests/package.json
+++ b/packages/@aws-cdk/integ-tests/package.json
@@ -67,7 +67,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1",
"nock": "^13.3.0",
diff --git a/packages/@aws-cdk/lambda-layer-awscli/package.json b/packages/@aws-cdk/lambda-layer-awscli/package.json
index a9661d7872f3b..7e6cc5e5d7e5e 100644
--- a/packages/@aws-cdk/lambda-layer-awscli/package.json
+++ b/packages/@aws-cdk/lambda-layer-awscli/package.json
@@ -84,7 +84,7 @@
"dependencies": {
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/core": "0.0.0",
- "@aws-cdk/asset-awscli-v1": "^2.2.85",
+ "@aws-cdk/asset-awscli-v1": "^2.2.97",
"constructs": "^10.0.0"
},
"homepage": "https://github.com/aws/aws-cdk",
diff --git a/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json b/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json
index 33fc33d129d07..17f369d855bfe 100644
--- a/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json
+++ b/packages/@aws-cdk/lambda-layer-node-proxy-agent/package.json
@@ -84,7 +84,7 @@
"dependencies": {
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/core": "0.0.0",
- "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.71",
+ "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.77",
"constructs": "^10.0.0"
},
"homepage": "https://github.com/aws/aws-cdk",
diff --git a/packages/@aws-cdk/pipelines/package.json b/packages/@aws-cdk/pipelines/package.json
index 22003dab4cd5f..d1101c155c99b 100644
--- a/packages/@aws-cdk/pipelines/package.json
+++ b/packages/@aws-cdk/pipelines/package.json
@@ -51,7 +51,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
- "aws-sdk": "^2.1325.0"
+ "aws-sdk": "^2.1329.0"
},
"peerDependencies": {
"@aws-cdk/aws-codebuild": "0.0.0",
diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline-without-prepare.ts b/packages/@aws-cdk/pipelines/test/integ.pipeline-without-prepare.ts
index 948c03b0acf3a..91b52552c6302 100644
--- a/packages/@aws-cdk/pipelines/test/integ.pipeline-without-prepare.ts
+++ b/packages/@aws-cdk/pipelines/test/integ.pipeline-without-prepare.ts
@@ -4,9 +4,30 @@ import * as s3 from '@aws-cdk/aws-s3';
import { App, Stack, StackProps, RemovalPolicy, Stage, StageProps, DefaultStackSynthesizer } from '@aws-cdk/core';
import * as integ from '@aws-cdk/integ-tests';
import { Construct } from 'constructs';
-import { PlainStackApp } from './testhelpers';
import * as pipelines from '../lib';
+/**
+ * A test stack
+ *
+ * It contains a single Bucket. Such robust. Much uptime.
+ */
+export class BucketStack extends Stack {
+ public readonly bucket: s3.IBucket;
+
+ constructor(scope: Construct, id: string, props?: StackProps) {
+ super(scope, id, props);
+ this.bucket = new s3.Bucket(this, 'Bucket');
+ }
+}
+
+
+export class PlainStackApp extends Stage {
+ constructor(scope: Construct, id: string, props?: StageProps) {
+ super(scope, id, props);
+ new BucketStack(this, 'Stack');
+ }
+}
+
class MyStage extends Stage {
constructor(scope: Construct, id: string, props?: StageProps) {
super(scope, id, props);
diff --git a/packages/@aws-cdk/triggers/package.json b/packages/@aws-cdk/triggers/package.json
index 0fcc8c783120a..3d4221bd14726 100644
--- a/packages/@aws-cdk/triggers/package.json
+++ b/packages/@aws-cdk/triggers/package.json
@@ -78,7 +78,7 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/integ-tests": "0.0.0",
"@aws-cdk/aws-sns": "0.0.0",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"jest": "^27.5.1"
diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json
index 5a5c4ef436d66..ea1f95056d281 100644
--- a/packages/aws-cdk-lib/package.json
+++ b/packages/aws-cdk-lib/package.json
@@ -114,8 +114,8 @@
"punycode": "^2.3.0",
"semver": "^7.3.8",
"yaml": "1.10.2",
- "@aws-cdk/asset-awscli-v1": "^2.2.85",
- "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.71",
+ "@aws-cdk/asset-awscli-v1": "^2.2.97",
+ "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.77",
"@aws-cdk/asset-kubectl-v20": "^2.1.1"
},
"devDependencies": {
@@ -380,7 +380,7 @@
"@aws-cdk/triggers": "0.0.0",
"@aws-cdk/ubergen": "0.0.0",
"constructs": "^10.0.0",
- "esbuild": "^0.17.10",
+ "esbuild": "^0.17.11",
"fs-extra": "^9.1.0",
"ts-node": "^9.1.1",
"typescript": "~3.8.3"
diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md
index 009dd9a192389..175adfc9e6508 100644
--- a/packages/aws-cdk/README.md
+++ b/packages/aws-cdk/README.md
@@ -757,8 +757,11 @@ Some of the interesting keys that can be used in the JSON configuration files:
"key": "value"
},
"toolkitStackName": "foo", // Customize 'bootstrap' stack name (--toolkit-stack-name=foo)
- "toolkitBucketName": "fooBucket", // Customize 'bootstrap' bucket name (--toolkit-bucket-name=fooBucket)
- "versionReporting": false, // Opt-out of version reporting (--no-version-reporting)
+ "toolkitBucket": {
+ "bucketName": "fooBucket", // Customize 'bootstrap' bucket name (--toolkit-bucket-name=fooBucket)
+ "kmsKeyId": "fooKMSKey" // Customize 'bootstrap' KMS key id (--bootstrap-kms-key-id=fooKMSKey)
+ },
+ "versionReporting": false, // Opt-out of version reporting (--no-version-reporting)
}
```
diff --git a/packages/aws-cdk/THIRD_PARTY_LICENSES b/packages/aws-cdk/THIRD_PARTY_LICENSES
index 144889e860f6e..db4620ad0710c 100644
--- a/packages/aws-cdk/THIRD_PARTY_LICENSES
+++ b/packages/aws-cdk/THIRD_PARTY_LICENSES
@@ -1,6 +1,6 @@
The aws-cdk package includes the following third-party software/licensing:
-** @jsii/check-node@1.76.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.76.0 | Apache-2.0
+** @jsii/check-node@1.77.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.77.0 | Apache-2.0
jsii
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -268,7 +268,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
----------------
-** aws-sdk@2.1325.0 - https://www.npmjs.com/package/aws-sdk/v/2.1325.0 | Apache-2.0
+** aws-sdk@2.1329.0 - https://www.npmjs.com/package/aws-sdk/v/2.1329.0 | Apache-2.0
AWS SDK for JavaScript
Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
diff --git a/packages/aws-cdk/lib/import.ts b/packages/aws-cdk/lib/import.ts
index 0a5795313fbc0..f3caf736373be 100644
--- a/packages/aws-cdk/lib/import.ts
+++ b/packages/aws-cdk/lib/import.ts
@@ -9,18 +9,18 @@ import { ResourceIdentifierProperties, ResourcesToImport } from './api/util/clou
import { error, print, success, warning } from './logging';
/**
- * Parameters that uniquely identify a physical resource of a given type
+ * Set of parameters that uniquely identify a physical resource of a given type
* for the import operation, example:
*
* ```
* {
- * "AWS::S3::Bucket": ["BucketName"],
- * "AWS::IAM::Role": ["RoleName"],
- * "AWS::EC2::VPC": ["VpcId"]
+ * "AWS::S3::Bucket": [["BucketName"]],
+ * "AWS::DynamoDB::GlobalTable": [["TableName"], ["TableArn"], ["TableStreamArn"]],
+ * "AWS::Route53::KeySigningKey": [["HostedZoneId", "Name"]],
* }
* ```
*/
-export type ResourceIdentifiers = { [resourceType: string]: string[] };
+export type ResourceIdentifiers = { [resourceType: string]: string[][] };
/**
* Mapping of CDK resources (L1 constructs) to physical resources to be imported
@@ -225,12 +225,21 @@ export class ResourceImporter {
const resourceIdentifierSummaries = await this.cfn.resourceIdentifierSummaries(this.stack, this.options.toolkitStackName);
for (const summary of resourceIdentifierSummaries) {
if ('ResourceType' in summary && summary.ResourceType && 'ResourceIdentifiers' in summary && summary.ResourceIdentifiers) {
- ret[summary.ResourceType] = summary.ResourceIdentifiers;
+ ret[summary.ResourceType] = (summary.ResourceIdentifiers ?? [])?.map(x => x.split(','));
}
}
return ret;
}
+ /**
+ * Ask for the importable identifier for the given resource
+ *
+ * There may be more than one identifier under which a resource can be imported. The `import`
+ * operation needs exactly one of them.
+ *
+ * - If we can get one from the template, we will use one.
+ * - Otherwise, we will ask the user for one of them.
+ */
private async askForResourceIdentifier(
resourceIdentifiers: ResourceIdentifiers,
chg: ImportableResource,
@@ -244,45 +253,83 @@ export class ResourceImporter {
return undefined;
}
- const idProps = resourceIdentifiers[resourceType];
- const resourceProps = chg.resourceDefinition.Properties ?? {};
+ const idPropSets = resourceIdentifiers[resourceType];
- const fixedIdProps = idProps.filter(p => resourceProps[p]);
- const fixedIdInput: ResourceIdentifierProperties = Object.fromEntries(fixedIdProps.map(p => [p, resourceProps[p]]));
+ // Retain only literal strings: strip potential CFN intrinsics
+ const resourceProps = Object.fromEntries(Object.entries(chg.resourceDefinition.Properties ?? {})
+ .filter(([_, v]) => typeof v === 'string')) as Record;
- const missingIdProps = idProps.filter(p => !resourceProps[p]);
+ // Find property sets that are fully satisfied in the template, ask the user to confirm them
+ const satisfiedPropSets = idPropSets.filter(ps => ps.every(p => resourceProps[p]));
+ for (const satisfiedPropSet of satisfiedPropSets) {
+ const candidateProps = Object.fromEntries(satisfiedPropSet.map(p => [p, resourceProps[p]]));
+ const displayCandidateProps = fmtdict(candidateProps);
- if (missingIdProps.length === 0) {
- // We can auto-import this, but ask the user to confirm
- const props = fmtdict(fixedIdInput);
-
- if (!await promptly.confirm(
- `${chalk.blue(resourceName)} (${resourceType}): import with ${chalk.yellow(props)} (yes/no) [default: yes]? `,
+ if (await promptly.confirm(
+ `${chalk.blue(resourceName)} (${resourceType}): import with ${chalk.yellow(displayCandidateProps)} (yes/no) [default: yes]? `,
{ default: 'yes' },
)) {
- print(chalk.grey(`Skipping import of ${resourceName}`));
- return undefined;
+ return candidateProps;
}
}
- // Ask the user to provide missing props
- const userInput: ResourceIdentifierProperties = {};
- for (const missingIdProp of missingIdProps) {
- const response = (await promptly.prompt(
- `${chalk.blue(resourceName)} (${resourceType}): enter ${chalk.blue(missingIdProp)} to import (empty to skip):`,
- { default: '', trim: true },
- ));
- if (!response) {
- print(chalk.grey(`Skipping import of ${resourceName}`));
- return undefined;
+ // If we got here and the user rejected any available identifiers, then apparently they don't want the resource at all
+ if (satisfiedPropSets.length > 0) {
+ print(chalk.grey(`Skipping import of ${resourceName}`));
+ return undefined;
+ }
+
+ // We cannot auto-import this, ask the user for one of the props
+ // The only difference between these cases is what we print: for multiple properties, we print a preamble
+ const prefix = `${chalk.blue(resourceName)} (${resourceType})`;
+ let preamble;
+ let promptPattern;
+ if (idPropSets.length > 1) {
+ preamble = `${prefix}: enter one of ${idPropSets.map(x => chalk.blue(x.join('+'))).join(', ')} to import (all empty to skip)`;
+ promptPattern = `${prefix}: enter %`;
+ } else {
+ promptPattern = `${prefix}: enter %`;
+ }
+
+ // Do the input loop here
+ if (preamble) {
+ print(preamble);
+ }
+ for (const idProps of idPropSets) {
+ const input: Record = {};
+ for (const idProp of idProps) {
+ // If we have a value from the template, use it as default. This will only be a partial
+ // identifier if present, otherwise we would have done the import already above.
+ const defaultValue = typeof resourceProps[idProp] ?? '';
+
+ const prompt = [
+ promptPattern.replace(/%/, chalk.blue(idProp)),
+ defaultValue
+ ? `[${defaultValue}]`
+ : '(empty to skip)',
+ ].join(' ') + ':';
+ const response = await promptly.prompt(prompt,
+ { default: defaultValue, trim: true },
+ );
+
+ if (!response) {
+ break;
+ }
+
+ input[idProp] = response;
+ // Also stick this property into 'resourceProps', so that it may be reused by a subsequent question
+ // (for a different compound identifier that involves the same property). Just a small UX enhancement.
+ resourceProps[idProp] = response;
+ }
+
+ // If the user gave inputs for all values, we are complete
+ if (Object.keys(input).length === idProps.length) {
+ return input;
}
- userInput[missingIdProp] = response;
}
- return {
- ...fixedIdInput,
- ...userInput,
- };
+ print(chalk.grey(`Skipping import of ${resourceName}`));
+ return undefined;
}
/**
@@ -364,4 +411,4 @@ function addDefaultDeletionPolicy(resource: any): any {
export interface DiscoverImportableResourcesResult {
readonly additions: ImportableResource[];
readonly hasNonAdditions: boolean;
-}
\ No newline at end of file
+}
diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/package.json b/packages/aws-cdk/lib/init-templates/app/javascript/package.json
index 3d4f898b31c6b..c4314e7f6c633 100644
--- a/packages/aws-cdk/lib/init-templates/app/javascript/package.json
+++ b/packages/aws-cdk/lib/init-templates/app/javascript/package.json
@@ -11,7 +11,7 @@
},
"devDependencies": {
"aws-cdk": "%cdk-version%",
- "jest": "^29.4.3"
+ "jest": "^29.5.0"
},
"dependencies": {
"aws-cdk-lib": "%cdk-version%",
diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/package.json b/packages/aws-cdk/lib/init-templates/app/typescript/package.json
index c2d4c49eb5f5f..19242f850ad79 100644
--- a/packages/aws-cdk/lib/init-templates/app/typescript/package.json
+++ b/packages/aws-cdk/lib/init-templates/app/typescript/package.json
@@ -12,8 +12,8 @@
},
"devDependencies": {
"@types/jest": "^29.4.0",
- "@types/node": "18.14.2",
- "jest": "^29.4.3",
+ "@types/node": "18.14.6",
+ "jest": "^29.5.0",
"ts-jest": "^29.0.5",
"aws-cdk": "%cdk-version%",
"ts-node": "^10.9.1",
diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/package.json b/packages/aws-cdk/lib/init-templates/lib/typescript/package.json
index ddfbc0ba961ab..77bcd371c72cc 100644
--- a/packages/aws-cdk/lib/init-templates/lib/typescript/package.json
+++ b/packages/aws-cdk/lib/init-templates/lib/typescript/package.json
@@ -10,10 +10,10 @@
},
"devDependencies": {
"@types/jest": "^29.4.0",
- "@types/node": "18.14.2",
+ "@types/node": "18.14.6",
"aws-cdk-lib": "%cdk-version%",
"constructs": "%constructs-version%",
- "jest": "^29.4.3",
+ "jest": "^29.5.0",
"ts-jest": "^29.0.5",
"typescript": "~4.9.5"
},
diff --git a/packages/aws-cdk/lib/init-templates/sample-app/go/%name%_test.template.go b/packages/aws-cdk/lib/init-templates/sample-app/go/%name%_test.template.go
index 56181ebe4b377..d7d6ce936326d 100644
--- a/packages/aws-cdk/lib/init-templates/sample-app/go/%name%_test.template.go
+++ b/packages/aws-cdk/lib/init-templates/sample-app/go/%name%_test.template.go
@@ -16,7 +16,7 @@ func Test%name.PascalCased%Stack(t *testing.T) {
stack := New%name.PascalCased%Stack(app, "MyStack", nil)
// THEN
- template := assertions.Template_FromStack(stack)
+ template := assertions.Template_FromStack(stack, nil)
template.HasResourceProperties(jsii.String("AWS::SQS::Queue"), map[string]interface{}{
"VisibilityTimeout": 300,
diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.json b/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.json
index 3d4f898b31c6b..c4314e7f6c633 100644
--- a/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.json
+++ b/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.json
@@ -11,7 +11,7 @@
},
"devDependencies": {
"aws-cdk": "%cdk-version%",
- "jest": "^29.4.3"
+ "jest": "^29.5.0"
},
"dependencies": {
"aws-cdk-lib": "%cdk-version%",
diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json
index 3c82377faa1c2..bae3f27c14704 100644
--- a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json
+++ b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json
@@ -12,8 +12,8 @@
},
"devDependencies": {
"@types/jest": "^29.4.0",
- "@types/node": "18.14.2",
- "jest": "^29.4.3",
+ "@types/node": "18.14.6",
+ "jest": "^29.5.0",
"ts-jest": "^29.0.5",
"aws-cdk": "%cdk-version%",
"ts-node": "^10.9.1",
diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json
index 00f0dc12be4f3..192d9c433a0ce 100644
--- a/packages/aws-cdk/package.json
+++ b/packages/aws-cdk/package.json
@@ -98,9 +98,9 @@
"@aws-cdk/cloudformation-diff": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"@aws-cdk/region-info": "0.0.0",
- "@jsii/check-node": "1.76.0",
+ "@jsii/check-node": "1.77.0",
"archiver": "^5.3.1",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"camelcase": "^6.3.0",
"cdk-assets": "0.0.0",
"chokidar": "^3.5.3",
diff --git a/packages/aws-cdk/test/import.test.ts b/packages/aws-cdk/test/import.test.ts
index ec970df533daf..9bbbc7b98a24f 100644
--- a/packages/aws-cdk/test/import.test.ts
+++ b/packages/aws-cdk/test/import.test.ts
@@ -17,31 +17,53 @@ const promptlyPrompt = promptly.prompt as jest.Mock;
let createChangeSetInput: AWS.CloudFormation.CreateChangeSetInput | undefined;
-const STACK_WITH_QUEUE = testStack({
- stackName: 'StackWithQueue',
- template: {
- Resources: {
- MyQueue: {
- Type: 'AWS::SQS::Queue',
- Properties: {},
+function stackWithQueue(props: Record) {
+ return testStack({
+ stackName: 'StackWithQueue',
+ template: {
+ Resources: {
+ MyQueue: {
+ Type: 'AWS::SQS::Queue',
+ Properties: props,
+ },
},
},
- },
+ });
+}
+
+const STACK_WITH_QUEUE = stackWithQueue({});
+
+const STACK_WITH_NAMED_QUEUE = stackWithQueue({
+ QueueName: 'TheQueueName',
});
-const STACK_WITH_NAMED_QUEUE = testStack({
- stackName: 'StackWithQueue',
- template: {
- Resources: {
- MyQueue: {
- Type: 'AWS::SQS::Queue',
- Properties: {
- QueueName: 'TheQueueName',
+function stackWithGlobalTable(props: Record) {
+ return testStack({
+ stackName: 'StackWithTable',
+ template: {
+ Resources: {
+ MyTable: {
+ Type: 'AWS::DynamoDB::GlobalTable',
+ Properties: props,
},
},
},
- },
-});
+ });
+}
+
+function stackWithKeySigningKey(props: Record) {
+ return testStack({
+ stackName: 'StackWithKSK',
+ template: {
+ Resources: {
+ MyKSK: {
+ Type: 'AWS::Route53::KeySigningKey',
+ Properties: props,
+ },
+ },
+ },
+ });
+}
let sdkProvider: MockSdkProvider;
let deployments: CloudFormationDeployments;
@@ -154,6 +176,122 @@ test('asks human to confirm automic import if identifier is in template', async
]);
});
+test('only use one identifier if multiple are in template', async () => {
+ // GIVEN
+ const stack = stackWithGlobalTable({
+ TableName: 'TheTableName',
+ TableArn: 'ThisFieldDoesntExistInReality',
+ TableStreamArn: 'NorDoesThisOne',
+ });
+
+ // WHEN
+ promptlyConfirm.mockResolvedValue(true); // Confirm yes/no
+ await importTemplateFromClean(stack);
+
+ // THEN
+ expect(createChangeSetInput?.ResourcesToImport).toEqual([
+ {
+ LogicalResourceId: 'MyTable',
+ ResourceIdentifier: { TableName: 'TheTableName' },
+ ResourceType: 'AWS::DynamoDB::GlobalTable',
+ },
+ ]);
+});
+
+test('only ask user for one identifier if multiple possible ones are possible', async () => {
+ // GIVEN -- no identifiers in template, so ask user
+ const stack = stackWithGlobalTable({});
+
+ // WHEN
+ promptlyPrompt.mockResolvedValue('Banana');
+ const importable = await importTemplateFromClean(stack);
+
+ // THEN -- only asked once
+ expect(promptlyPrompt).toHaveBeenCalledTimes(1);
+ expect(importable.resourceMap).toEqual({
+ MyTable: { TableName: 'Banana' },
+ });
+});
+
+test('ask identifier if the value in the template is a CFN intrinsic', async () => {
+ // GIVEN -- identifier in template is a CFN intrinsic so it doesn't count
+ const stack = stackWithQueue({
+ QueueName: { Ref: 'SomeParam' },
+ });
+
+ // WHEN
+ promptlyPrompt.mockResolvedValue('Banana');
+ const importable = await importTemplateFromClean(stack);
+
+ // THEN
+ expect(importable.resourceMap).toEqual({
+ MyQueue: { QueueName: 'Banana' },
+ });
+});
+
+test('take compound identifiers from the template if found', async () => {
+ // GIVEN
+ const stack = stackWithKeySigningKey({
+ HostedZoneId: 'z-123',
+ Name: 'KeyName',
+ });
+
+ // WHEN
+ promptlyConfirm.mockResolvedValue(true);
+ await importTemplateFromClean(stack);
+
+ // THEN
+ expect(createChangeSetInput?.ResourcesToImport).toEqual([
+ {
+ LogicalResourceId: 'MyKSK',
+ ResourceIdentifier: { HostedZoneId: 'z-123', Name: 'KeyName' },
+ ResourceType: 'AWS::Route53::KeySigningKey',
+ },
+ ]);
+});
+
+test('ask user for compound identifiers if not found', async () => {
+ // GIVEN
+ const stack = stackWithKeySigningKey({});
+
+ // WHEN
+ promptlyPrompt.mockReturnValue('Banana');
+ await importTemplateFromClean(stack);
+
+ // THEN
+ expect(createChangeSetInput?.ResourcesToImport).toEqual([
+ {
+ LogicalResourceId: 'MyKSK',
+ ResourceIdentifier: { HostedZoneId: 'Banana', Name: 'Banana' },
+ ResourceType: 'AWS::Route53::KeySigningKey',
+ },
+ ]);
+});
+
+test('do not ask for second part of compound identifier if the user skips the first', async () => {
+ // GIVEN
+ const stack = stackWithKeySigningKey({});
+
+ // WHEN
+ promptlyPrompt.mockReturnValue('');
+ const importMap = await importTemplateFromClean(stack);
+
+ // THEN
+ expect(importMap.resourceMap).toEqual({});
+});
+
+/**
+ * Do a full import cycle with the given stack template
+ */
+async function importTemplateFromClean(stack: ReturnType) {
+ givenCurrentStack(stack.stackName, { Resources: {} });
+ const importer = new ResourceImporter(stack, deployments);
+ const { additions } = await importer.discoverImportableResources();
+ const importable = await importer.askForResourceIdentifiers(additions);
+ await importer.importResources(importable, { stack });
+ return importable;
+}
+
function givenCurrentStack(stackName: string, template: any) {
sdkProvider.stubCloudFormation({
describeStacks() {
@@ -181,6 +319,14 @@ function givenCurrentStack(stackName: string, template: any) {
ResourceType: 'AWS::SQS::Queue',
ResourceIdentifiers: ['QueueName'],
},
+ {
+ ResourceType: 'AWS::DynamoDB::GlobalTable',
+ ResourceIdentifiers: ['TableName', 'TableArn', 'TableStreamArn'],
+ },
+ {
+ ResourceType: 'AWS::Route53::KeySigningKey',
+ ResourceIdentifiers: ['HostedZoneId,Name'],
+ },
],
};
},
diff --git a/packages/awslint/package.json b/packages/awslint/package.json
index fd31ed7b098e7..702292df72889 100644
--- a/packages/awslint/package.json
+++ b/packages/awslint/package.json
@@ -18,11 +18,11 @@
"awslint": "bin/awslint"
},
"dependencies": {
- "@jsii/spec": "1.76.0",
+ "@jsii/spec": "1.77.0",
"camelcase": "^6.3.0",
"chalk": "^4",
"fs-extra": "^9.1.0",
- "jsii-reflect": "1.76.0",
+ "jsii-reflect": "1.77.0",
"yargs": "^16.2.0"
},
"devDependencies": {
diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json
index be2a4e69f3df4..558ece15e56d8 100644
--- a/packages/cdk-assets/package.json
+++ b/packages/cdk-assets/package.json
@@ -46,7 +46,7 @@
"@aws-cdk/cloud-assembly-schema": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"archiver": "^5.3.1",
- "aws-sdk": "^2.1325.0",
+ "aws-sdk": "^2.1329.0",
"glob": "^7.2.3",
"mime": "^2.6.0",
"yargs": "^16.2.0"
diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json
index 0b9f1def89778..a2f040d7ebf22 100644
--- a/packages/cdk-dasm/package.json
+++ b/packages/cdk-dasm/package.json
@@ -30,7 +30,7 @@
},
"license": "Apache-2.0",
"dependencies": {
- "codemaker": "1.76.0",
+ "codemaker": "1.77.0",
"yaml": "1.10.2"
},
"devDependencies": {
diff --git a/scripts/check-build-prerequisites.sh b/scripts/check-build-prerequisites.sh
index 93f9606e7c52e..49d6feef733be 100755
--- a/scripts/check-build-prerequisites.sh
+++ b/scripts/check-build-prerequisites.sh
@@ -127,7 +127,7 @@ app_min="6.0.100"
check_which $app $app_min
app_v=$(${app} --list-sdks)
echo -e "Checking dotnet version... \c"
-if [ $(echo $app_v | grep -c -E "6\.[0-9]+\.[0-9]+") -eq 1 ]
+if [ $(echo $app_v | grep -c -E "[67]\.[0-9]+\.[0-9]+") -eq 1 ]
then
echo "Ok"
else
diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json
index b8ed716059491..e6d86da84f9cd 100644
--- a/tools/@aws-cdk/cdk-build-tools/package.json
+++ b/tools/@aws-cdk/cdk-build-tools/package.json
@@ -57,9 +57,9 @@
"fs-extra": "^9.1.0",
"jest": "^27.5.1",
"jest-junit": "^13.2.0",
- "jsii": "1.76.0",
- "jsii-pacmak": "1.76.0",
- "jsii-reflect": "1.76.0",
+ "jsii": "1.77.0",
+ "jsii-pacmak": "1.77.0",
+ "jsii-reflect": "1.77.0",
"markdownlint-cli": "^0.33.0",
"nyc": "^15.1.0",
"semver": "^7.3.8",
diff --git a/tools/@aws-cdk/cfn2ts/package.json b/tools/@aws-cdk/cfn2ts/package.json
index 73eebbefafe61..f3a415c4f1202 100644
--- a/tools/@aws-cdk/cfn2ts/package.json
+++ b/tools/@aws-cdk/cfn2ts/package.json
@@ -32,7 +32,7 @@
"license": "Apache-2.0",
"dependencies": {
"@aws-cdk/cfnspec": "0.0.0",
- "codemaker": "1.76.0",
+ "codemaker": "1.77.0",
"fast-json-patch": "^3.1.1",
"fs-extra": "^9.1.0",
"yargs": "^16.2.0"
diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json
index 4108e453a5a34..4a6159e124d2a 100644
--- a/tools/@aws-cdk/node-bundle/package.json
+++ b/tools/@aws-cdk/node-bundle/package.json
@@ -40,14 +40,14 @@
"jest-junit": "^13",
"json-schema": "^0.4.0",
"npm-check-updates": "^12",
- "projen": "^0.67.69",
+ "projen": "^0.67.75",
"standard-version": "^9",
"ts-jest": "^27",
"typescript": "^4.5.5"
},
"dependencies": {
- "cdk-generate-synthetic-examples": "^0.1.167",
- "esbuild": "^0.17.10",
+ "cdk-generate-synthetic-examples": "^0.1.173",
+ "esbuild": "^0.17.11",
"fs-extra": "^10.1.0",
"license-checker": "^25.0.1",
"madge": "^5.0.2",
diff --git a/yarn.lock b/yarn.lock
index a8e1c91085beb..6a8a6b63bf239 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -21,9 +21,9 @@
"@octokit/plugin-rest-endpoint-methods" "^5.13.0"
"@actions/http-client@^2.0.1":
- version "2.0.1"
- resolved "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz#873f4ca98fe32f6839462a6f046332677322f99c"
- integrity sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==
+ version "2.1.0"
+ resolved "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz#b6d8c3934727d6a50d10d19f00a711a964599a9f"
+ integrity sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==
dependencies:
tunnel "^0.0.6"
@@ -35,25 +35,25 @@
"@jridgewell/gen-mapping" "^0.1.0"
"@jridgewell/trace-mapping" "^0.3.9"
-"@aws-cdk/asset-awscli-v1@^2.2.85":
- version "2.2.85"
- resolved "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.85.tgz#3671dc4de44f243571a806d651697bb4f49d06c1"
- integrity sha512-oNX4HMupi2+/blbUNctA8WIwyqFTLOGhGDB+gginMSy7QHevLWb/duMlwa7Np4wpiHeiBDMF/ccc5Mfb352srg==
+"@aws-cdk/asset-awscli-v1@^2.2.97":
+ version "2.2.97"
+ resolved "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.97.tgz#af6fcefe7b9ddecc6656691bd0b4061f5c5eabf2"
+ integrity sha512-bWFkQphw1U7Q8XngShvGy0S1yqDui6q72zjnLciqKQ5ucZq17/TEujLTpSv+v2K5qJU8oa8VaMDiRyYbdPD6MA==
"@aws-cdk/asset-kubectl-v20@^2.1.1":
version "2.1.1"
resolved "https://registry.npmjs.org/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.1.tgz#d01c1efb867fb7f2cfd8c8b230b8eae16447e156"
integrity sha512-U1ntiX8XiMRRRH5J1IdC+1t5CE89015cwyt5U63Cpk0GnMlN5+h9WsWMlKlPXZR4rdq/m806JRlBMRpBUB2Dhw==
-"@aws-cdk/asset-node-proxy-agent-v5@^2.0.71":
- version "2.0.71"
- resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.71.tgz#dd269f8aa160473e006633d2f0f5384f46747693"
- integrity sha512-vB/KF9naAYkELP6Hi5+Oib59B4ZAz6jjtrpsKNzsIZTmcTs0IIBb4nVdAuwMpMkPcwT0mzhMg2tlsiSyjrOFBA==
+"@aws-cdk/asset-node-proxy-agent-v5@^2.0.77":
+ version "2.0.77"
+ resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.77.tgz#25ad8e416945c3a51881eedad3ee84516f23ecee"
+ integrity sha512-KKrnyIujGN38yOb0MIm0EnB3n7z83NRl9VgKvN0flOyB8C+3Ey+XKxLYfjoXJ/BulB0161eBJXXwGdP8xQrQJw==
-"@aws-cdk/lambda-layer-kubectl-v24@^2.0.113":
- version "2.0.113"
- resolved "https://registry.npmjs.org/@aws-cdk/lambda-layer-kubectl-v24/-/lambda-layer-kubectl-v24-2.0.113.tgz#7b22497eb41bd88cfdea73a34c398721514b72c6"
- integrity sha512-8mn6/5s/EDxmQP1cnoIAYqGwHmUl+Jimbnut/7Jhz6MzvmkDU9olpem1W6bESmrI6RFTX/1UABz+jaYthmqlXA==
+"@aws-cdk/lambda-layer-kubectl-v24@^2.0.121":
+ version "2.0.121"
+ resolved "https://registry.npmjs.org/@aws-cdk/lambda-layer-kubectl-v24/-/lambda-layer-kubectl-v24-2.0.121.tgz#eddc9dca05add57bcd15301356b74a616e016630"
+ integrity sha512-jCoOZMzizRga6rhIkFS5xRIgJjxTPdq6L4a7oIO0fDPLqohS9KWX3XKB0vOEIafmLrZ27BDSql39s7y5xkj33w==
"@babel/code-frame@7.12.11":
version "7.12.11"
@@ -361,115 +361,115 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"
-"@esbuild/android-arm64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.10.tgz#ad2ee47dd021035abdfb0c38848ff77a1e1918c4"
- integrity sha512-ht1P9CmvrPF5yKDtyC+z43RczVs4rrHpRqrmIuoSvSdn44Fs1n6DGlpZKdK6rM83pFLbVaSUwle8IN+TPmkv7g==
-
-"@esbuild/android-arm@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.10.tgz#bb5a68af8adeb94b30eadee7307404dc5237d076"
- integrity sha512-7YEBfZ5lSem9Tqpsz+tjbdsEshlO9j/REJrfv4DXgKTt1+/MHqGwbtlyxQuaSlMeUZLxUKBaX8wdzlTfHkmnLw==
-
-"@esbuild/android-x64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.10.tgz#751d5d8ae9ece1efa9627b689c888eb85b102360"
- integrity sha512-CYzrm+hTiY5QICji64aJ/xKdN70IK8XZ6iiyq0tZkd3tfnwwSWTYH1t3m6zyaaBxkuj40kxgMyj1km/NqdjQZA==
-
-"@esbuild/darwin-arm64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.10.tgz#85601ee7efb2129cd3218d5bcbe8da1173bc1e8b"
- integrity sha512-3HaGIowI+nMZlopqyW6+jxYr01KvNaLB5znXfbyyjuo4lE0VZfvFGcguIJapQeQMS4cX/NEispwOekJt3gr5Dg==
-
-"@esbuild/darwin-x64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.10.tgz#362c7e988c61fe72d5edef4f717e4b4fc728da98"
- integrity sha512-J4MJzGchuCRG5n+B4EHpAMoJmBeAE1L3wGYDIN5oWNqX0tEr7VKOzw0ymSwpoeSpdCa030lagGUfnfhS7OvzrQ==
-
-"@esbuild/freebsd-arm64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.10.tgz#e8a85a46ede7c3a048a12f16b9d551d25adc8bb1"
- integrity sha512-ZkX40Z7qCbugeK4U5/gbzna/UQkM9d9LNV+Fro8r7HA7sRof5Rwxc46SsqeMvB5ZaR0b1/ITQ/8Y1NmV2F0fXQ==
-
-"@esbuild/freebsd-x64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.10.tgz#cd0a1b68bffbcb5b65e65b3fd542e8c7c3edd86b"
- integrity sha512-0m0YX1IWSLG9hWh7tZa3kdAugFbZFFx9XrvfpaCMMvrswSTvUZypp0NFKriUurHpBA3xsHVE9Qb/0u2Bbi/otg==
-
-"@esbuild/linux-arm64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.10.tgz#13b183f432512ed9d9281cc89476caeebe9e9123"
- integrity sha512-g1EZJR1/c+MmCgVwpdZdKi4QAJ8DCLP5uTgLWSAVd9wlqk9GMscaNMEViG3aE1wS+cNMzXXgdWiW/VX4J+5nTA==
-
-"@esbuild/linux-arm@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.10.tgz#dd11e0a5faa3ea94dc80278a601c3be7b4fdf1da"
- integrity sha512-whRdrrl0X+9D6o5f0sTZtDM9s86Xt4wk1bf7ltx6iQqrIIOH+sre1yjpcCdrVXntQPCNw/G+XqsD4HuxeS+2QA==
-
-"@esbuild/linux-ia32@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.10.tgz#4d836f87b92807d9292379963c4888270d282405"
- integrity sha512-1vKYCjfv/bEwxngHERp7huYfJ4jJzldfxyfaF7hc3216xiDA62xbXJfRlradiMhGZbdNLj2WA1YwYFzs9IWNPw==
-
-"@esbuild/linux-loong64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.10.tgz#92eb2ee200c17ef12c7fb3b648231948699e7a4c"
- integrity sha512-mvwAr75q3Fgc/qz3K6sya3gBmJIYZCgcJ0s7XshpoqIAIBszzfXsqhpRrRdVFAyV1G9VUjj7VopL2HnAS8aHFA==
-
-"@esbuild/linux-mips64el@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.10.tgz#14f7d50c40fe7f7ee545a9bd07c6f6e4cba5570e"
- integrity sha512-XilKPgM2u1zR1YuvCsFQWl9Fc35BqSqktooumOY2zj7CSn5czJn279j9TE1JEqSqz88izJo7yE4x3LSf7oxHzg==
-
-"@esbuild/linux-ppc64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.10.tgz#1ab5802e93ae511ce9783e1cb95f37df0f84c4af"
- integrity sha512-kM4Rmh9l670SwjlGkIe7pYWezk8uxKHX4Lnn5jBZYBNlWpKMBCVfpAgAJqp5doLobhzF3l64VZVrmGeZ8+uKmQ==
-
-"@esbuild/linux-riscv64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.10.tgz#4fae25201ef7ad868731d16c8b50b0e386c4774a"
- integrity sha512-r1m9ZMNJBtOvYYGQVXKy+WvWd0BPvSxMsVq8Hp4GzdMBQvfZRvRr5TtX/1RdN6Va8JMVQGpxqde3O+e8+khNJQ==
-
-"@esbuild/linux-s390x@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.10.tgz#126254d8335bb3586918b1ca60beb4abb46e6d54"
- integrity sha512-LsY7QvOLPw9WRJ+fU5pNB3qrSfA00u32ND5JVDrn/xG5hIQo3kvTxSlWFRP0NJ0+n6HmhPGG0Q4jtQsb6PFoyg==
-
-"@esbuild/linux-x64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.10.tgz#7fa4667b2df81ea0538e1b75e607cf04e526ce91"
- integrity sha512-zJUfJLebCYzBdIz/Z9vqwFjIA7iSlLCFvVi7glMgnu2MK7XYigwsonXshy9wP9S7szF+nmwrelNaP3WGanstEg==
-
-"@esbuild/netbsd-x64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.10.tgz#2d24727ddc2305619685bf237a46d6087a02ee9a"
- integrity sha512-lOMkailn4Ok9Vbp/q7uJfgicpDTbZFlXlnKT2DqC8uBijmm5oGtXAJy2ZZVo5hX7IOVXikV9LpCMj2U8cTguWA==
-
-"@esbuild/openbsd-x64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.10.tgz#bf3fc38ee6ecf028c1f0cfe11f61d53cc75fef12"
- integrity sha512-/VE0Kx6y7eekqZ+ZLU4AjMlB80ov9tEz4H067Y0STwnGOYL8CsNg4J+cCmBznk1tMpxMoUOf0AbWlb1d2Pkbig==
-
-"@esbuild/sunos-x64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.10.tgz#8deabd6dfec6256f80bb101bc59d29dbae99c69b"
- integrity sha512-ERNO0838OUm8HfUjjsEs71cLjLMu/xt6bhOlxcJ0/1MG3hNqCmbWaS+w/8nFLa0DDjbwZQuGKVtCUJliLmbVgg==
-
-"@esbuild/win32-arm64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.10.tgz#1ec1ee04c788c4c57a83370b6abf79587b3e4965"
- integrity sha512-fXv+L+Bw2AeK+XJHwDAQ9m3NRlNemG6Z6ijLwJAAVdu4cyoFbBWbEtyZzDeL+rpG2lWI51cXeMt70HA8g2MqIg==
-
-"@esbuild/win32-ia32@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.10.tgz#a362528d7f3ad5d44fa8710a96764677ef92ebe9"
- integrity sha512-3s+HADrOdCdGOi5lnh5DMQEzgbsFsd4w57L/eLKKjMnN0CN4AIEP0DCP3F3N14xnxh3ruNc32A0Na9zYe1Z/AQ==
-
-"@esbuild/win32-x64@0.17.10":
- version "0.17.10"
- resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.10.tgz#ac779220f2da96afd480fb3f3148a292f66e7fc3"
- integrity sha512-oP+zFUjYNaMNmjTwlFtWep85hvwUu19cZklB3QsBOcZSs6y7hmH4LNCJ7075bsqzYaNvZFXJlAVaQ2ApITDXtw==
+"@esbuild/android-arm64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.11.tgz#52c3e6cabc19c5e4c1c0c01cb58f0442338e1c14"
+ integrity sha512-QnK4d/zhVTuV4/pRM4HUjcsbl43POALU2zvBynmrrqZt9LPcLA3x1fTZPBg2RRguBQnJcnU059yKr+bydkntjg==
+
+"@esbuild/android-arm@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.11.tgz#f3fc768235aecbeb840d0049fdf13cd28592105f"
+ integrity sha512-CdyX6sRVh1NzFCsf5vw3kULwlAhfy9wVt8SZlrhQ7eL2qBjGbFhRBWkkAzuZm9IIEOCKJw4DXA6R85g+qc8RDw==
+
+"@esbuild/android-x64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.11.tgz#443ed47771a7e917e4282469ba350d117473550c"
+ integrity sha512-3PL3HKtsDIXGQcSCKtWD/dy+mgc4p2Tvo2qKgKHj9Yf+eniwFnuoQ0OUhlSfAEpKAFzF9N21Nwgnap6zy3L3MQ==
+
+"@esbuild/darwin-arm64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.11.tgz#0e8c78d94d5759a48521dbfd83189d2ed3499a16"
+ integrity sha512-pJ950bNKgzhkGNO3Z9TeHzIFtEyC2GDQL3wxkMApDEghYx5Qers84UTNc1bAxWbRkuJOgmOha5V0WUeh8G+YGw==
+
+"@esbuild/darwin-x64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.11.tgz#2405cfdf70eb961c7cf973463ca7263dc2004c88"
+ integrity sha512-iB0dQkIHXyczK3BZtzw1tqegf0F0Ab5texX2TvMQjiJIWXAfM4FQl7D909YfXWnB92OQz4ivBYQ2RlxBJrMJOw==
+
+"@esbuild/freebsd-arm64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.11.tgz#d5138e873e15f87bd4564c024dfa00ef37e623fd"
+ integrity sha512-7EFzUADmI1jCHeDRGKgbnF5sDIceZsQGapoO6dmw7r/ZBEKX7CCDnIz8m9yEclzr7mFsd+DyasHzpjfJnmBB1Q==
+
+"@esbuild/freebsd-x64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.11.tgz#e850b58b8fabf8e9ef0e125af3c25229ad2d6c38"
+ integrity sha512-iPgenptC8i8pdvkHQvXJFzc1eVMR7W2lBPrTE6GbhR54sLcF42mk3zBOjKPOodezzuAz/KSu8CPyFSjcBMkE9g==
+
+"@esbuild/linux-arm64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.11.tgz#2bfb93d0809ec2357c12ebb27736b750c9ae0aa5"
+ integrity sha512-Qxth3gsWWGKz2/qG2d5DsW/57SeA2AmpSMhdg9TSB5Svn2KDob3qxfQSkdnWjSd42kqoxIPy3EJFs+6w1+6Qjg==
+
+"@esbuild/linux-arm@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.11.tgz#e56fb3b76828317a704f4a167c5bd790fe5314e7"
+ integrity sha512-M9iK/d4lgZH0U5M1R2p2gqhPV/7JPJcRz+8O8GBKVgqndTzydQ7B2XGDbxtbvFkvIs53uXTobOhv+RyaqhUiMg==
+
+"@esbuild/linux-ia32@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.11.tgz#59fa1c49b271793d14eb5effc757e8c0d0cb2cab"
+ integrity sha512-dB1nGaVWtUlb/rRDHmuDQhfqazWE0LMro/AIbT2lWM3CDMHJNpLckH+gCddQyhhcLac2OYw69ikUMO34JLt3wA==
+
+"@esbuild/linux-loong64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.11.tgz#89575bc189099c03a36daa54f3f481780c7fd502"
+ integrity sha512-aCWlq70Q7Nc9WDnormntGS1ar6ZFvUpqr8gXtO+HRejRYPweAFQN615PcgaSJkZjhHp61+MNLhzyVALSF2/Q0g==
+
+"@esbuild/linux-mips64el@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.11.tgz#0e18ca039dc7e4645efd8edc1b10952933eb6b1b"
+ integrity sha512-cGeGNdQxqY8qJwlYH1BP6rjIIiEcrM05H7k3tR7WxOLmD1ZxRMd6/QIOWMb8mD2s2YJFNRuNQ+wjMhgEL2oCEw==
+
+"@esbuild/linux-ppc64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.11.tgz#2d152cb3a253afb8c100a165ad132dc96f36cb11"
+ integrity sha512-BdlziJQPW/bNe0E8eYsHB40mYOluS+jULPCjlWiHzDgr+ZBRXPtgMV1nkLEGdpjrwgmtkZHEGEPaKdS/8faLDA==
+
+"@esbuild/linux-riscv64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.11.tgz#c6ac494a81221d53d65b33e665c7df1747952d3c"
+ integrity sha512-MDLwQbtF+83oJCI1Cixn68Et/ME6gelmhssPebC40RdJaect+IM+l7o/CuG0ZlDs6tZTEIoxUe53H3GmMn8oMA==
+
+"@esbuild/linux-s390x@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.11.tgz#4bad33894bc7415cea4be8fa90fe456226a424ad"
+ integrity sha512-4N5EMESvws0Ozr2J94VoUD8HIRi7X0uvUv4c0wpTHZyZY9qpaaN7THjosdiW56irQ4qnJ6Lsc+i+5zGWnyqWqQ==
+
+"@esbuild/linux-x64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.11.tgz#903fda743459f530a16a6c6ee8d2c0f6c1a12fc7"
+ integrity sha512-rM/v8UlluxpytFSmVdbCe1yyKQd/e+FmIJE2oPJvbBo+D0XVWi1y/NQ4iTNx+436WmDHQBjVLrbnAQLQ6U7wlw==
+
+"@esbuild/netbsd-x64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.11.tgz#b589239fe7d9b16ee03c5e191f3f5b640f1518a1"
+ integrity sha512-4WaAhuz5f91h3/g43VBGdto1Q+X7VEZfpcWGtOFXnggEuLvjV+cP6DyLRU15IjiU9fKLLk41OoJfBFN5DhPvag==
+
+"@esbuild/openbsd-x64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.11.tgz#b355019754116bef39ec688f8fd2fe6471b9779b"
+ integrity sha512-UBj135Nx4FpnvtE+C8TWGp98oUgBcmNmdYgl5ToKc0mBHxVVqVE7FUS5/ELMImOp205qDAittL6Ezhasc2Ev/w==
+
+"@esbuild/sunos-x64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.11.tgz#2ea47fb592e68406e5025a7696dc714fc6a115dc"
+ integrity sha512-1/gxTifDC9aXbV2xOfCbOceh5AlIidUrPsMpivgzo8P8zUtczlq1ncFpeN1ZyQJ9lVs2hILy1PG5KPp+w8QPPg==
+
+"@esbuild/win32-arm64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.11.tgz#47e6fdab17c4c52e6e0d606dd9cb843b29826325"
+ integrity sha512-vtSfyx5yRdpiOW9yp6Ax0zyNOv9HjOAw8WaZg3dF5djEHKKm3UnoohftVvIJtRh0Ec7Hso0RIdTqZvPXJ7FdvQ==
+
+"@esbuild/win32-ia32@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.11.tgz#a97273aa3164c8d8f501899f55cc75a4a79599a3"
+ integrity sha512-GFPSLEGQr4wHFTiIUJQrnJKZhZjjq4Sphf+mM76nQR6WkQn73vm7IsacmBRPkALfpOCHsopSvLgqdd4iUW2mYw==
+
+"@esbuild/win32-x64@0.17.11":
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.11.tgz#9be796d93ae27b636da32d960899a4912bca27a1"
+ integrity sha512-N9vXqLP3eRL8BqSy8yn4Y98cZI2pZ8fyuHx6lKjiG2WABpT2l01TXdzq5Ma2ZUBzfB7tx5dXVhge8X9u0S70ZQ==
"@eslint/eslintrc@^0.4.3":
version "0.4.3"
@@ -795,10 +795,18 @@
chalk "^4.1.2"
semver "^7.3.8"
-"@jsii/spec@1.76.0", "@jsii/spec@^1.76.0":
- version "1.76.0"
- resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.76.0.tgz#9323aec77f4e0a3ec7c68a5c257b0841f5ad0731"
- integrity sha512-7L8KeG44ECq0ulKYWaOr0FQvnFW7RavjxEGvMAdKfIOXb5mZyGERnj5pKl5kmq2m1lWE2VBZELoTfM7dDlAPtg==
+"@jsii/check-node@1.77.0":
+ version "1.77.0"
+ resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.77.0.tgz#46e0e4201f5006cef0c5d11a1ce4b00b6ce27801"
+ integrity sha512-kgq4h5SrpIuM9CZ6uZVZ9KrJCPSn6zwz4y60ZEIFMA5aqkBN1n7MhTJglG6I8IaL2uYm7P5kZf6+eGNI+n3tig==
+ dependencies:
+ chalk "^4.1.2"
+ semver "^7.3.8"
+
+"@jsii/spec@1.77.0", "@jsii/spec@^1.76.0", "@jsii/spec@^1.77.0":
+ version "1.77.0"
+ resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.77.0.tgz#2ee31c32e26d61880e422a546a62296c6543bff9"
+ integrity sha512-QmwXRREX8W1YOdKHbfu+Tw0rygdCJ2AYcKt7iu56Is2giQ9doyRLKvzywXoKxJjZtj9E7Sp0GdDob8pl8cwmlg==
dependencies:
ajv "^8.12.0"
@@ -2157,9 +2165,9 @@
integrity sha512-uv53RrNdhbkV/3VmVCtfImfYCWC3GTTRn3R11Whni3EJ+gb178tkZBVNj2edLY5CMrB749dQi+SJkg87jsN8UQ==
"@types/node@*":
- version "18.14.2"
- resolved "https://registry.npmjs.org/@types/node/-/node-18.14.2.tgz#c076ed1d7b6095078ad3cf21dfeea951842778b1"
- integrity sha512-1uEQxww3DaghA0RxqHx0O0ppVlo43pJhepY51OxuQIKHpjbnYLA7vcdwioNPzIqmC2u3I/dmylcqjlh0e7AyUA==
+ version "18.14.6"
+ resolved "https://registry.npmjs.org/@types/node/-/node-18.14.6.tgz#ae1973dd2b1eeb1825695bb11ebfb746d27e3e93"
+ integrity sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA==
"@types/node@18.11.19":
version "18.11.19"
@@ -2167,9 +2175,9 @@
integrity sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw==
"@types/node@^16.9.2":
- version "16.18.13"
- resolved "https://registry.npmjs.org/@types/node/-/node-16.18.13.tgz#c572f8837094c6e3b73918a68674c784f6877fc0"
- integrity sha512-l0/3XZ153UTlNOnZK8xSNoJlQda9/WnYgiTdcKKPJSZjdjI9MU+A9oMXOesAWLSnqAaaJhj3qfQsU07Dr8OUwg==
+ version "16.18.14"
+ resolved "https://registry.npmjs.org/@types/node/-/node-16.18.14.tgz#5465ce598486a703caddbefe8603f8a2cffa3461"
+ integrity sha512-wvzClDGQXOCVNU4APPopC2KtMYukaF1MN/W3xAmslx22Z4/IF1/izDMekuyoUlwfnDHYCIZGaj7jMwnJKBTxKw==
"@types/normalize-package-data@^2.4.0":
version "2.4.1"
@@ -2328,13 +2336,13 @@
tsutils "^3.21.0"
"@typescript-eslint/eslint-plugin@^5":
- version "5.54.0"
- resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.54.0.tgz#2c821ad81b2c786d142279a8292090f77d1881f4"
- integrity sha512-+hSN9BdSr629RF02d7mMtXhAJvDTyCbprNYJKrXETlul/Aml6YZwd90XioVbjejQeHbb3R8Dg0CkRgoJDxo8aw==
+ version "5.54.1"
+ resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.54.1.tgz#0c5091289ce28372e38ab8d28e861d2dbe1ab29e"
+ integrity sha512-a2RQAkosH3d3ZIV08s3DcL/mcGc2M/UC528VkPULFxR9VnVPT8pBu0IyBAJJmVsCmhVfwQX1v6q+QGnmSe1bew==
dependencies:
- "@typescript-eslint/scope-manager" "5.54.0"
- "@typescript-eslint/type-utils" "5.54.0"
- "@typescript-eslint/utils" "5.54.0"
+ "@typescript-eslint/scope-manager" "5.54.1"
+ "@typescript-eslint/type-utils" "5.54.1"
+ "@typescript-eslint/utils" "5.54.1"
debug "^4.3.4"
grapheme-splitter "^1.0.4"
ignore "^5.2.0"
@@ -2366,13 +2374,13 @@
debug "^4.3.1"
"@typescript-eslint/parser@^5":
- version "5.54.0"
- resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.54.0.tgz#def186eb1b1dbd0439df0dacc44fb6d8d5c417fe"
- integrity sha512-aAVL3Mu2qTi+h/r04WI/5PfNWvO6pdhpeMRWk9R7rEV4mwJNzoWf5CCU5vDKBsPIFQFjEq1xg7XBI2rjiMXQbQ==
+ version "5.54.1"
+ resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.54.1.tgz#05761d7f777ef1c37c971d3af6631715099b084c"
+ integrity sha512-8zaIXJp/nG9Ff9vQNh7TI+C3nA6q6iIsGJ4B4L6MhZ7mHnTMR4YP5vp2xydmFXIy8rpyIVbNAG44871LMt6ujg==
dependencies:
- "@typescript-eslint/scope-manager" "5.54.0"
- "@typescript-eslint/types" "5.54.0"
- "@typescript-eslint/typescript-estree" "5.54.0"
+ "@typescript-eslint/scope-manager" "5.54.1"
+ "@typescript-eslint/types" "5.54.1"
+ "@typescript-eslint/typescript-estree" "5.54.1"
debug "^4.3.4"
"@typescript-eslint/scope-manager@4.33.0":
@@ -2383,21 +2391,21 @@
"@typescript-eslint/types" "4.33.0"
"@typescript-eslint/visitor-keys" "4.33.0"
-"@typescript-eslint/scope-manager@5.54.0":
- version "5.54.0"
- resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.0.tgz#74b28ac9a3fc8166f04e806c957adb8c1fd00536"
- integrity sha512-VTPYNZ7vaWtYna9M4oD42zENOBrb+ZYyCNdFs949GcN8Miwn37b8b7eMj+EZaq7VK9fx0Jd+JhmkhjFhvnovhg==
+"@typescript-eslint/scope-manager@5.54.1":
+ version "5.54.1"
+ resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.1.tgz#6d864b4915741c608a58ce9912edf5a02bb58735"
+ integrity sha512-zWKuGliXxvuxyM71UA/EcPxaviw39dB2504LqAmFDjmkpO8qNLHcmzlh6pbHs1h/7YQ9bnsO8CCcYCSA8sykUg==
dependencies:
- "@typescript-eslint/types" "5.54.0"
- "@typescript-eslint/visitor-keys" "5.54.0"
+ "@typescript-eslint/types" "5.54.1"
+ "@typescript-eslint/visitor-keys" "5.54.1"
-"@typescript-eslint/type-utils@5.54.0":
- version "5.54.0"
- resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.54.0.tgz#390717216eb61393a0cad2995da154b613ba7b26"
- integrity sha512-WI+WMJ8+oS+LyflqsD4nlXMsVdzTMYTxl16myXPaCXnSgc7LWwMsjxQFZCK/rVmTZ3FN71Ct78ehO9bRC7erYQ==
+"@typescript-eslint/type-utils@5.54.1":
+ version "5.54.1"
+ resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.54.1.tgz#4825918ec27e55da8bb99cd07ec2a8e5f50ab748"
+ integrity sha512-WREHsTz0GqVYLIbzIZYbmUUr95DKEKIXZNH57W3s+4bVnuF1TKe2jH8ZNH8rO1CeMY3U4j4UQeqPNkHMiGem3g==
dependencies:
- "@typescript-eslint/typescript-estree" "5.54.0"
- "@typescript-eslint/utils" "5.54.0"
+ "@typescript-eslint/typescript-estree" "5.54.1"
+ "@typescript-eslint/utils" "5.54.1"
debug "^4.3.4"
tsutils "^3.21.0"
@@ -2406,10 +2414,10 @@
resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72"
integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==
-"@typescript-eslint/types@5.54.0":
- version "5.54.0"
- resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz#7d519df01f50739254d89378e0dcac504cab2740"
- integrity sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==
+"@typescript-eslint/types@5.54.1":
+ version "5.54.1"
+ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.1.tgz#29fbac29a716d0f08c62fe5de70c9b6735de215c"
+ integrity sha512-G9+1vVazrfAfbtmCapJX8jRo2E4MDXxgm/IMOF4oGh3kq7XuK3JRkOg6y2Qu1VsTRmWETyTkWt1wxy7X7/yLkw==
"@typescript-eslint/typescript-estree@4.33.0", "@typescript-eslint/typescript-estree@^4.33.0":
version "4.33.0"
@@ -2424,29 +2432,29 @@
semver "^7.3.5"
tsutils "^3.21.0"
-"@typescript-eslint/typescript-estree@5.54.0":
- version "5.54.0"
- resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.0.tgz#f6f3440cabee8a43a0b25fa498213ebb61fdfe99"
- integrity sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==
+"@typescript-eslint/typescript-estree@5.54.1":
+ version "5.54.1"
+ resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.1.tgz#df7b6ae05fd8fef724a87afa7e2f57fa4a599be1"
+ integrity sha512-bjK5t+S6ffHnVwA0qRPTZrxKSaFYocwFIkZx5k7pvWfsB1I57pO/0M0Skatzzw1sCkjJ83AfGTL0oFIFiDX3bg==
dependencies:
- "@typescript-eslint/types" "5.54.0"
- "@typescript-eslint/visitor-keys" "5.54.0"
+ "@typescript-eslint/types" "5.54.1"
+ "@typescript-eslint/visitor-keys" "5.54.1"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
semver "^7.3.7"
tsutils "^3.21.0"
-"@typescript-eslint/utils@5.54.0":
- version "5.54.0"
- resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.54.0.tgz#3db758aae078be7b54b8ea8ea4537ff6cd3fbc21"
- integrity sha512-cuwm8D/Z/7AuyAeJ+T0r4WZmlnlxQ8wt7C7fLpFlKMR+dY6QO79Cq1WpJhvZbMA4ZeZGHiRWnht7ZJ8qkdAunw==
+"@typescript-eslint/utils@5.54.1":
+ version "5.54.1"
+ resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.54.1.tgz#7a3ee47409285387b9d4609ea7e1020d1797ec34"
+ integrity sha512-IY5dyQM8XD1zfDe5X8jegX6r2EVU5o/WJnLu/znLPWCBF7KNGC+adacXnt5jEYS9JixDcoccI6CvE4RCjHMzCQ==
dependencies:
"@types/json-schema" "^7.0.9"
"@types/semver" "^7.3.12"
- "@typescript-eslint/scope-manager" "5.54.0"
- "@typescript-eslint/types" "5.54.0"
- "@typescript-eslint/typescript-estree" "5.54.0"
+ "@typescript-eslint/scope-manager" "5.54.1"
+ "@typescript-eslint/types" "5.54.1"
+ "@typescript-eslint/typescript-estree" "5.54.1"
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
semver "^7.3.7"
@@ -2459,12 +2467,12 @@
"@typescript-eslint/types" "4.33.0"
eslint-visitor-keys "^2.0.0"
-"@typescript-eslint/visitor-keys@5.54.0":
- version "5.54.0"
- resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz#846878afbf0cd67c19cfa8d75947383d4490db8f"
- integrity sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==
+"@typescript-eslint/visitor-keys@5.54.1":
+ version "5.54.1"
+ resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.1.tgz#d7a8a0f7181d6ac748f4d47b2306e0513b98bf8b"
+ integrity sha512-q8iSoHTgwCfgcRJ2l2x+xCbu8nBlRAlsQ33k24Adj8eoVBE0f8dUeI+bAa8F84Mv05UGbAx57g2zrRsYIooqQg==
dependencies:
- "@typescript-eslint/types" "5.54.0"
+ "@typescript-eslint/types" "5.54.1"
eslint-visitor-keys "^3.3.0"
"@xmldom/xmldom@^0.8.6":
@@ -2541,12 +2549,12 @@ agent-base@6, agent-base@^6.0.0, agent-base@^6.0.2:
debug "4"
agentkeepalive@^4.1.3, agentkeepalive@^4.2.1:
- version "4.2.1"
- resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717"
- integrity sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==
+ version "4.3.0"
+ resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.3.0.tgz#bb999ff07412653c1803b3ced35e50729830a255"
+ integrity sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==
dependencies:
debug "^4.1.0"
- depd "^1.1.2"
+ depd "^2.0.0"
humanize-ms "^1.2.1"
aggregate-error@^3.0.0:
@@ -2887,10 +2895,10 @@ aws-sdk-mock@5.6.0:
sinon "^11.1.1"
traverse "^0.6.6"
-aws-sdk@^2.1325.0, aws-sdk@^2.928.0:
- version "2.1325.0"
- resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1325.0.tgz#4529ede089ee8db79d6eb04ab46a211bfddbbe5b"
- integrity sha512-ztg9HG5aoUHTprY+/eqjqb25E4joCgz+8ToxsP4OSKFQCtaBcF6my03j4e/J2j3fmpPifJnZSPMu4kV7DBj8WA==
+aws-sdk@^2.1329.0, aws-sdk@^2.928.0:
+ version "2.1329.0"
+ resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1329.0.tgz#6a83a1f7f8e1b3cdc8f8bdc3b7db7bfd43812b78"
+ integrity sha512-F5M9x/T+PanPiYGiL95atFE6QiwzJWwgPahaEgUdq+qvVAgruiNy5t6nw2B5tBB/yWDPPavHFip3UsXeO0qU3Q==
dependencies:
buffer "4.9.2"
events "1.1.1"
@@ -3258,9 +3266,9 @@ camelcase@^6.2.0, camelcase@^6.3.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001449:
- version "1.0.30001458"
- resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001458.tgz#871e35866b4654a7d25eccca86864f411825540c"
- integrity sha512-lQ1VlUUq5q9ro9X+5gOEyH7i3vm+AYVT1WDCVB69XOZ17KZRhnZ9J0Sqz7wTHQaLBJccNCHq8/Ww5LlOIZbB0w==
+ version "1.0.30001462"
+ resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001462.tgz#b2e801e37536d453731286857c8520d3dcee15fe"
+ integrity sha512-PDd20WuOBPiasZ7KbFnmQRyuLE7cFXW2PVd7dmALzbkUXEP46upAuCDm9eY9vho8fgNMGmbAX92QBZHzcnWIqw==
case@1.6.3, case@^1.6.3:
version "1.6.3"
@@ -3272,29 +3280,29 @@ caseless@~0.12.0:
resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==
-cdk-generate-synthetic-examples@^0.1.167:
- version "0.1.167"
- resolved "https://registry.npmjs.org/cdk-generate-synthetic-examples/-/cdk-generate-synthetic-examples-0.1.167.tgz#1fba547e4cab09b914c0cf36e72d618cedbf8df3"
- integrity sha512-rjSRrw1fzalETc1tI5pm8aytdnuaqa6/oDD/r2fsSPzWzoOtV8W+TCNx4/BkPgZxaKJwwURpUAx7Jl8R12eZWg==
+cdk-generate-synthetic-examples@^0.1.173:
+ version "0.1.173"
+ resolved "https://registry.npmjs.org/cdk-generate-synthetic-examples/-/cdk-generate-synthetic-examples-0.1.173.tgz#2792893986c57e9859e23a178c146736845bf51f"
+ integrity sha512-BTf4tAWfmGZ2nZgQmFZuCpU2o/Ay8YvizYhDTKmqFlipm12luewZkSBP9U52QQZRRiC+Wnn5YFAetJF4Ho4IEg==
dependencies:
- "@jsii/spec" "^1.76.0"
+ "@jsii/spec" "^1.77.0"
fs-extra "^10.1.0"
- jsii "^1.76.0"
- jsii-reflect "^1.76.0"
- jsii-rosetta "^1.76.0"
+ jsii "^1.77.0"
+ jsii-reflect "^1.77.0"
+ jsii-rosetta "^1.77.0"
yargs "^17.7.1"
-cdk8s-plus-24@2.4.40:
- version "2.4.40"
- resolved "https://registry.npmjs.org/cdk8s-plus-24/-/cdk8s-plus-24-2.4.40.tgz#f27c4c5f0adf20ec58294ac7452fdbe3bcb64a9a"
- integrity sha512-vDs1Q1XJ1cVg9ap/onOPEC4QRhuCMIHod7TeeQqO8v6I1bB2W9sZc52aLBEc4u9yEuI7/pP2t1rL9m+obcITvw==
+cdk8s-plus-24@2.4.46:
+ version "2.4.46"
+ resolved "https://registry.npmjs.org/cdk8s-plus-24/-/cdk8s-plus-24-2.4.46.tgz#4168a1cda18daa828494384f6866a7c35bb3578c"
+ integrity sha512-GMkCQ5NpKxFgbSy8eKCGWr3Eu5QeL2cmNQ1tcQYE7VELhoJfGVxOESRmdN8W6f9eik50mHql2V0Np/kKpNQhtA==
dependencies:
minimatch "^3.1.2"
-cdk8s@^2.7.15:
- version "2.7.15"
- resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-2.7.15.tgz#f7d40a17e5ce662208d2713e02a1902593d1caa0"
- integrity sha512-bQIYHUas23SnjSso1ajZdzs0uKY76jisv41KhdL0RMaG+kvHZ5U6WqbKgwMfocPB9DDKxl+k00emn/g5Eh+Nvg==
+cdk8s@^2.7.23:
+ version "2.7.23"
+ resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-2.7.23.tgz#d9be5e0ec64ac2f4e8427b5c6710e716117cd85b"
+ integrity sha512-mofg+0B6VkIXMbW6yWNW6fxAiiMZMUllRm5MDtWby+WuNEKVVHNmtRXD2CtJrrdZ1HVOUJwF9C5+/h2yJC/XYA==
dependencies:
fast-json-patch "^3.1.1"
follow-redirects "^1.15.2"
@@ -3526,10 +3534,10 @@ co@^4.6.0:
resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==
-codemaker@1.76.0, codemaker@^1.76.0:
- version "1.76.0"
- resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.76.0.tgz#28a2c517ee53bdcfb02030c82520f669db6e5286"
- integrity sha512-EqnBOOiEV+kjyRghA5Z0TX22VnVH2Mgo2diOSYelcmntlTSiQkZimGof6jxE5j1buzjEVBK1d1W7bhRKYGegUg==
+codemaker@1.77.0, codemaker@^1.77.0:
+ version "1.77.0"
+ resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.77.0.tgz#8fa150ab21c8fcb0f6ee557bbc3160529c03499c"
+ integrity sha512-XSHAqkXMn5OtcebJLVMFEW9puB+4ZmmChBFspEf62ZeYzs+ggSXEHW9GrjC/ZyX+sfxql6ciJP3z25sSp4VsVQ==
dependencies:
camelcase "^6.3.0"
decamelize "^5.0.1"
@@ -3699,9 +3707,9 @@ console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-
integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==
constructs@^10.0.0:
- version "10.1.264"
- resolved "https://registry.npmjs.org/constructs/-/constructs-10.1.264.tgz#84d418b582e6938b998d67e493a6db49011277bc"
- integrity sha512-f9db+zgEV9xiIhmHxBuxNU2DjmnIQkM5M4IyLvjP+pBtS3r+PflQFwdZlDuy3K84NMnSaI4J/Sz5i5aNgwmDAg==
+ version "10.1.270"
+ resolved "https://registry.npmjs.org/constructs/-/constructs-10.1.270.tgz#a9e55f33504b14561fe3dc971b9075b864610272"
+ integrity sha512-EuPb/VI9q0pOy/deaddOIO0RKdJXpBv+qTo7AbYK2dcEq6Kd7PJ8TnDQ5XwotWgB7YaXuTPddIgFDyyIstHcsA==
conventional-changelog-angular@^5.0.12:
version "5.0.13"
@@ -4159,16 +4167,11 @@ delegates@^1.0.0:
resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==
-depd@2.0.0:
+depd@2.0.0, depd@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
-depd@^1.1.2:
- version "1.1.2"
- resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
- integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==
-
dependency-tree@^8.1.1:
version "8.1.2"
resolved "https://registry.npmjs.org/dependency-tree/-/dependency-tree-8.1.2.tgz#c9e652984f53bd0239bc8a3e50cbd52f05b2e770"
@@ -4414,9 +4417,9 @@ ecc-jsbn@~0.1.1:
safer-buffer "^2.1.0"
electron-to-chromium@^1.4.284:
- version "1.4.314"
- resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.314.tgz#33e4ad7a2ca2ddbe2e113874cc0c0e2a00cb46bf"
- integrity sha512-+3RmNVx9hZLlc0gW//4yep0K5SYKmIvB5DXg1Yg6varsuAHlHwTeqeygfS8DWwLCsNOWrgj+p9qgM5WYjw1lXQ==
+ version "1.4.322"
+ resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.322.tgz#e0afa1d115b66c1d47869db40d8f2f3729cecc16"
+ integrity sha512-KovjizNC9XB7dno/2GjxX8VS0SlfPpCjtyoKft+bCO+UfD8bFy16hY4Sh9s0h9BDxbRH2U0zX5VBjpM1LTcNlg==
emittery@^0.8.1:
version "0.8.1"
@@ -4599,33 +4602,33 @@ es6-weak-map@^2.0.3:
es6-iterator "^2.0.3"
es6-symbol "^3.1.1"
-esbuild@^0.17.10:
- version "0.17.10"
- resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.17.10.tgz#3be050561b34c5dc05b46978f4e1f326d5cc9437"
- integrity sha512-n7V3v29IuZy5qgxx25TKJrEm0FHghAlS6QweUcyIgh/U0zYmQcvogWROitrTyZId1mHSkuhhuyEXtI9OXioq7A==
+esbuild@^0.17.11:
+ version "0.17.11"
+ resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.17.11.tgz#9f3122643b21d7e7731e42f18576c10bfa28152b"
+ integrity sha512-pAMImyokbWDtnA/ufPxjQg0fYo2DDuzAlqwnDvbXqHLphe+m80eF++perYKVm8LeTuj2zUuFXC+xgSVxyoHUdg==
optionalDependencies:
- "@esbuild/android-arm" "0.17.10"
- "@esbuild/android-arm64" "0.17.10"
- "@esbuild/android-x64" "0.17.10"
- "@esbuild/darwin-arm64" "0.17.10"
- "@esbuild/darwin-x64" "0.17.10"
- "@esbuild/freebsd-arm64" "0.17.10"
- "@esbuild/freebsd-x64" "0.17.10"
- "@esbuild/linux-arm" "0.17.10"
- "@esbuild/linux-arm64" "0.17.10"
- "@esbuild/linux-ia32" "0.17.10"
- "@esbuild/linux-loong64" "0.17.10"
- "@esbuild/linux-mips64el" "0.17.10"
- "@esbuild/linux-ppc64" "0.17.10"
- "@esbuild/linux-riscv64" "0.17.10"
- "@esbuild/linux-s390x" "0.17.10"
- "@esbuild/linux-x64" "0.17.10"
- "@esbuild/netbsd-x64" "0.17.10"
- "@esbuild/openbsd-x64" "0.17.10"
- "@esbuild/sunos-x64" "0.17.10"
- "@esbuild/win32-arm64" "0.17.10"
- "@esbuild/win32-ia32" "0.17.10"
- "@esbuild/win32-x64" "0.17.10"
+ "@esbuild/android-arm" "0.17.11"
+ "@esbuild/android-arm64" "0.17.11"
+ "@esbuild/android-x64" "0.17.11"
+ "@esbuild/darwin-arm64" "0.17.11"
+ "@esbuild/darwin-x64" "0.17.11"
+ "@esbuild/freebsd-arm64" "0.17.11"
+ "@esbuild/freebsd-x64" "0.17.11"
+ "@esbuild/linux-arm" "0.17.11"
+ "@esbuild/linux-arm64" "0.17.11"
+ "@esbuild/linux-ia32" "0.17.11"
+ "@esbuild/linux-loong64" "0.17.11"
+ "@esbuild/linux-mips64el" "0.17.11"
+ "@esbuild/linux-ppc64" "0.17.11"
+ "@esbuild/linux-riscv64" "0.17.11"
+ "@esbuild/linux-s390x" "0.17.11"
+ "@esbuild/linux-x64" "0.17.11"
+ "@esbuild/netbsd-x64" "0.17.11"
+ "@esbuild/openbsd-x64" "0.17.11"
+ "@esbuild/sunos-x64" "0.17.11"
+ "@esbuild/win32-arm64" "0.17.11"
+ "@esbuild/win32-ia32" "0.17.11"
+ "@esbuild/win32-x64" "0.17.11"
escalade@^3.1.1:
version "3.1.1"
@@ -4927,9 +4930,9 @@ esprima@^4.0.0, esprima@^4.0.1:
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
esquery@^1.4.0, esquery@^1.4.2:
- version "1.4.2"
- resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz#c6d3fee05dd665808e2ad870631f221f5617b1d1"
- integrity sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==
+ version "1.5.0"
+ resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b"
+ integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==
dependencies:
estraverse "^5.1.0"
@@ -6097,12 +6100,12 @@ is-arguments@^1.0.4:
has-tostringtag "^1.0.0"
is-array-buffer@^3.0.1:
- version "3.0.1"
- resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz#deb1db4fcae48308d54ef2442706c0393997052a"
- integrity sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==
+ version "3.0.2"
+ resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe"
+ integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==
dependencies:
call-bind "^1.0.2"
- get-intrinsic "^1.1.3"
+ get-intrinsic "^1.2.0"
is-typed-array "^1.1.10"
is-arrayish@^0.2.1:
@@ -7016,64 +7019,64 @@ jsesc@^2.5.1:
resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
-jsii-diff@1.76.0:
- version "1.76.0"
- resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.76.0.tgz#8aba54481e1ac7dcd7e2c592d1ef11defe244b2a"
- integrity sha512-i3U753ae5WzaiGLJV8ZFTu9rlGQGVuSJADCHxteP2UuHuFSWRSPY2iMhtyg7tEoQmdNYjPznM7fesqrDHLxBOg==
+jsii-diff@1.77.0:
+ version "1.77.0"
+ resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.77.0.tgz#f56c72ff22918dbcf2dcdfd10ad3c15815833aa0"
+ integrity sha512-H/ujCkMXM1VrZJQJVOfkz+t1S9CAVTut0HSENuXrDdxdIUgIIIT7gnap7LNFVxKwOU9E54Ya+hEnSwjO3sw1FQ==
dependencies:
- "@jsii/check-node" "1.76.0"
- "@jsii/spec" "^1.76.0"
+ "@jsii/check-node" "1.77.0"
+ "@jsii/spec" "^1.77.0"
fs-extra "^10.1.0"
- jsii-reflect "^1.76.0"
- log4js "^6.7.1"
+ jsii-reflect "^1.77.0"
+ log4js "^6.8.0"
yargs "^16.2.0"
-jsii-pacmak@1.76.0:
- version "1.76.0"
- resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.76.0.tgz#e0d95bc20f757f7b067dc545587bc38795611b09"
- integrity sha512-70h0puIRpDeDyYk/jLxQk7vPbg3w3ppJRATlF0qPntMk/WnSo4uvr8hlz1BmRzOOvQ7JqXBuNOaVd+bp7Xolbw==
+jsii-pacmak@1.77.0:
+ version "1.77.0"
+ resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.77.0.tgz#f6253a871bccc8a0617a032235a8cdbf33bffd03"
+ integrity sha512-mYrITqM/fTiS1rzGFYeIK90/Ab7S39/4wFlBlhVYqqxbeAwiOFS1+zfx2m5RBYGvJMw5rd6S4zoWg6CnK2kpPg==
dependencies:
- "@jsii/check-node" "1.76.0"
- "@jsii/spec" "^1.76.0"
+ "@jsii/check-node" "1.77.0"
+ "@jsii/spec" "^1.77.0"
clone "^2.1.2"
- codemaker "^1.76.0"
+ codemaker "^1.77.0"
commonmark "^0.30.0"
escape-string-regexp "^4.0.0"
fs-extra "^10.1.0"
- jsii-reflect "^1.76.0"
- jsii-rosetta "^1.76.0"
+ jsii-reflect "^1.77.0"
+ jsii-rosetta "^1.77.0"
semver "^7.3.8"
spdx-license-list "^6.6.0"
xmlbuilder "^15.1.1"
yargs "^16.2.0"
-jsii-reflect@1.76.0, jsii-reflect@^1.76.0:
- version "1.76.0"
- resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.76.0.tgz#a80ab48f9bea9f1ad4212e8b2057eb0ae325e1e0"
- integrity sha512-voS5WyeitP3o0knus00v00NlxVLbaU9ykvEDamFw5KPEc4z4wvAwDG9wBfNmdO1OulXgID41WhMzJOEJFKle6A==
+jsii-reflect@1.77.0, jsii-reflect@^1.77.0:
+ version "1.77.0"
+ resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.77.0.tgz#f4fa0c43f550f6af065b118427763dc00f861a7c"
+ integrity sha512-wSEkBxdEjuZHp2qLPpUPFamhppvDBW+vUJi8/VnQlAYJMCOIvQPdj8GVfiMllc+6tir9xIHl8q30PZaanbQpXA==
dependencies:
- "@jsii/check-node" "1.76.0"
- "@jsii/spec" "^1.76.0"
+ "@jsii/check-node" "1.77.0"
+ "@jsii/spec" "^1.77.0"
chalk "^4"
fs-extra "^10.1.0"
- oo-ascii-tree "^1.76.0"
+ oo-ascii-tree "^1.77.0"
yargs "^16.2.0"
-jsii-rosetta@^1.76.0:
- version "1.76.0"
- resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.76.0.tgz#450256361bdbb0d6d5524c4817a7b345d9647a57"
- integrity sha512-y3OcYebjMdK/4Yxt8P9tMalK9Szmq8Xc4VXD3kGDIEulMjUxo3TpEUZc9WEfzVu6A+lSl/WRAwV50ZgzQyVWZg==
+jsii-rosetta@^1.77.0:
+ version "1.77.0"
+ resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.77.0.tgz#12e99f0e43c5028456883f46d3ac92bd8c77a22e"
+ integrity sha512-gOpK7YxGb64Fwy6zvEpRV3umC3u77HAmltP3kSF/eGPmM04ggTQ17UEfN+XsEO4NXJh1LDniMDyMjOIa3QViBw==
dependencies:
- "@jsii/check-node" "1.76.0"
- "@jsii/spec" "1.76.0"
+ "@jsii/check-node" "1.77.0"
+ "@jsii/spec" "1.77.0"
"@xmldom/xmldom" "^0.8.6"
commonmark "^0.30.0"
fast-glob "^3.2.12"
- jsii "1.76.0"
+ jsii "1.77.0"
semver "^7.3.8"
semver-intersect "^1.4.0"
typescript "~3.9.10"
- workerpool "^6.3.1"
+ workerpool "^6.4.0"
yargs "^16.2.0"
jsii-rosetta@v4.9-next:
@@ -7093,18 +7096,18 @@ jsii-rosetta@v4.9-next:
workerpool "^6.4.0"
yargs "^17.7.1"
-jsii@1.76.0, jsii@^1.76.0:
- version "1.76.0"
- resolved "https://registry.npmjs.org/jsii/-/jsii-1.76.0.tgz#b40c98108b1cac2cb86a5eb2b3f201ba52a316b6"
- integrity sha512-IlQmxPPnscn2Va/cnnXRnQ7bnxEkO8ImKW0MBlEr66oqxhFQ9jy9+FWzOp/5kfHzhyyyM5mcqitB8O6fr1moIw==
+jsii@1.77.0, jsii@^1.77.0:
+ version "1.77.0"
+ resolved "https://registry.npmjs.org/jsii/-/jsii-1.77.0.tgz#bc3f4e3c475045f5d8d49c3c6fe202b33a1d0705"
+ integrity sha512-3VODnWUhljro1+PmWlTWAEUPxWGWwCOmzOS6EG7l5E1KthurCgQDzhpTySlw80U85mGU9XvDJMcpvwuj3ESrKA==
dependencies:
- "@jsii/check-node" "1.76.0"
- "@jsii/spec" "^1.76.0"
+ "@jsii/check-node" "1.77.0"
+ "@jsii/spec" "^1.77.0"
case "^1.6.3"
chalk "^4"
fast-deep-equal "^3.1.3"
fs-extra "^10.1.0"
- log4js "^6.7.1"
+ log4js "^6.8.0"
semver "^7.3.8"
semver-intersect "^1.4.0"
sort-json "^2.0.1"
@@ -7113,9 +7116,9 @@ jsii@1.76.0, jsii@^1.76.0:
yargs "^16.2.0"
jsii@v4.9-next:
- version "4.9.0-dev.1"
- resolved "https://registry.npmjs.org/jsii/-/jsii-4.9.0-dev.1.tgz#3fcc0001a425f7cf933260b9b9dd999ca71739b6"
- integrity sha512-1neCv7G/y9Ihku5ZEz2cDMuSNXpZYxNuTS1ycVXZ0ZhOVGn0+s0ghkOLj+Xecei3M0fBfZxlLiHSpw3xrJT/Mg==
+ version "4.9.0-dev.2"
+ resolved "https://registry.npmjs.org/jsii/-/jsii-4.9.0-dev.2.tgz#6b193a8a1ce6078741ce4f40bf1b5cf01c9a6f41"
+ integrity sha512-5VIj4HVTYuXJwv+UnEG9KIZ1Kwx4S7fws0y6XwMf6U7Qr4QbOwW59HM7mn28B0GJgj83y/CezcJTTqpuEES+5Q==
dependencies:
"@jsii/check-node" "1.76.0"
"@jsii/spec" "^1.76.0"
@@ -7697,10 +7700,10 @@ log-symbols@^4.1.0:
chalk "^4.1.0"
is-unicode-supported "^0.1.0"
-log4js@^6.7.1, log4js@^6.8.0:
- version "6.8.0"
- resolved "https://registry.npmjs.org/log4js/-/log4js-6.8.0.tgz#f0fe9b2b82725aaf97f20692e23381a5c5722448"
- integrity sha512-g+V8gZyurIexrOvWQ+AcZsIvuK/lBnx2argejZxL4gVZ4Hq02kUYH6WZOnqxgBml+zzQZYdaEoTN84B6Hzm8Fg==
+log4js@^6.8.0:
+ version "6.9.0"
+ resolved "https://registry.npmjs.org/log4js/-/log4js-6.9.0.tgz#2687c08b330f610054e79c492b35c677c9b183eb"
+ integrity sha512-sAGxJKqxXFlK+05OlMH6SIDAdvgQHj95EfSDOfkHW6BQUlkz+fZw8PWhydfRHq+0UuWYWR55mVnR+KTnWE2JDA==
dependencies:
date-format "^4.0.14"
debug "^4.3.4"
@@ -7733,9 +7736,9 @@ lru-cache@^6.0.0:
yallist "^4.0.0"
lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1:
- version "7.18.1"
- resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.1.tgz#4716408dec51d5d0104732647f584d1f6738b109"
- integrity sha512-8/HcIENyQnfUTCDizRu9rrDyG6XG/21M4X7/YEGZeD76ZJilFPAUVb/2zysFf7VVO1LEjCDFyHp8pMMvozIrvg==
+ version "7.18.3"
+ resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89"
+ integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==
lru-queue@^0.1.0:
version "0.1.0"
@@ -8016,9 +8019,9 @@ min-indent@^1.0.0:
integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
minimatch@>=3.1:
- version "7.4.1"
- resolved "https://registry.npmjs.org/minimatch/-/minimatch-7.4.1.tgz#166705f9417985ba5149f2dbf2fa50c29832913b"
- integrity sha512-Oz1iPEP+MGl7KS3SciLsLLcuZ7VsBfb7Qrz/jYt/s/sYAv272P26HSLz2f77Y6hzTKXiBi6g765fqpEDNc5fJw==
+ version "7.4.2"
+ resolved "https://registry.npmjs.org/minimatch/-/minimatch-7.4.2.tgz#157e847d79ca671054253b840656720cb733f10f"
+ integrity sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==
dependencies:
brace-expansion "^2.0.1"
@@ -8860,10 +8863,10 @@ onetime@^5.1.0, onetime@^5.1.2:
dependencies:
mimic-fn "^2.1.0"
-oo-ascii-tree@^1.76.0:
- version "1.76.0"
- resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.76.0.tgz#776630f3e3df43a3a5082cbf23fa40e3ada808ab"
- integrity sha512-I/me4GK6Dybc9lsPYZJdnd1OOFbbnZtfEIIizrbTuFx/v1if375Y59w9ol/TJ75MlSAKs4aHj7Xm+A4E0JitSw==
+oo-ascii-tree@^1.77.0:
+ version "1.77.0"
+ resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.77.0.tgz#8205a3b2df0bd6f085764092ed93b0cd61218f67"
+ integrity sha512-UQXPEVtecK9FDQxlp5WQ9nVBgS0sq96R9LWE1HBmlS3ZLJRqXh3+kdU7Bxs+qqF+cdWmE9uOggwihBffTpqLrA==
open@^7.4.2:
version "7.4.2"
@@ -9458,10 +9461,10 @@ progress@^2.0.0, progress@^2.0.3:
resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
-projen@^0.67.69:
- version "0.67.69"
- resolved "https://registry.npmjs.org/projen/-/projen-0.67.69.tgz#ec666e340395a3b429581a91733b6856d0602e86"
- integrity sha512-F28eW4CZFQwsb93omeVfzAoK9hEajqrzBzKZCwIfKaEupAjqJ8KJkc29FW4MnI7tbZ0DzHg75u0yzzNtotaEXg==
+projen@^0.67.75:
+ version "0.67.75"
+ resolved "https://registry.npmjs.org/projen/-/projen-0.67.75.tgz#64fc75d9e8aaea7ad56424bf78ba0c5d59a8f27e"
+ integrity sha512-cdCRjhyIumTPOlKIaNSl4FtJUV5QC6C11FqbdEXhOBsnLleppo62NoS/renS4IGkruyHyqliX0bXakBCskYiaQ==
dependencies:
"@iarna/toml" "^2.2.5"
case "^1.6.3"
@@ -9618,9 +9621,9 @@ qrcode-terminal@^0.12.0:
integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==
qs@^6.9.4:
- version "6.11.0"
- resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
- integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
+ version "6.11.1"
+ resolved "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz#6c29dff97f0c0060765911ba65cbc9764186109f"
+ integrity sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==
dependencies:
side-channel "^1.0.4"
@@ -10449,9 +10452,9 @@ spdx-compare@^1.0.0:
spdx-ranges "^2.0.0"
spdx-correct@^3.0.0:
- version "3.1.1"
- resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9"
- integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==
+ version "3.2.0"
+ resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c"
+ integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==
dependencies:
spdx-expression-parse "^3.0.0"
spdx-license-ids "^3.0.0"
@@ -11201,9 +11204,9 @@ typescript@^4.5.5, typescript@~4.9.5:
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
typescript@next:
- version "5.1.0-dev.20230301"
- resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.0-dev.20230301.tgz#3250b647dfd19942326bf904211350cdbbfdfe79"
- integrity sha512-aJ0PIgQ00zlf9npD2tri7MWDAooMoh3iIn4v0hAMSRCSKqJjTzt7fVopvdtbvWPKripipxeXnX5mhkBZcGrEKQ==
+ version "5.1.0-dev.20230307"
+ resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.0-dev.20230307.tgz#64cde6497b61b894af9b9a0547ee273f11bd34ce"
+ integrity sha512-QoA4rJ5koT+JJk69FBwAF4vx446c5xPWlvgMrlz0E0SaGDpveCbK8DTpRmdxrZR4oVQ0VxMag1BGtZPtQtU+Jg==
typescript@~3.8.3:
version "3.8.3"
@@ -11627,7 +11630,7 @@ wordwrap@>=0.0.2, wordwrap@^1.0.0:
resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==
-workerpool@^6.3.1, workerpool@^6.4.0:
+workerpool@^6.4.0:
version "6.4.0"
resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.4.0.tgz#f8d5cfb45fde32fa3b7af72ad617c3369567a462"
integrity sha512-i3KR1mQMNwY2wx20ozq2EjISGtQWDIfV56We+yGJ5yDs8jTwQiLLaqHlkBHITlCuJnYlVRmXegxFxZg7gqI++A==