diff --git a/.github/ISSUE_TEMPLATE/region.yml b/.github/ISSUE_TEMPLATE/region.yml new file mode 100644 index 0000000000000..0e6ed816993f4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/region.yml @@ -0,0 +1,86 @@ +name: New Region +description: Register a new region. +title: "Register new region: [region]" +labels: ["@aws-cdk/region-info", "feature-request", "p1", "effort/medium"] +body: + - type: input + id: ROUTE_53_BUCKET_WEBSITE_ZONE_IDS + attributes: + label: AWS Route 53 Bucket Website Zone ID + description: | + See [Amazon Simple Storage Service endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints). + + - type: input + id: EBS_ENV_ENDPOINT_HOSTED_ZONE_IDS + attributes: + label: AWS Elastic Beanstalk Hosted Zone ID + description: | + See [AWS Elastic Beanstalk endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/elasticbeanstalk.html). + + - type: input + id: ELBV2_ACCOUNTS + attributes: + label: AWS Elastic Beanstalk Load Balancer Account ID + description: | + See [Attach a policy to your S3 bucket](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy). + + - type: input + id: DLC_REPOSITORY_ACCOUNTS + attributes: + label: AWS Deep Learning Container Account ID + description: | + See [Available Deep Learning Containers Images](https://aws.amazon.com/releasenotes/available-deep-learning-containers-images/). + + - type: input + id: APPMESH_ECR_ACCOUNTS + attributes: + label: AWS AppMesh Envoy Proxy ECR Account ID + description: | + See [Envoy Image](https://docs.aws.amazon.com/app-mesh/latest/userguide/envoy.html). + + - type: input + id: CLOUDWATCH_LAMBDA_INSIGHTS_ARNS + attributes: + label: AWS CloudWatch Lambda Insights Extension ARN + description: | + See [1.0.178.0](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versionsx86-64.html#Lambda-Insights-extension-1.0.178.0). + + - type: input + id: FIREHOSE_CIDR_BLOCKS + attributes: + label: AWS Kinesis Data Firehose CIDR Block + description: | + See [VPC Access to an Amazon Redshift Cluster](https://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-rs-vpc). + + - type: checkboxes + id: ADOT_LAMBDA_LAYER + attributes: + label: OpenTelemetry Lambda Support + description: | + [Supported in Region](https://aws-otel.github.io/docs/getting-started/lambda/lambda-js)? + options: + - label: "Yes" + - label: "No" + + - type: markdown + attributes: + value: | + --- + + 🚀 Checklist: + + * [ ] Add region in [AWS_CDK_METADATA](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L1) (commented out). + * [ ] Add region and zone id in [ROUTE_53_BUCKET_WEBSITE_ZONE_IDS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L40). + * [ ] Add region and zone id in [EBS_ENV_ENDPOINT_HOSTED_ZONE_IDS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L77). + * [ ] Add region and account in [ELBV2_ACCOUNTS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L116). + * [ ] Add region and account in [DLC_REPOSITORY_ACCOUNTS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L149). + * [ ] Add region and account in [APPMESH_ECR_ACCOUNTS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L174). + * [ ] Add region and ARN in [CLOUDWATCH_LAMBDA_INSIGHTS_ARNS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L202) for `1.0.178.0`. + * [ ] Add region and CIDR block address in [FIREHOSE_CIDR_BLOCKS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L498). + * [ ] Add region and ARN in [ADOT_LAMBDA_LAYER_JAVA_SDK_ARNS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L529) for most recent version in `x86_64` and `arm64`. + * [ ] Add region and ARN in [ADOT_LAMBDA_LAYER_JAVA_AUTO_INSTRUMENTATION_ARNS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L608) for most recent version in `x86_64` and `arm64`. + * [ ] Add region and ARN in [ADOT_LAMBDA_LAYER_JAVASCRIPT_SDK_ARNS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L689) for most recent version in `x86_64` and `arm64`. + * [ ] Add region and ARN in [ADOT_LAMBDA_LAYER_PYTHON_SDK_ARNS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L768) for most recent version in `x86_64` and `arm64`. + * [ ] Add region and ARN in [ADOT_LAMBDA_LAYER_GENERIC_ARNS](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/build-tools/fact-tables.ts#L847) for most recent version in `x86_64` and `arm64`. + * [ ] Add region in [AWS_REGIONS_AND_RULES](https://github.com/aws/aws-cdk/blob/v2.65.0/packages/@aws-cdk/region-info/lib/aws-entities.ts). + * [ ] Run integ tests and update snapshots \ No newline at end of file diff --git a/.github/workflows/yarn-upgrade-v1main.yml b/.github/workflows/yarn-upgrade-v1main.yml index 8d66e4f338193..d9ace696f4546 100644 --- a/.github/workflows/yarn-upgrade-v1main.yml +++ b/.github/workflows/yarn-upgrade-v1main.yml @@ -26,7 +26,7 @@ jobs: - name: Locate Yarn cache id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Restore Yarn cache uses: actions/cache@v3 @@ -39,20 +39,18 @@ jobs: run: yarn install --frozen-lockfile - name: Install Tools run: |- - npm -g install lerna npm-check-updates@^9.0.0 + npm -g install lerna npm-check-updates - name: Build CLI - run: cd packages/aws-cdk && ../../scripts/buildup + run: lerna run build --scope aws-cdk --include-dependencies --stream - name: Build Integ Runner - run: cd packages/@aws-cdk/integ-runner && ../../../scripts/buildup + run: lerna run build --scope @aws-cdk/integ-runner --include-dependencies --stream - name: List Mono-Repo Packages id: list-packages # These need to be ignored from the `ncu` runs! run: |- - echo -n "::set-output name=list::" - node -p "$(lerna ls --all --json 2>/dev/null).map(item => item.name).join(',')" + echo "list=$(lerna ls --all --json 2>/dev/null | jq -r 'map(.name) | join(",")')" >> $GITHUB_OUTPUT - name: Run "ncu -u" # We special-case some @types because they need to be pinned to specific versions due to breaking changes in minor upgrades https://github.com/DefinitelyTyped/DefinitelyTyped/issues/64266 - # We special-case aws-sdk because of breaking changes with TS interface exports in recent minor versions - https://github.com/aws/aws-sdk-js/issues/3453 # We special-case typescript because it's not semantically versioned # We special-case constructs because we want to stay in control of the minimum compatible version # We special-case lerna because we have a patch on it that stops applying if Lerna upgrades. Remove this once https://github.com/lerna/lerna/pull/2874 releases. @@ -62,8 +60,8 @@ jobs: ncu --upgrade --filter=typescript --target=patch ncu --upgrade --reject=@types/node,@types/prettier,constructs,typescript,lerna --target=minor # Upgrade all the packages - lerna exec --parallel ncu -- --upgrade --filter=typescript --target=patch - lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,constructs,typescript,aws-sdk,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor + lerna exec --parallel ncu -- --upgrade --filter=typescript,lerna --target=patch + lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,constructs,typescript,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run) - name: Run "yarn install" diff --git a/.github/workflows/yarn-upgrade.yml b/.github/workflows/yarn-upgrade.yml index 46e4c57f6ffd0..b11f45498db33 100644 --- a/.github/workflows/yarn-upgrade.yml +++ b/.github/workflows/yarn-upgrade.yml @@ -37,18 +37,16 @@ jobs: run: yarn install --frozen-lockfile - name: Install Tools run: |- - npm -g install lerna npm-check-updates@^9.0.0 + npm -g install lerna npm-check-updates - name: Build Integ Runner - run: cd packages/@aws-cdk/integ-runner && ../../../scripts/buildup + run: lerna run build --scope @aws-cdk/integ-runner --include-dependencies - name: List Mono-Repo Packages id: list-packages # These need to be ignored from the `ncu` runs! run: |- - echo -n "::set-output name=list::" echo "list=$(lerna ls --all --json 2>/dev/null | jq -r 'map(.name) | join(",")')" >> $GITHUB_OUTPUT - name: Run "ncu -u" # We special-case some @types because they need to be pinned to specific versions due to breaking changes in minor upgrades https://github.com/DefinitelyTyped/DefinitelyTyped/issues/64266 - # We special-case aws-sdk because of breaking changes with TS interface exports in recent minor versions - https://github.com/aws/aws-sdk-js/issues/3453 # We special-case typescript because it's not semantically versioned # We special-case constructs because we want to stay in control of the minimum compatible version # We special-case lerna because we have a patch on it that stops applying if Lerna upgrades. Remove this once https://github.com/lerna/lerna/pull/2874 releases. @@ -59,15 +57,15 @@ jobs: ncu --upgrade --reject=@types/node,@types/prettier,constructs,typescript,lerna --target=minor # Upgrade all the packages lerna exec --parallel ncu -- --upgrade --filter=typescript --target=patch - lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,constructs,typescript,aws-sdk,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor + lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,constructs,typescript,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor # Upgrade package.jsons in init templates for pj in $(find packages/aws-cdk/lib/init-templates -name package.json); do (cd $(dirname $pj) && ncu --upgrade --reject='constructs,${{ steps.list-packages.outputs.list }}') done # Upgrade dependencies at an aws-eks integ test docker image - cd packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject='aws-sdk,${{ steps.list-packages.outputs.list }}' + cd packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject=',${{ steps.list-packages.outputs.list }}' - # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run) + # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn upgrade" to run) - name: Run "yarn install" run: yarn install diff --git a/CHANGELOG.v2.alpha.md b/CHANGELOG.v2.alpha.md index bb662176a330f..51bdfa7d4d7eb 100644 --- a/CHANGELOG.v2.alpha.md +++ b/CHANGELOG.v2.alpha.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.65.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.64.0-alpha.0...v2.65.0-alpha.0) (2023-02-15) + + +### Features + +* **glue:** support Ray jobs ([#23822](https://github.com/aws/aws-cdk/issues/23822)) ([8de50d6](https://github.com/aws/aws-cdk/commit/8de50d624c8703a12713dcffbc764688868f22b0)) +* **redshift:** IAM roles can be attached to a cluster, post creation ([#23791](https://github.com/aws/aws-cdk/issues/23791)) ([1a46808](https://github.com/aws/aws-cdk/commit/1a46808b03e8f6d09846f999ae3dc65b190f5f26)), closes [#22632](https://github.com/aws/aws-cdk/issues/22632) +* **synthetics:** support runtime 3.9 ([#24101](https://github.com/aws/aws-cdk/issues/24101)) ([9d23cad](https://github.com/aws/aws-cdk/commit/9d23caded8aca42d3b78de1bc7e89c38a4d6805e)) + ## [2.64.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.63.2-alpha.0...v2.64.0-alpha.0) (2023-02-09) diff --git a/CHANGELOG.v2.md b/CHANGELOG.v2.md index d78c292fd363f..bef19ebe19823 100644 --- a/CHANGELOG.v2.md +++ b/CHANGELOG.v2.md @@ -2,6 +2,32 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.65.0](https://github.com/aws/aws-cdk/compare/v2.64.0...v2.65.0) (2023-02-15) + + +### Features + +* **autoscaling:** L2 construct for enabling capacity rebalance of autoscaling ([#24025](https://github.com/aws/aws-cdk/issues/24025)) ([d2c63f5](https://github.com/aws/aws-cdk/commit/d2c63f55f8657315ad4e4dd463cfcae07cb66e53)), closes [#22625](https://github.com/aws/aws-cdk/issues/22625) +* **chatbot:** support guardrail policies ([#24114](https://github.com/aws/aws-cdk/issues/24114)) ([4c72a7d](https://github.com/aws/aws-cdk/commit/4c72a7dc3994ba190f1e1aa467d3087228bcb881)), closes [#20788](https://github.com/aws/aws-cdk/issues/20788) +* **core:** Allow passing Docker build secrets ([#23778](https://github.com/aws/aws-cdk/issues/23778)) ([74512fa](https://github.com/aws/aws-cdk/commit/74512fa339e0a2937213f519c109ef1207e9d0c6)), closes [#14910](https://github.com/aws/aws-cdk/issues/14910) [#14395](https://github.com/aws/aws-cdk/issues/14395) +* **elbv2:** add metrics to INetworkTargetGroup and IApplicationTargetGroup ([#23993](https://github.com/aws/aws-cdk/issues/23993)) ([6a9e43f](https://github.com/aws/aws-cdk/commit/6a9e43f0c6f966df4671267eeda21638611dfb1c)), closes [#23853](https://github.com/aws/aws-cdk/issues/23853) [#10850](https://github.com/aws/aws-cdk/issues/10850) +* **lambda:** add insights version 1.0.178.0 ([#23836](https://github.com/aws/aws-cdk/issues/23836)) ([5272908](https://github.com/aws/aws-cdk/commit/527290854d0fa31e7f41497ede0c1b8b0e1b9ad4)) + + +### Bug Fixes + +* **bootstrap:** remove Security Hub finding S3.10 ([#24175](https://github.com/aws/aws-cdk/issues/24175)) ([a1da757](https://github.com/aws/aws-cdk/commit/a1da757ce348b4bd66a6d0e7776f2ff8e9f531b6)), closes [/docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-fsbp-controls.html#fsbp-s3-10](https://github.com/aws//docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-fsbp-controls.html/issues/fsbp-s3-10) +* **codedeploy:** unable to remove alarms from deployment group ([#23308](https://github.com/aws/aws-cdk/issues/23308)) ([eee005f](https://github.com/aws/aws-cdk/commit/eee005f4949d7438467c7448ba8326efa4b79221)) +* **codepipeline:** x-env ECS deployment lacking support stack-dependency ([#24053](https://github.com/aws/aws-cdk/issues/24053)) ([adfe4fa](https://github.com/aws/aws-cdk/commit/adfe4fa137bb748961b4a767d538335490e13ed1)), closes [#24050](https://github.com/aws/aws-cdk/issues/24050) [#24051](https://github.com/aws/aws-cdk/issues/24051) +* **core:** messages are displayed multiple times per construct ([#24019](https://github.com/aws/aws-cdk/issues/24019)) ([57770bb](https://github.com/aws/aws-cdk/commit/57770bb12ea6d77373f1e9e8e04f6757b440f277)), closes [#9565](https://github.com/aws/aws-cdk/issues/9565) +* **ec2:** enable set throughput param to CfnVolume ([#24118](https://github.com/aws/aws-cdk/issues/24118)) ([32781f8](https://github.com/aws/aws-cdk/commit/32781f825352f9cb43d8fed5c122b454275b3076)), closes [#24107](https://github.com/aws/aws-cdk/issues/24107) [#24107](https://github.com/aws/aws-cdk/issues/24107) +* **elbv2:** healthcheck interval is overly restrictive ([#24157](https://github.com/aws/aws-cdk/issues/24157)) ([4f83e02](https://github.com/aws/aws-cdk/commit/4f83e02b85229ebdff3f32ba6fd662ffd707d8db)), closes [#24156](https://github.com/aws/aws-cdk/issues/24156) +* **iam:** PrincipalWithConditions.addCondition fails with a new key ([#23782](https://github.com/aws/aws-cdk/issues/23782)) ([8951d01](https://github.com/aws/aws-cdk/commit/8951d013bea5dad54b94a6a683f56275ff4e6dba)), closes [#23781](https://github.com/aws/aws-cdk/issues/23781) +* **iam:** SamlConsolePrincipal does not work in China [#22091](https://github.com/aws/aws-cdk/issues/22091) ([#24034](https://github.com/aws/aws-cdk/issues/24034)) ([2902043](https://github.com/aws/aws-cdk/commit/29020435aeb1a9fb6401572520d0adca8155dc60)) +* **pipelines:** SelfMutation CodeBuild project not accessible ([#24073](https://github.com/aws/aws-cdk/issues/24073)) ([5942978](https://github.com/aws/aws-cdk/commit/594297862f2626b64b174d6998886a40f1b316be)) +* **rds:** database proxies use ids as their resource names directly (under feature flag) ([#23703](https://github.com/aws/aws-cdk/issues/23703)) ([03a0f79](https://github.com/aws/aws-cdk/commit/03a0f79b40e3be95de5421370703eb54c06b7dd7)), closes [#18578](https://github.com/aws/aws-cdk/issues/18578) +* **s3:** logging bucket blocks KMS_MANAGED encryption ([#23514](https://github.com/aws/aws-cdk/issues/23514)) ([1e8926f](https://github.com/aws/aws-cdk/commit/1e8926fa9bcf561135beaa31379ec1f1e6f79901)) + ## [2.64.0](https://github.com/aws/aws-cdk/compare/v2.63.2...v2.64.0) (2023-02-09) diff --git a/lerna.json b/lerna.json index fca71760dbe9a..b12a6e27cad78 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "lerna": "3.15.0", + "lerna": "^4.0.0", "npmClient": "yarn", "useWorkspaces": true, "packages": [ diff --git a/package.json b/package.json index c1e428cba2b8e..243c86647e9cc 100644 --- a/package.json +++ b/package.json @@ -19,15 +19,15 @@ "@types/node": "18.11.18", "@types/prettier": "2.6.0", "@yarnpkg/lockfile": "^1.1.0", - "cdk-generate-synthetic-examples": "^0.1.151", + "cdk-generate-synthetic-examples": "^0.1.155", "conventional-changelog-cli": "^2.2.2", "fs-extra": "^9.1.0", "graceful-fs": "^4.2.10", "jest-junit": "^13.2.0", - "jsii-diff": "1.74.0", - "jsii-pacmak": "1.74.0", - "jsii-reflect": "1.74.0", - "jsii-rosetta": "1.74.0", + "jsii-diff": "1.75.0", + "jsii-pacmak": "1.75.0", + "jsii-reflect": "1.75.0", + "jsii-rosetta": "1.75.0", "lerna": "^4.0.0", "patch-package": "^6.5.1", "semver": "^6.3.0", diff --git a/packages/@aws-cdk-testing/cli-integ/lib/aws.ts b/packages/@aws-cdk-testing/cli-integ/lib/aws.ts index 289b87bf955a1..9f93ee093feb1 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/aws.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/aws.ts @@ -1,5 +1,8 @@ import * as AWS from 'aws-sdk'; +// eslint-disable-next-line @typescript-eslint/no-require-imports +require('aws-sdk/lib/maintenance_mode_message').suppress = true; + export class AwsClients { public static async default(output: NodeJS.WritableStream) { const region = process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION ?? 'us-east-1'; diff --git a/packages/@aws-cdk-testing/cli-integ/package.json b/packages/@aws-cdk-testing/cli-integ/package.json index 55a8ce540ab89..8a47dbe509cdc 100644 --- a/packages/@aws-cdk-testing/cli-integ/package.json +++ b/packages/@aws-cdk-testing/cli-integ/package.json @@ -39,17 +39,18 @@ }, "dependencies": { "@octokit/rest": "^18.12.0", - "jest": "^27.5.1", - "aws-sdk": "^2.1313.0", + "aws-sdk": "^2.1317.0", "axios": "^0.27.2", + "fs-extra": "^9.1.0", + "glob": "^7.2.3", + "jest": "^27.5.1", "jest-junit": "^14.0.1", + "make-runnable": "^1.4.1", + "npm": "^8.19.4", + "p-queue": "^6.6.2", "semver": "^7.3.8", "ts-mock-imports": "^1.3.8", - "yargs": "^17.6.2", - "glob": "^7.2.3", - "p-queue": "^6.6.2", - "fs-extra": "^9.1.0", - "npm": "^8.19.3" + "yargs": "^17.7.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", 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 new file mode 100644 index 0000000000000..f9772a7d80460 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/tests/init-go/init-go.integtest.ts @@ -0,0 +1,16 @@ +import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib'; + +['app', 'sample-app'].forEach(template => { + integTest(`init go ${template}`, withTemporaryDirectory(withPackages(async (context) => { + context.packages.assertJsiiPackagesAvailable(); + + const shell = ShellHelper.fromContext(context); + 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', '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 f14005fc7c46f..0abedc9a6cf79 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.1211.0" + "aws-sdk": "^2.1317.0" }, "dependencies": { "@aws-cdk/aws-codebuild": "0.0.0", diff --git a/packages/@aws-cdk/aws-apigateway/README.md b/packages/@aws-cdk/aws-apigateway/README.md index 511a4239a22b8..deaf8d41f3a26 100644 --- a/packages/@aws-cdk/aws-apigateway/README.md +++ b/packages/@aws-cdk/aws-apigateway/README.md @@ -945,6 +945,18 @@ to allow users revert the stage to an old deployment manually. [Deployment]: https://docs.aws.amazon.com/apigateway/api-reference/resource/deployment/ [Stage]: https://docs.aws.amazon.com/apigateway/api-reference/resource/stage/ +In order to also create a new deployment when changes are made to any authorizer attached to the API, +the `@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId` [feature flag](https://docs.aws.amazon.com/cdk/v2/guide/featureflags.html) can be enabled. This can be set +in the `cdk.json` file. + +```json +{ + "context": { + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true + } +} +``` + ## Custom Domains To associate an API with a custom domain, use the `domainName` configuration when diff --git a/packages/@aws-cdk/aws-apigateway/lib/authorizers/cognito.ts b/packages/@aws-cdk/aws-apigateway/lib/authorizers/cognito.ts index a1d000189354c..870c976d9ba20 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/authorizers/cognito.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/authorizers/cognito.ts @@ -1,7 +1,8 @@ import * as cognito from '@aws-cdk/aws-cognito'; -import { Duration, Lazy, Names, Stack } from '@aws-cdk/core'; +import { Duration, FeatureFlags, Lazy, Names, Stack } from '@aws-cdk/core'; +import { APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID } from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; -import { CfnAuthorizer } from '../apigateway.generated'; +import { CfnAuthorizer, CfnAuthorizerProps } from '../apigateway.generated'; import { Authorizer, IAuthorizer } from '../authorizer'; import { AuthorizationType } from '../method'; import { IRestApi } from '../restapi'; @@ -64,18 +65,25 @@ export class CognitoUserPoolsAuthorizer extends Authorizer implements IAuthorize private restApiId?: string; + private readonly authorizerProps: CfnAuthorizerProps; + constructor(scope: Construct, id: string, props: CognitoUserPoolsAuthorizerProps) { super(scope, id); const restApiId = this.lazyRestApiId(); - const resource = new CfnAuthorizer(this, 'Resource', { + + const authorizerProps = { name: props.authorizerName ?? Names.uniqueId(this), restApiId, type: 'COGNITO_USER_POOLS', providerArns: props.cognitoUserPools.map(userPool => userPool.userPoolArn), authorizerResultTtlInSeconds: props.resultsCacheTtl?.toSeconds(), identitySource: props.identitySource || 'method.request.header.Authorization', - }); + }; + + this.authorizerProps = authorizerProps; + + const resource = new CfnAuthorizer(this, 'Resource', authorizerProps); this.authorizerId = resource.ref; this.authorizerArn = Stack.of(this).formatArn({ @@ -96,6 +104,16 @@ export class CognitoUserPoolsAuthorizer extends Authorizer implements IAuthorize } this.restApiId = restApi.restApiId; + + const addToLogicalId = FeatureFlags.of(this).isEnabled(APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID); + + const deployment = restApi.latestDeployment; + if (deployment && addToLogicalId) { + deployment.node.addDependency(this); + deployment.addToLogicalId({ + authorizer: this.authorizerProps, + }); + } } /** diff --git a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts index f67cf4b7faa79..545e5440ef34b 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts @@ -1,8 +1,9 @@ import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; -import { Arn, ArnFormat, Duration, Lazy, Names, Stack } from '@aws-cdk/core'; +import { Arn, ArnFormat, Duration, FeatureFlags, Lazy, Names, Stack } from '@aws-cdk/core'; +import { APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID } from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; -import { CfnAuthorizer } from '../apigateway.generated'; +import { CfnAuthorizer, CfnAuthorizerProps } from '../apigateway.generated'; import { Authorizer, IAuthorizer } from '../authorizer'; import { IRestApi } from '../restapi'; @@ -69,6 +70,8 @@ abstract class LambdaAuthorizer extends Authorizer implements IAuthorizer { protected restApiId?: string; + protected abstract readonly authorizerProps: CfnAuthorizerProps; + protected constructor(scope: Construct, id: string, props: LambdaAuthorizerProps) { super(scope, id); @@ -90,6 +93,28 @@ abstract class LambdaAuthorizer extends Authorizer implements IAuthorizer { } this.restApiId = restApi.restApiId; + + const deployment = restApi.latestDeployment; + const addToLogicalId = FeatureFlags.of(this).isEnabled(APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID); + + if (deployment && addToLogicalId) { + let functionName; + + if (this.handler instanceof lambda.Function) { + // if not imported, attempt to get the function name, which + // may be a token + functionName = (this.handler.node.defaultChild as lambda.CfnFunction).functionName; + } else { + // if imported, the function name will be a token + functionName = this.handler.functionName; + } + + deployment.node.addDependency(this); + deployment.addToLogicalId({ + authorizer: this.authorizerProps, + authorizerToken: functionName, + }); + } } /** @@ -163,11 +188,14 @@ export class TokenAuthorizer extends LambdaAuthorizer { public readonly authorizerArn: string; + protected readonly authorizerProps: CfnAuthorizerProps; + constructor(scope: Construct, id: string, props: TokenAuthorizerProps) { super(scope, id, props); const restApiId = this.lazyRestApiId(); - const resource = new CfnAuthorizer(this, 'Resource', { + + const authorizerProps: CfnAuthorizerProps = { name: props.authorizerName ?? Names.uniqueId(this), restApiId, type: 'TOKEN', @@ -176,7 +204,11 @@ export class TokenAuthorizer extends LambdaAuthorizer { authorizerResultTtlInSeconds: props.resultsCacheTtl?.toSeconds(), identitySource: props.identitySource || 'method.request.header.Authorization', identityValidationExpression: props.validationRegex, - }); + }; + + this.authorizerProps = authorizerProps; + + const resource = new CfnAuthorizer(this, 'Resource', authorizerProps); this.authorizerId = resource.ref; this.authorizerArn = Stack.of(this).formatArn({ @@ -221,6 +253,8 @@ export class RequestAuthorizer extends LambdaAuthorizer { public readonly authorizerArn: string; + protected readonly authorizerProps: CfnAuthorizerProps; + constructor(scope: Construct, id: string, props: RequestAuthorizerProps) { super(scope, id, props); @@ -229,7 +263,8 @@ export class RequestAuthorizer extends LambdaAuthorizer { } const restApiId = this.lazyRestApiId(); - const resource = new CfnAuthorizer(this, 'Resource', { + + const authorizerProps: CfnAuthorizerProps = { name: props.authorizerName ?? Names.uniqueId(this), restApiId, type: 'REQUEST', @@ -237,7 +272,11 @@ export class RequestAuthorizer extends LambdaAuthorizer { authorizerCredentials: props.assumeRole?.roleArn, authorizerResultTtlInSeconds: props.resultsCacheTtl?.toSeconds(), identitySource: props.identitySources.map(is => is.toString()).join(','), - }); + }; + + this.authorizerProps = authorizerProps; + + const resource = new CfnAuthorizer(this, 'Resource', authorizerProps); this.authorizerId = resource.ref; this.authorizerArn = Stack.of(this).formatArn({ diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/cognito.test.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/cognito.test.ts index 906f772a8505b..214384359016b 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/cognito.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/cognito.test.ts @@ -63,4 +63,58 @@ describe('Cognito Authorizer', () => { expect(authorizer.authorizerArn.endsWith(`/authorizers/${authorizer.authorizerId}`)).toBeTruthy(); }); + + test('rest api depends on the authorizer when @aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId is enabled', () => { + const stack = new Stack(); + stack.node.setContext('@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId', true); + const userPool1 = new cognito.UserPool(stack, 'UserPool'); + + const authorizer = new CognitoUserPoolsAuthorizer(stack, 'Authorizer', { + cognitoUserPools: [userPool1], + }); + + const restApi = new RestApi(stack, 'Api'); + + restApi.root.addMethod('ANY', undefined, { + authorizer, + authorizationType: AuthorizationType.COGNITO, + }); + + const template = Template.fromStack(stack); + + const authorizerId = Object.keys(template.findResources('AWS::ApiGateway::Authorizer'))[0]; + const deployment = Object.values(template.findResources('AWS::ApiGateway::Deployment'))[0]; + + expect(deployment.DependsOn).toEqual(expect.arrayContaining([authorizerId])); + }); + + test('a new deployment is created when a cognito user pool is re-created and @aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId is enabled', () => { + const createApiTemplate = (userPoolId: string) => { + const stack = new Stack(); + stack.node.setContext('@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId', true); + + const userPool = new cognito.UserPool(stack, userPoolId); + + const auth = new CognitoUserPoolsAuthorizer(stack, 'myauthorizer', { + resultsCacheTtl: Duration.seconds(0), + cognitoUserPools: [userPool], + }); + + const restApi = new RestApi(stack, 'myrestapi'); + restApi.root.addMethod('ANY', undefined, { + authorizer: auth, + authorizationType: AuthorizationType.COGNITO, + }); + + return Template.fromStack(stack); + }; + + const oldTemplate = createApiTemplate('foo'); + const newTemplate = createApiTemplate('bar'); + + const oldDeploymentId = Object.keys(oldTemplate.findResources('AWS::ApiGateway::Deployment'))[0]; + const newDeploymentId = Object.keys(newTemplate.findResources('AWS::ApiGateway::Deployment'))[0]; + + expect(oldDeploymentId).not.toEqual(newDeploymentId); + }); }); diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/CognitoUserPoolsAuthorizerInteg.assets.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/CognitoUserPoolsAuthorizerInteg.assets.json index ddef77182f50d..0a772224ed903 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/CognitoUserPoolsAuthorizerInteg.assets.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/CognitoUserPoolsAuthorizerInteg.assets.json @@ -1,7 +1,7 @@ { - "version": "20.0.0", + "version": "22.0.0", "files": { - "551baa1ebfdea9d8d905ffd1e2e8ac09982d0a49e669c97ad0d8f8c092cb96df": { + "81ccfaff55790eb0a0ba90c4ede5ca2168072939afb21004c5dcb5ca74295b40": { "source": { "path": "CognitoUserPoolsAuthorizerInteg.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "551baa1ebfdea9d8d905ffd1e2e8ac09982d0a49e669c97ad0d8f8c092cb96df.json", + "objectKey": "81ccfaff55790eb0a0ba90c4ede5ca2168072939afb21004c5dcb5ca74295b40.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-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/CognitoUserPoolsAuthorizerInteg.template.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/CognitoUserPoolsAuthorizerInteg.template.json index 377d0b8acb1d3..51688cc80a529 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/CognitoUserPoolsAuthorizerInteg.template.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/CognitoUserPoolsAuthorizerInteg.template.json @@ -105,7 +105,7 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "myrestapiDeployment419B1464b903292b53d7532ca4296973bcb95b1a": { + "myrestapiDeployment419B1464d5146a3a0aa3a9f79024a52930571dc6": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { @@ -114,6 +114,7 @@ "Description": "Automatically created by the RestApi construct" }, "DependsOn": [ + "myauthorizer23CB99DD", "myrestapiANY94B0497F" ] }, @@ -124,7 +125,7 @@ "Ref": "myrestapi551C8392" }, "DeploymentId": { - "Ref": "myrestapiDeployment419B1464b903292b53d7532ca4296973bcb95b1a" + "Ref": "myrestapiDeployment419B1464d5146a3a0aa3a9f79024a52930571dc6" }, "StageName": "prod" }, diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/cdk.out b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/cdk.out index 588d7b269d34f..145739f539580 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/cognitoauthorizerDefaultTestDeployAssert4551574C.assets.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/cognitoauthorizerDefaultTestDeployAssert4551574C.assets.json index c2d38a0a1c79b..da60b8f9da60e 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/cognitoauthorizerDefaultTestDeployAssert4551574C.assets.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/cognitoauthorizerDefaultTestDeployAssert4551574C.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "22.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/integ.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/integ.json index 1e72b0d39b727..3be28d00ffde7 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "22.0.0", "testCases": { "cognito-authorizer/DefaultTest": { "stacks": [ "CognitoUserPoolsAuthorizerInteg" ], - "assertionStack": "cognito-authorizer/DefaultTest/DeployAssert" + "assertionStack": "cognito-authorizer/DefaultTest/DeployAssert", + "assertionStackName": "cognitoauthorizerDefaultTestDeployAssert4551574C" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/manifest.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/manifest.json index 1de3c09fa1d8d..0761ffc156133 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "22.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "CognitoUserPoolsAuthorizerInteg.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}/551baa1ebfdea9d8d905ffd1e2e8ac09982d0a49e669c97ad0d8f8c092cb96df.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/81ccfaff55790eb0a0ba90c4ede5ca2168072939afb21004c5dcb5ca74295b40.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -72,7 +66,7 @@ "/CognitoUserPoolsAuthorizerInteg/myrestapi/Deployment/Resource": [ { "type": "aws:cdk:logicalId", - "data": "myrestapiDeployment419B1464b903292b53d7532ca4296973bcb95b1a" + "data": "myrestapiDeployment419B1464d5146a3a0aa3a9f79024a52930571dc6" } ], "/CognitoUserPoolsAuthorizerInteg/myrestapi/DeploymentStage.prod/Resource": [ @@ -104,6 +98,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "myrestapiDeployment419B1464b903292b53d7532ca4296973bcb95b1a": [ + { + "type": "aws:cdk:logicalId", + "data": "myrestapiDeployment419B1464b903292b53d7532ca4296973bcb95b1a", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "CognitoUserPoolsAuthorizerInteg" @@ -154,6 +157,12 @@ ] }, "displayName": "cognito-authorizer/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/tree.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/tree.json index 06688fd7cbcc8..c7963b5f43382 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.cognito-authorizer.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" - } - }, "CognitoUserPoolsAuthorizerInteg": { "id": "CognitoUserPoolsAuthorizerInteg", "path": "CognitoUserPoolsAuthorizerInteg", @@ -122,6 +114,14 @@ "id": "CloudWatchRole", "path": "CognitoUserPoolsAuthorizerInteg/myrestapi/CloudWatchRole", "children": { + "ImportCloudWatchRole": { + "id": "ImportCloudWatchRole", + "path": "CognitoUserPoolsAuthorizerInteg/myrestapi/CloudWatchRole/ImportCloudWatchRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "CognitoUserPoolsAuthorizerInteg/myrestapi/CloudWatchRole/Resource", @@ -227,7 +227,7 @@ "Ref": "myrestapi551C8392" }, "deploymentId": { - "Ref": "myrestapiDeployment419B1464b903292b53d7532ca4296973bcb95b1a" + "Ref": "myrestapiDeployment419B1464d5146a3a0aa3a9f79024a52930571dc6" }, "stageName": "prod" } @@ -247,8 +247,8 @@ "id": "Endpoint", "path": "CognitoUserPoolsAuthorizerInteg/myrestapi/Endpoint", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "Default": { @@ -320,11 +320,27 @@ "fqn": "@aws-cdk/aws-apigateway.RestApi", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "CognitoUserPoolsAuthorizerInteg/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "CognitoUserPoolsAuthorizerInteg/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } }, "cognito-authorizer": { @@ -340,15 +356,33 @@ "path": "cognito-authorizer/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.168" } }, "DeployAssert": { "id": "DeployAssert", "path": "cognito-authorizer/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "cognito-authorizer/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "cognito-authorizer/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, @@ -362,11 +396,19 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.168" + } } }, "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-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/RequestAuthorizerInteg.assets.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/RequestAuthorizerInteg.assets.json index a5d63e72ed201..2eb109263812d 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/RequestAuthorizerInteg.assets.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/RequestAuthorizerInteg.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "29.0.0", "files": { "3dc8c5549b88fef617feef923524902b3650973ae1159c9489ee8405344dd5a0": { "source": { @@ -14,7 +14,7 @@ } } }, - "5ba1108f5d1f7ce23d5bad675df22e0d3beb4f42fc970713488ea99585299b43": { + "a605b6be7a978439cf7b93d6214f4ce6d30a9163415575fa17ba0a5857238906": { "source": { "path": "RequestAuthorizerInteg.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5ba1108f5d1f7ce23d5bad675df22e0d3beb4f42fc970713488ea99585299b43.json", + "objectKey": "a605b6be7a978439cf7b93d6214f4ce6d30a9163415575fa17ba0a5857238906.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-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/RequestAuthorizerInteg.template.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/RequestAuthorizerInteg.template.json index 5d3dd9f410c25..034601d9d70fd 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/RequestAuthorizerInteg.template.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/RequestAuthorizerInteg.template.json @@ -93,6 +93,46 @@ } } }, + "MyAuthorizerFunctionRequestAuthorizerIntegMySecondAuthorizerCCC4ECEDPermissions055F817A": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "MyAuthorizerFunction70F1223E", + "Arn" + ] + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":execute-api:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":", + { + "Ref": "MyRestApi2D1F47A9" + }, + "/authorizers/", + { + "Ref": "MySecondAuthorizer25A69B96" + } + ] + ] + } + } + }, "MyRestApi2D1F47A9": { "Type": "AWS::ApiGateway::RestApi", "Properties": { @@ -148,7 +188,7 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": { + "MyRestApiDeploymentB555B582d83364d66d67f510f848797cd89349d5": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { @@ -157,7 +197,11 @@ "Description": "Automatically created by the RestApi construct" }, "DependsOn": [ - "MyRestApiANY05143F93" + "MyAuthorizer6575980E", + "MyRestApiANY05143F93", + "MyRestApiauthANY12A3CAB7", + "MyRestApiauth918A22B9", + "MySecondAuthorizer25A69B96" ] }, "MyRestApiDeploymentStageprodC33B8E5F": { @@ -167,7 +211,7 @@ "Ref": "MyRestApi2D1F47A9" }, "DeploymentId": { - "Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb" + "Ref": "MyRestApiDeploymentB555B582d83364d66d67f510f848797cd89349d5" }, "StageName": "prod" }, @@ -211,6 +255,54 @@ ] } }, + "MyRestApiauth918A22B9": { + "Type": "AWS::ApiGateway::Resource", + "Properties": { + "ParentId": { + "Fn::GetAtt": [ + "MyRestApi2D1F47A9", + "RootResourceId" + ] + }, + "PathPart": "auth", + "RestApiId": { + "Ref": "MyRestApi2D1F47A9" + } + } + }, + "MyRestApiauthANY12A3CAB7": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "HttpMethod": "ANY", + "ResourceId": { + "Ref": "MyRestApiauth918A22B9" + }, + "RestApiId": { + "Ref": "MyRestApi2D1F47A9" + }, + "AuthorizationType": "CUSTOM", + "AuthorizerId": { + "Ref": "MySecondAuthorizer25A69B96" + }, + "Integration": { + "IntegrationResponses": [ + { + "StatusCode": "200" + } + ], + "PassthroughBehavior": "NEVER", + "RequestTemplates": { + "application/json": "{ \"statusCode\": 200 }" + }, + "Type": "MOCK" + }, + "MethodResponses": [ + { + "StatusCode": "200" + } + ] + } + }, "MyAuthorizer6575980E": { "Type": "AWS::ApiGateway::Authorizer", "Properties": { @@ -270,6 +362,66 @@ }, "IdentitySource": "method.request.header.Authorization,method.request.querystring.allow" } + }, + "MySecondAuthorizer25A69B96": { + "Type": "AWS::ApiGateway::Authorizer", + "Properties": { + "Name": "RequestAuthorizerIntegMySecondAuthorizerCCC4ECED", + "RestApiId": { + "Ref": "MyRestApi2D1F47A9" + }, + "Type": "REQUEST", + "AuthorizerUri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "MyAuthorizerFunction70F1223E", + "Arn" + ] + } + ] + } + ] + }, + ":apigateway:", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "MyAuthorizerFunction70F1223E", + "Arn" + ] + } + ] + } + ] + }, + ":lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "MyAuthorizerFunction70F1223E", + "Arn" + ] + }, + "/invocations" + ] + ] + }, + "IdentitySource": "method.request.header.Authorization,method.request.querystring.allow" + } } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/cdk.out b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/cdk.out index 588d7b269d34f..d8b441d447f8a 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.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-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/integ.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/integ.json index 672507dc37b1c..0898fdc8ceefa 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "29.0.0", "testCases": { "integ.request-authorizer.lit": { "stacks": [ diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/manifest.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/manifest.json index 6bc875ca85fff..9b3020372b883 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.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" - } - }, "RequestAuthorizerInteg.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}/5ba1108f5d1f7ce23d5bad675df22e0d3beb4f42fc970713488ea99585299b43.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a605b6be7a978439cf7b93d6214f4ce6d30a9163415575fa17ba0a5857238906.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -57,6 +51,12 @@ "data": "MyAuthorizerFunctionRequestAuthorizerIntegMyAuthorizer5D9D41C5PermissionsCB8B246E" } ], + "/RequestAuthorizerInteg/MyAuthorizerFunction/RequestAuthorizerIntegMySecondAuthorizerCCC4ECED:Permissions": [ + { + "type": "aws:cdk:logicalId", + "data": "MyAuthorizerFunctionRequestAuthorizerIntegMySecondAuthorizerCCC4ECEDPermissions055F817A" + } + ], "/RequestAuthorizerInteg/MyRestApi/Resource": [ { "type": "aws:cdk:logicalId", @@ -78,7 +78,7 @@ "/RequestAuthorizerInteg/MyRestApi/Deployment/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb" + "data": "MyRestApiDeploymentB555B582d83364d66d67f510f848797cd89349d5" } ], "/RequestAuthorizerInteg/MyRestApi/DeploymentStage.prod/Resource": [ @@ -99,12 +99,30 @@ "data": "MyRestApiANY05143F93" } ], + "/RequestAuthorizerInteg/MyRestApi/Default/auth/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyRestApiauth918A22B9" + } + ], + "/RequestAuthorizerInteg/MyRestApi/Default/auth/ANY/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyRestApiauthANY12A3CAB7" + } + ], "/RequestAuthorizerInteg/MyAuthorizer/Resource": [ { "type": "aws:cdk:logicalId", "data": "MyAuthorizer6575980E" } ], + "/RequestAuthorizerInteg/MySecondAuthorizer/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MySecondAuthorizer25A69B96" + } + ], "/RequestAuthorizerInteg/BootstrapVersion": [ { "type": "aws:cdk:logicalId", @@ -116,9 +134,24 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "MyRestApiDeploymentB555B5824e51b8fe7583a45923d0b84d7acf920f": [ + { + "type": "aws:cdk:logicalId", + "data": "MyRestApiDeploymentB555B5824e51b8fe7583a45923d0b84d7acf920f", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "RequestAuthorizerInteg" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/tree.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/tree.json index 0efd3e0dc3177..e9bba1a26a1f6 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.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" - } - }, "RequestAuthorizerInteg": { "id": "RequestAuthorizerInteg", "path": "RequestAuthorizerInteg", @@ -24,6 +16,14 @@ "id": "ServiceRole", "path": "RequestAuthorizerInteg/MyAuthorizerFunction/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "RequestAuthorizerInteg/MyAuthorizerFunction/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "RequestAuthorizerInteg/MyAuthorizerFunction/ServiceRole/Resource", @@ -77,8 +77,8 @@ "id": "Stage", "path": "RequestAuthorizerInteg/MyAuthorizerFunction/Code/Stage", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" } }, "AssetBucket": { @@ -169,6 +169,54 @@ "fqn": "@aws-cdk/aws-lambda.CfnPermission", "version": "0.0.0" } + }, + "RequestAuthorizerIntegMySecondAuthorizerCCC4ECED:Permissions": { + "id": "RequestAuthorizerIntegMySecondAuthorizerCCC4ECED:Permissions", + "path": "RequestAuthorizerInteg/MyAuthorizerFunction/RequestAuthorizerIntegMySecondAuthorizerCCC4ECED:Permissions", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", + "aws:cdk:cloudformation:props": { + "action": "lambda:InvokeFunction", + "functionName": { + "Fn::GetAtt": [ + "MyAuthorizerFunction70F1223E", + "Arn" + ] + }, + "principal": "apigateway.amazonaws.com", + "sourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":execute-api:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":", + { + "Ref": "MyRestApi2D1F47A9" + }, + "/authorizers/", + { + "Ref": "MySecondAuthorizer25A69B96" + } + ] + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnPermission", + "version": "0.0.0" + } } }, "constructInfo": { @@ -198,6 +246,14 @@ "id": "CloudWatchRole", "path": "RequestAuthorizerInteg/MyRestApi/CloudWatchRole", "children": { + "ImportCloudWatchRole": { + "id": "ImportCloudWatchRole", + "path": "RequestAuthorizerInteg/MyRestApi/CloudWatchRole/ImportCloudWatchRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "RequestAuthorizerInteg/MyRestApi/CloudWatchRole/Resource", @@ -303,7 +359,7 @@ "Ref": "MyRestApi2D1F47A9" }, "deploymentId": { - "Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb" + "Ref": "MyRestApiDeploymentB555B582d83364d66d67f510f848797cd89349d5" }, "stageName": "prod" } @@ -323,8 +379,8 @@ "id": "Endpoint", "path": "RequestAuthorizerInteg/MyRestApi/Endpoint", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "Default": { @@ -384,6 +440,90 @@ "fqn": "@aws-cdk/aws-apigateway.Method", "version": "0.0.0" } + }, + "auth": { + "id": "auth", + "path": "RequestAuthorizerInteg/MyRestApi/Default/auth", + "children": { + "Resource": { + "id": "Resource", + "path": "RequestAuthorizerInteg/MyRestApi/Default/auth/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Resource", + "aws:cdk:cloudformation:props": { + "parentId": { + "Fn::GetAtt": [ + "MyRestApi2D1F47A9", + "RootResourceId" + ] + }, + "pathPart": "auth", + "restApiId": { + "Ref": "MyRestApi2D1F47A9" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigateway.CfnResource", + "version": "0.0.0" + } + }, + "ANY": { + "id": "ANY", + "path": "RequestAuthorizerInteg/MyRestApi/Default/auth/ANY", + "children": { + "Resource": { + "id": "Resource", + "path": "RequestAuthorizerInteg/MyRestApi/Default/auth/ANY/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Method", + "aws:cdk:cloudformation:props": { + "httpMethod": "ANY", + "resourceId": { + "Ref": "MyRestApiauth918A22B9" + }, + "restApiId": { + "Ref": "MyRestApi2D1F47A9" + }, + "authorizationType": "CUSTOM", + "authorizerId": { + "Ref": "MySecondAuthorizer25A69B96" + }, + "integration": { + "type": "MOCK", + "requestTemplates": { + "application/json": "{ \"statusCode\": 200 }" + }, + "passthroughBehavior": "NEVER", + "integrationResponses": [ + { + "statusCode": "200" + } + ] + }, + "methodResponses": [ + { + "statusCode": "200" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigateway.CfnMethod", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigateway.Method", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigateway.Resource", + "version": "0.0.0" + } } }, "constructInfo": { @@ -474,17 +614,119 @@ "fqn": "@aws-cdk/aws-apigateway.RequestAuthorizer", "version": "0.0.0" } + }, + "MySecondAuthorizer": { + "id": "MySecondAuthorizer", + "path": "RequestAuthorizerInteg/MySecondAuthorizer", + "children": { + "Resource": { + "id": "Resource", + "path": "RequestAuthorizerInteg/MySecondAuthorizer/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGateway::Authorizer", + "aws:cdk:cloudformation:props": { + "name": "RequestAuthorizerIntegMySecondAuthorizerCCC4ECED", + "restApiId": { + "Ref": "MyRestApi2D1F47A9" + }, + "type": "REQUEST", + "authorizerUri": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "MyAuthorizerFunction70F1223E", + "Arn" + ] + } + ] + } + ] + }, + ":apigateway:", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "MyAuthorizerFunction70F1223E", + "Arn" + ] + } + ] + } + ] + }, + ":lambda:path/2015-03-31/functions/", + { + "Fn::GetAtt": [ + "MyAuthorizerFunction70F1223E", + "Arn" + ] + }, + "/invocations" + ] + ] + }, + "identitySource": "method.request.header.Authorization,method.request.querystring.allow" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigateway.CfnAuthorizer", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigateway.RequestAuthorizer", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "RequestAuthorizerInteg/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "RequestAuthorizerInteg/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.189" } } }, "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-apigateway/test/authorizers/integ.request-authorizer.lit.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.ts index 60ec86b2430a3..169355dad134f 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 @@ -26,6 +26,11 @@ const authorizer = new RequestAuthorizer(stack, 'MyAuthorizer', { identitySources: [IdentitySource.header('Authorization'), IdentitySource.queryString('allow')], }); +const secondAuthorizer = new RequestAuthorizer(stack, 'MySecondAuthorizer', { + handler: authorizerFn, + identitySources: [IdentitySource.header('Authorization'), IdentitySource.queryString('allow')], +}); + restapi.root.addMethod('ANY', new MockIntegration({ integrationResponses: [ { statusCode: '200' }, @@ -40,3 +45,18 @@ restapi.root.addMethod('ANY', new MockIntegration({ ], authorizer, }); + +restapi.root.resourceForPath('auth').addMethod('ANY', new MockIntegration({ + integrationResponses: [ + { statusCode: '200' }, + ], + passthroughBehavior: PassthroughBehavior.NEVER, + requestTemplates: { + 'application/json': '{ "statusCode": 200 }', + }, +}), { + methodResponses: [ + { statusCode: '200' }, + ], + authorizer: secondAuthorizer, +}); diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/TokenAuthorizerIAMRoleInteg.assets.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/TokenAuthorizerIAMRoleInteg.assets.json index ce783b73b0f18..c72486df32a45 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/TokenAuthorizerIAMRoleInteg.assets.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/TokenAuthorizerIAMRoleInteg.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "22.0.0", "files": { "fec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3": { "source": { @@ -14,7 +14,7 @@ } } }, - "ca126ba9a02884a8dc3612e63dc5ab11b76fc4f7b3e1901d9081bac728c3a32a": { + "5fdd271d3e3ca8dcde2fe1c2529c3b6fc2527c7812e6edcf239bf1ad6043152b": { "source": { "path": "TokenAuthorizerIAMRoleInteg.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ca126ba9a02884a8dc3612e63dc5ab11b76fc4f7b3e1901d9081bac728c3a32a.json", + "objectKey": "5fdd271d3e3ca8dcde2fe1c2529c3b6fc2527c7812e6edcf239bf1ad6043152b.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-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/TokenAuthorizerIAMRoleInteg.template.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/TokenAuthorizerIAMRoleInteg.template.json index 504a0d98e04e0..6c0415656d799 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/TokenAuthorizerIAMRoleInteg.template.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/TokenAuthorizerIAMRoleInteg.template.json @@ -233,7 +233,7 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": { + "MyRestApiDeploymentB555B582694e8eb3fdb7b5f988ba347d35601979": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { @@ -242,6 +242,8 @@ "Description": "Automatically created by the RestApi construct" }, "DependsOn": [ + "MyAuthorizerauthorizerInvokePolicy0F88B8E1", + "MyAuthorizer6575980E", "MyRestApiANY05143F93" ] }, @@ -252,7 +254,7 @@ "Ref": "MyRestApi2D1F47A9" }, "DeploymentId": { - "Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb" + "Ref": "MyRestApiDeploymentB555B582694e8eb3fdb7b5f988ba347d35601979" }, "StageName": "prod" }, diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/cdk.out b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/cdk.out index 588d7b269d34f..145739f539580 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/iamtokenauthorizerDefaultTestDeployAssert87D47FBB.assets.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/iamtokenauthorizerDefaultTestDeployAssert87D47FBB.assets.json index af6ca95e1f7b1..5be62c8213017 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/iamtokenauthorizerDefaultTestDeployAssert87D47FBB.assets.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/iamtokenauthorizerDefaultTestDeployAssert87D47FBB.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "22.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/integ.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/integ.json index e65f7fb12db53..be0cefd589916 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "22.0.0", "testCases": { "iam-token-authorizer/DefaultTest": { "stacks": [ "TokenAuthorizerIAMRoleInteg" ], - "assertionStack": "iam-token-authorizer/DefaultTest/DeployAssert" + "assertionStack": "iam-token-authorizer/DefaultTest/DeployAssert", + "assertionStackName": "iamtokenauthorizerDefaultTestDeployAssert87D47FBB" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/manifest.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/manifest.json index 2f3929acac683..4ccd364f7a5d0 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "22.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "TokenAuthorizerIAMRoleInteg.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}/ca126ba9a02884a8dc3612e63dc5ab11b76fc4f7b3e1901d9081bac728c3a32a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5fdd271d3e3ca8dcde2fe1c2529c3b6fc2527c7812e6edcf239bf1ad6043152b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -90,7 +84,7 @@ "/TokenAuthorizerIAMRoleInteg/MyRestApi/Deployment/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb" + "data": "MyRestApiDeploymentB555B582694e8eb3fdb7b5f988ba347d35601979" } ], "/TokenAuthorizerIAMRoleInteg/MyRestApi/DeploymentStage.prod/Resource": [ @@ -122,6 +116,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": [ + { + "type": "aws:cdk:logicalId", + "data": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "TokenAuthorizerIAMRoleInteg" @@ -172,6 +175,12 @@ ] }, "displayName": "iam-token-authorizer/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/tree.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/tree.json index f3b5869471ce3..6d0f5f9394ca3 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.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" - } - }, "TokenAuthorizerIAMRoleInteg": { "id": "TokenAuthorizerIAMRoleInteg", "path": "TokenAuthorizerIAMRoleInteg", @@ -24,6 +16,14 @@ "id": "ServiceRole", "path": "TokenAuthorizerIAMRoleInteg/MyAuthorizerFunction/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "TokenAuthorizerIAMRoleInteg/MyAuthorizerFunction/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "TokenAuthorizerIAMRoleInteg/MyAuthorizerFunction/ServiceRole/Resource", @@ -77,8 +77,8 @@ "id": "Stage", "path": "TokenAuthorizerIAMRoleInteg/MyAuthorizerFunction/Code/Stage", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" } }, "AssetBucket": { @@ -132,6 +132,14 @@ "id": "authorizerRole", "path": "TokenAuthorizerIAMRoleInteg/authorizerRole", "children": { + "ImportauthorizerRole": { + "id": "ImportauthorizerRole", + "path": "TokenAuthorizerIAMRoleInteg/authorizerRole/ImportauthorizerRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "TokenAuthorizerIAMRoleInteg/authorizerRole/Resource", @@ -329,6 +337,14 @@ "id": "CloudWatchRole", "path": "TokenAuthorizerIAMRoleInteg/MyRestApi/CloudWatchRole", "children": { + "ImportCloudWatchRole": { + "id": "ImportCloudWatchRole", + "path": "TokenAuthorizerIAMRoleInteg/MyRestApi/CloudWatchRole/ImportCloudWatchRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "TokenAuthorizerIAMRoleInteg/MyRestApi/CloudWatchRole/Resource", @@ -434,7 +450,7 @@ "Ref": "MyRestApi2D1F47A9" }, "deploymentId": { - "Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb" + "Ref": "MyRestApiDeploymentB555B582694e8eb3fdb7b5f988ba347d35601979" }, "stageName": "prod" } @@ -454,8 +470,8 @@ "id": "Endpoint", "path": "TokenAuthorizerIAMRoleInteg/MyRestApi/Endpoint", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "Default": { @@ -527,11 +543,27 @@ "fqn": "@aws-cdk/aws-apigateway.RestApi", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "TokenAuthorizerIAMRoleInteg/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "TokenAuthorizerIAMRoleInteg/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } }, "iam-token-authorizer": { @@ -547,15 +579,33 @@ "path": "iam-token-authorizer/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.168" } }, "DeployAssert": { "id": "DeployAssert", "path": "iam-token-authorizer/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "iam-token-authorizer/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "iam-token-authorizer/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, @@ -569,11 +619,19 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.168" + } } }, "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-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/TokenAuthorizerInteg.assets.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/TokenAuthorizerInteg.assets.json index 02ff71cc0d01f..144db7309dc98 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/TokenAuthorizerInteg.assets.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/TokenAuthorizerInteg.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { "fec8e8354e12687c5a4b843b4e269741f53dec634946869b276f7fd1017845c3": { "source": { @@ -14,7 +14,7 @@ } } }, - "d48b90b340d35b9bc726b78e652d17148e2449f6f756e4377428635071f68d09": { + "3ef3f0473a2312add1b6eeec16180f638b07d97828baa8745a05728ef3a87074": { "source": { "path": "TokenAuthorizerInteg.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d48b90b340d35b9bc726b78e652d17148e2449f6f756e4377428635071f68d09.json", + "objectKey": "3ef3f0473a2312add1b6eeec16180f638b07d97828baa8745a05728ef3a87074.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-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/TokenAuthorizerInteg.template.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/TokenAuthorizerInteg.template.json index 3d2e9d31fafd1..a226c574ab92c 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/TokenAuthorizerInteg.template.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/TokenAuthorizerInteg.template.json @@ -208,7 +208,7 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "MyRestApiDeploymentB555B582464879c8d1f9fcce2500f142532cdaec": { + "MyRestApiDeploymentB555B5822d29e7cc325d84a3264c658c75a9d43a": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { @@ -217,6 +217,7 @@ "Description": "Automatically created by the RestApi construct" }, "DependsOn": [ + "MyAuthorizer6575980E", "MyRestApiANY05143F93", "MyRestApiOPTIONS43BD7BF4" ] @@ -228,7 +229,7 @@ "Ref": "MyRestApi2D1F47A9" }, "DeploymentId": { - "Ref": "MyRestApiDeploymentB555B582464879c8d1f9fcce2500f142532cdaec" + "Ref": "MyRestApiDeploymentB555B5822d29e7cc325d84a3264c658c75a9d43a" }, "StageName": "prod" }, diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/apigwtokenauthDefaultTestDeployAssert2CF60E05.assets.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/apigwtokenauthDefaultTestDeployAssert2CF60E05.assets.json index 5ff8adbfac7a7..db76c4d9514d0 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/apigwtokenauthDefaultTestDeployAssert2CF60E05.assets.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/apigwtokenauthDefaultTestDeployAssert2CF60E05.assets.json @@ -1,20 +1,20 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { - "456da4984f762c1c25e94bd5f2df6758d2b0884d0dae8ca59bb8f4e3de7c2136": { + "382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674": { "source": { - "path": "asset.456da4984f762c1c25e94bd5f2df6758d2b0884d0dae8ca59bb8f4e3de7c2136.bundle", + "path": "asset.382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "456da4984f762c1c25e94bd5f2df6758d2b0884d0dae8ca59bb8f4e3de7c2136.zip", + "objectKey": "382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "663a8c1a16f9e427d0ecfe2215cb471b582dfce87e95f6bbf85d32c371692ece": { + "52fafe59d21141477256755bcebd4385222337a65ba87eac0399ec8dc24a2702": { "source": { "path": "apigwtokenauthDefaultTestDeployAssert2CF60E05.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "663a8c1a16f9e427d0ecfe2215cb471b582dfce87e95f6bbf85d32c371692ece.json", + "objectKey": "52fafe59d21141477256755bcebd4385222337a65ba87eac0399ec8dc24a2702.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-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/apigwtokenauthDefaultTestDeployAssert2CF60E05.template.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/apigwtokenauthDefaultTestDeployAssert2CF60E05.template.json index e1e122baa02da..1883011cbabbf 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/apigwtokenauthDefaultTestDeployAssert2CF60E05.template.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/apigwtokenauthDefaultTestDeployAssert2CF60E05.template.json @@ -19,7 +19,7 @@ "Payload": "{\"method\":\"GET\",\"authorization\":\"allow\"}" }, "flattenResponse": "false", - "salt": "1665080757293" + "salt": "1670026030165" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -199,7 +199,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "456da4984f762c1c25e94bd5f2df6758d2b0884d0dae8ca59bb8f4e3de7c2136.zip" + "S3Key": "382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -230,7 +230,7 @@ "Payload": "{\"method\":\"GET\",\"authorization\":\"deny\"}" }, "flattenResponse": "false", - "salt": "1665080757294" + "salt": "1670026030166" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -269,7 +269,7 @@ "Payload": "{\"method\":\"OPTIONS\"}" }, "flattenResponse": "false", - "salt": "1665080757295" + "salt": "1670026030167" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/asset.382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.bundle/index.js similarity index 97% rename from packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js rename to packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/asset.382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.bundle/index.js index 2d6c2f0e85497..ffbf23bc9533f 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/asset.382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.bundle/index.js @@ -614,11 +614,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); diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/asset.456da4984f762c1c25e94bd5f2df6758d2b0884d0dae8ca59bb8f4e3de7c2136.bundle/index.js b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/asset.456da4984f762c1c25e94bd5f2df6758d2b0884d0dae8ca59bb8f4e3de7c2136.bundle/index.js deleted file mode 100644 index afcb0cbcfe30a..0000000000000 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/asset.456da4984f762c1c25e94bd5f2df6758d2b0884d0dae8ca59bb8f4e3de7c2136.bundle/index.js +++ /dev/null @@ -1,668 +0,0 @@ -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-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/cdk.out b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/cdk.out index 8ecc185e9dbee..145739f539580 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/integ.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/integ.json index e967d654f2819..080bde5b55794 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "testCases": { "apigw-token-auth/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/manifest.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/manifest.json index d2bf3e547ad21..975ac0a9e56f4 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "21.0.0", + "version": "22.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "TokenAuthorizerInteg.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}/d48b90b340d35b9bc726b78e652d17148e2449f6f756e4377428635071f68d09.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3ef3f0473a2312add1b6eeec16180f638b07d97828baa8745a05728ef3a87074.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -84,7 +78,7 @@ "/TokenAuthorizerInteg/MyRestApi/Deployment/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyRestApiDeploymentB555B582464879c8d1f9fcce2500f142532cdaec" + "data": "MyRestApiDeploymentB555B5822d29e7cc325d84a3264c658c75a9d43a" } ], "/TokenAuthorizerInteg/MyRestApi/DeploymentStage.prod/Resource": [ @@ -140,6 +134,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "MyRestApiDeploymentB555B582464879c8d1f9fcce2500f142532cdaec": [ + { + "type": "aws:cdk:logicalId", + "data": "MyRestApiDeploymentB555B582464879c8d1f9fcce2500f142532cdaec", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "TokenAuthorizerInteg" @@ -160,7 +163,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}/663a8c1a16f9e427d0ecfe2215cb471b582dfce87e95f6bbf85d32c371692ece.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/52fafe59d21141477256755bcebd4385222337a65ba87eac0399ec8dc24a2702.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -257,6 +260,12 @@ ] }, "displayName": "apigw-token-auth/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/tree.json b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/tree.json index 2dc4bcb660eab..74b779ad07db7 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.js.snapshot/tree.json @@ -4,14 +4,6 @@ "id": "App", "path": "", "children": { - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.108" - } - }, "TokenAuthorizerInteg": { "id": "TokenAuthorizerInteg", "path": "TokenAuthorizerInteg", @@ -24,6 +16,14 @@ "id": "ServiceRole", "path": "TokenAuthorizerInteg/MyAuthorizerFunction/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "TokenAuthorizerInteg/MyAuthorizerFunction/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "TokenAuthorizerInteg/MyAuthorizerFunction/ServiceRole/Resource", @@ -276,6 +276,14 @@ "id": "CloudWatchRole", "path": "TokenAuthorizerInteg/MyRestApi/CloudWatchRole", "children": { + "ImportCloudWatchRole": { + "id": "ImportCloudWatchRole", + "path": "TokenAuthorizerInteg/MyRestApi/CloudWatchRole/ImportCloudWatchRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "TokenAuthorizerInteg/MyRestApi/CloudWatchRole/Resource", @@ -381,7 +389,7 @@ "Ref": "MyRestApi2D1F47A9" }, "deploymentId": { - "Ref": "MyRestApiDeploymentB555B582464879c8d1f9fcce2500f142532cdaec" + "Ref": "MyRestApiDeploymentB555B5822d29e7cc325d84a3264c658c75a9d43a" }, "stageName": "prod" } @@ -543,6 +551,14 @@ "id": "ServiceRole", "path": "TokenAuthorizerInteg/InvokeFunction/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "TokenAuthorizerInteg/InvokeFunction/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "TokenAuthorizerInteg/InvokeFunction/ServiceRole/Resource", @@ -658,7 +674,23 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.108" + "version": "10.1.168" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "TokenAuthorizerInteg/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "TokenAuthorizerInteg/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" } } }, @@ -680,7 +712,7 @@ "path": "apigw-token-auth/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.108" + "version": "10.1.168" } }, "DeployAssert": { @@ -700,7 +732,7 @@ "path": "apigw-token-auth/DefaultTest/DeployAssert/LambdaInvoke3deec958b1e945795e38da5fc2f86753/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.108" + "version": "10.1.168" } } }, @@ -780,7 +812,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.108" + "version": "10.1.168" } }, "LambdaInvoke8e1b9f979f2329abf1ed6574d33d391a": { @@ -796,7 +828,7 @@ "path": "apigw-token-auth/DefaultTest/DeployAssert/LambdaInvoke8e1b9f979f2329abf1ed6574d33d391a/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.108" + "version": "10.1.168" } } }, @@ -858,7 +890,7 @@ "path": "apigw-token-auth/DefaultTest/DeployAssert/LambdaInvoke0532e3d95b2a56b147278c621e5800c4/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.108" + "version": "10.1.168" } } }, @@ -906,6 +938,22 @@ "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "apigw-token-auth/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "apigw-token-auth/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { @@ -924,6 +972,14 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.168" + } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts b/packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts index 54bc61807c662..cef396426d377 100644 --- a/packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts +++ b/packages/@aws-cdk/aws-apigateway/test/authorizers/lambda.test.ts @@ -524,4 +524,129 @@ describe('lambda authorizer', () => { expect(() => stack.resolve(auth.authorizerArn)).toThrow(/must be attached to a RestApi/); }); + + test('rest api depends on the token authorizer when @aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId is enabled', () => { + const stack = new Stack(); + stack.node.setContext('@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId', true); + + const func = new lambda.Function(stack, 'myfunction', { + handler: 'handler', + code: lambda.Code.fromInline('foo'), + runtime: lambda.Runtime.NODEJS_18_X, + }); + + const auth = new TokenAuthorizer(stack, 'myauthorizer', { + handler: func, + }); + + const restApi = new RestApi(stack, 'myrestapi'); + restApi.root.addMethod('ANY', undefined, { + authorizer: auth, + authorizationType: AuthorizationType.CUSTOM, + }); + + const template = Template.fromStack(stack); + + const authorizerId = Object.keys(template.findResources('AWS::ApiGateway::Authorizer'))[0]; + const deployment = Object.values(template.findResources('AWS::ApiGateway::Deployment'))[0]; + + expect(deployment.DependsOn).toEqual(expect.arrayContaining([authorizerId])); + }); + + test('rest api depends on the request authorizer when @aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId is enabled', () => { + const stack = new Stack(); + stack.node.setContext('@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId', true); + + const func = new lambda.Function(stack, 'myfunction', { + handler: 'handler', + code: lambda.Code.fromInline('foo'), + runtime: lambda.Runtime.NODEJS_14_X, + }); + + const auth = new RequestAuthorizer(stack, 'myauthorizer', { + handler: func, + resultsCacheTtl: Duration.seconds(0), + identitySources: [], + }); + + const restApi = new RestApi(stack, 'myrestapi'); + restApi.root.addMethod('ANY', undefined, { + authorizer: auth, + authorizationType: AuthorizationType.CUSTOM, + }); + + const template = Template.fromStack(stack); + + const authorizerId = Object.keys(template.findResources('AWS::ApiGateway::Authorizer'))[0]; + const deployment = Object.values(template.findResources('AWS::ApiGateway::Deployment'))[0]; + + expect(deployment.DependsOn).toEqual(expect.arrayContaining([authorizerId])); + }); + + test('a new deployment is created when a lambda function changes name and @aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId is enabled', () => { + const createApiTemplate = (lambdaFunctionName: string) => { + const stack = new Stack(); + stack.node.setContext('@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId', true); + + const func = new lambda.Function(stack, 'myfunction', { + handler: 'handler', + functionName: lambdaFunctionName, + code: lambda.Code.fromInline('foo'), + runtime: lambda.Runtime.NODEJS_18_X, + }); + + const auth = new RequestAuthorizer(stack, 'myauthorizer', { + handler: func, + resultsCacheTtl: Duration.seconds(0), + identitySources: [], + }); + + const restApi = new RestApi(stack, 'myrestapi'); + restApi.root.addMethod('ANY', undefined, { + authorizer: auth, + authorizationType: AuthorizationType.CUSTOM, + }); + + return Template.fromStack(stack); + }; + + const oldTemplate = createApiTemplate('foo'); + const newTemplate = createApiTemplate('bar'); + + const oldDeploymentId = Object.keys(oldTemplate.findResources('AWS::ApiGateway::Deployment'))[0]; + const newDeploymentId = Object.keys(newTemplate.findResources('AWS::ApiGateway::Deployment'))[0]; + + expect(oldDeploymentId).not.toEqual(newDeploymentId); + }); + + test('a new deployment is created when an imported lambda function changes name and @aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId is enabled', () => { + const createApiTemplate = (lambdaFunctionName: string) => { + const stack = new Stack(); + stack.node.setContext('@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId', true); + + const func = lambda.Function.fromFunctionName(stack, 'myfunction', lambdaFunctionName); + + const auth = new RequestAuthorizer(stack, 'myauthorizer', { + handler: func, + resultsCacheTtl: Duration.seconds(0), + identitySources: [], + }); + + const restApi = new RestApi(stack, 'myrestapi'); + restApi.root.addMethod('ANY', undefined, { + authorizer: auth, + authorizationType: AuthorizationType.CUSTOM, + }); + + return Template.fromStack(stack); + }; + + const oldTemplate = createApiTemplate('foo'); + const newTemplate = createApiTemplate('bar'); + + const oldDeploymentId = Object.keys(oldTemplate.findResources('AWS::ApiGateway::Deployment'))[0]; + const newDeploymentId = Object.keys(newTemplate.findResources('AWS::ApiGateway::Deployment'))[0]; + + expect(oldDeploymentId).not.toEqual(newDeploymentId); + }); }); diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.assets.json b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.assets.json index 837804ded00fc..d59129a690af5 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.assets.json +++ b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "06411bc9644c9af466e4101cc159122b7c5422ecbd496553c2a2ef821687361c": { + "de2c198bbb6588ccbe00d0f0794f7217c429e3d7e3c5b4326e3b085b0d697753": { "source": { "path": "StepFunctionsRestApiDeploymentStack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "06411bc9644c9af466e4101cc159122b7c5422ecbd496553c2a2ef821687361c.json", + "objectKey": "de2c198bbb6588ccbe00d0f0794f7217c429e3d7e3c5b4326e3b085b0d697753.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-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.template.json b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.template.json index b75afc9956bc0..4155a4e79f248 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.template.json +++ b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.template.json @@ -31,7 +31,9 @@ }, "DependsOn": [ "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "StepFunctionsRestApiC6E3E883": { "Type": "AWS::ApiGateway::RestApi", diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/cdk.out b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/integ.json b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/integ.json index 84a4bb18930c6..a03cac6c93cba 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "step-functions-restapi/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/manifest.json b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/manifest.json index 6e701d17646f4..52ddf9169a128 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "StepFunctionsRestApiDeploymentStack.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}/06411bc9644c9af466e4101cc159122b7c5422ecbd496553c2a2ef821687361c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/de2c198bbb6588ccbe00d0f0794f7217c429e3d7e3c5b4326e3b085b0d697753.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/stepfunctionsrestapiDefaultTestDeployAssert53C3797F.assets.json b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/stepfunctionsrestapiDefaultTestDeployAssert53C3797F.assets.json index 03dbadceca242..4afeaa40c1436 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/stepfunctionsrestapiDefaultTestDeployAssert53C3797F.assets.json +++ b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/stepfunctionsrestapiDefaultTestDeployAssert53C3797F.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/tree.json b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/tree.json index 6bc4666f58659..f7ebd58e0c8c7 100644 --- a/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/tree.json @@ -24,6 +24,14 @@ "id": "Role", "path": "StepFunctionsRestApiDeploymentStack/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "StepFunctionsRestApiDeploymentStack/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "StepFunctionsRestApiDeploymentStack/StateMachine/Role/Resource", @@ -104,6 +112,14 @@ "id": "CloudWatchRole", "path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/CloudWatchRole", "children": { + "ImportCloudWatchRole": { + "id": "ImportCloudWatchRole", + "path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/CloudWatchRole/ImportCloudWatchRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/CloudWatchRole/Resource", @@ -180,6 +196,14 @@ "id": "StartSyncExecutionRole", "path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/Default/ANY/StartSyncExecutionRole", "children": { + "ImportStartSyncExecutionRole": { + "id": "ImportStartSyncExecutionRole", + "path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/Default/ANY/StartSyncExecutionRole/ImportStartSyncExecutionRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/Default/ANY/StartSyncExecutionRole/Resource", @@ -476,7 +500,7 @@ "path": "step-functions-restapi/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "DeployAssert": { @@ -522,7 +546,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json index 3eae9be949a44..3b9a0665e8acb 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/package.json @@ -81,6 +81,7 @@ "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", + "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.5.2" }, diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json new file mode 100644 index 0000000000000..1c86a68a43509 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json @@ -0,0 +1,19 @@ +{ + "version": "21.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "IntegDefaultTestDeployAssert4E6713E1.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-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.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-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/aws-cdk-aws-apigatewayv2-websockets.assets.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/aws-cdk-aws-apigatewayv2-websockets.assets.json new file mode 100644 index 0000000000000..1b84d4a69430f --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/aws-cdk-aws-apigatewayv2-websockets.assets.json @@ -0,0 +1,19 @@ +{ + "version": "21.0.0", + "files": { + "536558280cda4b74d67fdcdc23a22d0fb7b7e175f5bb56b260d43680056a3718": { + "source": { + "path": "aws-cdk-aws-apigatewayv2-websockets.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "536558280cda4b74d67fdcdc23a22d0fb7b7e175f5bb56b260d43680056a3718.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-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/aws-cdk-aws-apigatewayv2-websockets.template.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/aws-cdk-aws-apigatewayv2-websockets.template.json new file mode 100644 index 0000000000000..fc78860fb477a --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/aws-cdk-aws-apigatewayv2-websockets.template.json @@ -0,0 +1,90 @@ +{ + "Resources": { + "MyWebsocketApiEBAC53DF": { + "Type": "AWS::ApiGatewayV2::Api", + "Properties": { + "Name": "MyWebsocketApi", + "ProtocolType": "WEBSOCKET", + "RouteSelectionExpression": "$request.body.action" + } + }, + "MyWebsocketApitestRouteSendMessageIntegration526C7CB6": { + "Type": "AWS::ApiGatewayV2::Integration", + "Properties": { + "ApiId": { + "Ref": "MyWebsocketApiEBAC53DF" + }, + "IntegrationType": "MOCK", + "IntegrationUri": "" + } + }, + "MyWebsocketApitestRoute893E635A": { + "Type": "AWS::ApiGatewayV2::Route", + "Properties": { + "ApiId": { + "Ref": "MyWebsocketApiEBAC53DF" + }, + "RouteKey": "test", + "AuthorizationType": "NONE", + "RouteResponseSelectionExpression": "$default", + "Target": { + "Fn::Join": [ + "", + [ + "integrations/", + { + "Ref": "MyWebsocketApitestRouteSendMessageIntegration526C7CB6" + } + ] + ] + } + } + }, + "MyWebsocketApitestRouteResponse5A88D743": { + "Type": "AWS::ApiGatewayV2::RouteResponse", + "Properties": { + "ApiId": { + "Ref": "MyWebsocketApiEBAC53DF" + }, + "RouteId": { + "Ref": "MyWebsocketApitestRoute893E635A" + }, + "RouteResponseKey": "$default" + } + } + }, + "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-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/cdk.out b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/cdk.out new file mode 100644 index 0000000000000..8ecc185e9dbee --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/integ.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/integ.json new file mode 100644 index 0000000000000..96c7a9ea56951 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "21.0.0", + "testCases": { + "Integ/DefaultTest": { + "stacks": [ + "aws-cdk-aws-apigatewayv2-websockets" + ], + "assertionStack": "Integ/DefaultTest/DeployAssert", + "assertionStackName": "IntegDefaultTestDeployAssert4E6713E1" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/manifest.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/manifest.json new file mode 100644 index 0000000000000..394ee072dfc5a --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/manifest.json @@ -0,0 +1,129 @@ +{ + "version": "21.0.0", + "artifacts": { + "aws-cdk-aws-apigatewayv2-websockets.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-aws-apigatewayv2-websockets.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-aws-apigatewayv2-websockets": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-aws-apigatewayv2-websockets.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}/536558280cda4b74d67fdcdc23a22d0fb7b7e175f5bb56b260d43680056a3718.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-aws-apigatewayv2-websockets.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": [ + "aws-cdk-aws-apigatewayv2-websockets.assets" + ], + "metadata": { + "/aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyWebsocketApiEBAC53DF" + } + ], + "/aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/test-Route/SendMessageIntegration/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyWebsocketApitestRouteSendMessageIntegration526C7CB6" + } + ], + "/aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/test-Route/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyWebsocketApitestRoute893E635A" + } + ], + "/aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/test-Route/Response": [ + { + "type": "aws:cdk:logicalId", + "data": "MyWebsocketApitestRouteResponse5A88D743" + } + ], + "/aws-cdk-aws-apigatewayv2-websockets/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-aws-apigatewayv2-websockets/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-aws-apigatewayv2-websockets" + }, + "IntegDefaultTestDeployAssert4E6713E1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "IntegDefaultTestDeployAssert4E6713E1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "IntegDefaultTestDeployAssert4E6713E1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "IntegDefaultTestDeployAssert4E6713E1.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": [ + "IntegDefaultTestDeployAssert4E6713E1.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": [ + "IntegDefaultTestDeployAssert4E6713E1.assets" + ], + "metadata": { + "/Integ/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "Integ/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/tree.json b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/tree.json new file mode 100644 index 0000000000000..62f1b75e222d9 --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.js.snapshot/tree.json @@ -0,0 +1,215 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-aws-apigatewayv2-websockets": { + "id": "aws-cdk-aws-apigatewayv2-websockets", + "path": "aws-cdk-aws-apigatewayv2-websockets", + "children": { + "MyWebsocketApi": { + "id": "MyWebsocketApi", + "path": "aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGatewayV2::Api", + "aws:cdk:cloudformation:props": { + "name": "MyWebsocketApi", + "protocolType": "WEBSOCKET", + "routeSelectionExpression": "$request.body.action" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigatewayv2.CfnApi", + "version": "0.0.0" + } + }, + "test-Route": { + "id": "test-Route", + "path": "aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/test-Route", + "children": { + "SendMessageIntegration": { + "id": "SendMessageIntegration", + "path": "aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/test-Route/SendMessageIntegration", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/test-Route/SendMessageIntegration/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGatewayV2::Integration", + "aws:cdk:cloudformation:props": { + "apiId": { + "Ref": "MyWebsocketApiEBAC53DF" + }, + "integrationType": "MOCK", + "integrationUri": "" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigatewayv2.CfnIntegration", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigatewayv2.WebSocketIntegration", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/test-Route/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGatewayV2::Route", + "aws:cdk:cloudformation:props": { + "apiId": { + "Ref": "MyWebsocketApiEBAC53DF" + }, + "routeKey": "test", + "authorizationType": "NONE", + "routeResponseSelectionExpression": "$default", + "target": { + "Fn::Join": [ + "", + [ + "integrations/", + { + "Ref": "MyWebsocketApitestRouteSendMessageIntegration526C7CB6" + } + ] + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigatewayv2.CfnRoute", + "version": "0.0.0" + } + }, + "Response": { + "id": "Response", + "path": "aws-cdk-aws-apigatewayv2-websockets/MyWebsocketApi/test-Route/Response", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApiGatewayV2::RouteResponse", + "aws:cdk:cloudformation:props": { + "apiId": { + "Ref": "MyWebsocketApiEBAC53DF" + }, + "routeId": { + "Ref": "MyWebsocketApitestRoute893E635A" + }, + "routeResponseKey": "$default" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigatewayv2.CfnRouteResponse", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigatewayv2.WebSocketRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-apigatewayv2.WebSocketApi", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-aws-apigatewayv2-websockets/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-aws-apigatewayv2-websockets/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Integ": { + "id": "Integ", + "path": "Integ", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "Integ/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "Integ/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "Integ/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "Integ/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "Integ/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.161" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.ts b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.ts new file mode 100644 index 0000000000000..063b1d20d962e --- /dev/null +++ b/packages/@aws-cdk/aws-apigatewayv2-integrations/test/websocket/integ.route-response.ts @@ -0,0 +1,18 @@ +import { WebSocketApi } from '@aws-cdk/aws-apigatewayv2'; +import * as cdk from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; +import { WebSocketMockIntegration } from '../../lib'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'aws-cdk-aws-apigatewayv2-websockets'); + +const api = new WebSocketApi(stack, 'MyWebsocketApi'); +api.addRoute('test', { + integration: new WebSocketMockIntegration('SendMessageIntegration'), + returnResponse: true, +}); + +new IntegTest(app, 'Integ', { testCases: [stack] }); + +app.synth(); diff --git a/packages/@aws-cdk/aws-apigatewayv2/README.md b/packages/@aws-cdk/aws-apigatewayv2/README.md index 2d35001373921..ceca6f35c3854 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/README.md +++ b/packages/@aws-cdk/aws-apigatewayv2/README.md @@ -404,6 +404,19 @@ webSocketApi.addRoute('sendmessage', { }); ``` +To add a route that can return a result: + +```ts +import { WebSocketLambdaIntegration } from '@aws-cdk/aws-apigatewayv2-integrations'; + +declare const messageHandler: lambda.Function; +const webSocketApi = new apigwv2.WebSocketApi(this, 'mywsapi'); +webSocketApi.addRoute('sendmessage', { + integration: new WebSocketLambdaIntegration('SendMessageIntegration', messageHandler), + returnResponse: true, +}); +``` + To import an existing WebSocketApi: ```ts diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/websocket/route.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/websocket/route.ts index 923311a2b524e..84328d18e795d 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/websocket/route.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/websocket/route.ts @@ -1,6 +1,6 @@ import { Resource } from '@aws-cdk/core'; import { Construct } from 'constructs'; -import { CfnRoute } from '../apigatewayv2.generated'; +import { CfnRoute, CfnRouteResponse } from '../apigatewayv2.generated'; import { IRoute } from '../common'; import { IWebSocketApi } from './api'; import { IWebSocketRouteAuthorizer, WebSocketNoneAuthorizer } from './authorizer'; @@ -37,6 +37,13 @@ export interface WebSocketRouteOptions { * @default - No Authorizer */ readonly authorizer?: IWebSocketRouteAuthorizer; + + /** + * Should the route send a response to the client + * @default false + */ + readonly returnResponse?: boolean; + } /** @@ -102,7 +109,15 @@ export class WebSocketRoute extends Resource implements IWebSocketRoute { target: `integrations/${config.integrationId}`, authorizerId: authBindResult.authorizerId, authorizationType: authBindResult.authorizationType, + routeResponseSelectionExpression: props.returnResponse ? '$default' : undefined, }); this.routeId = route.ref; + if (props.returnResponse) { + new CfnRouteResponse(this, 'Response', { + apiId: props.webSocketApi.apiId, + routeId: route.ref, + routeResponseKey: '$default', + }); + } } } diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/websocket/api.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/websocket/api.test.ts index f9fb740c0e190..fd7839b4b7657 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/websocket/api.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/websocket/api.test.ts @@ -65,6 +65,28 @@ describe('WebSocketApi', () => { }); }); + test('addRoute: adds a route with passed key and allows it to return a response', () => { + // GIVEN + const stack = new Stack(); + const api = new WebSocketApi(stack, 'api'); + + // WHEN + const route = api.addRoute('myroute', { integration: new DummyIntegration(), returnResponse: true }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::ApiGatewayV2::Route', { + ApiId: stack.resolve(api.apiId), + RouteKey: 'myroute', + RouteResponseSelectionExpression: '$default', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::ApiGatewayV2::RouteResponse', { + ApiId: stack.resolve(api.apiId), + RouteId: stack.resolve(route.routeId), + RouteResponseKey: '$default', + }); + }); + test('connectRouteOptions: adds a $connect route', () => { // GIVEN const stack = new Stack(); diff --git a/packages/@aws-cdk/aws-apigatewayv2/test/websocket/route.test.ts b/packages/@aws-cdk/aws-apigatewayv2/test/websocket/route.test.ts index 94c4e969a08b6..63bc3e6e969c7 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/test/websocket/route.test.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/test/websocket/route.test.ts @@ -120,6 +120,50 @@ describe('WebSocketRoute', () => { Template.fromStack(stack).hasResource('AWS::ApiGatewayV2::Integration', 2); }); + + test('default RouteResponseSelectionExpression is set if route will return a response to the client', () => { + // GIVEN + const stack = new Stack(); + const webSocketApi = new WebSocketApi(stack, 'Api'); + + // WHEN + const route = new WebSocketRoute(stack, 'Route', { + webSocketApi, + integration: new DummyIntegration(), + routeKey: 'message', + returnResponse: true, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::ApiGatewayV2::Route', { + ApiId: stack.resolve(webSocketApi.apiId), + RouteKey: 'message', + RouteResponseSelectionExpression: '$default', + Target: { + 'Fn::Join': [ + '', + [ + 'integrations/', + { + Ref: 'RouteDummyIntegrationE40E82B4', + }, + ], + ], + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::ApiGatewayV2::RouteResponse', { + ApiId: stack.resolve(webSocketApi.apiId), + RouteId: stack.resolve(route.routeId), + RouteResponseKey: '$default', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::ApiGatewayV2::Integration', { + ApiId: stack.resolve(webSocketApi.apiId), + IntegrationType: 'AWS_PROXY', + IntegrationUri: 'some-uri', + }); + }); }); diff --git a/packages/@aws-cdk/aws-athena/package.json b/packages/@aws-cdk/aws-athena/package.json index b1fe21bdcaa0b..6ac916cea984b 100644 --- a/packages/@aws-cdk/aws-athena/package.json +++ b/packages/@aws-cdk/aws-athena/package.json @@ -83,6 +83,7 @@ "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", + "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.5.2", diff --git a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.assets.json b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.assets.json new file mode 100644 index 0000000000000..f1d91048247ac --- /dev/null +++ b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.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-athena/test/integ.workgroup.js.snapshot/athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.template.json b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.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-athena/test/integ.workgroup.js.snapshot/aws-cdk-athena-workgroup-tags.assets.json b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/aws-cdk-athena-workgroup-tags.assets.json index 61d1be7611394..7f55e4b268d0b 100644 --- a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/aws-cdk-athena-workgroup-tags.assets.json +++ b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/aws-cdk-athena-workgroup-tags.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { "d8b01509e317c31bcc2aa728dce91fba9a9fb5d533a6b61cf09948a178861951": { "source": { diff --git a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/cdk.out b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/integ.json b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/integ.json index df6fa852a5ee2..10db286950e8e 100644 --- a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { - "integ.workgroup": { + "athena-workgroup-tags-test/DefaultTest": { "stacks": [ "aws-cdk-athena-workgroup-tags" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "athena-workgroup-tags-test/DefaultTest/DeployAssert", + "assertionStackName": "athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/manifest.json b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/manifest.json index ef499cb17f6ab..6e3370835f703 100644 --- a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "aws-cdk-athena-workgroup-tags.assets": { "type": "cdk:asset-manifest", "properties": { @@ -59,6 +53,59 @@ ] }, "displayName": "aws-cdk-athena-workgroup-tags" + }, + "athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.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": [ + "athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.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": [ + "athenaworkgrouptagstestDefaultTestDeployAssert5C4419AB.assets" + ], + "metadata": { + "/athena-workgroup-tags-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/athena-workgroup-tags-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "athena-workgroup-tags-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/tree.json b/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/tree.json index 39281bf89a71e..5aad17478f674 100644 --- a/packages/@aws-cdk/aws-athena/test/integ.workgroup.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-athena/test/integ.workgroup.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-athena-workgroup-tags": { "id": "aws-cdk-athena-workgroup-tags", "path": "aws-cdk-athena-workgroup-tags", @@ -42,17 +34,95 @@ "fqn": "@aws-cdk/aws-athena.CfnWorkGroup", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-athena-workgroup-tags/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-athena-workgroup-tags/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "athena-workgroup-tags-test": { + "id": "athena-workgroup-tags-test", + "path": "athena-workgroup-tags-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "athena-workgroup-tags-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "athena-workgroup-tags-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "athena-workgroup-tags-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "athena-workgroup-tags-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "athena-workgroup-tags-test/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.249" } } }, "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-athena/test/integ.workgroup.ts b/packages/@aws-cdk/aws-athena/test/integ.workgroup.ts index fcac72f9c8c08..8a5a05ee50cf2 100644 --- a/packages/@aws-cdk/aws-athena/test/integ.workgroup.ts +++ b/packages/@aws-cdk/aws-athena/test/integ.workgroup.ts @@ -1,4 +1,5 @@ import * as cdk from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import { CfnWorkGroup } from '../lib'; const app = new cdk.App(); @@ -21,4 +22,8 @@ new CfnWorkGroup(stack, 'AthenaWorkgroup', { ], }); +new IntegTest(app, 'athena-workgroup-tags-test', { + testCases: [stack], +}); + app.synth(); 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 b8d12523eed0c..3f9651aebba3d 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.110", "@types/sinon": "^9.0.11", "@aws-cdk/cdk-build-tools": "0.0.0", - "aws-sdk": "^2.596.0", + "aws-sdk": "^2.1317.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 030de64af9b5e..422c0368fa76e 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.1211.0" + "aws-sdk": "^2.1317.0" }, "dependencies": { "@aws-cdk/aws-apigateway": "0.0.0", diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 76829339fa3f2..f85a2538c1bd4 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.1211.0", + "aws-sdk": "^2.1317.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 6ae72b8456ee3..1e392e3526eea 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.1211.0", + "aws-sdk": "^2.1317.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 bf7fc7931f72f..86568eaeaa0ae 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.1211.0", + "aws-sdk": "^2.1317.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 bde04cf3ebe28..c9a902db27c96 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.1211.0", + "aws-sdk": "^2.1317.0", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-group.ts index 7b549e79d173c..836ce6069ced7 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-group.ts @@ -3,6 +3,7 @@ import * as ecs from '@aws-cdk/aws-ecs'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; +import { CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP } from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { CfnDeploymentGroup } from '../codedeploy.generated'; import { ImportedDeploymentGroupBase, DeploymentGroupBase } from '../private/base-deployment-group'; @@ -240,6 +241,8 @@ export class EcsDeploymentGroup extends DeploymentGroupBase implements IEcsDeplo } } + const removeAlarmsFromDeploymentGroup = cdk.FeatureFlags.of(this).isEnabled(CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP); + const resource = new CfnDeploymentGroup(this, 'Resource', { applicationName: this.application.applicationName, serviceRoleArn: this.role.roleArn, @@ -257,7 +260,9 @@ export class EcsDeploymentGroup extends DeploymentGroupBase implements IEcsDeplo produce: () => this.renderBlueGreenDeploymentConfiguration(props.blueGreenDeploymentConfig), }), loadBalancerInfo: cdk.Lazy.any({ produce: () => this.renderLoadBalancerInfo(props.blueGreenDeploymentConfig) }), - alarmConfiguration: cdk.Lazy.any({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }), + alarmConfiguration: cdk.Lazy.any({ + produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure, removeAlarmsFromDeploymentGroup), + }), autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); diff --git a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts index ea61370f9a140..ba7ec471172e3 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts @@ -2,6 +2,7 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; +import { CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP } from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { CfnDeploymentGroup } from '../codedeploy.generated'; import { ImportedDeploymentGroupBase, DeploymentGroupBase } from '../private/base-deployment-group'; @@ -164,6 +165,8 @@ export class LambdaDeploymentGroup extends DeploymentGroupBase implements ILambd this.role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSCodeDeployRoleForLambdaLimited')); this.deploymentConfig = this._bindDeploymentConfig(props.deploymentConfig || LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES); + const removeAlarmsFromDeploymentGroup = cdk.FeatureFlags.of(this).isEnabled(CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP); + const resource = new CfnDeploymentGroup(this, 'Resource', { applicationName: this.application.applicationName, serviceRoleArn: this.role.roleArn, @@ -173,7 +176,9 @@ export class LambdaDeploymentGroup extends DeploymentGroupBase implements ILambd deploymentType: 'BLUE_GREEN', deploymentOption: 'WITH_TRAFFIC_CONTROL', }, - alarmConfiguration: cdk.Lazy.any({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }), + alarmConfiguration: cdk.Lazy.any({ + produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure, removeAlarmsFromDeploymentGroup), + }), autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); diff --git a/packages/@aws-cdk/aws-codedeploy/lib/private/utils.ts b/packages/@aws-cdk/aws-codedeploy/lib/private/utils.ts index 2cd2857e3079f..83aabb2f6d50e 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/private/utils.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/private/utils.ts @@ -31,8 +31,16 @@ export function arnForDeploymentConfig(name: string, resource?: IResource): stri }); } -export function renderAlarmConfiguration(alarms: cloudwatch.IAlarm[], ignorePollAlarmFailure?: boolean): +export function renderAlarmConfiguration(alarms: cloudwatch.IAlarm[], ignorePollAlarmFailure: boolean | undefined, removeAlarms = true): CfnDeploymentGroup.AlarmConfigurationProperty | undefined { + if (removeAlarms) { + return { + alarms: alarms.length > 0 ? alarms.map(a => ({ name: a.alarmName })) : undefined, + enabled: alarms.length > 0, + ignorePollAlarmFailure, + }; + } + return alarms.length === 0 ? undefined : { @@ -114,4 +122,4 @@ export function validateName(type: 'Application' | 'Deployment group' | 'Deploym } return ret; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts index b78bc0179af67..72087c1481aaa 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-group.ts @@ -4,6 +4,7 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; +import { CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP } from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { CfnDeploymentGroup } from '../codedeploy.generated'; import { ImportedDeploymentGroupBase, DeploymentGroupBase } from '../private/base-deployment-group'; @@ -267,6 +268,8 @@ export class ServerDeploymentGroup extends DeploymentGroupBase implements IServe this.alarms = props.alarms || []; + const removeAlarmsFromDeploymentGroup = cdk.FeatureFlags.of(this).isEnabled(CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP); + const resource = new CfnDeploymentGroup(this, 'Resource', { applicationName: this.application.applicationName, deploymentGroupName: this.physicalName, @@ -282,7 +285,9 @@ export class ServerDeploymentGroup extends DeploymentGroupBase implements IServe }, ec2TagSet: this.ec2TagSet(props.ec2InstanceTags), onPremisesTagSet: this.onPremiseTagSet(props.onPremiseInstanceTags), - alarmConfiguration: cdk.Lazy.any({ produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure) }), + alarmConfiguration: cdk.Lazy.any({ + produce: () => renderAlarmConfiguration(this.alarms, props.ignorePollAlarmsFailure, removeAlarmsFromDeploymentGroup), + }), autoRollbackConfiguration: cdk.Lazy.any({ produce: () => renderAutoRollbackConfiguration(this.alarms, props.autoRollback) }), }); diff --git a/packages/@aws-cdk/aws-codedeploy/package.json b/packages/@aws-cdk/aws-codedeploy/package.json index ad4f31f642035..5a329a0d0919c 100644 --- a/packages/@aws-cdk/aws-codedeploy/package.json +++ b/packages/@aws-cdk/aws-codedeploy/package.json @@ -104,6 +104,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "constructs": "^10.0.0" }, "homepage": "https://github.com/aws/aws-cdk", diff --git a/packages/@aws-cdk/aws-codedeploy/test/ecs/deployment-group.test.ts b/packages/@aws-cdk/aws-codedeploy/test/ecs/deployment-group.test.ts index 0b6a6ee653baa..7051f9e793318 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/ecs/deployment-group.test.ts +++ b/packages/@aws-cdk/aws-codedeploy/test/ecs/deployment-group.test.ts @@ -1,4 +1,4 @@ -import { Template } from '@aws-cdk/assertions'; +import { Match, Template } from '@aws-cdk/assertions'; import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as ecs from '@aws-cdk/aws-ecs'; @@ -51,6 +51,7 @@ describe('CodeDeploy ECS DeploymentGroup', () => { test('can be created with default configuration', () => { const stack = new cdk.Stack(); + stack.node.setContext('@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup', true); new codedeploy.EcsDeploymentGroup(stack, 'MyDG', { service: mockEcsService(stack), @@ -73,6 +74,10 @@ describe('CodeDeploy ECS DeploymentGroup', () => { 'Arn', ], }, + AlarmConfiguration: { + Enabled: false, + Alarms: Match.absent(), + }, AutoRollbackConfiguration: { Enabled: true, Events: [ diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.test.ts b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.test.ts index 202f4127432ed..33dadeb60dd61 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.test.ts +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.test.ts @@ -1,4 +1,4 @@ -import { Template } from '@aws-cdk/assertions'; +import { Match, Template } from '@aws-cdk/assertions'; import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; @@ -26,6 +26,7 @@ function mockAlias(stack: cdk.Stack) { describe('CodeDeploy Lambda DeploymentGroup', () => { test('can be created with default AllAtOnce IN_PLACE configuration', () => { const stack = new cdk.Stack(); + stack.node.setContext('@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup', true); const application = new codedeploy.LambdaApplication(stack, 'MyApp'); const alias = mockAlias(stack); new codedeploy.LambdaDeploymentGroup(stack, 'MyDG', { @@ -44,6 +45,10 @@ describe('CodeDeploy Lambda DeploymentGroup', () => { 'Arn', ], }, + AlarmConfiguration: { + Enabled: false, + Alarms: Match.absent(), + }, AutoRollbackConfiguration: { Enabled: true, Events: [ diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-lambda.assets.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-lambda.assets.json index e0f3e2cbe5c50..3a14bbd492f97 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-lambda.assets.json +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-lambda.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { "edb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3": { "source": { @@ -40,7 +40,7 @@ } } }, - "f2bf64943c8612dfbd52471095c4b141d6c458592f9416621609658bc7935827": { + "209ced6e70ec9b3c3a5387896ca7c4942afced90ed5eb6045cc8f392776ae7ce": { "source": { "path": "aws-cdk-codedeploy-lambda.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f2bf64943c8612dfbd52471095c4b141d6c458592f9416621609658bc7935827.json", + "objectKey": "209ced6e70ec9b3c3a5387896ca7c4942afced90ed5eb6045cc8f392776ae7ce.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-codedeploy/test/lambda/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-lambda.template.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-lambda.template.json index eded0f28707fb..cab763cc9afa0 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-lambda.template.json +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/aws-cdk-codedeploy-lambda.template.json @@ -328,12 +328,6 @@ "Threshold": 1 } }, - "BlueGreenDeploymentApplication36C892C0": { - "Type": "AWS::CodeDeploy::Application", - "Properties": { - "ComputePlatform": "Lambda" - } - }, "BlueGreenDeploymentServiceRole225851FB": { "Type": "AWS::IAM::Role", "Properties": { @@ -427,6 +421,12 @@ ] } }, + "BlueGreenDeploymentApplication36C892C0": { + "Type": "AWS::CodeDeploy::Application", + "Properties": { + "ComputePlatform": "Lambda" + } + }, "BlueGreenDeployment5C188134": { "Type": "AWS::CodeDeploy::DeploymentGroup", "Properties": { @@ -462,6 +462,96 @@ "DeploymentType": "BLUE_GREEN" } } + }, + "SecondAlias33D63566": { + "Type": "AWS::Lambda::Alias", + "Properties": { + "FunctionName": { + "Ref": "Handler886CB40B" + }, + "FunctionVersion": { + "Fn::GetAtt": [ + "HandlerCurrentVersion93FB80BF4a6a6623436a0664df4549c4c809c243", + "Version" + ] + }, + "Name": "secondAlias" + }, + "UpdatePolicy": { + "CodeDeployLambdaAliasUpdate": { + "ApplicationName": { + "Ref": "SecondDeploymentApplication1F8C51FE" + }, + "DeploymentGroupName": { + "Ref": "SecondDeploymentC270A23D" + } + } + } + }, + "SecondDeploymentServiceRoleAFF1ECD5": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codedeploy.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSCodeDeployRoleForLambdaLimited" + ] + ] + } + ] + } + }, + "SecondDeploymentApplication1F8C51FE": { + "Type": "AWS::CodeDeploy::Application", + "Properties": { + "ComputePlatform": "Lambda" + } + }, + "SecondDeploymentC270A23D": { + "Type": "AWS::CodeDeploy::DeploymentGroup", + "Properties": { + "ApplicationName": { + "Ref": "SecondDeploymentApplication1F8C51FE" + }, + "ServiceRoleArn": { + "Fn::GetAtt": [ + "SecondDeploymentServiceRoleAFF1ECD5", + "Arn" + ] + }, + "AlarmConfiguration": { + "Enabled": false + }, + "AutoRollbackConfiguration": { + "Enabled": true, + "Events": [ + "DEPLOYMENT_FAILURE" + ] + }, + "DeploymentConfigName": "CodeDeployDefault.LambdaCanary10Percent5Minutes", + "DeploymentStyle": { + "DeploymentOption": "WITH_TRAFFIC_CONTROL", + "DeploymentType": "BLUE_GREEN" + } + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/cdk.out b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/cdk.out index 8ecc185e9dbee..145739f539580 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/integ.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/integ.json index 6f0779dedc630..8669ea3f51f98 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "testCases": { "integ.deployment-group": { "stacks": [ diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/manifest.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/manifest.json index 239364aebbe5a..ed5cdd797bb26 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "artifacts": { "aws-cdk-codedeploy-lambda.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}/f2bf64943c8612dfbd52471095c4b141d6c458592f9416621609658bc7935827.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/209ced6e70ec9b3c3a5387896ca7c4942afced90ed5eb6045cc8f392776ae7ce.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -99,12 +99,6 @@ "data": "BlueGreenErrors60C27452" } ], - "/aws-cdk-codedeploy-lambda/BlueGreenDeployment/Application/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "BlueGreenDeploymentApplication36C892C0" - } - ], "/aws-cdk-codedeploy-lambda/BlueGreenDeployment/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", @@ -117,12 +111,42 @@ "data": "BlueGreenDeploymentServiceRoleDefaultPolicy7008FB0A" } ], + "/aws-cdk-codedeploy-lambda/BlueGreenDeployment/Application/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "BlueGreenDeploymentApplication36C892C0" + } + ], "/aws-cdk-codedeploy-lambda/BlueGreenDeployment/Resource": [ { "type": "aws:cdk:logicalId", "data": "BlueGreenDeployment5C188134" } ], + "/aws-cdk-codedeploy-lambda/SecondAlias/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SecondAlias33D63566" + } + ], + "/aws-cdk-codedeploy-lambda/SecondDeployment/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SecondDeploymentServiceRoleAFF1ECD5" + } + ], + "/aws-cdk-codedeploy-lambda/SecondDeployment/Application/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SecondDeploymentApplication1F8C51FE" + } + ], + "/aws-cdk-codedeploy-lambda/SecondDeployment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SecondDeploymentC270A23D" + } + ], "/aws-cdk-codedeploy-lambda/BootstrapVersion": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/tree.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/tree.json index 65d5a041bdf34..edcdfc438f597 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.js.snapshot/tree.json @@ -16,6 +16,14 @@ "id": "ServiceRole", "path": "aws-cdk-codedeploy-lambda/Handler/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-codedeploy-lambda/Handler/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codedeploy-lambda/Handler/ServiceRole/Resource", @@ -195,6 +203,14 @@ "id": "ServiceRole", "path": "aws-cdk-codedeploy-lambda/PreHook/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-codedeploy-lambda/PreHook/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codedeploy-lambda/PreHook/ServiceRole/Resource", @@ -372,6 +388,14 @@ "id": "ServiceRole", "path": "aws-cdk-codedeploy-lambda/PostHook/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-codedeploy-lambda/PostHook/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codedeploy-lambda/PostHook/ServiceRole/Resource", @@ -597,34 +621,18 @@ "id": "BlueGreenDeployment", "path": "aws-cdk-codedeploy-lambda/BlueGreenDeployment", "children": { - "Application": { - "id": "Application", - "path": "aws-cdk-codedeploy-lambda/BlueGreenDeployment/Application", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-codedeploy-lambda/BlueGreenDeployment/Application/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::CodeDeploy::Application", - "aws:cdk:cloudformation:props": { - "computePlatform": "Lambda" - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-codedeploy.CfnApplication", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-codedeploy.LambdaApplication", - "version": "0.0.0" - } - }, "ServiceRole": { "id": "ServiceRole", "path": "aws-cdk-codedeploy-lambda/BlueGreenDeployment/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-codedeploy-lambda/BlueGreenDeployment/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codedeploy-lambda/BlueGreenDeployment/ServiceRole/Resource", @@ -750,6 +758,30 @@ "version": "0.0.0" } }, + "Application": { + "id": "Application", + "path": "aws-cdk-codedeploy-lambda/BlueGreenDeployment/Application", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codedeploy-lambda/BlueGreenDeployment/Application/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeDeploy::Application", + "aws:cdk:cloudformation:props": { + "computePlatform": "Lambda" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codedeploy.CfnApplication", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codedeploy.LambdaApplication", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codedeploy-lambda/BlueGreenDeployment/Resource", @@ -800,6 +832,174 @@ "version": "0.0.0" } }, + "SecondAlias": { + "id": "SecondAlias", + "path": "aws-cdk-codedeploy-lambda/SecondAlias", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codedeploy-lambda/SecondAlias/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Alias", + "aws:cdk:cloudformation:props": { + "functionName": { + "Ref": "Handler886CB40B" + }, + "functionVersion": { + "Fn::GetAtt": [ + "HandlerCurrentVersion93FB80BF4a6a6623436a0664df4549c4c809c243", + "Version" + ] + }, + "name": "secondAlias" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnAlias", + "version": "0.0.0" + } + }, + "ScalingRole": { + "id": "ScalingRole", + "path": "aws-cdk-codedeploy-lambda/SecondAlias/ScalingRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Alias", + "version": "0.0.0" + } + }, + "SecondDeployment": { + "id": "SecondDeployment", + "path": "aws-cdk-codedeploy-lambda/SecondDeployment", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-codedeploy-lambda/SecondDeployment/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-codedeploy-lambda/SecondDeployment/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codedeploy-lambda/SecondDeployment/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codedeploy.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSCodeDeployRoleForLambdaLimited" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.Role", + "version": "0.0.0" + } + }, + "Application": { + "id": "Application", + "path": "aws-cdk-codedeploy-lambda/SecondDeployment/Application", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codedeploy-lambda/SecondDeployment/Application/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeDeploy::Application", + "aws:cdk:cloudformation:props": { + "computePlatform": "Lambda" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codedeploy.CfnApplication", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codedeploy.LambdaApplication", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codedeploy-lambda/SecondDeployment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeDeploy::DeploymentGroup", + "aws:cdk:cloudformation:props": { + "applicationName": { + "Ref": "SecondDeploymentApplication1F8C51FE" + }, + "serviceRoleArn": { + "Fn::GetAtt": [ + "SecondDeploymentServiceRoleAFF1ECD5", + "Arn" + ] + }, + "alarmConfiguration": { + "enabled": false + }, + "autoRollbackConfiguration": { + "enabled": true, + "events": [ + "DEPLOYMENT_FAILURE" + ] + }, + "deploymentConfigName": "CodeDeployDefault.LambdaCanary10Percent5Minutes", + "deploymentStyle": { + "deploymentType": "BLUE_GREEN", + "deploymentOption": "WITH_TRAFFIC_CONTROL" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codedeploy.CfnDeploymentGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codedeploy.LambdaDeploymentGroup", + "version": "0.0.0" + } + }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-cdk-codedeploy-lambda/BootstrapVersion", @@ -827,7 +1027,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.189" } } }, diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.ts index 4464fd9fc9a21..1eda714fab3ae 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/integ.deployment-group.ts @@ -45,4 +45,14 @@ new codedeploy.LambdaDeploymentGroup(stack, 'BlueGreenDeployment', { postHook, }); +const secondAlias = new lambda.Alias(stack, 'SecondAlias', { + aliasName: 'secondAlias', + version, +}); + +new codedeploy.LambdaDeploymentGroup(stack, 'SecondDeployment', { + alias: secondAlias, + deploymentConfig: codedeploy.LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES, +}); + app.synth(); diff --git a/packages/@aws-cdk/aws-codedeploy/test/server/deployment-group.test.ts b/packages/@aws-cdk/aws-codedeploy/test/server/deployment-group.test.ts index 02d76400d3120..7787af144c0ba 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/server/deployment-group.test.ts +++ b/packages/@aws-cdk/aws-codedeploy/test/server/deployment-group.test.ts @@ -1,4 +1,4 @@ -import { Template } from '@aws-cdk/assertions'; +import { Match, Template } from '@aws-cdk/assertions'; import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; @@ -24,6 +24,23 @@ describe('CodeDeploy Server Deployment Group', () => { }); }); + test('can create a deployment group with no alarms', () => { + const stack = new cdk.Stack(); + stack.node.setContext('@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup', true); + + const application = new codedeploy.ServerApplication(stack, 'MyApp'); + new codedeploy.ServerDeploymentGroup(stack, 'MyDG', { + application, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CodeDeploy::DeploymentGroup', { + AlarmConfiguration: { + Enabled: false, + Alarms: Match.absent(), + }, + }); + }); + test('creating an application with physical name if needed', () => { const stack = new cdk.Stack(undefined, undefined, { env: { account: '12345', region: 'us-test-1' } }); const stack2 = new cdk.Stack(undefined, undefined, { env: { account: '12346', region: 'us-test-2' } }); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/aws-cdk-codepipeline-codedeploy.assets.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/aws-cdk-codepipeline-codedeploy.assets.json index 39f2d2131efb4..32668992b6b90 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/aws-cdk-codepipeline-codedeploy.assets.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/aws-cdk-codepipeline-codedeploy.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { - "982e819193e67d69016afd5ad3b73ea4c6eb095a7f174e7c5a1d9110229e770c": { + "2fa5756c8f8e565e1154e44f989fee5667a26b8cd37f1b6186290d0bc8453929": { "source": { "path": "aws-cdk-codepipeline-codedeploy.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "982e819193e67d69016afd5ad3b73ea4c6eb095a7f174e7c5a1d9110229e770c.json", + "objectKey": "2fa5756c8f8e565e1154e44f989fee5667a26b8cd37f1b6186290d0bc8453929.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-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/aws-cdk-codepipeline-codedeploy.template.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/aws-cdk-codepipeline-codedeploy.template.json index 767ef896cda8f..3bcb10a14b4da 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/aws-cdk-codepipeline-codedeploy.template.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/aws-cdk-codepipeline-codedeploy.template.json @@ -59,6 +59,9 @@ "Arn" ] }, + "AlarmConfiguration": { + "Enabled": false + }, "AutoRollbackConfiguration": { "Enabled": true, "Events": [ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/cdk.out b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/cdk.out index 8ecc185e9dbee..145739f539580 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/integ.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/integ.json index 686ae821f051b..c51ba5f9eaaa8 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "testCases": { "integ.pipeline-code-deploy": { "stacks": [ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/manifest.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/manifest.json index cce08be8a7666..428ccd4e8dfac 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "artifacts": { "aws-cdk-codepipeline-codedeploy.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}/982e819193e67d69016afd5ad3b73ea4c6eb095a7f174e7c5a1d9110229e770c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2fa5756c8f8e565e1154e44f989fee5667a26b8cd37f1b6186290d0bc8453929.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/tree.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/tree.json index 2d5a5d3d8dc2b..53239cfc1d126 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js.snapshot/tree.json @@ -68,6 +68,14 @@ "id": "Role", "path": "aws-cdk-codepipeline-codedeploy/CodeDeployGroup/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-cdk-codepipeline-codedeploy/CodeDeployGroup/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codepipeline-codedeploy/CodeDeployGroup/Role/Resource", @@ -136,6 +144,9 @@ "Arn" ] }, + "alarmConfiguration": { + "enabled": false + }, "autoRollbackConfiguration": { "enabled": true, "events": [ @@ -193,6 +204,14 @@ "id": "Role", "path": "aws-cdk-codepipeline-codedeploy/Pipeline/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-cdk-codepipeline-codedeploy/Pipeline/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codepipeline-codedeploy/Pipeline/Role/Resource", @@ -418,6 +437,14 @@ "id": "CodePipelineActionRole", "path": "aws-cdk-codepipeline-codedeploy/Pipeline/Source/S3Source/CodePipelineActionRole", "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-cdk-codepipeline-codedeploy/Pipeline/Source/S3Source/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codepipeline-codedeploy/Pipeline/Source/S3Source/CodePipelineActionRole/Resource", @@ -565,13 +592,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.189" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.189" } }, "Deploy": { @@ -586,6 +613,14 @@ "id": "CodePipelineActionRole", "path": "aws-cdk-codepipeline-codedeploy/Pipeline/Deploy/CodeDeploy/CodePipelineActionRole", "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-cdk-codepipeline-codedeploy/Pipeline/Deploy/CodeDeploy/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codepipeline-codedeploy/Pipeline/Deploy/CodeDeploy/CodePipelineActionRole/Resource", @@ -790,13 +825,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.189" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.189" } } }, @@ -832,7 +867,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.189" } } }, diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.assets.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.assets.json index d055657efff56..132232d28ad09 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.assets.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "3d5f0e79e533ad63e029ee86782cdc022e8faa5575d2e96d5a6bc3d7f5734e54": { + "9c2191cf64f5d0c7288c4daeb90518584cb5076983557a2d930df85cbf8b1e4d": { "source": { "path": "aws-cdk-codepipeline-stepfunctions.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3d5f0e79e533ad63e029ee86782cdc022e8faa5575d2e96d5a6bc3d7f5734e54.json", + "objectKey": "9c2191cf64f5d0c7288c4daeb90518584cb5076983557a2d930df85cbf8b1e4d.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-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.template.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.template.json index 99dcf1e5ecb94..7e3e23f4f9c16 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.template.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.template.json @@ -30,7 +30,9 @@ }, "DependsOn": [ "SimpleStateMachineRole0CBC135A" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "MyPipelineArtifactsBucketEncryptionKey8BF0A7F3": { "Type": "AWS::KMS::Key", diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/cdk.out b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/integ.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/integ.json index 56f61ae58196d..dd4483a86ac5f 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.pipeline-stepfunctions": { "stacks": [ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/manifest.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/manifest.json index 25860493677a7..04dcf319e6137 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-cdk-codepipeline-stepfunctions.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}/3d5f0e79e533ad63e029ee86782cdc022e8faa5575d2e96d5a6bc3d7f5734e54.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9c2191cf64f5d0c7288c4daeb90518584cb5076983557a2d930df85cbf8b1e4d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/tree.json b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/tree.json index 387b9a6647c0a..bccc846a27687 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/tree.json @@ -24,6 +24,14 @@ "id": "Role", "path": "aws-cdk-codepipeline-stepfunctions/SimpleStateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-cdk-codepipeline-stepfunctions/SimpleStateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codepipeline-stepfunctions/SimpleStateMachine/Role/Resource", @@ -279,6 +287,14 @@ "id": "Role", "path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Role/Resource", @@ -524,6 +540,14 @@ "id": "CodePipelineActionRole", "path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Source/Source/CodePipelineActionRole", "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Source/Source/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Source/Source/CodePipelineActionRole/Resource", @@ -686,13 +710,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "Invoke": { @@ -707,6 +731,14 @@ "id": "CodePipelineActionRole", "path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Invoke/Invoke/CodePipelineActionRole", "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Invoke/Invoke/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Invoke/Invoke/CodePipelineActionRole/Resource", @@ -838,13 +870,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, @@ -902,7 +934,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts index 7e18b4cd3eb52..73517691fa7c7 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-client.ts @@ -451,7 +451,7 @@ export class UserPoolClient extends Resource implements IUserPoolClient { 'DescribeCognitoUserPoolClient', { resourceType: 'Custom::DescribeCognitoUserPoolClient', - onCreate: { + onUpdate: { region: Stack.of(this).region, service: 'CognitoIdentityServiceProvider', action: 'describeUserPoolClient', diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/cdk.out b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/cdk.out index 145739f539580..d8b441d447f8a 100644 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"22.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-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ-user-pool-client-explicit-props.assets.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ-user-pool-client-explicit-props.assets.json index e7f5f97ce2f59..cdb28513ed3d8 100644 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ-user-pool-client-explicit-props.assets.json +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ-user-pool-client-explicit-props.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "29.0.0", "files": { "a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476": { "source": { @@ -14,7 +14,7 @@ } } }, - "be03a3e392c69c83e42480095a0bbc5f0bb315abc56be4db3af345689cf1505a": { + "734cf8b4d966e3e725d80eb9076268d2066da8cd9e460447734d6f661bb4fba7": { "source": { "path": "integ-user-pool-client-explicit-props.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "be03a3e392c69c83e42480095a0bbc5f0bb315abc56be4db3af345689cf1505a.json", + "objectKey": "734cf8b4d966e3e725d80eb9076268d2066da8cd9e460447734d6f661bb4fba7.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-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ-user-pool-client-explicit-props.template.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ-user-pool-client-explicit-props.template.json index 97af9d7a5e078..82a903b7c7280 100644 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ-user-pool-client-explicit-props.template.json +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ-user-pool-client-explicit-props.template.json @@ -132,6 +132,30 @@ ] ] }, + "Update": { + "Fn::Join": [ + "", + [ + "{\"region\":\"", + { + "Ref": "AWS::Region" + }, + "\",\"service\":\"CognitoIdentityServiceProvider\",\"action\":\"describeUserPoolClient\",\"parameters\":{\"UserPoolId\":\"", + { + "Ref": "myuserpool01998219" + }, + "\",\"ClientId\":\"", + { + "Ref": "myuserpoolmyuserpoolclientAFB2274E" + }, + "\"},\"physicalResourceId\":{\"id\":\"", + { + "Ref": "myuserpoolmyuserpoolclientAFB2274E" + }, + "\"}}" + ] + ] + }, "InstallLatestAwsSdk": false }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ.json index 54a15ce9239e6..3a51670909b4a 100644 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "29.0.0", "testCases": { "integ.user-pool-client-explicit-props": { "stacks": [ diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/manifest.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/manifest.json index 3f7161e4ddd86..6fa43a29f0ecd 100644 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "29.0.0", "artifacts": { "integ-user-pool-client-explicit-props.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}/be03a3e392c69c83e42480095a0bbc5f0bb315abc56be4db3af345689cf1505a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/734cf8b4d966e3e725d80eb9076268d2066da8cd9e460447734d6f661bb4fba7.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/tree.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/tree.json index c237ef918d3a5..a993ea80fa56c 100644 --- a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-explicit-props.js.snapshot/tree.json @@ -398,7 +398,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.216" } } }, diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/asset.a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476/index.js b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/asset.a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476/index.js new file mode 100644 index 0000000000000..d913ab9defaa1 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/asset.a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476/index.js @@ -0,0 +1,253 @@ +"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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJz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QtZXNsaW50L25vLXJlcXVpcmUtaW1wb3J0c1xuICAgICAgICBjb25zdCByZXF1ZXN0ID0gcmVxdWlyZSgnaHR0cHMnKS5yZXF1ZXN0KHJlcXVlc3RPcHRpb25zLCByZXNvbHZlKTtcbiAgICAgICAgcmVxdWVzdC5vbignZXJyb3InLCByZWplY3QpO1xuICAgICAgICByZXF1ZXN0LndyaXRlKHJlc3BvbnNlQm9keSk7XG4gICAgICAgIHJlcXVlc3QuZW5kKCk7XG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHJlamVjdChlKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxufVxuXG5mdW5jdGlvbiBkZWNvZGVDYWxsKGNhbGw6IHN0cmluZyB8IHVuZGVmaW5lZCkge1xuICBpZiAoIWNhbGwpIHsgcmV0dXJuIHVuZGVmaW5lZDsgfVxuICByZXR1cm4gSlNPTi5wYXJzZShjYWxsKTtcbn1cblxuZnVuY3Rpb24gc3RhcnRzV2l0aE9uZU9mKHNlYXJjaFN0cmluZ3M6IHN0cmluZ1tdKTogKHN0cmluZzogc3RyaW5nKSA9PiBib29sZWFuIHtcbiAgcmV0dXJuIGZ1bmN0aW9uKHN0cmluZzogc3RyaW5nKTogYm9vbGVhbiB7XG4gICAgZm9yIChjb25zdCBzZWFyY2hTdHJpbmcgb2Ygc2VhcmNoU3RyaW5ncykge1xuICAgICAgaWYgKHN0cmluZy5zdGFydHNXaXRoKHNlYXJjaFN0cmluZykpIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBmYWxzZTtcbiAgfTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/cdk.out b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/cdk.out similarity index 100% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/cdk.out rename to packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/cdk.out diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integ-user-pool-client-secret.assets.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integ-user-pool-client-secret.assets.json new file mode 100644 index 0000000000000..76e5207d0953a --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integ-user-pool-client-secret.assets.json @@ -0,0 +1,32 @@ +{ + "version": "29.0.0", + "files": { + "a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476": { + "source": { + "path": "asset.a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "23470f9d0cab672bb28f93d0b4cc009f579dd49d76249b541091db889df6aaae": { + "source": { + "path": "integ-user-pool-client-secret.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "23470f9d0cab672bb28f93d0b4cc009f579dd49d76249b541091db889df6aaae.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-cognito/test/integ.user-pool-client-secret.js.snapshot/integ-user-pool-client-secret.template.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integ-user-pool-client-secret.template.json new file mode 100644 index 0000000000000..40cdb9f89a307 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integ-user-pool-client-secret.template.json @@ -0,0 +1,311 @@ +{ + "Resources": { + "pool056F3F7E": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AccountRecoverySetting": { + "RecoveryMechanisms": [ + { + "Name": "verified_phone_number", + "Priority": 1 + }, + { + "Name": "verified_email", + "Priority": 2 + } + ] + }, + "AdminCreateUserConfig": { + "AllowAdminCreateUserOnly": true + }, + "EmailVerificationMessage": "The verification code to your new account is {####}", + "EmailVerificationSubject": "Verify your new account", + "SmsVerificationMessage": "The verification code to your new account is {####}", + "VerificationMessageTemplate": { + "DefaultEmailOption": "CONFIRM_WITH_CODE", + "EmailMessage": "The verification code to your new account is {####}", + "EmailSubject": "Verify your new account", + "SmsMessage": "The verification code to your new account is {####}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "poolclient2623294C": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "UserPoolId": { + "Ref": "pool056F3F7E" + }, + "AllowedOAuthFlows": [ + "implicit", + "code" + ], + "AllowedOAuthFlowsUserPoolClient": true, + "AllowedOAuthScopes": [ + "profile", + "phone", + "email", + "openid", + "aws.cognito.signin.user.admin" + ], + "CallbackURLs": [ + "https://example.com" + ], + "GenerateSecret": true, + "SupportedIdentityProviders": [ + "COGNITO" + ] + } + }, + "poolclientDescribeCognitoUserPoolClient51F12EBD": { + "Type": "Custom::DescribeCognitoUserPoolClient", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd22872D164C4C", + "Arn" + ] + }, + "Create": { + "Fn::Join": [ + "", + [ + "{\"region\":\"", + { + "Ref": "AWS::Region" + }, + "\",\"service\":\"CognitoIdentityServiceProvider\",\"action\":\"describeUserPoolClient\",\"parameters\":{\"UserPoolId\":\"", + { + "Ref": "pool056F3F7E" + }, + "\",\"ClientId\":\"", + { + "Ref": "poolclient2623294C" + }, + "\"},\"physicalResourceId\":{\"id\":\"", + { + "Ref": "poolclient2623294C" + }, + "\"}}" + ] + ] + }, + "Update": { + "Fn::Join": [ + "", + [ + "{\"region\":\"", + { + "Ref": "AWS::Region" + }, + "\",\"service\":\"CognitoIdentityServiceProvider\",\"action\":\"describeUserPoolClient\",\"parameters\":{\"UserPoolId\":\"", + { + "Ref": "pool056F3F7E" + }, + "\",\"ClientId\":\"", + { + "Ref": "poolclient2623294C" + }, + "\"},\"physicalResourceId\":{\"id\":\"", + { + "Ref": "poolclient2623294C" + }, + "\"}}" + ] + ] + }, + "InstallLatestAwsSdk": false + }, + "DependsOn": [ + "poolclientDescribeCognitoUserPoolClientCustomResourcePolicy5C0049D2" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "poolclientDescribeCognitoUserPoolClientCustomResourcePolicy5C0049D2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "cognito-idp:DescribeUserPoolClient", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "pool056F3F7E", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "poolclientDescribeCognitoUserPoolClientCustomResourcePolicy5C0049D2", + "Roles": [ + { + "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ] + } + }, + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { + "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" + ] + ] + } + ] + } + }, + "AWS679f53fac002430cb0da5b7982bd22872D164C4C": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476.zip" + }, + "Role": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "nodejs14.x", + "Timeout": 120 + }, + "DependsOn": [ + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + ] + }, + "secret4DA88516": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "SecretString": { + "Fn::GetAtt": [ + "poolclientDescribeCognitoUserPoolClient51F12EBD", + "UserPoolClient.ClientSecret" + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ClientSecretName": { + "Value": { + "Fn::Join": [ + "-", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "secret4DA88516" + } + ] + } + ] + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "-", + { + "Fn::Select": [ + 6, + { + "Fn::Split": [ + ":", + { + "Ref": "secret4DA88516" + } + ] + } + ] + } + ] + } + ] + } + ] + ] + } + } + }, + "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-cognito/test/integ.user-pool-client-secret.js.snapshot/integ.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integ.json new file mode 100644 index 0000000000000..ce682377ddcae --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "29.0.0", + "testCases": { + "integ-user-pool-client-secret-test/DefaultTest": { + "stacks": [ + "integ-user-pool-client-secret" + ], + "assertionStack": "integ-user-pool-client-secret-test/DefaultTest/DeployAssert", + "assertionStackName": "integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.assets.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.assets.json new file mode 100644 index 0000000000000..5dd96eadcd8a2 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.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-cognito/test/integ.user-pool-client-secret.js.snapshot/integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.template.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.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-cognito/test/integ.user-pool-client-secret.js.snapshot/manifest.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/manifest.json new file mode 100644 index 0000000000000..24f78fde3a23e --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/manifest.json @@ -0,0 +1,153 @@ +{ + "version": "29.0.0", + "artifacts": { + "integ-user-pool-client-secret.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integ-user-pool-client-secret.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integ-user-pool-client-secret": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integ-user-pool-client-secret.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}/23470f9d0cab672bb28f93d0b4cc009f579dd49d76249b541091db889df6aaae.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "integ-user-pool-client-secret.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-user-pool-client-secret.assets" + ], + "metadata": { + "/integ-user-pool-client-secret/pool/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "pool056F3F7E" + } + ], + "/integ-user-pool-client-secret/pool/client/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "poolclient2623294C" + } + ], + "/integ-user-pool-client-secret/pool/client/DescribeCognitoUserPoolClient/Resource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "poolclientDescribeCognitoUserPoolClient51F12EBD" + } + ], + "/integ-user-pool-client-secret/pool/client/DescribeCognitoUserPoolClient/CustomResourcePolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "poolclientDescribeCognitoUserPoolClientCustomResourcePolicy5C0049D2" + } + ], + "/integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ], + "/integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AWS679f53fac002430cb0da5b7982bd22872D164C4C" + } + ], + "/integ-user-pool-client-secret/secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "secret4DA88516" + } + ], + "/integ-user-pool-client-secret/ClientSecretName": [ + { + "type": "aws:cdk:logicalId", + "data": "ClientSecretName" + } + ], + "/integ-user-pool-client-secret/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-user-pool-client-secret/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-user-pool-client-secret" + }, + "integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.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": [ + "integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.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": [ + "integuserpoolclientsecrettestDefaultTestDeployAssert4FDD1661.assets" + ], + "metadata": { + "/integ-user-pool-client-secret-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-user-pool-client-secret-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-user-pool-client-secret-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/tree.json b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/tree.json new file mode 100644 index 0000000000000..91c38ab925a11 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.js.snapshot/tree.json @@ -0,0 +1,431 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "integ-user-pool-client-secret": { + "id": "integ-user-pool-client-secret", + "path": "integ-user-pool-client-secret", + "children": { + "pool": { + "id": "pool", + "path": "integ-user-pool-client-secret/pool", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-user-pool-client-secret/pool/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Cognito::UserPool", + "aws:cdk:cloudformation:props": { + "accountRecoverySetting": { + "recoveryMechanisms": [ + { + "name": "verified_phone_number", + "priority": 1 + }, + { + "name": "verified_email", + "priority": 2 + } + ] + }, + "adminCreateUserConfig": { + "allowAdminCreateUserOnly": true + }, + "emailVerificationMessage": "The verification code to your new account is {####}", + "emailVerificationSubject": "Verify your new account", + "smsVerificationMessage": "The verification code to your new account is {####}", + "verificationMessageTemplate": { + "defaultEmailOption": "CONFIRM_WITH_CODE", + "emailMessage": "The verification code to your new account is {####}", + "emailSubject": "Verify your new account", + "smsMessage": "The verification code to your new account is {####}" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.CfnUserPool", + "version": "0.0.0" + } + }, + "client": { + "id": "client", + "path": "integ-user-pool-client-secret/pool/client", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-user-pool-client-secret/pool/client/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Cognito::UserPoolClient", + "aws:cdk:cloudformation:props": { + "userPoolId": { + "Ref": "pool056F3F7E" + }, + "allowedOAuthFlows": [ + "implicit", + "code" + ], + "allowedOAuthFlowsUserPoolClient": true, + "allowedOAuthScopes": [ + "profile", + "phone", + "email", + "openid", + "aws.cognito.signin.user.admin" + ], + "callbackUrLs": [ + "https://example.com" + ], + "generateSecret": true, + "supportedIdentityProviders": [ + "COGNITO" + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.CfnUserPoolClient", + "version": "0.0.0" + } + }, + "DescribeCognitoUserPoolClient": { + "id": "DescribeCognitoUserPoolClient", + "path": "integ-user-pool-client-secret/pool/client/DescribeCognitoUserPoolClient", + "children": { + "Provider": { + "id": "Provider", + "path": "integ-user-pool-client-secret/pool/client/DescribeCognitoUserPoolClient/Provider", + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.SingletonFunction", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-user-pool-client-secret/pool/client/DescribeCognitoUserPoolClient/Resource", + "children": { + "Default": { + "id": "Default", + "path": "integ-user-pool-client-secret/pool/client/DescribeCognitoUserPoolClient/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": "integ-user-pool-client-secret/pool/client/DescribeCognitoUserPoolClient/CustomResourcePolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-user-pool-client-secret/pool/client/DescribeCognitoUserPoolClient/CustomResourcePolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "cognito-idp:DescribeUserPoolClient", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "pool056F3F7E", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "poolclientDescribeCognitoUserPoolClientCustomResourcePolicy5C0049D2", + "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-cognito.UserPoolClient", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.UserPool", + "version": "0.0.0" + } + }, + "AWS679f53fac002430cb0da5b7982bd2287": { + "id": "AWS679f53fac002430cb0da5b7982bd2287", + "path": "integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287/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": "integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287/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": "integ-user-pool-client-secret/AWS679f53fac002430cb0da5b7982bd2287/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": "a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476.zip" + }, + "role": { + "Fn::GetAtt": [ + "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "nodejs14.x", + "timeout": 120 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + }, + "secret": { + "id": "secret", + "path": "integ-user-pool-client-secret/secret", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-user-pool-client-secret/secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "secretString": { + "Fn::GetAtt": [ + "poolclientDescribeCognitoUserPoolClient51F12EBD", + "UserPoolClient.ClientSecret" + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.Secret", + "version": "0.0.0" + } + }, + "ClientSecretName": { + "id": "ClientSecretName", + "path": "integ-user-pool-client-secret/ClientSecretName", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-user-pool-client-secret/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-user-pool-client-secret/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "integ-user-pool-client-secret-test": { + "id": "integ-user-pool-client-secret-test", + "path": "integ-user-pool-client-secret-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "integ-user-pool-client-secret-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "integ-user-pool-client-secret-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.216" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "integ-user-pool-client-secret-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-user-pool-client-secret-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-user-pool-client-secret-test/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.216" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.ts b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.ts new file mode 100644 index 0000000000000..6dfe94496cab3 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-client-secret.ts @@ -0,0 +1,30 @@ +import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; +import { App, CfnOutput, RemovalPolicy, Stack } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; +import { Construct } from 'constructs'; +import { UserPool } from '../lib'; + +class TestStack extends Stack { + constructor(scope: Construct, id: string) { + super(scope, id); + const userpool = new UserPool(this, 'pool', { + removalPolicy: RemovalPolicy.DESTROY, + }); + + const client = userpool.addClient('client', { generateSecret: true }); + const secret = new secretsmanager.Secret(this, 'secret', { + secretStringValue: client.userPoolClientSecret, + }); + + new CfnOutput(this, 'ClientSecretName', { + value: secret.secretName, + }); + } +} + +const app = new App(); +const testCase = new TestStack(app, 'integ-user-pool-client-secret'); + +new IntegTest(app, 'integ-user-pool-client-secret-test', { + testCases: [testCase], +}); diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts index f6fc9dec75ae1..e246e46bf54b3 100644 --- a/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-client.test.ts @@ -93,6 +93,30 @@ describe('User Pool Client', () => { ], ], }, + Update: { + 'Fn::Join': [ + '', + [ + '{"region":"', + { + Ref: 'AWS::Region', + }, + '","service":"CognitoIdentityServiceProvider","action":"describeUserPoolClient","parameters":{"UserPoolId":"', + { + Ref: 'PoolD3F588B8', + }, + '","ClientId":"', + { + Ref: 'clientWithSecretD25031A8', + }, + '"},"physicalResourceId":{"id":"', + { + Ref: 'clientWithSecretD25031A8', + }, + '"}}', + ], + ], + }, InstallLatestAwsSdk: false, }); diff --git a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json index 02dd562403bd3..eb0a05ac95760 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json @@ -29,7 +29,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "aws-sdk": "^2.596.0", + "aws-sdk": "^2.1317.0", "aws-sdk-mock": "5.6.0", "eslint": "^7.32.0", "eslint-config-standard": "^14.1.1", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 3245af3705b4f..8a335fd2b0fc7 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.110", "@types/jest": "^27.5.2", "@types/sinon": "^9.0.11", - "aws-sdk": "^2.1211.0", + "aws-sdk": "^2.1317.0", "aws-sdk-mock": "5.6.0", "jest": "^27.5.1", "sinon": "^9.2.4", diff --git a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts index 8c112a18a3a38..4eda8f884b813 100644 --- a/packages/@aws-cdk/aws-ecs/lib/container-definition.ts +++ b/packages/@aws-cdk/aws-ecs/lib/container-definition.ts @@ -858,6 +858,23 @@ function renderEnvironmentFiles(partition: string, environmentFiles: Environment } function renderHealthCheck(hc: HealthCheck): CfnTaskDefinition.HealthCheckProperty { + if (hc.interval?.toSeconds() !== undefined) { + if (5 > hc.interval?.toSeconds() || hc.interval?.toSeconds() > 300) { + throw new Error('Interval must be between 5 seconds and 300 seconds.'); + } + } + + if (hc.timeout?.toSeconds() !== undefined) { + if (2 > hc.timeout?.toSeconds() || hc.timeout?.toSeconds() > 120) { + throw new Error('Timeout must be between 2 seconds and 120 seconds.'); + } + } + if (hc.interval?.toSeconds() !== undefined && hc.timeout?.toSeconds() !== undefined) { + if (hc.interval?.toSeconds() < hc.timeout?.toSeconds()) { + throw new Error('Health check interval should be longer than timeout.'); + } + } + return { command: getHealthCheckCommand(hc), interval: hc.interval?.toSeconds() ?? 30, diff --git a/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts b/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts index ab8498a507c3e..ebd24fa1235f0 100644 --- a/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts +++ b/packages/@aws-cdk/aws-ecs/lib/linux-parameters.ts @@ -126,7 +126,7 @@ export class LinuxParameters extends Construct { /** * Adds one or more Linux capabilities to the Docker configuration of a container. * - * Only works with EC2 launch type. + * Tasks launched on Fargate only support adding the 'SYS_PTRACE' kernel capability. */ public addCapabilities(...cap: Capability[]) { this.capAdd.push(...cap); @@ -134,8 +134,6 @@ export class LinuxParameters extends Construct { /** * Removes one or more Linux capabilities to the Docker configuration of a container. - * - * Only works with EC2 launch type. */ public dropCapabilities(...cap: Capability[]) { this.capDrop.push(...cap); diff --git a/packages/@aws-cdk/aws-ecs/test/container-definition.test.ts b/packages/@aws-cdk/aws-ecs/test/container-definition.test.ts index a0bfbf217ed2b..1db0b3e8815d0 100644 --- a/packages/@aws-cdk/aws-ecs/test/container-definition.test.ts +++ b/packages/@aws-cdk/aws-ecs/test/container-definition.test.ts @@ -7,6 +7,7 @@ import * as cdk from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import * as ecs from '../lib'; import { AppProtocol } from '../lib'; +import { Duration } from '@aws-cdk/core'; describe('container definition', () => { describe('When creating a Task Definition', () => { @@ -1691,6 +1692,161 @@ describe('container definition', () => { }).toThrow(/At least one argument must be supplied for health check command./); }); + test('throws when setting Health Check with invalid interval because of too short', () => { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + healthCheck: { + command: ['CMD-SHELL', 'curl localhost:8000'], + interval: Duration.seconds(4), + timeout: Duration.seconds(30), + }, + }); + + // THEN + expect(() => { + Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + HealthCheck: { + Command: ['CMD-SHELL', 'curl localhost:8000'], + Interval: 4, + }, + }, + ], + }); + }).toThrow(/Interval must be between 5 seconds and 300 seconds./); + }); + + test('throws when setting Health Check with invalid interval because of too long', () => { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + healthCheck: { + command: ['CMD-SHELL', 'curl localhost:8000'], + interval: Duration.seconds(301), + timeout: Duration.seconds(30), + }, + }); + + // THEN + expect(() => { + Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + HealthCheck: { + Command: ['CMD-SHELL', 'curl localhost:8000'], + Interval: 4, + }, + }, + ], + }); + }).toThrow(/Interval must be between 5 seconds and 300 seconds./); + }); + + test('throws when setting Health Check with invalid timeout because of too short', () => { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + healthCheck: { + command: ['CMD-SHELL', 'curl localhost:8000'], + interval: Duration.seconds(40), + timeout: Duration.seconds(1), + }, + }); + + // THEN + expect(() => { + Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + HealthCheck: { + Command: ['CMD-SHELL', 'curl localhost:8000'], + Interval: 4, + }, + }, + ], + }); + }).toThrow(/Timeout must be between 2 seconds and 120 seconds./); + }); + + test('throws when setting Health Check with invalid timeout because of too long', () => { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + healthCheck: { + command: ['CMD-SHELL', 'curl localhost:8000'], + interval: Duration.seconds(150), + timeout: Duration.seconds(130), + }, + }); + + // THEN + expect(() => { + Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + HealthCheck: { + Command: ['CMD-SHELL', 'curl localhost:8000'], + Interval: 4, + }, + }, + ], + }); + }).toThrow(/Timeout must be between 2 seconds and 120 seconds./); + }); + + test('throws when setting Health Check with invalid interval and timeout because timeout is longer than interval', () => { + // GIVEN + const stack = new cdk.Stack(); + const taskDefinition = new ecs.Ec2TaskDefinition(stack, 'TaskDef'); + + // WHEN + taskDefinition.addContainer('cont', { + image: ecs.ContainerImage.fromRegistry('test'), + memoryLimitMiB: 1024, + healthCheck: { + command: ['CMD-SHELL', 'curl localhost:8000'], + interval: Duration.seconds(10), + timeout: Duration.seconds(30), + }, + }); + + // THEN + expect(() => { + Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + { + HealthCheck: { + Command: ['CMD-SHELL', 'curl localhost:8000'], + Interval: 4, + }, + }, + ], + }); + }).toThrow(/Health check interval should be longer than timeout./); + }); + test('can specify Health Check values in shell form', () => { // GIVEN const stack = new cdk.Stack(); diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.assets.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.assets.json index a926baf83f30c..69056d07d817d 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.assets.json +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.assets.json @@ -1,7 +1,7 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { - "4dba456b46dc53b954d12cf55bad7b455371f307d7b5df57b5fb2e6cafe4e9ba": { + "1a5bcacf8adc1fb93503daec527cf36ecf57f189012726acf8ad69d9f993d3cb": { "source": { "path": "aws-ecs-integ-exec-command.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4dba456b46dc53b954d12cf55bad7b455371f307d7b5df57b5fb2e6cafe4e9ba.json", + "objectKey": "1a5bcacf8adc1fb93503daec527cf36ecf57f189012726acf8ad69d9f993d3cb.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-ecs/test/fargate/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.template.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.template.json index a6e57f5b88db6..377a73d413b6d 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.template.json +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.template.json @@ -673,6 +673,15 @@ "ContainerDefinitions": [ { "Essential": true, + "HealthCheck": { + "Command": [ + "CMD-SHELL", + "curl localhost:8000" + ], + "Interval": 60, + "Retries": 3, + "Timeout": 40 + }, "Image": "amazon/amazon-ecs-sample", "Name": "web" } diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/cdk.out b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/execcommandintegtestDefaultTestDeployAssert4F7706FE.assets.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/execcommandintegtestDefaultTestDeployAssert4F7706FE.assets.json new file mode 100644 index 0000000000000..d3e14dafbed7e --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/execcommandintegtestDefaultTestDeployAssert4F7706FE.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "execcommandintegtestDefaultTestDeployAssert4F7706FE.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-ecs/test/fargate/integ.exec-command.js.snapshot/execcommandintegtestDefaultTestDeployAssert4F7706FE.template.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/execcommandintegtestDefaultTestDeployAssert4F7706FE.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/execcommandintegtestDefaultTestDeployAssert4F7706FE.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-ecs/test/fargate/integ.exec-command.js.snapshot/integ.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/integ.json index 54e1790dd2707..c11a247f3a29b 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/integ.json @@ -1,14 +1,20 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { - "integ.exec-command": { + "exec-command-integ-test/DefaultTest": { "stacks": [ "aws-ecs-integ-exec-command" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "diffAssets": true, + "cdkCommandOptions": { + "deploy": { + "args": { + "rollback": true + } + } + }, + "assertionStack": "exec-command-integ-test/DefaultTest/DeployAssert", + "assertionStackName": "execcommandintegtestDefaultTestDeployAssert4F7706FE" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/manifest.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/manifest.json index f2551e7cdb262..e45fd352cef32 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "aws-ecs-integ-exec-command.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}/4dba456b46dc53b954d12cf55bad7b455371f307d7b5df57b5fb2e6cafe4e9ba.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1a5bcacf8adc1fb93503daec527cf36ecf57f189012726acf8ad69d9f993d3cb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -216,7 +210,10 @@ "/aws-ecs-integ-exec-command/TaskDef/Resource": [ { "type": "aws:cdk:logicalId", - "data": "TaskDef54694570" + "data": "TaskDef54694570", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] } ], "/aws-ecs-integ-exec-command/FargateService/Service": [ @@ -245,6 +242,59 @@ ] }, "displayName": "aws-ecs-integ-exec-command" + }, + "execcommandintegtestDefaultTestDeployAssert4F7706FE.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "execcommandintegtestDefaultTestDeployAssert4F7706FE.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "execcommandintegtestDefaultTestDeployAssert4F7706FE": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "execcommandintegtestDefaultTestDeployAssert4F7706FE.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": [ + "execcommandintegtestDefaultTestDeployAssert4F7706FE.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": [ + "execcommandintegtestDefaultTestDeployAssert4F7706FE.assets" + ], + "metadata": { + "/exec-command-integ-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/exec-command-integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "exec-command-integ-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/tree.json b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/tree.json index 0da31318a2e10..ccc7204857046 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.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-ecs-integ-exec-command": { "id": "aws-ecs-integ-exec-command", "path": "aws-ecs-integ-exec-command", @@ -91,8 +83,8 @@ "id": "Acl", "path": "aws-ecs-integ-exec-command/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-ecs-integ-exec-command/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-ecs-integ-exec-command/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-ecs-integ-exec-command/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -880,6 +872,14 @@ "id": "TaskRole", "path": "aws-ecs-integ-exec-command/TaskDef/TaskRole", "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-ecs-integ-exec-command/TaskDef/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ-exec-command/TaskDef/TaskRole/Resource", @@ -1051,7 +1051,16 @@ { "essential": true, "image": "amazon/amazon-ecs-sample", - "name": "web" + "name": "web", + "healthCheck": { + "command": [ + "CMD-SHELL", + "curl localhost:8000" + ], + "interval": 60, + "retries": 3, + "timeout": 40 + } } ], "cpu": "256", @@ -1178,17 +1187,95 @@ "fqn": "@aws-cdk/aws-ecs.FargateService", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-integ-exec-command/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-integ-exec-command/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "exec-command-integ-test": { + "id": "exec-command-integ-test", + "path": "exec-command-integ-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "exec-command-integ-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "exec-command-integ-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "exec-command-integ-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "exec-command-integ-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "exec-command-integ-test/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.249" } } }, "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-ecs/test/fargate/integ.exec-command.ts b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.ts index 5bc89fb2432b7..0af518dfa6b11 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.ts +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.exec-command.ts @@ -3,6 +3,8 @@ import * as kms from '@aws-cdk/aws-kms'; import * as logs from '@aws-cdk/aws-logs'; import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; +import { Duration } from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; import * as ecs from '../../lib'; const app = new cdk.App(); @@ -39,6 +41,11 @@ const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef'); taskDefinition.addContainer('web', { image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), + healthCheck: { + command: ['CMD-SHELL', 'curl localhost:8000'], + interval: Duration.seconds(60), + timeout: Duration.seconds(40), + }, }); new ecs.FargateService(stack, 'FargateService', { @@ -47,4 +54,14 @@ new ecs.FargateService(stack, 'FargateService', { enableExecuteCommand: true, }); -app.synth(); \ No newline at end of file +new integ.IntegTest(app, 'exec-command-integ-test', { + testCases: [stack], + diffAssets: true, + cdkCommandOptions: { + deploy: { + args: { + rollback: true, + }, + }, + }, +}); diff --git a/packages/@aws-cdk/aws-efs/README.md b/packages/@aws-cdk/aws-efs/README.md index a0ea3b8432341..060f827810ab9 100644 --- a/packages/@aws-cdk/aws-efs/README.md +++ b/packages/@aws-cdk/aws-efs/README.md @@ -61,6 +61,33 @@ const importedFileSystem = efs.FileSystem.fromFileSystemAttributes(this, 'existi }); ``` +### IAM to control file system data access + +You can use both IAM identity policies and resource policies to control client access to Amazon EFS resources in a way that is scalable and optimized for cloud environments. Using IAM, you can permit clients to perform specific actions on a file system, including read-only, write, and root access. + +```ts +const myFileSystemPolicy = new PolicyDocument({ + statements: [new PolicyStatement({ + actions: [ + 'elasticfilesystem:ClientWrite', + 'elasticfilesystem:ClientMount', + ], + principals: [new AccountRootPrincipal()], + resources: ['*'], + conditions: { + Bool: { + 'elasticfilesystem:AccessedViaMountTarget': 'true', + }, + }, + })], +}); + +const fileSystem = new efs.FileSystem(this, 'MyEfsFileSystem', { + vpc: new ec2.Vpc(this, 'VPC'), + fileSystemPolicy: myFileSystemPolicy, +}); +``` + ### Permissions If you need to grant file system permissions to another resource, you can use the `.grant()` API. diff --git a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts index 57b7e295068f0..ca05353728fae 100644 --- a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts +++ b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts @@ -231,6 +231,13 @@ export interface FileSystemProps { * @default false */ readonly enableAutomaticBackups?: boolean; + + /** + * File system policy is an IAM resource policy used to control NFS access to an EFS file system. + * + * @default none + */ + readonly fileSystemPolicy?: iam.PolicyDocument; } /** @@ -371,6 +378,7 @@ export class FileSystem extends FileSystemBase { throughputMode: props.throughputMode, provisionedThroughputInMibps: props.provisionedThroughputPerSecond?.toMebibytes(), backupPolicy: props.enableAutomaticBackups ? { status: 'ENABLED' } : undefined, + fileSystemPolicy: props.fileSystemPolicy, }); filesystem.applyRemovalPolicy(props.removalPolicy); diff --git a/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts b/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts index 96715f688c968..e0aff4d328ec3 100644 --- a/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts +++ b/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts @@ -414,3 +414,47 @@ test('can create when using a VPC with multiple subnets per availability zone', // make sure only one mount target is created. Template.fromStack(stack).resourceCountIs('AWS::EFS::MountTarget', 1); }); + +test('can specify file system policy', () => { + // WHEN + const myFileSystemPolicy = new iam.PolicyDocument({ + statements: [new iam.PolicyStatement({ + actions: [ + 'elasticfilesystem:ClientWrite', + 'elasticfilesystem:ClientMount', + ], + principals: [new iam.ArnPrincipal('arn:aws:iam::111122223333:role/Testing_Role')], + resources: ['arn:aws:elasticfilesystem:us-east-2:111122223333:file-system/fs-1234abcd'], + conditions: { + Bool: { + 'elasticfilesystem:AccessedViaMountTarget': 'true', + }, + }, + })], + }); + new FileSystem(stack, 'EfsFileSystem', { vpc, fileSystemPolicy: myFileSystemPolicy }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::EFS::FileSystem', { + FileSystemPolicy: { + Statement: [ + { + Effect: 'Allow', + Principal: { + AWS: 'arn:aws:iam::111122223333:role/Testing_Role', + }, + Action: [ + 'elasticfilesystem:ClientWrite', + 'elasticfilesystem:ClientMount', + ], + Resource: 'arn:aws:elasticfilesystem:us-east-2:111122223333:file-system/fs-1234abcd', + Condition: { + Bool: { + 'elasticfilesystem:AccessedViaMountTarget': 'true', + }, + }, + }, + ], + }, + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets.json new file mode 100644 index 0000000000000..63310c336fab4 --- /dev/null +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.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-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.template.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.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-efs/test/integ.efs-filesystem-policy.js.snapshot/cdk.out b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/cdk.out new file mode 100644 index 0000000000000..ae4b03c54e770 --- /dev/null +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/integ.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/integ.json new file mode 100644 index 0000000000000..92343ca276aaf --- /dev/null +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "30.0.0", + "testCases": { + "FileSystemPolicyTest/DefaultTest": { + "stacks": [ + "test-efs-integ" + ], + "assertionStack": "FileSystemPolicyTest/DefaultTest/DeployAssert", + "assertionStackName": "FileSystemPolicyTestDefaultTestDeployAssertD0596FC1" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/manifest.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/manifest.json new file mode 100644 index 0000000000000..e59b3eec02264 --- /dev/null +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/manifest.json @@ -0,0 +1,255 @@ +{ + "version": "30.0.0", + "artifacts": { + "test-efs-integ.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "test-efs-integ.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "test-efs-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "test-efs-integ.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}/c5e7b14cbe61beadd8ee29f1e2e8da7ac152bf472dfba586a792ff422a1eef41.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "test-efs-integ.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": [ + "test-efs-integ.assets" + ], + "metadata": { + "/test-efs-integ/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/test-efs-integ/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4" + } + ], + "/test-efs-integ/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/test-efs-integ/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677" + } + ], + "/test-efs-integ/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/test-efs-integ/Vpc/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1EIPD7E02669" + } + ], + "/test-efs-integ/Vpc/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1NATGateway4D7517AA" + } + ], + "/test-efs-integ/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "/test-efs-integ/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/test-efs-integ/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" + } + ], + "/test-efs-integ/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/test-efs-integ/Vpc/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1Subnet536B997A" + } + ], + "/test-efs-integ/Vpc/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableB2C5B500" + } + ], + "/test-efs-integ/Vpc/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6" + } + ], + "/test-efs-integ/Vpc/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" + } + ], + "/test-efs-integ/Vpc/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "/test-efs-integ/Vpc/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableA678073B" + } + ], + "/test-efs-integ/Vpc/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + } + ], + "/test-efs-integ/Vpc/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2DefaultRoute060D2087" + } + ], + "/test-efs-integ/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/test-efs-integ/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/test-efs-integ/FileSystem/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FileSystem8A8E25C0" + } + ], + "/test-efs-integ/FileSystem/EfsSecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FileSystemEfsSecurityGroup212D3ACB" + } + ], + "/test-efs-integ/FileSystem/EfsMountTarget1": [ + { + "type": "aws:cdk:logicalId", + "data": "FileSystemEfsMountTarget1586453F0" + } + ], + "/test-efs-integ/FileSystem/EfsMountTarget2": [ + { + "type": "aws:cdk:logicalId", + "data": "FileSystemEfsMountTarget24B8EBB43" + } + ], + "/test-efs-integ/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/test-efs-integ/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "test-efs-integ" + }, + "FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "FileSystemPolicyTestDefaultTestDeployAssertD0596FC1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.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": [ + "FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.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": [ + "FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets" + ], + "metadata": { + "/FileSystemPolicyTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/FileSystemPolicyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "FileSystemPolicyTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.assets.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.assets.json new file mode 100644 index 0000000000000..4b4483a20346e --- /dev/null +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "c5e7b14cbe61beadd8ee29f1e2e8da7ac152bf472dfba586a792ff422a1eef41": { + "source": { + "path": "test-efs-integ.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "c5e7b14cbe61beadd8ee29f1e2e8da7ac152bf472dfba586a792ff422a1eef41.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-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.template.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.template.json new file mode 100644 index 0000000000000..7abbbf57f980e --- /dev/null +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.template.json @@ -0,0 +1,503 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "test-efs-integ/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1RouteTableAssociation97140677" + ] + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "test-efs-integ/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "test-efs-integ/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "FileSystem8A8E25C0": { + "Type": "AWS::EFS::FileSystem", + "Properties": { + "Encrypted": true, + "FileSystemPolicy": { + "Statement": [ + { + "Action": [ + "elasticfilesystem:ClientMount", + "elasticfilesystem:ClientWrite" + ], + "Condition": { + "Bool": { + "elasticfilesystem:AccessedViaMountTarget": "true" + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "FileSystemTags": [ + { + "Key": "Name", + "Value": "test-efs-integ/FileSystem" + } + ] + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "FileSystemEfsSecurityGroup212D3ACB": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "test-efs-integ/FileSystem/EfsSecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "test-efs-integ/FileSystem" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "FileSystemEfsMountTarget1586453F0": { + "Type": "AWS::EFS::MountTarget", + "Properties": { + "FileSystemId": { + "Ref": "FileSystem8A8E25C0" + }, + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "FileSystemEfsSecurityGroup212D3ACB", + "GroupId" + ] + } + ], + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "FileSystemEfsMountTarget24B8EBB43": { + "Type": "AWS::EFS::MountTarget", + "Properties": { + "FileSystemId": { + "Ref": "FileSystem8A8E25C0" + }, + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "FileSystemEfsSecurityGroup212D3ACB", + "GroupId" + ] + } + ], + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + } + }, + "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-efs/test/integ.efs-filesystem-policy.js.snapshot/tree.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/tree.json new file mode 100644 index 0000000000000..d231356b874e9 --- /dev/null +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/tree.json @@ -0,0 +1,856 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "test-efs-integ": { + "id": "test-efs-integ", + "path": "test-efs-integ", + "children": { + "Vpc": { + "id": "Vpc", + "path": "test-efs-integ/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "test-efs-integ/Vpc/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "test-efs-integ/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "test-efs-integ/Vpc/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "test-efs-integ/Vpc/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "test-efs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "test-efs-integ/Vpc/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "test-efs-integ/Vpc/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "test-efs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "test-efs-integ/Vpc/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "test-efs-integ/Vpc/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "test-efs-integ/Vpc/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "test-efs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "test-efs-integ/Vpc/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "tags": [ + { + "key": "Name", + "value": "test-efs-integ/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "test-efs-integ/Vpc/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "test-efs-integ/Vpc/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "test-efs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "test-efs-integ/Vpc/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "test-efs-integ/Vpc/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "test-efs-integ/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "test-efs-integ/Vpc/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "test-efs-integ/Vpc/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "test-efs-integ/Vpc/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "test-efs-integ/Vpc/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "test-efs-integ/Vpc/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "test-efs-integ/Vpc/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "test-efs-integ/Vpc/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "test-efs-integ/Vpc/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "test-efs-integ/Vpc/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "test-efs-integ/Vpc/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "test-efs-integ/Vpc/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "test-efs-integ/Vpc/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "test-efs-integ/Vpc/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "test-efs-integ/Vpc/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "test-efs-integ/Vpc/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "test-efs-integ/Vpc/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "test-efs-integ/Vpc/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "test-efs-integ/Vpc/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "test-efs-integ/Vpc/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "test-efs-integ/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "test-efs-integ/Vpc/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "internetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Vpc", + "version": "0.0.0" + } + }, + "FileSystem": { + "id": "FileSystem", + "path": "test-efs-integ/FileSystem", + "children": { + "Resource": { + "id": "Resource", + "path": "test-efs-integ/FileSystem/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EFS::FileSystem", + "aws:cdk:cloudformation:props": { + "encrypted": true, + "fileSystemPolicy": { + "Statement": [ + { + "Action": [ + "elasticfilesystem:ClientMount", + "elasticfilesystem:ClientWrite" + ], + "Condition": { + "Bool": { + "elasticfilesystem:AccessedViaMountTarget": "true" + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "fileSystemTags": [ + { + "key": "Name", + "value": "test-efs-integ/FileSystem" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-efs.CfnFileSystem", + "version": "0.0.0" + } + }, + "EfsSecurityGroup": { + "id": "EfsSecurityGroup", + "path": "test-efs-integ/FileSystem/EfsSecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "test-efs-integ/FileSystem/EfsSecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "test-efs-integ/FileSystem/EfsSecurityGroup", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "tags": [ + { + "key": "Name", + "value": "test-efs-integ/FileSystem" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "EfsMountTarget1": { + "id": "EfsMountTarget1", + "path": "test-efs-integ/FileSystem/EfsMountTarget1", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EFS::MountTarget", + "aws:cdk:cloudformation:props": { + "fileSystemId": { + "Ref": "FileSystem8A8E25C0" + }, + "securityGroups": [ + { + "Fn::GetAtt": [ + "FileSystemEfsSecurityGroup212D3ACB", + "GroupId" + ] + } + ], + "subnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-efs.CfnMountTarget", + "version": "0.0.0" + } + }, + "EfsMountTarget2": { + "id": "EfsMountTarget2", + "path": "test-efs-integ/FileSystem/EfsMountTarget2", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EFS::MountTarget", + "aws:cdk:cloudformation:props": { + "fileSystemId": { + "Ref": "FileSystem8A8E25C0" + }, + "securityGroups": [ + { + "Fn::GetAtt": [ + "FileSystemEfsSecurityGroup212D3ACB", + "GroupId" + ] + } + ], + "subnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-efs.CfnMountTarget", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-efs.FileSystem", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "test-efs-integ/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "test-efs-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "FileSystemPolicyTest": { + "id": "FileSystemPolicyTest", + "path": "FileSystemPolicyTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "FileSystemPolicyTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "FileSystemPolicyTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "FileSystemPolicyTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "FileSystemPolicyTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "FileSystemPolicyTest/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.249" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.ts b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.ts new file mode 100644 index 0000000000000..a468a6822e2f1 --- /dev/null +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.ts @@ -0,0 +1,37 @@ +import * as ec2 from '@aws-cdk/aws-ec2'; +import { AccountRootPrincipal, PolicyDocument, PolicyStatement } from '@aws-cdk/aws-iam'; +import * as cdk from '@aws-cdk/core'; +// eslint-disable-next-line import/no-extraneous-dependencies +import * as integ from '@aws-cdk/integ-tests'; +import { FileSystem } from '../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'test-efs-integ'); + +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 3, natGateways: 1 }); + +const myFileSystemPolicy = new PolicyDocument({ + statements: [new PolicyStatement({ + actions: [ + 'elasticfilesystem:ClientWrite', + 'elasticfilesystem:ClientMount', + ], + principals: [new AccountRootPrincipal()], + resources: ['*'], + conditions: { + Bool: { + 'elasticfilesystem:AccessedViaMountTarget': 'true', + }, + }, + })], +}); + +new FileSystem(stack, 'FileSystem', { + vpc, + fileSystemPolicy: myFileSystemPolicy, +}); + +new integ.IntegTest(app, 'FileSystemPolicyTest', { + testCases: [stack], +}); +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index 2d46ea7460f7a..e10cba101ec14 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -1237,7 +1237,7 @@ const chart2 = cluster.addHelmChart('MyChart', { chart2.node.addDependency(chart1); ``` -#### CDK8s Charts +### CDK8s Charts [CDK8s](https://cdk8s.io/) is an open-source library that enables Kubernetes manifest authoring using familiar programming languages. It is founded on the same technologies as the AWS CDK, such as [`constructs`](https://github.com/aws/constructs) and [`jsii`](https://github.com/aws/jsii). @@ -1313,7 +1313,7 @@ const myChart = new MyChart(new cdk8s.App(), 'MyChart', { bucket }); cluster.addCdk8sChart('my-chart', myChart); ``` -##### Custom CDK8s Constructs +#### Custom CDK8s Constructs You can also compose a few stock `cdk8s+` constructs into your own custom construct. However, since mixing scopes between `aws-cdk` and `cdk8s` is currently not supported, the `Construct` class you'll need to use is the one from the [`constructs`](https://github.com/aws/constructs) module, and not from `@aws-cdk/core` like you normally would. @@ -1350,7 +1350,7 @@ export class LoadBalancedWebService extends constructs.Construct { } ``` -##### Manually importing k8s specs and CRD's +#### Manually importing k8s specs and CRD's If you find yourself unable to use `cdk8s+`, or just like to directly use the `k8s` native objects or CRD's, you can do so by manually importing them using the `cdk8s-cli`. diff --git a/packages/@aws-cdk/aws-eks/lib/kubectl-handler/helm/__init__.py b/packages/@aws-cdk/aws-eks/lib/kubectl-handler/helm/__init__.py index a7b26b264118b..c9120c1926e03 100644 --- a/packages/@aws-cdk/aws-eks/lib/kubectl-handler/helm/__init__.py +++ b/packages/@aws-cdk/aws-eks/lib/kubectl-handler/helm/__init__.py @@ -6,7 +6,6 @@ import shutil import tempfile import zipfile -from urllib.parse import urlparse, unquote logger = logging.getLogger() logger.setLevel(logging.INFO) @@ -95,26 +94,25 @@ def helm_handler(event, context): def get_oci_cmd(repository, version): # Generates OCI command based on pattern. Public ECR vs Private ECR are treated differently. - cmnd = [] - private_ecr_pattern = '\d+.dkr.ecr.[a-z]+-[a-z]+-\d.amazonaws.com' - public_ecr = 'public.ecr.aws' + private_ecr_pattern = 'oci://(?P\d+.dkr.ecr.(?P[a-z]+-[a-z]+-\d).amazonaws.com)*' + public_ecr_pattern = 'oci://(?Ppublic.ecr.aws)*' - registry = repository.rsplit('/', 1)[0].replace('oci://', '') + private_registry = re.match(private_ecr_pattern, repository).groupdict() + public_registry = re.match(public_ecr_pattern, repository).groupdict() - if re.fullmatch(private_ecr_pattern, registry) is not None: + if private_registry['registry'] is not None: logger.info("Found AWS private repository") - region = registry.replace('.amazonaws.com', '').split('.')[-1] cmnd = [ - f"aws ecr get-login-password --region {region} | " \ - f"helm registry login --username AWS --password-stdin {registry}; helm pull {repository} --version {version} --untar" + f"aws ecr get-login-password --region {private_registry['region']} | " \ + f"helm registry login --username AWS --password-stdin {private_registry['registry']}; helm pull {repository} --version {version} --untar" ] - elif registry.startswith(public_ecr): + elif public_registry['registry'] is not None: logger.info("Found AWS public repository, will use default region as deployment") region = os.environ.get('AWS_REGION', 'us-east-1') cmnd = [ f"aws ecr-public get-login-password --region {region} | " \ - f"helm registry login --username AWS --password-stdin {public_ecr}; helm pull {repository} --version {version} --untar" + f"helm registry login --username AWS --password-stdin {public_registry['registry']}; helm pull {repository} --version {version} --untar" ] else: logger.error("OCI repository format not recognized, falling back to helm pull") diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 9d3281d7095b1..a42cda8ebb6a6 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.96", + "@aws-cdk/lambda-layer-kubectl-v24": "^2.0.100", "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.1211.0", - "cdk8s": "^2.6.47", - "cdk8s-plus-24": "2.4.19", + "aws-sdk": "^2.1317.0", + "cdk8s": "^2.7.2", + "cdk8s-plus-24": "2.4.23", "jest": "^27.5.1", "sinon": "^9.2.4" }, diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-helm-asset.ts b/packages/@aws-cdk/aws-eks/test/integ.eks-helm-asset.ts index 563af5eacb87d..a3a39739d98bc 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-helm-asset.ts +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-helm-asset.ts @@ -60,6 +60,14 @@ class EksClusterStack extends Stack { createNamespace: true, }); + // there is no opinionated way of testing charts from private ECR, so there is description of manual steps needed to reproduce: + // 1. `export AWS_PROFILE=youraccountprofile; aws ecr create-repository --repository-name helm-charts-test/s3-chart --region YOUR_REGION` + // 2. `helm pull oci://public.ecr.aws/aws-controllers-k8s/s3-chart --version v0.1.0` + // 3. Login to ECR (howto: https://docs.aws.amazon.com/AmazonECR/latest/userguide/push-oci-artifact.html ) + // 4. `helm push s3-chart-v0.1.0.tgz oci://YOUR_ACCOUNT_ID.dkr.ecr.YOUR_REGION.amazonaws.com/helm-charts-test/` + // 5. Change `repository` in above test to oci://YOUR_ACCOUNT_ID.dkr.ecr.YOUR_REGION.amazonaws.com/helm-charts-test + // 6. Run integration tests as usual + this.cluster.addHelmChart('test-oci-chart-different-release-name', { chart: 'lambda-chart', release: 'lambda-chart-release', @@ -79,4 +87,3 @@ new integ.IntegTest(app, 'aws-cdk-eks-helm', { }); app.synth(); - diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md b/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md index da7a5034f72c2..87572898730b8 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md @@ -158,7 +158,7 @@ listener.addAction('Fixed', { elbv2.ListenerCondition.pathPatterns(['/ok']), ], action: elbv2.ListenerAction.fixedResponse(200, { - contentType: elbv2.ContentType.TEXT_PLAIN, + contentType: 'text/plain', messageBody: 'OK', }) }); @@ -607,7 +607,9 @@ const listener = elbv2.NetworkListener.fromLookup(this, 'ALBListener', { ## Metrics -You may create metrics for each Load Balancer through the `metrics` attribute: +You may create metrics for Load Balancers and Target Groups through the `metrics` attribute: + +**Load Balancer:** ```ts declare const alb: elbv2.IApplicationLoadBalancer; @@ -615,3 +617,37 @@ declare const alb: elbv2.IApplicationLoadBalancer; const albMetrics: elbv2.IApplicationLoadBalancerMetrics = alb.metrics; const metricConnectionCount: cloudwatch.Metric = albMetrics.activeConnectionCount(); ``` + +**Target Group:** + +```ts +declare const targetGroup: elbv2.IApplicationTargetGroup; + +const targetGroupMetrics: elbv2.IApplicationTargetGroupMetrics = targetGroup.metrics; +const metricHealthyHostCount: cloudwatch.Metric = targetGroupMetrics.healthyHostCount(); +``` + +Metrics are also available to imported resources: + +```ts +declare const stack: Stack; + +const targetGroup = elbv2.ApplicationTargetGroup.fromTargetGroupAttributes(stack, 'MyTargetGroup', { + targetGroupArn: Fn.importValue('TargetGroupArn'), + loadBalancerArns: Fn.importValue('LoadBalancerArn'), +}); + +const targetGroupMetrics: elbv2.IApplicationTargetGroupMetrics = targetGroup.metrics; +``` + +Notice that TargetGroups must be imported by supplying the Load Balancer too, otherwise accessing the `metrics` will +throw an error: + +```ts +declare const stack: Stack; +const targetGroup = elbv2.ApplicationTargetGroup.fromTargetGroupAttributes(stack, 'MyTargetGroup', { + targetGroupArn: Fn.importValue('TargetGroupArn'), +}); + +const targetGroupMetrics: elbv2.IApplicationTargetGroupMetrics = targetGroup.metrics; // throws an Error() +``` diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts index 4599f289d892a..a842adb3a978d 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-target-group.ts @@ -1,6 +1,6 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; -import { Annotations, Duration, Token } from '@aws-cdk/core'; +import { Aws, Annotations, Duration, Token } from '@aws-cdk/core'; import { IConstruct, Construct } from 'constructs'; import { ApplicationELBMetrics } from '../elasticloadbalancingv2-canned-metrics.generated'; import { @@ -9,7 +9,7 @@ import { } from '../shared/base-target-group'; import { ApplicationProtocol, ApplicationProtocolVersion, Protocol, TargetType, TargetGroupLoadBalancingAlgorithmType } from '../shared/enums'; import { ImportedTargetGroupBase } from '../shared/imported'; -import { determineProtocolAndPort } from '../shared/util'; +import { determineProtocolAndPort, parseLoadBalancerFullName, parseTargetGroupFullName } from '../shared/util'; import { IApplicationListener } from './application-listener'; import { HttpCodeTarget } from './application-load-balancer'; @@ -93,6 +93,188 @@ export interface ApplicationTargetGroupProps extends BaseTargetGroupProps { readonly targets?: IApplicationLoadBalancerTarget[]; } +/** + * Contains all metrics for a Target Group of a Application Load Balancer. + */ +export interface IApplicationTargetGroupMetrics { + /** + * Return the given named metric for this Network Target Group + * + * @default Average over 5 minutes + */ + custom(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + + /** + * The number of IPv6 requests received by the target group + * + * @default Sum over 5 minutes + */ + ipv6RequestCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The number of requests processed over IPv4 and IPv6. + * + * This count includes only the requests with a response generated by a target of the load balancer. + * + * @default Sum over 5 minutes + */ + requestCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The number of healthy hosts in the target group + * + * @default Average over 5 minutes + */ + healthyHostCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The number of unhealthy hosts in the target group + * + * @default Average over 5 minutes + */ + unhealthyHostCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The number of HTTP 2xx/3xx/4xx/5xx response codes generated by all targets in this target group. + * + * This does not include any response codes generated by the load balancer. + * + * @default Sum over 5 minutes + */ + httpCodeTarget(code: HttpCodeTarget, props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The average number of requests received by each target in a target group. + * + * The only valid statistic is Sum. Note that this represents the average not the sum. + * + * @default Sum over 5 minutes + */ + requestCountPerTarget(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The number of connections that were not successfully established between the load balancer and target. + * + * @default Sum over 5 minutes + */ + targetConnectionErrorCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received. + * + * @default Average over 5 minutes + */ + targetResponseTime(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The number of TLS connections initiated by the load balancer that did not establish a session with the target. + * + * Possible causes include a mismatch of ciphers or protocols. + * + * @default Sum over 5 minutes + */ + targetTLSNegotiationErrorCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric; +} + + +/** + * The metrics for a Application Load Balancer. + */ +class ApplicationTargetGroupMetrics implements IApplicationTargetGroupMetrics { + private readonly scope: Construct; + private readonly loadBalancerFullName: string; + private readonly targetGroupFullName: string; + + public constructor(scope: Construct, targetGroupFullName: string, loadBalancerFullName: string) { + this.scope = scope; + this.targetGroupFullName = targetGroupFullName; + this.loadBalancerFullName = loadBalancerFullName; + } + + public custom(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + namespace: 'AWS/ApplicationELB', + metricName, + dimensionsMap: { + TargetGroup: this.targetGroupFullName, + LoadBalancer: this.loadBalancerFullName, + }, + ...props, + }).attachTo(this.scope); + } + + + public ipv6RequestCount(props?: cloudwatch.MetricOptions) { + return this.cannedMetric(ApplicationELBMetrics.iPv6RequestCountSum, props); + } + + public requestCount(props?: cloudwatch.MetricOptions) { + return this.cannedMetric(ApplicationELBMetrics.requestCountSum, props); + } + + public healthyHostCount(props?: cloudwatch.MetricOptions) { + return this.custom('HealthyHostCount', { + statistic: 'Average', + ...props, + }); + } + + public unhealthyHostCount(props?: cloudwatch.MetricOptions) { + return this.custom('UnHealthyHostCount', { + statistic: 'Average', + ...props, + }); + } + + public httpCodeTarget(code: HttpCodeTarget, props?: cloudwatch.MetricOptions) { + return this.custom(code, { + statistic: 'Sum', + ...props, + }); + } + + public requestCountPerTarget(props?: cloudwatch.MetricOptions) { + return this.custom('RequestCountPerTarget', { + statistic: 'Sum', + ...props, + }); + } + + public targetConnectionErrorCount(props?: cloudwatch.MetricOptions) { + return this.custom('TargetConnectionErrorCount', { + statistic: 'Sum', + ...props, + }); + } + + public targetResponseTime(props?: cloudwatch.MetricOptions) { + return this.custom('TargetResponseTime', { + statistic: 'Average', + ...props, + }); + } + + public targetTLSNegotiationErrorCount(props?: cloudwatch.MetricOptions) { + return this.custom('TargetTLSNegotiationErrorCount', { + statistic: 'Sum', + ...props, + }); + } + + private cannedMetric( + fn: (dims: { LoadBalancer: string, TargetGroup: string }) => cloudwatch.MetricProps, + props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + ...fn({ + LoadBalancer: this.loadBalancerFullName, + TargetGroup: this.targetGroupFullName, + }), + ...props, + }).attachTo(this.scope); + } +} + /** * Define an Application Target Group */ @@ -117,6 +299,7 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat private readonly listeners: IApplicationListener[]; private readonly protocol?: ApplicationProtocol; private readonly port?: number; + private _metrics?: IApplicationTargetGroupMetrics; constructor(scope: Construct, id: string, props: ApplicationTargetGroupProps = {}) { const [protocol, port] = determineProtocolAndPort(props.protocol, props.port); @@ -165,6 +348,13 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat } } + public get metrics(): IApplicationTargetGroupMetrics { + if (!this._metrics) { + this._metrics = new ApplicationTargetGroupMetrics(this, this.targetGroupFullName, this.firstLoadBalancerFullName); + } + return this._metrics; + } + /** * Add a load balancing target to this target group */ @@ -262,24 +452,17 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat * @default Average over 5 minutes */ public metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return new cloudwatch.Metric({ - namespace: 'AWS/ApplicationELB', - metricName, - dimensionsMap: { - TargetGroup: this.targetGroupFullName, - LoadBalancer: this.firstLoadBalancerFullName, - }, - ...props, - }).attachTo(this); + return this.metrics.custom(metricName, props); } /** * The number of IPv6 requests received by the target group * * @default Sum over 5 minutes + * @deprecated Use ``ApplicationTargetGroup.metrics.ipv6RequestCount`` instead */ public metricIpv6RequestCount(props?: cloudwatch.MetricOptions) { - return this.cannedMetric(ApplicationELBMetrics.iPv6RequestCountSum, props); + return this.metrics.ipv6RequestCount(props); } /** @@ -288,33 +471,30 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat * This count includes only the requests with a response generated by a target of the load balancer. * * @default Sum over 5 minutes + * @deprecated Use ``ApplicationTargetGroup.metrics.requestCount`` instead */ public metricRequestCount(props?: cloudwatch.MetricOptions) { - return this.cannedMetric(ApplicationELBMetrics.requestCountSum, props); + return this.metrics.requestCount(props); } /** * The number of healthy hosts in the target group * * @default Average over 5 minutes + * @deprecated Use ``ApplicationTargetGroup.metrics.healthyHostCount`` instead */ public metricHealthyHostCount(props?: cloudwatch.MetricOptions) { - return this.metric('HealthyHostCount', { - statistic: 'Average', - ...props, - }); + return this.metrics.healthyHostCount(props); } /** * The number of unhealthy hosts in the target group * * @default Average over 5 minutes + * @deprecated Use ``ApplicationTargetGroup.metrics.unhealthyHostCount`` instead */ public metricUnhealthyHostCount(props?: cloudwatch.MetricOptions) { - return this.metric('UnHealthyHostCount', { - statistic: 'Average', - ...props, - }); + return this.metrics.unhealthyHostCount(props); } /** @@ -323,12 +503,10 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat * This does not include any response codes generated by the load balancer. * * @default Sum over 5 minutes + * @deprecated Use ``ApplicationTargetGroup.metrics.httpCodeTarget`` instead */ public metricHttpCodeTarget(code: HttpCodeTarget, props?: cloudwatch.MetricOptions) { - return this.metric(code, { - statistic: 'Sum', - ...props, - }); + return this.metrics.httpCodeTarget(code, props); } /** @@ -337,36 +515,30 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat * The only valid statistic is Sum. Note that this represents the average not the sum. * * @default Sum over 5 minutes + * @deprecated Use ``ApplicationTargetGroup.metrics.ipv6RequestCount`` instead */ public metricRequestCountPerTarget(props?: cloudwatch.MetricOptions) { - return this.metric('RequestCountPerTarget', { - statistic: 'Sum', - ...props, - }); + return this.metrics.requestCountPerTarget(props); } /** * The number of connections that were not successfully established between the load balancer and target. * * @default Sum over 5 minutes + * @deprecated Use ``ApplicationTargetGroup.metrics.targetConnectionErrorCount`` instead */ public metricTargetConnectionErrorCount(props?: cloudwatch.MetricOptions) { - return this.metric('TargetConnectionErrorCount', { - statistic: 'Sum', - ...props, - }); + return this.metrics.targetConnectionErrorCount(props); } /** * The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received. * * @default Average over 5 minutes + * @deprecated Use ``ApplicationTargetGroup.metrics.targetResponseTime`` instead */ public metricTargetResponseTime(props?: cloudwatch.MetricOptions) { - return this.metric('TargetResponseTime', { - statistic: 'Average', - ...props, - }); + return this.metrics.targetResponseTime(props); } /** @@ -375,12 +547,10 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat * Possible causes include a mismatch of ciphers or protocols. * * @default Sum over 5 minutes + * @deprecated Use ``ApplicationTargetGroup.metrics.tlsNegotiationErrorCount`` instead */ public metricTargetTLSNegotiationErrorCount(props?: cloudwatch.MetricOptions) { - return this.metric('TargetTLSNegotiationErrorCount', { - statistic: 'Sum', - ...props, - }); + return this.metrics.targetTLSNegotiationErrorCount(props); } protected validateTargetGroup(): string[] { @@ -409,18 +579,6 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat return ret; } - - private cannedMetric( - fn: (dims: { LoadBalancer: string, TargetGroup: string }) => cloudwatch.MetricProps, - props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return new cloudwatch.Metric({ - ...fn({ - LoadBalancer: this.firstLoadBalancerFullName, - TargetGroup: this.targetGroupFullName, - }), - ...props, - }).attachTo(this); - } } /** @@ -442,6 +600,11 @@ interface ConnectableMember { * A Target Group for Application Load Balancers */ export interface IApplicationTargetGroup extends ITargetGroup { + /** + * All metrics available for this target group. + */ + readonly metrics: IApplicationTargetGroupMetrics; + /** * Register a listener that is load balancing to this target group. * @@ -466,6 +629,17 @@ export interface IApplicationTargetGroup extends ITargetGroup { * An imported application target group */ class ImportedApplicationTargetGroup extends ImportedTargetGroupBase implements IApplicationTargetGroup { + private readonly _metrics?: IApplicationTargetGroupMetrics; + + public constructor(scope: Construct, id: string, props: TargetGroupAttributes) { + super(scope, id, props); + if (this.loadBalancerArns != Aws.NO_VALUE) { + const targetGroupFullName = parseTargetGroupFullName(this.targetGroupArn); + const firstLoadBalancerFullName = parseLoadBalancerFullName(this.loadBalancerArns); + this._metrics = new ApplicationTargetGroupMetrics(this, targetGroupFullName, firstLoadBalancerFullName); + } + } + public registerListener(_listener: IApplicationListener, _associatingConstruct?: IConstruct) { // Nothing to do, we know nothing of our members Annotations.of(this).addWarning('Cannot register listener on imported target group -- security groups might need to be updated manually'); @@ -484,6 +658,15 @@ class ImportedApplicationTargetGroup extends ImportedTargetGroupBase implements } } } + + public get metrics(): IApplicationTargetGroupMetrics { + if (!this._metrics) { + throw new Error( + 'The imported ApplicationTargetGroup needs the associated ApplicationBalancer to be able to provide metrics. ' + + 'Please specify the ARN value when importing it.'); + } + return this._metrics; + } } /** diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts index 4c19fd228e706..98125107bf98e 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts @@ -7,7 +7,7 @@ import { } from '../shared/base-target-group'; import { Protocol } from '../shared/enums'; import { ImportedTargetGroupBase } from '../shared/imported'; -import { validateNetworkProtocol } from '../shared/util'; +import { parseLoadBalancerFullName, parseTargetGroupFullName, validateNetworkProtocol } from '../shared/util'; import { INetworkListener } from './network-listener'; /** @@ -62,6 +62,70 @@ export interface NetworkTargetGroupProps extends BaseTargetGroupProps { readonly connectionTermination?: boolean; } +/** + * Contains all metrics for a Target Group of a Network Load Balancer. + */ +export interface INetworkTargetGroupMetrics { + /** + * Return the given named metric for this Network Target Group + * + * @default Average over 5 minutes + */ + custom(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The number of targets that are considered healthy. + * + * @default Average over 5 minutes + */ + healthyHostCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric; + + /** + * The number of targets that are considered unhealthy. + * + * @default Average over 5 minutes + */ + unHealthyHostCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric; +} + +/** + * The metrics for a network load balancer. + */ +class NetworkTargetGroupMetrics implements INetworkTargetGroupMetrics { + private readonly scope: Construct; + private readonly loadBalancerFullName: string; + private readonly targetGroupFullName: string; + + public constructor(scope: Construct, targetGroupFullName: string, loadBalancerFullName: string) { + this.scope = scope; + this.targetGroupFullName = targetGroupFullName; + this.loadBalancerFullName = loadBalancerFullName; + } + + public custom(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return new cloudwatch.Metric({ + namespace: 'AWS/NetworkELB', + metricName, + dimensionsMap: { LoadBalancer: this.loadBalancerFullName, TargetGroup: this.targetGroupFullName }, + ...props, + }).attachTo(this.scope); + } + + public healthyHostCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.custom('HealthyHostCount', { + statistic: 'Average', + ...props, + }); + } + + public unHealthyHostCount(props?: cloudwatch.MetricOptions) { + return this.custom('UnHealthyHostCount', { + statistic: 'Average', + ...props, + }); + } +} + /** * Define a Network Target Group */ @@ -83,6 +147,7 @@ export class NetworkTargetGroup extends TargetGroupBase implements INetworkTarge } private readonly listeners: INetworkListener[]; + private _metrics?: INetworkTargetGroupMetrics; constructor(scope: Construct, id: string, props: NetworkTargetGroupProps) { const proto = props.protocol || Protocol.TCP; @@ -106,6 +171,14 @@ export class NetworkTargetGroup extends TargetGroupBase implements INetworkTarge this.setAttribute('deregistration_delay.connection_termination.enabled', props.connectionTermination ? 'true' : 'false'); } this.addTarget(...(props.targets || [])); + + } + + public get metrics(): INetworkTargetGroupMetrics { + if (!this._metrics) { + this._metrics = new NetworkTargetGroupMetrics(this, this.targetGroupFullName, this.firstLoadBalancerFullName); + } + return this._metrics; } /** @@ -132,24 +205,20 @@ export class NetworkTargetGroup extends TargetGroupBase implements INetworkTarge * The number of targets that are considered healthy. * * @default Average over 5 minutes + * @deprecated Use ``NetworkTargetGroup.metrics.healthyHostCount`` instead */ public metricHealthyHostCount(props?: cloudwatch.MetricOptions) { - return this.metric('HealthyHostCount', { - statistic: 'Average', - ...props, - }); + return this.metrics.healthyHostCount(props); } /** * The number of targets that are considered unhealthy. * * @default Average over 5 minutes + * @deprecated Use ``NetworkTargetGroup.metrics.healthyHostCount`` instead */ public metricUnHealthyHostCount(props?: cloudwatch.MetricOptions) { - return this.metric('UnHealthyHostCount', { - statistic: 'Average', - ...props, - }); + return this.metrics.unHealthyHostCount(props); } /** @@ -167,11 +236,12 @@ export class NetworkTargetGroup extends TargetGroupBase implements INetworkTarge const healthCheck: HealthCheck = this.healthCheck || {}; - const allowedIntervals = [10, 30]; + const lowHealthCheckInterval = 5; + const highHealthCheckInterval = 300; if (healthCheck.interval) { const seconds = healthCheck.interval.toSeconds(); - if (!cdk.Token.isUnresolved(seconds) && !allowedIntervals.includes(seconds)) { - ret.push(`Health check interval '${seconds}' not supported. Must be one of the following values '${allowedIntervals.join(',')}'.`); + if (!cdk.Token.isUnresolved(seconds) && (seconds < lowHealthCheckInterval || seconds > highHealthCheckInterval)) { + ret.push(`Health check interval '${seconds}' not supported. Must be between ${lowHealthCheckInterval} and ${highHealthCheckInterval}.`); } } @@ -219,21 +289,17 @@ export class NetworkTargetGroup extends TargetGroupBase implements INetworkTarge return ret; } - - private metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { - return new cloudwatch.Metric({ - namespace: 'AWS/NetworkELB', - metricName, - dimensionsMap: { LoadBalancer: this.firstLoadBalancerFullName, TargetGroup: this.targetGroupFullName }, - ...props, - }).attachTo(this); - } } /** * A network target group */ export interface INetworkTargetGroup extends ITargetGroup { + /** + * All metrics available for this target group. + */ + readonly metrics: INetworkTargetGroupMetrics; + /** * Register a listener that is load balancing to this target group. * @@ -251,6 +317,26 @@ export interface INetworkTargetGroup extends ITargetGroup { * An imported network target group */ class ImportedNetworkTargetGroup extends ImportedTargetGroupBase implements INetworkTargetGroup { + private readonly _metrics?: INetworkTargetGroupMetrics; + + public constructor(scope: Construct, id: string, props: TargetGroupImportProps) { + super(scope, id, props); + if (this.loadBalancerArns != cdk.Aws.NO_VALUE) { + const targetGroupFullName = parseTargetGroupFullName(this.targetGroupArn); + const firstLoadBalancerFullName = parseLoadBalancerFullName(this.loadBalancerArns); + this._metrics = new NetworkTargetGroupMetrics(this, targetGroupFullName, firstLoadBalancerFullName); + } + } + + public get metrics(): INetworkTargetGroupMetrics { + if (!this._metrics) { + throw new Error( + 'The imported NetworkTargetGroup needs the associated NetworkLoadBalancer to be able to provide metrics. ' + + 'Please specify the ARN value when importing it.'); + } + return this._metrics; + } + public registerListener(_listener: INetworkListener) { // Nothing to do, we know nothing of our members } diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts index 54da8bbec4c0e..74fd910765b7b 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts @@ -74,8 +74,9 @@ export interface HealthCheck { /** * The approximate number of seconds between health checks for an individual target. + * Must be 5 to 300 seconds * - * @default Duration.seconds(30) + * @default 10 seconds if protocol is `GENEVE`, 35 seconds if target type is `lambda`, else 30 seconds */ readonly interval?: cdk.Duration; diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/util.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/util.ts index 518e0865161c9..b52d6ba09ea23 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/util.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/util.ts @@ -110,3 +110,21 @@ export function parseLoadBalancerFullName(arn: string): string { return resourceName; } } + +/** + * Transforms: + * + * arn:aws:elasticloadbalancing:us-east-1:123456789:targetgroup/my-target-group/da693d633af407a0 + * + * Into: + * + * targetgroup/my-target-group/da693d633af407a0 + */ +export function parseTargetGroupFullName(arn: string): string { + const arnComponents = Arn.split(arn, ArnFormat.NO_RESOURCE_NAME); + const resource = arnComponents.resource; + if (!resource) { + throw new Error(`Provided ARN does not belong to a target group: ${arn}`); + } + return resource; +} diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts index 838897fa5dfe1..025680b8ca1ad 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts @@ -645,14 +645,14 @@ describe('tests', () => { // WHEN const metrics = new Array(); - metrics.push(group.metricHttpCodeTarget(elbv2.HttpCodeTarget.TARGET_3XX_COUNT)); - metrics.push(group.metricIpv6RequestCount()); - metrics.push(group.metricUnhealthyHostCount()); - metrics.push(group.metricUnhealthyHostCount()); - metrics.push(group.metricRequestCount()); - metrics.push(group.metricTargetConnectionErrorCount()); - metrics.push(group.metricTargetResponseTime()); - metrics.push(group.metricTargetTLSNegotiationErrorCount()); + metrics.push(group.metrics.httpCodeTarget(elbv2.HttpCodeTarget.TARGET_3XX_COUNT)); + metrics.push(group.metrics.ipv6RequestCount()); + metrics.push(group.metrics.unhealthyHostCount()); + metrics.push(group.metrics.unhealthyHostCount()); + metrics.push(group.metrics.requestCount()); + metrics.push(group.metrics.targetConnectionErrorCount()); + metrics.push(group.metrics.targetResponseTime()); + metrics.push(group.metrics.targetTLSNegotiationErrorCount()); for (const metric of metrics) { expect(metric.namespace).toEqual('AWS/ApplicationELB'); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/target-group.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/target-group.test.ts index c11ce5a524a7f..33e31eb57e375 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/target-group.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/target-group.test.ts @@ -609,4 +609,38 @@ describe('tests', () => { }, }); }); + + test('imported targetGroup has metrics', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack'); + + // WHEN + const targetGroup = elbv2.ApplicationTargetGroup.fromTargetGroupAttributes(stack, 'importedTg', { + targetGroupArn: 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-target-group/50dc6c495c0c9188', + loadBalancerArns: 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/73e2d6bc24d8a067', + }); + + const metric = targetGroup.metrics.custom('MetricName'); + + // THEN + expect(metric.namespace).toEqual('AWS/ApplicationELB'); + expect(stack.resolve(metric.dimensions)).toEqual({ + LoadBalancer: 'app/my-load-balancer/73e2d6bc24d8a067', + TargetGroup: 'targetgroup/my-target-group/50dc6c495c0c9188', + }); + }); + + test('imported targetGroup without load balancer cannot have metrics', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack'); + + // WHEN + const targetGroup = elbv2.ApplicationTargetGroup.fromTargetGroupAttributes(stack, 'importedTg', { + targetGroupArn: 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-target-group/50dc6c495c0c9188', + }); + + expect(() => targetGroup.metrics.custom('MetricName')).toThrow(); + }); }); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-StackWithLb.assets.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-StackWithLb.assets.json index e830638335cf4..7422cdfc10c92 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-StackWithLb.assets.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-StackWithLb.assets.json @@ -1,7 +1,7 @@ { "version": "29.0.0", "files": { - "e24b7b4b9bebbe70e470dbe2c83f8f69c8338d37b258b8ebec384b51fd61536d": { + "6ad4c46c9b2688341a64b901149113b860270b54a02e718637959ebf672835b5": { "source": { "path": "aws-cdk-elbv2-StackWithLb.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "12345678-test-region": { "bucketName": "cdk-hnb659fds-assets-12345678-test-region", - "objectKey": "e24b7b4b9bebbe70e470dbe2c83f8f69c8338d37b258b8ebec384b51fd61536d.json", + "objectKey": "6ad4c46c9b2688341a64b901149113b860270b54a02e718637959ebf672835b5.json", "region": "test-region", "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-test-region" } diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-StackWithLb.template.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-StackWithLb.template.json index 4170f7e23915c..aae90c3d78bbc 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-StackWithLb.template.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-StackWithLb.template.json @@ -390,6 +390,40 @@ "VPCPublicSubnet2DefaultRouteB7481BBA", "VPCPublicSubnet2RouteTableAssociation5A808732" ] + }, + "LBListener49E825B4": { + "Type": "AWS::ElasticLoadBalancingV2::Listener", + "Properties": { + "DefaultActions": [ + { + "TargetGroupArn": { + "Ref": "LBListenerTargetGroupGroup07C223BF" + }, + "Type": "forward" + } + ], + "LoadBalancerArn": { + "Ref": "LB8A12904C" + }, + "Port": 443, + "Protocol": "TCP" + } + }, + "LBListenerTargetGroupGroup07C223BF": { + "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "Properties": { + "Port": 443, + "Protocol": "TCP", + "Targets": [ + { + "Id": "10.0.1.1" + } + ], + "TargetType": "ip", + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } } }, "Outputs": { @@ -401,6 +435,14 @@ "Name": "NlbArn" } }, + "TgArn": { + "Value": { + "Ref": "LBListenerTargetGroupGroup07C223BF" + }, + "Export": { + "Name": "TgArn" + } + }, "ExportsOutputRefLB8A12904C1150D6A6": { "Value": { "Ref": "LB8A12904C" @@ -408,6 +450,14 @@ "Export": { "Name": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLB8A12904C1150D6A6" } + }, + "ExportsOutputRefLBListenerTargetGroupGroup07C223BF73476D0D": { + "Value": { + "Ref": "LBListenerTargetGroupGroup07C223BF" + }, + "Export": { + "Name": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLBListenerTargetGroupGroup07C223BF73476D0D" + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-integ-StackUnderTest.assets.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-integ-StackUnderTest.assets.json index 37afa2c575793..d20ce25ee4927 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-integ-StackUnderTest.assets.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-integ-StackUnderTest.assets.json @@ -1,7 +1,7 @@ { "version": "29.0.0", "files": { - "e42d9c4a114328c16cb773781b2fee3cceeb499294ef3cb4f7a0aeafce947f13": { + "f26cf09b3a4b15b339d4d26f3d761938d15ff95bb2fce098b9559d13f55e6b94": { "source": { "path": "aws-cdk-elbv2-integ-StackUnderTest.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "12345678-test-region": { "bucketName": "cdk-hnb659fds-assets-12345678-test-region", - "objectKey": "e42d9c4a114328c16cb773781b2fee3cceeb499294ef3cb4f7a0aeafce947f13.json", + "objectKey": "f26cf09b3a4b15b339d4d26f3d761938d15ff95bb2fce098b9559d13f55e6b94.json", "region": "test-region", "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-test-region" } diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-integ-StackUnderTest.template.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-integ-StackUnderTest.template.json index 0356b00b65d81..5836bb7ada43c 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-integ-StackUnderTest.template.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/aws-cdk-elbv2-integ-StackUnderTest.template.json @@ -147,6 +147,190 @@ "Statistic": "Average", "Threshold": 0 } + }, + "TgByHardcodedArnHealthyHostCount433C0E6E": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "EvaluationPeriods": 1, + "Dimensions": [ + { + "Name": "LoadBalancer", + "Value": "net/my-load-balancer/50dc6c495c0c9188" + }, + { + "Name": "TargetGroup", + "Value": "targetgroup/my-target-group/50dc6c495c0c9188" + } + ], + "MetricName": "HealthyHostCount", + "Namespace": "AWS/NetworkELB", + "Period": 300, + "Statistic": "Average", + "Threshold": 0 + } + }, + "TgByCfnOutputsFromAnotherStackOutsideCdkHealthyHostCount3DA06734": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "EvaluationPeriods": 1, + "Dimensions": [ + { + "Name": "LoadBalancer", + "Value": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "NlbArn" + } + ] + } + ] + }, + "/", + { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "NlbArn" + } + ] + } + ] + }, + "/", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "NlbArn" + } + ] + } + ] + } + ] + ] + } + }, + { + "Name": "TargetGroup", + "Value": { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::ImportValue": "TgArn" + } + ] + } + ] + } + } + ], + "MetricName": "HealthyHostCount", + "Namespace": "AWS/NetworkELB", + "Period": 300, + "Statistic": "Average", + "Threshold": 0 + } + }, + "TgByCfnOutputsFromAnotherStackWithinCdkHealthyHostCountD4851E85": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "EvaluationPeriods": 1, + "Dimensions": [ + { + "Name": "LoadBalancer", + "Value": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLB8A12904C1150D6A6" + } + ] + } + ] + }, + "/", + { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLB8A12904C1150D6A6" + } + ] + } + ] + }, + "/", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLB8A12904C1150D6A6" + } + ] + } + ] + } + ] + ] + } + }, + { + "Name": "TargetGroup", + "Value": { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::ImportValue": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLBListenerTargetGroupGroup07C223BF73476D0D" + } + ] + } + ] + } + } + ], + "MetricName": "HealthyHostCount", + "Namespace": "AWS/NetworkELB", + "Period": 300, + "Statistic": "Average", + "Threshold": 0 + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/manifest.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/manifest.json index ecb92960fabc0..d524bd19d3da1 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/manifest.json @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-deploy-role-12345678-test-region", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-cfn-exec-role-12345678-test-region", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-test-region/e24b7b4b9bebbe70e470dbe2c83f8f69c8338d37b258b8ebec384b51fd61536d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-test-region/6ad4c46c9b2688341a64b901149113b860270b54a02e718637959ebf672835b5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -177,18 +177,42 @@ "data": "LB8A12904C" } ], + "/aws-cdk-elbv2-StackWithLb/LB/Listener/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LBListener49E825B4" + } + ], + "/aws-cdk-elbv2-StackWithLb/LB/Listener/TargetGroupGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LBListenerTargetGroupGroup07C223BF" + } + ], "/aws-cdk-elbv2-StackWithLb/NlbArn": [ { "type": "aws:cdk:logicalId", "data": "NlbArn" } ], + "/aws-cdk-elbv2-StackWithLb/TgArn": [ + { + "type": "aws:cdk:logicalId", + "data": "TgArn" + } + ], "/aws-cdk-elbv2-StackWithLb/Exports/Output{\"Ref\":\"LB8A12904C\"}": [ { "type": "aws:cdk:logicalId", "data": "ExportsOutputRefLB8A12904C1150D6A6" } ], + "/aws-cdk-elbv2-StackWithLb/Exports/Output{\"Ref\":\"LBListenerTargetGroupGroup07C223BF\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefLBListenerTargetGroupGroup07C223BF73476D0D" + } + ], "/aws-cdk-elbv2-StackWithLb/BootstrapVersion": [ { "type": "aws:cdk:logicalId", @@ -314,7 +338,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-deploy-role-12345678-test-region", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-cfn-exec-role-12345678-test-region", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-test-region/e42d9c4a114328c16cb773781b2fee3cceeb499294ef3cb4f7a0aeafce947f13.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-test-region/f26cf09b3a4b15b339d4d26f3d761938d15ff95bb2fce098b9559d13f55e6b94.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -349,6 +373,24 @@ "data": "NlbByCfnOutputsFromAnotherStackWithinCdkAlarmFlowCountD865DB84" } ], + "/aws-cdk-elbv2-integ-StackUnderTest/TgByHardcodedArn_HealthyHostCount/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TgByHardcodedArnHealthyHostCount433C0E6E" + } + ], + "/aws-cdk-elbv2-integ-StackUnderTest/TgByCfnOutputsFromAnotherStackOutsideCdk_HealthyHostCount/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TgByCfnOutputsFromAnotherStackOutsideCdkHealthyHostCount3DA06734" + } + ], + "/aws-cdk-elbv2-integ-StackUnderTest/TgByCfnOutputsFromAnotherStackWithinCdk_HealthyHostCount/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TgByCfnOutputsFromAnotherStackWithinCdkHealthyHostCountD4851E85" + } + ], "/aws-cdk-elbv2-integ-StackUnderTest/BootstrapVersion": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/tree.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/tree.json index 16876b01d13bb..bc368664df903 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.js.snapshot/tree.json @@ -656,6 +656,76 @@ "fqn": "@aws-cdk/aws-elasticloadbalancingv2.CfnLoadBalancer", "version": "0.0.0" } + }, + "Listener": { + "id": "Listener", + "path": "aws-cdk-elbv2-StackWithLb/LB/Listener", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-elbv2-StackWithLb/LB/Listener/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::Listener", + "aws:cdk:cloudformation:props": { + "defaultActions": [ + { + "type": "forward", + "targetGroupArn": { + "Ref": "LBListenerTargetGroupGroup07C223BF" + } + } + ], + "loadBalancerArn": { + "Ref": "LB8A12904C" + }, + "port": 443, + "protocol": "TCP" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.CfnListener", + "version": "0.0.0" + } + }, + "TargetGroupGroup": { + "id": "TargetGroupGroup", + "path": "aws-cdk-elbv2-StackWithLb/LB/Listener/TargetGroupGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-elbv2-StackWithLb/LB/Listener/TargetGroupGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "aws:cdk:cloudformation:props": { + "port": 443, + "protocol": "TCP", + "targets": [ + { + "id": "10.0.1.1" + } + ], + "targetType": "ip", + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.NetworkTargetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.NetworkListener", + "version": "0.0.0" + } } }, "constructInfo": { @@ -671,6 +741,14 @@ "version": "0.0.0" } }, + "TgArn": { + "id": "TgArn", + "path": "aws-cdk-elbv2-StackWithLb/TgArn", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, "Exports": { "id": "Exports", "path": "aws-cdk-elbv2-StackWithLb/Exports", @@ -682,6 +760,14 @@ "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" } + }, + "Output{\"Ref\":\"LBListenerTargetGroupGroup07C223BF\"}": { + "id": "Output{\"Ref\":\"LBListenerTargetGroupGroup07C223BF\"}", + "path": "aws-cdk-elbv2-StackWithLb/Exports/Output{\"Ref\":\"LBListenerTargetGroupGroup07C223BF\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1019,6 +1105,268 @@ "version": "0.0.0" } }, + "TgByHardcodedArn": { + "id": "TgByHardcodedArn", + "path": "aws-cdk-elbv2-integ-StackUnderTest/TgByHardcodedArn", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + }, + "TgByHardcodedArn_HealthyHostCount": { + "id": "TgByHardcodedArn_HealthyHostCount", + "path": "aws-cdk-elbv2-integ-StackUnderTest/TgByHardcodedArn_HealthyHostCount", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-elbv2-integ-StackUnderTest/TgByHardcodedArn_HealthyHostCount/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "comparisonOperator": "GreaterThanOrEqualToThreshold", + "evaluationPeriods": 1, + "dimensions": [ + { + "name": "LoadBalancer", + "value": "net/my-load-balancer/50dc6c495c0c9188" + }, + { + "name": "TargetGroup", + "value": "targetgroup/my-target-group/50dc6c495c0c9188" + } + ], + "metricName": "HealthyHostCount", + "namespace": "AWS/NetworkELB", + "period": 300, + "statistic": "Average", + "threshold": 0 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.Alarm", + "version": "0.0.0" + } + }, + "TgByCfnOutputsFromAnotherStackOutsideCdk": { + "id": "TgByCfnOutputsFromAnotherStackOutsideCdk", + "path": "aws-cdk-elbv2-integ-StackUnderTest/TgByCfnOutputsFromAnotherStackOutsideCdk", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + }, + "TgByCfnOutputsFromAnotherStackOutsideCdk_HealthyHostCount": { + "id": "TgByCfnOutputsFromAnotherStackOutsideCdk_HealthyHostCount", + "path": "aws-cdk-elbv2-integ-StackUnderTest/TgByCfnOutputsFromAnotherStackOutsideCdk_HealthyHostCount", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-elbv2-integ-StackUnderTest/TgByCfnOutputsFromAnotherStackOutsideCdk_HealthyHostCount/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "comparisonOperator": "GreaterThanOrEqualToThreshold", + "evaluationPeriods": 1, + "dimensions": [ + { + "name": "LoadBalancer", + "value": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "NlbArn" + } + ] + } + ] + }, + "/", + { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "NlbArn" + } + ] + } + ] + }, + "/", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "NlbArn" + } + ] + } + ] + } + ] + ] + } + }, + { + "name": "TargetGroup", + "value": { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::ImportValue": "TgArn" + } + ] + } + ] + } + } + ], + "metricName": "HealthyHostCount", + "namespace": "AWS/NetworkELB", + "period": 300, + "statistic": "Average", + "threshold": 0 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.Alarm", + "version": "0.0.0" + } + }, + "TgByCfnOutputsFromAnotherStackWithinCdk": { + "id": "TgByCfnOutputsFromAnotherStackWithinCdk", + "path": "aws-cdk-elbv2-integ-StackUnderTest/TgByCfnOutputsFromAnotherStackWithinCdk", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + }, + "TgByCfnOutputsFromAnotherStackWithinCdk_HealthyHostCount": { + "id": "TgByCfnOutputsFromAnotherStackWithinCdk_HealthyHostCount", + "path": "aws-cdk-elbv2-integ-StackUnderTest/TgByCfnOutputsFromAnotherStackWithinCdk_HealthyHostCount", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-elbv2-integ-StackUnderTest/TgByCfnOutputsFromAnotherStackWithinCdk_HealthyHostCount/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "comparisonOperator": "GreaterThanOrEqualToThreshold", + "evaluationPeriods": 1, + "dimensions": [ + { + "name": "LoadBalancer", + "value": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLB8A12904C1150D6A6" + } + ] + } + ] + }, + "/", + { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLB8A12904C1150D6A6" + } + ] + } + ] + }, + "/", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "/", + { + "Fn::ImportValue": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLB8A12904C1150D6A6" + } + ] + } + ] + } + ] + ] + } + }, + { + "name": "TargetGroup", + "value": { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::ImportValue": "aws-cdk-elbv2-StackWithLb:ExportsOutputRefLBListenerTargetGroupGroup07C223BF73476D0D" + } + ] + } + ] + } + } + ], + "metricName": "HealthyHostCount", + "namespace": "AWS/NetworkELB", + "period": 300, + "statistic": "Average", + "threshold": 0 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.Alarm", + "version": "0.0.0" + } + }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-cdk-elbv2-integ-StackUnderTest/BootstrapVersion", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.ts index ef5a0f7125ada..2bd2bbc8e1866 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb-lookup.ts @@ -22,10 +22,21 @@ const lb = new elbv2.NetworkLoadBalancer(stackWithLb, 'LB', { internetFacing: true, loadBalancerName: 'my-load-balancer', }); +const listener = lb.addListener('Listener', { + port: 443, +}); +const group = listener.addTargets('TargetGroup', { + port: 443, + targets: [new elbv2.IpTarget('10.0.1.1')], +}); new cdk.CfnOutput(stackWithLb, 'NlbArn', { value: lb.loadBalancerArn, exportName: 'NlbArn', }); +new cdk.CfnOutput(stackWithLb, 'TgArn', { + value: group.targetGroupArn, + exportName: 'TgArn', +}); const stackLookup = new IntegTestCaseStack(app, 'aws-cdk-elbv2-integ-StackUnderTest', { env: { @@ -34,6 +45,7 @@ const stackLookup = new IntegTestCaseStack(app, 'aws-cdk-elbv2-integ-StackUnderT }, }); +// Load Balancer const lbByHardcodedArn = elbv2.NetworkLoadBalancer.fromNetworkLoadBalancerAttributes(stackLookup, 'NlbByHardcodedArn', { loadBalancerArn: 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/network/my-load-balancer/50dc6c495c0c9188', }); @@ -58,6 +70,35 @@ lbByCfnOutputsFromAnotherStackWithinCdk.metrics.activeFlowCount().createAlarm(st threshold: 0, }); +// Target Group + +const tgByHardcodedArn = elbv2.NetworkTargetGroup.fromTargetGroupAttributes(stackLookup, 'TgByHardcodedArn', { + targetGroupArn: 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-target-group/50dc6c495c0c9188', + loadBalancerArns: 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/net/my-load-balancer/50dc6c495c0c9188', +}); +tgByHardcodedArn.metrics.healthyHostCount().createAlarm(stackLookup, 'TgByHardcodedArn_HealthyHostCount', { + evaluationPeriods: 1, + threshold: 0, +}); + +const tgByCfnOutputsFromAnotherStackOutsideCdk = elbv2.NetworkTargetGroup.fromTargetGroupAttributes(stackLookup, 'TgByCfnOutputsFromAnotherStackOutsideCdk', { + targetGroupArn: cdk.Fn.importValue('TgArn'), + loadBalancerArns: cdk.Fn.importValue('NlbArn'), +}); +tgByCfnOutputsFromAnotherStackOutsideCdk.metrics.healthyHostCount().createAlarm(stackLookup, 'TgByCfnOutputsFromAnotherStackOutsideCdk_HealthyHostCount', { + evaluationPeriods: 1, + threshold: 0, +}); + +const tgByCfnOutputsFromAnotherStackWithinCdk = elbv2.NetworkTargetGroup.fromTargetGroupAttributes(stackLookup, 'TgByCfnOutputsFromAnotherStackWithinCdk', { + targetGroupArn: group.targetGroupArn, + loadBalancerArns: lb.loadBalancerArn, +}); +tgByCfnOutputsFromAnotherStackWithinCdk.metrics.healthyHostCount().createAlarm(stackLookup, 'TgByCfnOutputsFromAnotherStackWithinCdk_HealthyHostCount', { + evaluationPeriods: 1, + threshold: 0, +}); + new integ.IntegTest(app, 'elbv2-integ', { testCases: [stackLookup], enableLookups: true, diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/aws-cdk-elbv2-integ.assets.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/aws-cdk-elbv2-integ.assets.json index ccd1c2a18d471..4ffdf7b55ca42 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/aws-cdk-elbv2-integ.assets.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/aws-cdk-elbv2-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { - "4ac709cf496678c5d2ee9fb122c995688f00a12297a81f2ecf125722d79e9bf4": { + "c7b59451188880618122593d9b5f98c0e30ff60bb10bb205c4c1a053fcdc4e79": { "source": { "path": "aws-cdk-elbv2-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4ac709cf496678c5d2ee9fb122c995688f00a12297a81f2ecf125722d79e9bf4.json", + "objectKey": "c7b59451188880618122593d9b5f98c0e30ff60bb10bb205c4c1a053fcdc4e79.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-elasticloadbalancingv2/test/integ.nlb.js.snapshot/aws-cdk-elbv2-integ.template.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/aws-cdk-elbv2-integ.template.json index 583a44b6994bc..2df03d9c09389 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/aws-cdk-elbv2-integ.template.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/aws-cdk-elbv2-integ.template.json @@ -439,6 +439,8 @@ "LBListenerTargetGroupF04FCF6D": { "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", "Properties": { + "HealthCheckIntervalSeconds": 250, + "HealthCheckProtocol": "TCP", "Port": 443, "Protocol": "TCP", "Targets": [ diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/cdk.out b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/elbv2integDefaultTestDeployAssert6120E394.assets.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/elbv2integDefaultTestDeployAssert6120E394.assets.json index a1f4f4025fa41..9a082228272cf 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/elbv2integDefaultTestDeployAssert6120E394.assets.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/elbv2integDefaultTestDeployAssert6120E394.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/integ.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/integ.json index fa7242b97d6be..21ebc6595531f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { "elbv2-integ/DefaultTest": { "stacks": [ "aws-cdk-elbv2-integ" ], - "assertionStack": "elbv2-integ/DefaultTest/DeployAssert" + "assertionStack": "elbv2-integ/DefaultTest/DeployAssert", + "assertionStackName": "elbv2integDefaultTestDeployAssert6120E394" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/manifest.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/manifest.json index 5378022e55ba1..d78508bf7c3ec 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "aws-cdk-elbv2-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}/4ac709cf496678c5d2ee9fb122c995688f00a12297a81f2ecf125722d79e9bf4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c7b59451188880618122593d9b5f98c0e30ff60bb10bb205c4c1a053fcdc4e79.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -256,6 +250,12 @@ ] }, "displayName": "elbv2-integ/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/tree.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/tree.json index ed32bd46f94fd..68ccca48ee73d 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.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-elbv2-integ": { "id": "aws-cdk-elbv2-integ", "path": "aws-cdk-elbv2-integ", @@ -91,8 +83,8 @@ "id": "Acl", "path": "aws-cdk-elbv2-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-elbv2-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-elbv2-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-elbv2-integ/VPC/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -732,6 +724,8 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::TargetGroup", "aws:cdk:cloudformation:props": { + "healthCheckIntervalSeconds": 250, + "healthCheckProtocol": "TCP", "port": 443, "protocol": "TCP", "targets": [ @@ -767,11 +761,27 @@ "fqn": "@aws-cdk/aws-elasticloadbalancingv2.NetworkLoadBalancer", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-elbv2-integ/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-elbv2-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } }, "elbv2-integ": { @@ -787,15 +797,33 @@ "path": "elbv2-integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.249" } }, "DeployAssert": { "id": "DeployAssert", "path": "elbv2-integ/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "elbv2-integ/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "elbv2-integ/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, @@ -809,11 +837,19 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } } }, "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-elasticloadbalancingv2/test/integ.nlb.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.ts index c6779b6d510f5..43e2e30ca572e 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.ts @@ -24,6 +24,11 @@ const group = listener.addTargets('Target', { targets: [new elbv2.IpTarget('10.0.1.1')], }); +group.configureHealthCheck({ + interval: cdk.Duration.seconds(250), + protocol: elbv2.Protocol.TCP, +}); + vpc.publicSubnets.forEach(subnet => group.node.addDependency(subnet)); group.node.addDependency(vpc.internetConnectivityEstablished); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts index f6c10da596916..886fd7a6a884c 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts @@ -307,12 +307,12 @@ describe('tests', () => { const targetGroup = listener.addTargets('ECS', { port: 80, healthCheck: { - interval: cdk.Duration.seconds(60), + interval: cdk.Duration.seconds(350), }, }); const validationErrors: string[] = targetGroup.node.validate(); - const intervalError = validationErrors.find((err) => /Health check interval '60' not supported. Must be one of the following values/.test(err)); + const intervalError = validationErrors.find((err) => /Health check interval '350' not supported. Must be between/.test(err)); expect(intervalError).toBeDefined(); }); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts index 6d94b4ee4d45e..8d705c7fee746 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts @@ -135,13 +135,13 @@ describe('tests', () => { vpc, port: 80, healthCheck: { - interval: cdk.Duration.seconds(5), + interval: cdk.Duration.seconds(3), }, }); expect(() => { app.synth(); - }).toThrow(/Health check interval '5' not supported. Must be one of the following values '10,30'./); + }).toThrow(/Health check interval '3' not supported. Must be between 5 and 300./); }); test('targetGroupName unallowed: more than 32 characters', () => { @@ -579,8 +579,8 @@ describe('tests', () => { // WHEN const metrics = new Array(); - metrics.push(targetGroup.metricHealthyHostCount()); - metrics.push(targetGroup.metricUnHealthyHostCount()); + metrics.push(targetGroup.metrics.healthyHostCount()); + metrics.push(targetGroup.metrics.unHealthyHostCount()); // THEN @@ -618,8 +618,8 @@ describe('tests', () => { }); // THEN - expect(() => targetGroup.metricHealthyHostCount()).toThrow(/The TargetGroup needs to be attached to a LoadBalancer/); - expect(() => targetGroup.metricUnHealthyHostCount()).toThrow(/The TargetGroup needs to be attached to a LoadBalancer/); + expect(() => targetGroup.metrics.healthyHostCount()).toThrow(/The TargetGroup needs to be attached to a LoadBalancer/); + expect(() => targetGroup.metrics.unHealthyHostCount()).toThrow(/The TargetGroup needs to be attached to a LoadBalancer/); }); test('imported targetGroup has targetGroupName', () => { @@ -682,4 +682,38 @@ describe('tests', () => { }, }); }); + + test('imported targetGroup has metrics', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack'); + + // WHEN + const targetGroup = elbv2.NetworkTargetGroup.fromTargetGroupAttributes(stack, 'importedTg', { + targetGroupArn: 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-target-group/50dc6c495c0c9188', + loadBalancerArns: 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/net/my-load-balancer/73e2d6bc24d8a067', + }); + + const metric = targetGroup.metrics.custom('MetricName'); + + // THEN + expect(metric.namespace).toEqual('AWS/NetworkELB'); + expect(stack.resolve(metric.dimensions)).toEqual({ + LoadBalancer: 'net/my-load-balancer/73e2d6bc24d8a067', + TargetGroup: 'targetgroup/my-target-group/50dc6c495c0c9188', + }); + }); + + test('imported targetGroup without load balancer cannot have metrics', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'Stack'); + + // WHEN + const targetGroup = elbv2.NetworkTargetGroup.fromTargetGroupAttributes(stack, 'importedTg', { + targetGroupArn: 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-target-group/50dc6c495c0c9188', + }); + + expect(() => targetGroup.metrics.custom('MetricName')).toThrow(); + }); }); diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index c78f874dfdf35..552362b73046c 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.1211.0", + "aws-sdk": "^2.1317.0", "aws-sdk-mock": "5.6.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-gamelift/package.json b/packages/@aws-cdk/aws-gamelift/package.json index e95c9897489de..05acd5fcb596d 100644 --- a/packages/@aws-cdk/aws-gamelift/package.json +++ b/packages/@aws-cdk/aws-gamelift/package.json @@ -84,7 +84,6 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/cx-api": "0.0.0", diff --git a/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json b/packages/@aws-cdk/aws-globalaccelerator-endpoints/package.json index 945f8cd6ea48d..2a9c7bac3b8e6 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.1211.0", + "aws-sdk": "^2.1317.0", "aws-sdk-mock": "5.6.0", "jest": "^27.5.1" }, diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index 3372f6f53fb5a..f42f7619e20d2 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -82,7 +82,6 @@ "devDependencies": { "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", - "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", diff --git a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/iamaccesskey1DefaultTestDeployAssert00360C89.assets.json b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/iamaccesskey1DefaultTestDeployAssert00360C89.assets.json new file mode 100644 index 0000000000000..ef00fa7cf9b2c --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/iamaccesskey1DefaultTestDeployAssert00360C89.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "iamaccesskey1DefaultTestDeployAssert00360C89.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-iam/test/integ.access-key.js.snapshot/iamaccesskey1DefaultTestDeployAssert00360C89.template.json b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/iamaccesskey1DefaultTestDeployAssert00360C89.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/iamaccesskey1DefaultTestDeployAssert00360C89.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-iam/test/integ.access-key.js.snapshot/integ-iam-access-key-1.assets.json b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/integ-iam-access-key-1.assets.json index 7c969e96846b0..73655fac16b11 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/integ-iam-access-key-1.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/integ-iam-access-key-1.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { "69e05eb7844cf593041f8404d87f7b0b4f0f71044f328c497d24f5dad7bae04c": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/integ.json index c2b14af654ed6..ffe98f64be74e 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { - "integ.access-key": { + "iam-access-key-1/DefaultTest": { "stacks": [ "integ-iam-access-key-1" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "iam-access-key-1/DefaultTest/DeployAssert", + "assertionStackName": "iamaccesskey1DefaultTestDeployAssert00360C89" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/manifest.json index 606d4642ab432..d071c7e7d2c22 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "integ-iam-access-key-1.assets": { "type": "cdk:asset-manifest", "properties": { @@ -71,6 +65,59 @@ ] }, "displayName": "integ-iam-access-key-1" + }, + "iamaccesskey1DefaultTestDeployAssert00360C89.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "iamaccesskey1DefaultTestDeployAssert00360C89.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "iamaccesskey1DefaultTestDeployAssert00360C89": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "iamaccesskey1DefaultTestDeployAssert00360C89.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": [ + "iamaccesskey1DefaultTestDeployAssert00360C89.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": [ + "iamaccesskey1DefaultTestDeployAssert00360C89.assets" + ], + "metadata": { + "/iam-access-key-1/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/iam-access-key-1/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "iam-access-key-1/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/tree.json index a38d1cb23d6a3..6df4d68722ef9 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.access-key.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.access-key.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-iam-access-key-1": { "id": "integ-iam-access-key-1", "path": "integ-iam-access-key-1", @@ -68,20 +60,98 @@ "id": "AccessKeyId", "path": "integ-iam-access-key-1/AccessKeyId", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-iam-access-key-1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-iam-access-key-1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" } } }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "iam-access-key-1": { + "id": "iam-access-key-1", + "path": "iam-access-key-1", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "iam-access-key-1/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "iam-access-key-1/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "iam-access-key-1/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "iam-access-key-1/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "iam-access-key-1/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.249" } } }, "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-iam/test/integ.access-key.ts b/packages/@aws-cdk/aws-iam/test/integ.access-key.ts index 65d229ed2b500..18c183b547d75 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.access-key.ts +++ b/packages/@aws-cdk/aws-iam/test/integ.access-key.ts @@ -1,4 +1,5 @@ import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import { AccessKey, User } from '../lib'; const app = new App(); @@ -9,4 +10,8 @@ const accessKey = new AccessKey(stack, 'TestAccessKey', { user }); new CfnOutput(stack, 'AccessKeyId', { value: accessKey.accessKeyId }); +new IntegTest(app, 'iam-access-key-1', { + testCases: [stack], +}); + app.synth(); diff --git a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/iam-integ-composite-principal.assets.json b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/iam-integ-composite-principal.assets.json index 63a6bb94f4518..0e559563d8568 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/iam-integ-composite-principal.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/iam-integ-composite-principal.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "3578a01f103e8c62fb5829a4bb0e5ee48141025197ba209fb3f42bb70e480a11": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.assets.json b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.assets.json new file mode 100644 index 0000000000000..0ad9dfc94836f --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.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-iam/test/integ.composite-principal.js.snapshot/iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.template.json b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.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-iam/test/integ.composite-principal.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/integ.json index 22d090d4e4a69..37b3ed3e3b44a 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { - "integ.composite-principal": { + "iam-integ-composite-principal-test/DefaultTest": { "stacks": [ "iam-integ-composite-principal" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "iam-integ-composite-principal-test/DefaultTest/DeployAssert", + "assertionStackName": "iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/manifest.json index 090c1a0c5c6e6..98d75ce569ca7 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "iam-integ-composite-principal.assets": { "type": "cdk:asset-manifest", "properties": { @@ -59,6 +53,59 @@ ] }, "displayName": "iam-integ-composite-principal" + }, + "iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.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": [ + "iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.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": [ + "iamintegcompositeprincipaltestDefaultTestDeployAssertDD256D71.assets" + ], + "metadata": { + "/iam-integ-composite-principal-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/iam-integ-composite-principal-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "iam-integ-composite-principal-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/tree.json index 4d4353b6b660d..58eceab486891 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.js.snapshot/tree.json @@ -4,14 +4,6 @@ "id": "App", "path": "", "children": { - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.123" - } - }, "iam-integ-composite-principal": { "id": "iam-integ-composite-principal", "path": "iam-integ-composite-principal", @@ -20,6 +12,14 @@ "id": "RoleWithCompositePrincipal", "path": "iam-integ-composite-principal/RoleWithCompositePrincipal", "children": { + "ImportRoleWithCompositePrincipal": { + "id": "ImportRoleWithCompositePrincipal", + "path": "iam-integ-composite-principal/RoleWithCompositePrincipal/ImportRoleWithCompositePrincipal", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "iam-integ-composite-principal/RoleWithCompositePrincipal/Resource", @@ -51,12 +51,90 @@ "fqn": "@aws-cdk/aws-iam.Role", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "iam-integ-composite-principal/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "iam-integ-composite-principal/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { "fqn": "@aws-cdk/core.Stack", "version": "0.0.0" } + }, + "iam-integ-composite-principal-test": { + "id": "iam-integ-composite-principal-test", + "path": "iam-integ-composite-principal-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "iam-integ-composite-principal-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "iam-integ-composite-principal-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "iam-integ-composite-principal-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "iam-integ-composite-principal-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "iam-integ-composite-principal-test/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.249" + } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.ts b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.ts index b13fd86804547..a72c20be1dc00 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.composite-principal.ts +++ b/packages/@aws-cdk/aws-iam/test/integ.composite-principal.ts @@ -1,4 +1,5 @@ import * as cdk from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import * as iam from '../lib'; class TestStack extends cdk.Stack { @@ -16,6 +17,8 @@ class TestStack extends cdk.Stack { const app = new cdk.App(); -new TestStack(app, 'iam-integ-composite-principal'); +new IntegTest(app, 'iam-integ-composite-principal-test', { + testCases: [new TestStack(app, 'iam-integ-composite-principal')], +}); app.synth(); diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/__entrypoint__.js b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/__entrypoint__.js deleted file mode 100644 index 9df94382cc74e..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/__entrypoint__.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = exports.external = void 0; -const https = require("https"); -const url = require("url"); -// for unit tests -exports.external = { - sendHttpRequest: defaultSendHttpRequest, - log: defaultLog, - includeStackTraces: true, - userHandlerIndex: './index', -}; -const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; -const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; -async function handler(event, context) { - const sanitizedEvent = { ...event, ResponseURL: '...' }; - exports.external.log(JSON.stringify(sanitizedEvent, undefined, 2)); - // ignore DELETE event when the physical resource ID is the marker that - // indicates that this DELETE is a subsequent DELETE to a failed CREATE - // operation. - if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { - exports.external.log('ignoring DELETE event caused by a failed CREATE event'); - await submitResponse('SUCCESS', event); - return; - } - try { - // invoke the user handler. this is intentionally inside the try-catch to - // ensure that if there is an error it's reported as a failure to - // cloudformation (otherwise cfn waits). - // eslint-disable-next-line @typescript-eslint/no-require-imports - const userHandler = require(exports.external.userHandlerIndex).handler; - const result = await userHandler(sanitizedEvent, context); - // validate user response and create the combined event - const responseEvent = renderResponse(event, result); - // submit to cfn as success - await submitResponse('SUCCESS', responseEvent); - } - catch (e) { - const resp = { - ...event, - Reason: exports.external.includeStackTraces ? e.stack : e.message, - }; - if (!resp.PhysicalResourceId) { - // special case: if CREATE fails, which usually implies, we usually don't - // have a physical resource id. in this case, the subsequent DELETE - // operation does not have any meaning, and will likely fail as well. to - // address this, we use a marker so the provider framework can simply - // ignore the subsequent DELETE. - if (event.RequestType === 'Create') { - exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); - resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; - } - else { - // otherwise, if PhysicalResourceId is not specified, something is - // terribly wrong because all other events should have an ID. - exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); - } - } - // this is an actual error, fail the activity altogether and exist. - await submitResponse('FAILED', resp); - } -} -exports.handler = handler; -function renderResponse(cfnRequest, handlerResponse = {}) { - // if physical ID is not returned, we have some defaults for you based - // on the request type. - const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; - // if we are in DELETE and physical ID was changed, it's an error. - if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { - throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); - } - // merge request event and result event (result prevails). - return { - ...cfnRequest, - ...handlerResponse, - PhysicalResourceId: physicalResourceId, - }; -} -async function submitResponse(status, event) { - const json = { - Status: status, - Reason: event.Reason ?? status, - StackId: event.StackId, - RequestId: event.RequestId, - PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, - LogicalResourceId: event.LogicalResourceId, - NoEcho: event.NoEcho, - Data: event.Data, - }; - exports.external.log('submit response to cloudformation', json); - const responseBody = JSON.stringify(json); - const parsedUrl = url.parse(event.ResponseURL); - const req = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { 'content-type': '', 'content-length': responseBody.length }, - }; - await exports.external.sendHttpRequest(req, responseBody); -} -async function defaultSendHttpRequest(options, responseBody) { - return new Promise((resolve, reject) => { - try { - const request = https.request(options, _ => resolve()); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); -} -function defaultLog(fmt, ...params) { - // eslint-disable-next-line no-console - console.log(fmt, ...params); -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLFNBQVM7Q0FDNUIsQ0FBQztBQUVGLE1BQU0sZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDbEcsTUFBTSwwQkFBMEIsR0FBRyw4RE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bnQuUmVzcG9uc2VVUkwpO1xuICBjb25zdCByZXEgPSB7XG4gICAgaG9zdG5hbWU6IHBhcnNlZFVybC5ob3N0bmFtZSxcbiAgICBwYXRoOiBwYXJzZWRVcmwucGF0aCxcbiAgICBtZXRob2Q6ICdQVVQnLFxuICAgIGhlYWRlcnM6IHsgJ2NvbnRlbnQtdHlwZSc6ICcnLCAnY29udGVudC1sZW5ndGgnOiByZXNwb25zZUJvZHkubGVuZ3RoIH0sXG4gIH07XG5cbiAgYXdhaXQgZXh0ZXJuYWwuc2VuZEh0dHBSZXF1ZXN0KHJlcSwgcmVzcG9uc2VCb2R5KTtcbn1cblxuYXN5bmMgZnVuY3Rpb24gZGVmYXVsdFNlbmRIdHRwUmVxdWVzdChvcHRpb25zOiBodHRwcy5SZXF1ZXN0T3B0aW9ucywgcmVzcG9uc2VCb2R5OiBzdHJpbmcpOiBQcm9taXNlPHZvaWQ+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICB0cnkge1xuICAgICAgY29uc3QgcmVxdWVzdCA9IGh0dHBzLnJlcXVlc3Qob3B0aW9ucywgXyA9PiByZXNvbHZlKCkpO1xuICAgICAgcmVxdWVzdC5vbignZXJyb3InLCByZWplY3QpO1xuICAgICAgcmVxdWVzdC53cml0ZShyZXNwb25zZUJvZHkpO1xuICAgICAgcmVxdWVzdC5lbmQoKTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZWplY3QoZSk7XG4gICAgfVxuICB9KTtcbn1cblxuZnVuY3Rpb24gZGVmYXVsdExvZyhmbXQ6IHN0cmluZywgLi4ucGFyYW1zOiBhbnlbXSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tY29uc29sZVxuICBjb25zb2xlLmxvZyhmbXQsIC4uLnBhcmFtcyk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/consts.d.ts b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/consts.d.ts deleted file mode 100644 index 35c3d8f5c637f..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/consts.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Supported resource type. - */ -export declare const enum CfnUtilsResourceType { - /** - * CfnJson - */ - CFN_JSON = "Custom::AWSCDKCfnJson", - /** - * CfnJsonStringify - */ - CFN_JSON_STRINGIFY = "Custom::AWSCDKCfnJsonStringify" -} diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/consts.ts b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/consts.ts deleted file mode 100644 index 9718dcef40645..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/consts.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Supported resource type. - */ -export const enum CfnUtilsResourceType { - /** - * CfnJson - */ - CFN_JSON = 'Custom::AWSCDKCfnJson', - - /** - * CfnJsonStringify - */ - CFN_JSON_STRINGIFY = 'Custom::AWSCDKCfnJsonStringify', -} diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/index.d.ts b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/index.d.ts deleted file mode 100644 index b228aec7fd8cc..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Parses the value of "Value" and reflects it back as attribute. - */ -export declare function handler(event: AWSLambda.CloudFormationCustomResourceEvent): Promise<{ - Data: { - Value: any; - }; -}>; diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/index.ts b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/index.ts deleted file mode 100644 index f082001f80159..0000000000000 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { CfnUtilsResourceType } from './consts'; - -/** - * Parses the value of "Value" and reflects it back as attribute. - */ -export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent) { - - // dispatch based on resource type - if (event.ResourceType === CfnUtilsResourceType.CFN_JSON) { - return cfnJsonHandler(event); - } - if (event.ResourceType === CfnUtilsResourceType.CFN_JSON_STRINGIFY) { - return cfnJsonStringifyHandler(event); - } - - throw new Error(`unexpected resource type "${event.ResourceType}`); -} - -function cfnJsonHandler(event: AWSLambda.CloudFormationCustomResourceEvent) { - return { - Data: { - Value: JSON.parse(event.ResourceProperties.Value), - }, - }; -} - -function cfnJsonStringifyHandler(event: AWSLambda.CloudFormationCustomResourceEvent) { - return { - Data: { - Value: JSON.stringify(event.ResourceProperties.Value), - }, - }; -} diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057/__entrypoint__.js b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a/__entrypoint__.js similarity index 100% rename from packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057/__entrypoint__.js rename to packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a/__entrypoint__.js diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/consts.js b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a/consts.js similarity index 100% rename from packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/consts.js rename to packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a/consts.js diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/index.js b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a/index.js similarity index 100% rename from packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/index.js rename to packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/asset.f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a/index.js diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.assets.json b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.assets.json new file mode 100644 index 0000000000000..ef0463c3cf2f6 --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.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-iam/test/integ.condition-with-ref.js.snapshot/iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.template.json b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.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-iam/test/integ.condition-with-ref.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/integ.json index 8497cee70d57d..5fd388e21a7cf 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { - "integ.condition-with-ref": { + "iam-test-condition-with-ref/DefaultTest": { "stacks": [ "test-condition-with-ref" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "iam-test-condition-with-ref/DefaultTest/DeployAssert", + "assertionStackName": "iamtestconditionwithrefDefaultTestDeployAssert5E44A64B" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/manifest.json index 416f3088f41d9..c95ca1cd7d4bc 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "test-condition-with-ref.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}/d2e1ae61106bac62a68018345d07701a847f8c2b9ba0c534ab18041c395cc16b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/edccf132e3a9b66cdeabc4aff2caa02f91ac0de6ca0ecd9f1480461766e3d8ef.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -83,6 +77,59 @@ ] }, "displayName": "test-condition-with-ref" + }, + "iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "iamtestconditionwithrefDefaultTestDeployAssert5E44A64B": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.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": [ + "iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.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": [ + "iamtestconditionwithrefDefaultTestDeployAssert5E44A64B.assets" + ], + "metadata": { + "/iam-test-condition-with-ref/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/iam-test-condition-with-ref/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "iam-test-condition-with-ref/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/test-condition-with-ref.assets.json b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/test-condition-with-ref.assets.json index e25198d738d79..48b47aee6925f 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/test-condition-with-ref.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/test-condition-with-ref.assets.json @@ -1,20 +1,20 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { - "2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2": { + "f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a": { "source": { - "path": "asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2", + "path": "asset.f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2.zip", + "objectKey": "f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "d2e1ae61106bac62a68018345d07701a847f8c2b9ba0c534ab18041c395cc16b": { + "edccf132e3a9b66cdeabc4aff2caa02f91ac0de6ca0ecd9f1480461766e3d8ef": { "source": { "path": "test-condition-with-ref.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d2e1ae61106bac62a68018345d07701a847f8c2b9ba0c534ab18041c395cc16b.json", + "objectKey": "edccf132e3a9b66cdeabc4aff2caa02f91ac0de6ca0ecd9f1480461766e3d8ef.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-iam/test/integ.condition-with-ref.js.snapshot/test-condition-with-ref.template.json b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/test-condition-with-ref.template.json index 67623496d20f0..39492d49c802c 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/test-condition-with-ref.template.json +++ b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/test-condition-with-ref.template.json @@ -65,7 +65,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2.zip" + "S3Key": "f4599f463f56c5c9d584a8aca5b607b7bb0cead0b089b8ccd66b69f00b5ee98a.zip" }, "Timeout": 900, "MemorySize": 128, diff --git a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/tree.json index 8398bd4f61a14..641943d78b737 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.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" - } - }, "test-condition-with-ref": { "id": "test-condition-with-ref", "path": "test-condition-with-ref", @@ -20,8 +12,8 @@ "id": "PrincipalTag", "path": "test-condition-with-ref/PrincipalTag", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" } }, "PrincipalTagCondition": { @@ -36,20 +28,20 @@ "id": "Default", "path": "test-condition-with-ref/PrincipalTagCondition/Resource/Default", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnJson", + "version": "0.0.0" } }, "AWSCDKCfnUtilsProviderCustomResourceProvider": { @@ -60,36 +52,44 @@ "id": "Staging", "path": "test-condition-with-ref/AWSCDKCfnUtilsProviderCustomResourceProvider/Staging", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" } }, "Role": { "id": "Role", "path": "test-condition-with-ref/AWSCDKCfnUtilsProviderCustomResourceProvider/Role", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" } }, "Handler": { "id": "Handler", "path": "test-condition-with-ref/AWSCDKCfnUtilsProviderCustomResourceProvider/Handler", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CustomResourceProvider", + "version": "0.0.0" } }, "MyRole": { "id": "MyRole", "path": "test-condition-with-ref/MyRole", "children": { + "ImportMyRole": { + "id": "ImportMyRole", + "path": "test-condition-with-ref/MyRole/ImportMyRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "test-condition-with-ref/MyRole/Resource", @@ -143,17 +143,95 @@ "fqn": "@aws-cdk/aws-iam.Role", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "test-condition-with-ref/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "test-condition-with-ref/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "iam-test-condition-with-ref": { + "id": "iam-test-condition-with-ref", + "path": "iam-test-condition-with-ref", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "iam-test-condition-with-ref/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "iam-test-condition-with-ref/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "iam-test-condition-with-ref/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "iam-test-condition-with-ref/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "iam-test-condition-with-ref/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.249" } } }, "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-iam/test/integ.condition-with-ref.ts b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.ts index b9a7c77c397a0..a6b66b8c0a419 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.ts +++ b/packages/@aws-cdk/aws-iam/test/integ.condition-with-ref.ts @@ -1,4 +1,5 @@ import { App, CfnJson, CfnParameter, Stack } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import { Construct } from 'constructs'; import { AccountRootPrincipal, Role } from '../lib'; @@ -23,5 +24,8 @@ class MyStack extends Stack { } const app = new App(); -new MyStack(app, 'test-condition-with-ref'); +new IntegTest(app, 'iam-test-condition-with-ref', { + testCases: [new MyStack(app, 'test-condition-with-ref')], +}) +; app.synth(); diff --git a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/iamrole1DefaultTestDeployAssertC34A70B7.assets.json b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/iamrole1DefaultTestDeployAssertC34A70B7.assets.json new file mode 100644 index 0000000000000..5d6fc8cc2fedb --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/iamrole1DefaultTestDeployAssertC34A70B7.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "iamrole1DefaultTestDeployAssertC34A70B7.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-iam/test/integ.group.js.snapshot/iamrole1DefaultTestDeployAssertC34A70B7.template.json b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/iamrole1DefaultTestDeployAssertC34A70B7.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/iamrole1DefaultTestDeployAssertC34A70B7.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-iam/test/integ.group.js.snapshot/integ-iam-role-1.assets.json b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/integ-iam-role-1.assets.json index 349769be817de..991c1c3ab6215 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/integ-iam-role-1.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/integ-iam-role-1.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { "99b010bd74243a5c7fc3fe4f0861127e62239193f1706349d5e1cc8bede9b752": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/integ.json index f40a5241281e9..74b6a92333d54 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { - "integ.group": { + "iam-role-1/DefaultTest": { "stacks": [ "integ-iam-role-1" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "iam-role-1/DefaultTest/DeployAssert", + "assertionStackName": "iamrole1DefaultTestDeployAssertC34A70B7" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/manifest.json index 48f4a471f3000..249740932ac5f 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "integ-iam-role-1.assets": { "type": "cdk:asset-manifest", "properties": { @@ -59,6 +53,59 @@ ] }, "displayName": "integ-iam-role-1" + }, + "iamrole1DefaultTestDeployAssertC34A70B7.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "iamrole1DefaultTestDeployAssertC34A70B7.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "iamrole1DefaultTestDeployAssertC34A70B7": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "iamrole1DefaultTestDeployAssertC34A70B7.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": [ + "iamrole1DefaultTestDeployAssertC34A70B7.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": [ + "iamrole1DefaultTestDeployAssertC34A70B7.assets" + ], + "metadata": { + "/iam-role-1/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/iam-role-1/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "iam-role-1/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/tree.json index 7f19d82feb41e..79521051c835e 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.group.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.group.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-iam-role-1": { "id": "integ-iam-role-1", "path": "integ-iam-role-1", @@ -37,17 +29,95 @@ "fqn": "@aws-cdk/aws-iam.Group", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-iam-role-1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-iam-role-1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "iam-role-1": { + "id": "iam-role-1", + "path": "iam-role-1", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "iam-role-1/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "iam-role-1/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "iam-role-1/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "iam-role-1/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "iam-role-1/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.249" } } }, "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-iam/test/integ.group.ts b/packages/@aws-cdk/aws-iam/test/integ.group.ts index 97abbcc20bc8f..d3a45d42f7af4 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.group.ts +++ b/packages/@aws-cdk/aws-iam/test/integ.group.ts @@ -1,6 +1,7 @@ // Creates a default group, with no users and no policy attached. import { App, Stack } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import { Group } from '../lib'; const app = new App(); @@ -9,4 +10,8 @@ const stack = new Stack(app, 'integ-iam-role-1'); new Group(stack, 'MyGroup'); +new IntegTest(app, 'iam-role-1', { + testCases: [stack], +}); + app.synth(); diff --git a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/ImportedRoleTestAssertions.assets.json b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/ImportedRoleTestAssertions.assets.json index 132a4a3d0916d..a09f9d76dcb10 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/ImportedRoleTestAssertions.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/ImportedRoleTestAssertions.assets.json @@ -1,20 +1,20 @@ { - "version": "22.0.0", + "version": "30.0.0", "files": { - "278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4": { + "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": { "source": { - "path": "asset.278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.bundle", + "path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.zip", + "objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "6c95040b749f0a6e445ac1d86a50fe23443fed7e9a575f80f81c4cc2cea7e1d9": { + "b02399aa2549e4c2298f2f5dff33c108576e084bad5ea80f2e95e8693ff7394b": { "source": { "path": "ImportedRoleTestAssertions.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6c95040b749f0a6e445ac1d86a50fe23443fed7e9a575f80f81c4cc2cea7e1d9.json", + "objectKey": "b02399aa2549e4c2298f2f5dff33c108576e084bad5ea80f2e95e8693ff7394b.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-iam/test/integ.imported-role.js.snapshot/ImportedRoleTestAssertions.template.json b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/ImportedRoleTestAssertions.template.json index e835a7ef27a06..73ceb14830031 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/ImportedRoleTestAssertions.template.json +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/ImportedRoleTestAssertions.template.json @@ -22,7 +22,7 @@ "outputPaths": [ "PolicyNames.1" ], - "salt": "1672854356196" + "salt": "1676338905652" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -76,7 +76,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.handler", diff --git a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/asset.278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.bundle/index.js b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js similarity index 86% rename from packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/asset.278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.bundle/index.js rename to packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js index 2bf09d6726a42..58bcb1ef7f38e 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/asset.278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.bundle/index.js +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.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,6 +38,9 @@ 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; } @@ -49,9 +56,16 @@ var MatchResult = class { 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); @@ -65,18 +79,26 @@ var MatchResult = class { 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; @@ -89,6 +111,10 @@ var MatchResult = class { }); return this; } + /** + * Prepare the result to be analyzed. + * This API *must* be called prior to analyzing these results. + */ finished() { if (this.finalized) { return this; @@ -99,6 +125,13 @@ 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() { const failures = new Array(); debugger; @@ -120,6 +153,9 @@ var MatchResult = class { } } } + /** + * Do a deep render of the match result, showing the structure mismatches in context + */ renderMismatch() { if (!this.hasFailed()) { return ""; @@ -249,6 +285,9 @@ ${indents.join("")}`)); 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) { @@ -342,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); } @@ -484,6 +564,7 @@ var ArrayMatch = class extends Matcher { 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); @@ -495,6 +576,7 @@ var ArrayMatch = class extends Matcher { message: `Could not match arrayWith pattern ${patternIdx}. This is the closest match`, path: [`${index}`], cost: 0 + // Informational message }); result.compose(`${index}`, innerResult); } else { @@ -675,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) { @@ -696,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); @@ -707,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(); @@ -799,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) { @@ -948,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-iam/test/integ.imported-role.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/cdk.out index 145739f539580..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"22.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-1.assets.json b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-1.assets.json index 34650844ff5e1..0c7d0de595dea 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-1.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-1.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "files": { "3ce372792569a275a71c24c1e1645b0f27cb8538ee021ce2caffe07656ae446d": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-2.assets.json b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-2.assets.json index e9b9716cbb9bc..db5f3067364e4 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-2.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-2.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "files": { "5413ae0cf6f5eec97328e96b0f55acbf8a5b845a89fa55f073f7c4e355cd6a4c": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-role-stack.assets.json b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-role-stack.assets.json index 9bf3f1b6d4078..7338d9077c077 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-role-stack.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ-iam-imported-role-role-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "files": { "b0edbe674c841e0fab8222890e60faa33a2035d5cf26ebd4495e2c26ec1b7e9e": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ.json index 86b57b17980a9..a543ff222c763 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "testCases": { "ImportedRoleTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/manifest.json index 602f478984ca4..25aa4ba9b5f74 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "artifacts": { "integ-iam-imported-role-role-stack.assets": { "type": "cdk:asset-manifest", @@ -185,7 +185,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}/6c95040b749f0a6e445ac1d86a50fe23443fed7e9a575f80f81c4cc2cea7e1d9.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b02399aa2549e4c2298f2f5dff33c108576e084bad5ea80f2e95e8693ff7394b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/tree.json index d8d604e85f3e9..c01dfcb6e80c4 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.imported-role.js.snapshot/tree.json @@ -66,7 +66,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.249" } }, "BootstrapVersion": { @@ -258,7 +258,7 @@ "path": "ImportedRoleTestAssertions/AwsApiCallIAMlistRolePolicies/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.249" } } }, @@ -330,7 +330,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.249" } }, "BootstrapVersion": { @@ -368,7 +368,7 @@ "path": "ImportedRoleTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.249" } } }, @@ -388,7 +388,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.249" } } }, diff --git a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/ManagedPolicyIntegDefaultTestDeployAssert27007DC6.assets.json b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/ManagedPolicyIntegDefaultTestDeployAssert27007DC6.assets.json index f89489c6f3c67..6cb98bc62c137 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/ManagedPolicyIntegDefaultTestDeployAssert27007DC6.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/ManagedPolicyIntegDefaultTestDeployAssert27007DC6.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/aws-cdk-iam-managed-policy.assets.json b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/aws-cdk-iam-managed-policy.assets.json index 01d6e9e7b41fe..cbfa28341b318 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/aws-cdk-iam-managed-policy.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/aws-cdk-iam-managed-policy.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "df45fa697f19036987d5bfe10fdcfba6de6d5d93be8e406edfc43fcc13fedc33": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/integ.json index 93febf67f8ef7..07a2bb95c178f 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "ManagedPolicyInteg/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/manifest.json index e3d71b2ae9d91..c26d78c144695 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "aws-cdk-iam-managed-policy.assets": { "type": "cdk:asset-manifest", "properties": { @@ -124,6 +118,12 @@ ] }, "displayName": "ManagedPolicyInteg/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/tree.json index 55254491202f6..df0dd5a3a5487 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.managed-policy.js.snapshot/tree.json @@ -4,14 +4,6 @@ "id": "App", "path": "", "children": { - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.140" - } - }, "aws-cdk-iam-managed-policy": { "id": "aws-cdk-iam-managed-policy", "path": "aws-cdk-iam-managed-policy", @@ -60,6 +52,14 @@ "id": "OneManagedPolicy", "path": "aws-cdk-iam-managed-policy/OneManagedPolicy", "children": { + "ImportedOneManagedPolicy": { + "id": "ImportedOneManagedPolicy", + "path": "aws-cdk-iam-managed-policy/OneManagedPolicy/ImportedOneManagedPolicy", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-iam-managed-policy/OneManagedPolicy/Resource", @@ -111,6 +111,14 @@ "id": "TwoManagedPolicy", "path": "aws-cdk-iam-managed-policy/TwoManagedPolicy", "children": { + "ImportedTwoManagedPolicy": { + "id": "ImportedTwoManagedPolicy", + "path": "aws-cdk-iam-managed-policy/TwoManagedPolicy/ImportedTwoManagedPolicy", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-iam-managed-policy/TwoManagedPolicy/Resource", @@ -156,6 +164,14 @@ "id": "Role", "path": "aws-cdk-iam-managed-policy/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-cdk-iam-managed-policy/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-iam-managed-policy/Role/Resource", @@ -201,11 +217,27 @@ "fqn": "@aws-cdk/aws-iam.Role", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-iam-managed-policy/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-iam-managed-policy/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.140" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } }, "ManagedPolicyInteg": { @@ -221,15 +253,33 @@ "path": "ManagedPolicyInteg/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.249" } }, "DeployAssert": { "id": "DeployAssert", "path": "ManagedPolicyInteg/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "ManagedPolicyInteg/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "ManagedPolicyInteg/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.140" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, @@ -243,11 +293,19 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.140" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/__entrypoint__.js b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/__entrypoint__.js new file mode 100644 index 0000000000000..1e3a3093c1706 --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/__entrypoint__.js @@ -0,0 +1,144 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withRetries = exports.handler = exports.external = void 0; +const https = require("https"); +const url = require("url"); +// for unit tests +exports.external = { + sendHttpRequest: defaultSendHttpRequest, + log: defaultLog, + includeStackTraces: true, + userHandlerIndex: './index', +}; +const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; +const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; +async function handler(event, context) { + const sanitizedEvent = { ...event, ResponseURL: '...' }; + exports.external.log(JSON.stringify(sanitizedEvent, undefined, 2)); + // ignore DELETE event when the physical resource ID is the marker that + // indicates that this DELETE is a subsequent DELETE to a failed CREATE + // operation. + if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { + exports.external.log('ignoring DELETE event caused by a failed CREATE event'); + await submitResponse('SUCCESS', event); + return; + } + try { + // invoke the user handler. this is intentionally inside the try-catch to + // ensure that if there is an error it's reported as a failure to + // cloudformation (otherwise cfn waits). + // eslint-disable-next-line @typescript-eslint/no-require-imports + const userHandler = require(exports.external.userHandlerIndex).handler; + const result = await userHandler(sanitizedEvent, context); + // validate user response and create the combined event + const responseEvent = renderResponse(event, result); + // submit to cfn as success + await submitResponse('SUCCESS', responseEvent); + } + catch (e) { + const resp = { + ...event, + Reason: exports.external.includeStackTraces ? e.stack : e.message, + }; + if (!resp.PhysicalResourceId) { + // special case: if CREATE fails, which usually implies, we usually don't + // have a physical resource id. in this case, the subsequent DELETE + // operation does not have any meaning, and will likely fail as well. to + // address this, we use a marker so the provider framework can simply + // ignore the subsequent DELETE. + if (event.RequestType === 'Create') { + exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); + resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; + } + else { + // otherwise, if PhysicalResourceId is not specified, something is + // terribly wrong because all other events should have an ID. + exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); + } + } + // this is an actual error, fail the activity altogether and exist. + await submitResponse('FAILED', resp); + } +} +exports.handler = handler; +function renderResponse(cfnRequest, handlerResponse = {}) { + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...handlerResponse, + PhysicalResourceId: physicalResourceId, + }; +} +async function submitResponse(status, event) { + const json = { + Status: status, + Reason: event.Reason ?? status, + StackId: event.StackId, + RequestId: event.RequestId, + PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, + LogicalResourceId: event.LogicalResourceId, + NoEcho: event.NoEcho, + Data: event.Data, + }; + exports.external.log('submit response to cloudformation', json); + const responseBody = JSON.stringify(json); + const parsedUrl = url.parse(event.ResponseURL); + const req = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { 'content-type': '', 'content-length': responseBody.length }, + }; + const retryOptions = { + attempts: 5, + sleep: 1000, + }; + await withRetries(retryOptions, exports.external.sendHttpRequest)(req, responseBody); +} +async function defaultSendHttpRequest(options, responseBody) { + return new Promise((resolve, reject) => { + try { + const request = https.request(options, _ => resolve()); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); +} +function defaultLog(fmt, ...params) { + // eslint-disable-next-line no-console + console.log(fmt, ...params); +} +function withRetries(options, fn) { + return async (...xs) => { + let attempts = options.attempts; + let ms = options.sleep; + while (true) { + try { + return await fn(...xs); + } + catch (e) { + if (attempts-- <= 0) { + throw e; + } + await sleep(Math.floor(Math.random() * ms)); + ms *= 2; + } + } + }; +} +exports.withRetries = withRetries; +async function sleep(ms) { + return new Promise((ok) => setTimeout(ok, ms)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJ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SAqIG1zKSk7XG4gICAgICAgIG1zICo9IDI7XG4gICAgICB9XG4gICAgfVxuICB9O1xufVxuXG5hc3luYyBmdW5jdGlvbiBzbGVlcChtczogbnVtYmVyKTogUHJvbWlzZTx2b2lkPiB7XG4gIHJldHVybiBuZXcgUHJvbWlzZSgob2spID0+IHNldFRpbWVvdXQob2ssIG1zKSk7XG59Il19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057/diff.js b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/diff.js similarity index 100% rename from packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057/diff.js rename to packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/diff.js diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057/external.js b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/external.js similarity index 58% rename from packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057/external.js rename to packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/external.js index acdacae4e8175..1edead6dd3913 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057/external.js +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/external.js @@ -91,4 +91,4 @@ exports.external = { addClientIDToOpenIDConnectProvider: (req) => iam().addClientIDToOpenIDConnectProvider(req).promise(), removeClientIDFromOpenIDConnectProvider: (req) => iam().removeClientIDFromOpenIDConnectProvider(req).promise(), }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZXJuYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJleHRlcm5hbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSwyQkFBMkI7QUFDM0IsMkJBQTJCO0FBQzNCLDZEQUE2RDtBQUM3RCwrQkFBK0I7QUFFL0IsSUFBSSxNQUFlLENBQUM7QUFFcEIsU0FBUyxHQUFHO0lBQ1YsSUFBSSxDQUFDLE1BQU0sRUFBRTtRQUFFLE1BQU0sR0FBRyxJQUFJLEdBQUcsQ0FBQyxHQUFHLEVBQUUsQ0FBQztLQUFFO0lBQ3hDLE9BQU8sTUFBTSxDQUFDO0FBQ2hCLENBQUM7QUFFRCxTQUFTLGFBQWEsQ0FBQyxHQUFXLEVBQUUsR0FBRyxJQUFXO0lBQ2hELHNDQUFzQztJQUN0QyxPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBRSxHQUFHLElBQUksQ0FBQyxDQUFDO0FBQzVCLENBQUM7QUFFRDs7R0FFRztBQUNILEtBQUssVUFBVSxrQkFBa0IsQ0FBQyxTQUFpQjtJQUVqRCxPQUFPLElBQUksT0FBTyxDQUFTLENBQUMsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFO1FBQ3BDLE1BQU0sSUFBSSxHQUFHLEdBQUcsQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLENBQUM7UUFDbEMsTUFBTSxJQUFJLEdBQ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XRlT3BlbklEQ29ubmVjdFByb3ZpZGVyUmVxdWVzdCkgPT4gaWFtKCkuZGVsZXRlT3BlbklEQ29ubmVjdFByb3ZpZGVyKHJlcSkucHJvbWlzZSgpLFxuICB1cGRhdGVPcGVuSURDb25uZWN0UHJvdmlkZXJUaHVtYnByaW50OiAocmVxOiBhd3MuSUFNLlVwZGF0ZU9wZW5JRENvbm5lY3RQcm92aWRlclRodW1icHJpbnRSZXF1ZXN0KSA9PiBpYW0oKS51cGRhdGVPcGVuSURDb25uZWN0UHJvdmlkZXJUaHVtYnByaW50KHJlcSkucHJvbWlzZSgpLFxuICBhZGRDbGllbnRJRFRvT3BlbklEQ29ubmVjdFByb3ZpZGVyOiAocmVxOiBhd3MuSUFNLkFkZENsaWVudElEVG9PcGVuSURDb25uZWN0UHJvdmlkZXJSZXF1ZXN0KSA9PiBpYW0oKS5hZGRDbGllbnRJRFRvT3BlbklEQ29ubmVjdFByb3ZpZGVyKHJlcSkucHJvbWlzZSgpLFxuICByZW1vdmVDbGllbnRJREZyb21PcGVuSURDb25uZWN0UHJvdmlkZXI6IChyZXE6IGF3cy5JQU0uUmVtb3ZlQ2xpZW50SURGcm9tT3BlbklEQ29ubmVjdFByb3ZpZGVyUmVxdWVzdCkgPT4gaWFtKCkucmVtb3ZlQ2xpZW50SURGcm9tT3BlbklEQ29ubmVjdFByb3ZpZGVyKHJlcSkucHJvbWlzZSgpLFxufTsiXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057/index.js b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/index.js similarity index 100% rename from packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057/index.js rename to packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3/index.js diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/integ.json index f09b518404c2f..11955b59744e4 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { - "integ.oidc-provider": { + "iodc-provider-test/DefaultTest": { "stacks": [ "oidc-provider-integ-test" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "iodc-provider-test/DefaultTest/DeployAssert", + "assertionStackName": "iodcprovidertestDefaultTestDeployAssert2D70E37E" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/iodcprovidertestDefaultTestDeployAssert2D70E37E.assets.json b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/iodcprovidertestDefaultTestDeployAssert2D70E37E.assets.json new file mode 100644 index 0000000000000..28ca80d356175 --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/iodcprovidertestDefaultTestDeployAssert2D70E37E.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "iodcprovidertestDefaultTestDeployAssert2D70E37E.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-iam/test/integ.oidc-provider.js.snapshot/iodcprovidertestDefaultTestDeployAssert2D70E37E.template.json b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/iodcprovidertestDefaultTestDeployAssert2D70E37E.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/iodcprovidertestDefaultTestDeployAssert2D70E37E.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-iam/test/integ.oidc-provider.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/manifest.json index 648eb73e18037..57a7f8b56ccdd 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "oidc-provider-integ-test.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}/6949b773345c73f1a4e059545c46b98bf3e3d1dd63abceab631a3171d87bdec4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a71beb1d89e9907742e487f443ee17de90bdf5beb9d56a04556691b215875d9b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -96,6 +96,53 @@ }, "displayName": "oidc-provider-integ-test" }, + "iodcprovidertestDefaultTestDeployAssert2D70E37E.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "iodcprovidertestDefaultTestDeployAssert2D70E37E.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "iodcprovidertestDefaultTestDeployAssert2D70E37E": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "iodcprovidertestDefaultTestDeployAssert2D70E37E.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": [ + "iodcprovidertestDefaultTestDeployAssert2D70E37E.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": [ + "iodcprovidertestDefaultTestDeployAssert2D70E37E.assets" + ], + "metadata": { + "/iodc-provider-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/iodc-provider-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "iodc-provider-test/DefaultTest/DeployAssert" + }, "Tree": { "type": "cdk:tree", "properties": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/oidc-provider-integ-test.assets.json b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/oidc-provider-integ-test.assets.json index eaafe6fad8cbd..c4e2f2dbf647e 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/oidc-provider-integ-test.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/oidc-provider-integ-test.assets.json @@ -1,20 +1,20 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057": { + "2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3": { "source": { - "path": "asset.56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057", + "path": "asset.2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057.zip", + "objectKey": "2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "6949b773345c73f1a4e059545c46b98bf3e3d1dd63abceab631a3171d87bdec4": { + "a71beb1d89e9907742e487f443ee17de90bdf5beb9d56a04556691b215875d9b": { "source": { "path": "oidc-provider-integ-test.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6949b773345c73f1a4e059545c46b98bf3e3d1dd63abceab631a3171d87bdec4.json", + "objectKey": "a71beb1d89e9907742e487f443ee17de90bdf5beb9d56a04556691b215875d9b.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-iam/test/integ.oidc-provider.js.snapshot/oidc-provider-integ-test.template.json b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/oidc-provider-integ-test.template.json index cc0f150f5fc9c..b70e2419e4a86 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/oidc-provider-integ-test.template.json +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/oidc-provider-integ-test.template.json @@ -10,7 +10,7 @@ ] }, "Url": "https://oidc.eks.us-east-1.amazonaws.com/id/test2", - "CodeHash": "56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057" + "CodeHash": "2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -65,7 +65,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057.zip" + "S3Key": "2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3.zip" }, "Timeout": 900, "MemorySize": 128, @@ -96,7 +96,7 @@ "bar" ], "Url": "https://oidc.eks.us-east-1.amazonaws.com/id/test3", - "CodeHash": "56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057" + "CodeHash": "2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -115,7 +115,7 @@ "aa00aa1122aa00aa1122aa00aa1122aa00aa1111" ], "Url": "https://oidc.eks.us-east-1.amazonaws.com/id/test4", - "CodeHash": "56b85a7bb756e34ab12549549eb40d34151db41531599e8f2be6c04e8ae66057" + "CodeHash": "2df5a59d801a1efa337d7f2787d401cc48d736faa94d1f42eccad2d88f3ce2e3" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/tree.json index ba2998ba24dad..b867b303b767a 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.js.snapshot/tree.json @@ -172,12 +172,66 @@ "version": "0.0.0" } }, + "iodc-provider-test": { + "id": "iodc-provider-test", + "path": "iodc-provider-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "iodc-provider-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "iodc-provider-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "iodc-provider-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "iodc-provider-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "iodc-provider-test/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.140" + "version": "10.1.249" } } }, diff --git a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.ts b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.ts index dc050380c4611..d56099c13f584 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.ts +++ b/packages/@aws-cdk/aws-iam/test/integ.oidc-provider.ts @@ -1,4 +1,5 @@ import { App, Stack, CfnOutput } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import * as iam from '../lib'; const app = new App(); @@ -33,4 +34,8 @@ new CfnOutput(stack, 'ThumbprintsThumbprints', { value: `${thumbprints.openIdConnectProviderthumbprints}`, }); +new IntegTest(app, 'iodc-provider-test', { + testCases: [stack], +}); + app.synth(); diff --git a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/PolicyIntegDefaultTestDeployAssert274BB918.assets.json b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/PolicyIntegDefaultTestDeployAssert274BB918.assets.json index e3f3a3767e2cc..1dea1009db69c 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/PolicyIntegDefaultTestDeployAssert274BB918.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/PolicyIntegDefaultTestDeployAssert274BB918.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/aws-cdk-iam-policy.assets.json b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/aws-cdk-iam-policy.assets.json index f758663a791a6..cafe95b93a4e6 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/aws-cdk-iam-policy.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/aws-cdk-iam-policy.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "d898a04332095cb0948a67a0182d64a7d0604bb19454a2ce9dcd09153e09bb59": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/integ.json index 654d941e4fd37..9a843a137ca36 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "PolicyInteg/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/manifest.json index ad07206570a75..6bed1a5059a29 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "aws-cdk-iam-policy.assets": { "type": "cdk:asset-manifest", "properties": { @@ -124,6 +118,12 @@ ] }, "displayName": "PolicyInteg/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/tree.json index 5bc1ca1cb8e4d..5de3aa0868731 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.policy.js.snapshot/tree.json @@ -4,14 +4,6 @@ "id": "App", "path": "", "children": { - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.140" - } - }, "aws-cdk-iam-policy": { "id": "aws-cdk-iam-policy", "path": "aws-cdk-iam-policy", @@ -140,6 +132,14 @@ "id": "Role", "path": "aws-cdk-iam-policy/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-cdk-iam-policy/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-iam-policy/Role/Resource", @@ -185,11 +185,27 @@ "fqn": "@aws-cdk/aws-iam.Role", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-iam-policy/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-iam-policy/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.140" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } }, "PolicyInteg": { @@ -205,15 +221,33 @@ "path": "PolicyInteg/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.249" } }, "DeployAssert": { "id": "DeployAssert", "path": "PolicyInteg/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PolicyInteg/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PolicyInteg/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.140" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, @@ -227,11 +261,19 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.140" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/PrincipalWithConditionDefaultTestDeployAssertA4D5A2E9.assets.json b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/PrincipalWithConditionDefaultTestDeployAssertA4D5A2E9.assets.json index dc1fbb2bafcfd..bde434cf998b5 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/PrincipalWithConditionDefaultTestDeployAssertA4D5A2E9.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/PrincipalWithConditionDefaultTestDeployAssertA4D5A2E9.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/cdk.out index d8b441d447f8a..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"29.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/integ-principal-with-conditions.assets.json b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/integ-principal-with-conditions.assets.json index de88aa559e501..aff080f1657cb 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/integ-principal-with-conditions.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/integ-principal-with-conditions.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "files": { "e190312aaf9fec4bd55ff6f059f2bf5d7453c4ade33a3d922bfd6ff0a61d3a62": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/integ.json index acb178fa8dacd..9a19cacd87bf2 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "testCases": { "PrincipalWithCondition/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/manifest.json index 4242d3c39e60b..8b6e80c4c11e9 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "artifacts": { "integ-principal-with-conditions.assets": { "type": "cdk:asset-manifest", diff --git a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/tree.json index d4cd714281dba..95eca94b11a8a 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.principal-with-conditions.js.snapshot/tree.json @@ -95,7 +95,7 @@ "path": "PrincipalWithCondition/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.216" + "version": "10.1.249" } }, "DeployAssert": { @@ -141,7 +141,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.216" + "version": "10.1.249" } } }, diff --git a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integ-iam-role-1.assets.json b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integ-iam-role-1.assets.json index d7c1ed649e475..8fcd0e362a9dd 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integ-iam-role-1.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integ-iam-role-1.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { "514f5ee3a1aa7cfaa68a26e8992753c2a8dfaa4e62da39ff85fba52545f07a2a": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integ.json index a53b1c9f26384..fb19d898ca1a4 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { - "integ.role": { + "integ-iam-role/DefaultTest": { "stacks": [ "integ-iam-role-1" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "integ-iam-role/DefaultTest/DeployAssert", + "assertionStackName": "integiamroleDefaultTestDeployAssert48737E31" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integiamroleDefaultTestDeployAssert48737E31.assets.json b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integiamroleDefaultTestDeployAssert48737E31.assets.json new file mode 100644 index 0000000000000..bbcbe43c78388 --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integiamroleDefaultTestDeployAssert48737E31.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "integiamroleDefaultTestDeployAssert48737E31.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-iam/test/integ.role.js.snapshot/integiamroleDefaultTestDeployAssert48737E31.template.json b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integiamroleDefaultTestDeployAssert48737E31.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/integiamroleDefaultTestDeployAssert48737E31.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-iam/test/integ.role.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/manifest.json index 51844cd64b97f..1064dbf931db6 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "integ-iam-role-1.assets": { "type": "cdk:asset-manifest", "properties": { @@ -83,6 +77,59 @@ ] }, "displayName": "integ-iam-role-1" + }, + "integiamroleDefaultTestDeployAssert48737E31.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integiamroleDefaultTestDeployAssert48737E31.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integiamroleDefaultTestDeployAssert48737E31": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integiamroleDefaultTestDeployAssert48737E31.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": [ + "integiamroleDefaultTestDeployAssert48737E31.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": [ + "integiamroleDefaultTestDeployAssert48737E31.assets" + ], + "metadata": { + "/integ-iam-role/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-iam-role/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-iam-role/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/tree.json index 3374af095d79f..507038fa79bba 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.role.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.role.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-iam-role-1": { "id": "integ-iam-role-1", "path": "integ-iam-role-1", @@ -20,6 +12,14 @@ "id": "TestRole", "path": "integ-iam-role-1/TestRole", "children": { + "ImportTestRole": { + "id": "ImportTestRole", + "path": "integ-iam-role-1/TestRole/ImportTestRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-iam-role-1/TestRole/Resource", @@ -133,6 +133,14 @@ "id": "TestRole2", "path": "integ-iam-role-1/TestRole2", "children": { + "ImportTestRole2": { + "id": "ImportTestRole2", + "path": "integ-iam-role-1/TestRole2/ImportTestRole2", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-iam-role-1/TestRole2/Resource", @@ -188,6 +196,14 @@ "id": "TestRole3", "path": "integ-iam-role-1/TestRole3", "children": { + "ImportTestRole3": { + "id": "ImportTestRole3", + "path": "integ-iam-role-1/TestRole3/ImportTestRole3", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-iam-role-1/TestRole3/Resource", @@ -223,17 +239,95 @@ "fqn": "@aws-cdk/aws-iam.Role", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-iam-role-1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-iam-role-1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "integ-iam-role": { + "id": "integ-iam-role", + "path": "integ-iam-role", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "integ-iam-role/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "integ-iam-role/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "integ-iam-role/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-iam-role/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-iam-role/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.249" } } }, "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-iam/test/integ.role.ts b/packages/@aws-cdk/aws-iam/test/integ.role.ts index 1a19135ea6785..cbb0217deb7a9 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.role.ts +++ b/packages/@aws-cdk/aws-iam/test/integ.role.ts @@ -1,4 +1,5 @@ import { App, Stack } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import { AccountRootPrincipal, OrganizationPrincipal, Policy, PolicyStatement, Role, ServicePrincipal } from '../lib'; const app = new App(); @@ -26,4 +27,8 @@ new Role(stack, 'TestRole3', { assumedBy: new OrganizationPrincipal('o-1234'), }); +new IntegTest(app, 'integ-iam-role', { + testCases: [stack], +}); + app.synth(); diff --git a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/cdk-saml-provider.assets.json b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/cdk-saml-provider.assets.json index 564def61ef2cb..44e4011015dfe 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/cdk-saml-provider.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/cdk-saml-provider.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "files": { "adc0eedec883653ef9cbd8c66ae68791bf952df8f678cf586e78e02997e2674c": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/cdk.out index d8b441d447f8a..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"29.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/integ.json index 336c4cab2d4cc..dccacdf14329b 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "29.0.0", + "version": "30.0.0", "testCases": { - "integ.saml-provider": { + "saml-provider-test/DefaultTest": { "stacks": [ "cdk-saml-provider" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "saml-provider-test/DefaultTest/DeployAssert", + "assertionStackName": "samlprovidertestDefaultTestDeployAssert29A1AF64" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/manifest.json index 05a50dcfdf875..4e8a9d11b6371 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "artifacts": { "cdk-saml-provider.assets": { "type": "cdk:asset-manifest", @@ -60,6 +60,53 @@ }, "displayName": "cdk-saml-provider" }, + "samlprovidertestDefaultTestDeployAssert29A1AF64.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "samlprovidertestDefaultTestDeployAssert29A1AF64.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "samlprovidertestDefaultTestDeployAssert29A1AF64": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "samlprovidertestDefaultTestDeployAssert29A1AF64.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": [ + "samlprovidertestDefaultTestDeployAssert29A1AF64.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": [ + "samlprovidertestDefaultTestDeployAssert29A1AF64.assets" + ], + "metadata": { + "/saml-provider-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/saml-provider-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "saml-provider-test/DefaultTest/DeployAssert" + }, "Tree": { "type": "cdk:tree", "properties": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/samlprovidertestDefaultTestDeployAssert29A1AF64.assets.json b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/samlprovidertestDefaultTestDeployAssert29A1AF64.assets.json new file mode 100644 index 0000000000000..ce9c5f512bafd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/samlprovidertestDefaultTestDeployAssert29A1AF64.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "samlprovidertestDefaultTestDeployAssert29A1AF64.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-iam/test/integ.saml-provider.js.snapshot/samlprovidertestDefaultTestDeployAssert29A1AF64.template.json b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/samlprovidertestDefaultTestDeployAssert29A1AF64.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/samlprovidertestDefaultTestDeployAssert29A1AF64.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-iam/test/integ.saml-provider.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/tree.json index e1b7975da4ab9..e6fcd91ade7c9 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.js.snapshot/tree.json @@ -116,12 +116,66 @@ "version": "0.0.0" } }, + "saml-provider-test": { + "id": "saml-provider-test", + "path": "saml-provider-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "saml-provider-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "saml-provider-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "saml-provider-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "saml-provider-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "saml-provider-test/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.237" + "version": "10.1.249" } } }, diff --git a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.ts b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.ts index 4de1ece7e1446..efaadeffe9e1f 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.saml-provider.ts +++ b/packages/@aws-cdk/aws-iam/test/integ.saml-provider.ts @@ -1,5 +1,6 @@ import * as path from 'path'; import { App, Stack, StackProps } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import { Construct } from 'constructs'; import * as iam from '../lib'; @@ -19,5 +20,9 @@ class TestStack extends Stack { } const app = new App(); -new TestStack(app, 'cdk-saml-provider'); + +new IntegTest(app, 'saml-provider-test', { + testCases: [new TestStack(app, 'cdk-saml-provider')], +}); + app.synth(); diff --git a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/aws-cdk-iam-user.assets.json b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/aws-cdk-iam-user.assets.json index aa2c93d87ac14..b2999ccfd1d0d 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/aws-cdk-iam-user.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/aws-cdk-iam-user.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { "9692d8fd69db850e4ebd363cc6957741c608548de4c92289ea7fac366f7669e0": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/iamusertestDefaultTestDeployAssertBD838880.assets.json b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/iamusertestDefaultTestDeployAssertBD838880.assets.json new file mode 100644 index 0000000000000..e6251b69f12f7 --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/iamusertestDefaultTestDeployAssertBD838880.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "iamusertestDefaultTestDeployAssertBD838880.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-iam/test/integ.user.js.snapshot/iamusertestDefaultTestDeployAssertBD838880.template.json b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/iamusertestDefaultTestDeployAssertBD838880.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/iamusertestDefaultTestDeployAssertBD838880.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-iam/test/integ.user.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/integ.json index f109681a4e13d..0213bad6c3018 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { - "integ.user": { + "iam-user-test/DefaultTest": { "stacks": [ "aws-cdk-iam-user" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "iam-user-test/DefaultTest/DeployAssert", + "assertionStackName": "iamusertestDefaultTestDeployAssertBD838880" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/manifest.json index 05e9b0c9add95..2336856ab6586 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "aws-cdk-iam-user.assets": { "type": "cdk:asset-manifest", "properties": { @@ -101,6 +95,59 @@ ] }, "displayName": "aws-cdk-iam-user" + }, + "iamusertestDefaultTestDeployAssertBD838880.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "iamusertestDefaultTestDeployAssertBD838880.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "iamusertestDefaultTestDeployAssertBD838880": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "iamusertestDefaultTestDeployAssertBD838880.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": [ + "iamusertestDefaultTestDeployAssertBD838880.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": [ + "iamusertestDefaultTestDeployAssertBD838880.assets" + ], + "metadata": { + "/iam-user-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/iam-user-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "iam-user-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/tree.json index e4141fa561b4a..5f027c45798dc 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.user.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.user.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-iam-user": { "id": "aws-cdk-iam-user", "path": "aws-cdk-iam-user", @@ -48,124 +40,202 @@ "id": "ImportedUserByArn", "path": "aws-cdk-iam-user/ImportedUserByArn", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "ImportedUserByArnPath": { "id": "ImportedUserByArnPath", "path": "aws-cdk-iam-user/ImportedUserByArnPath", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "ImportedUserByArnPathMultiple": { "id": "ImportedUserByArnPathMultiple", "path": "aws-cdk-iam-user/ImportedUserByArnPathMultiple", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "ImportedUserByAttributes": { "id": "ImportedUserByAttributes", "path": "aws-cdk-iam-user/ImportedUserByAttributes", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "ImportedUserByAttributesPath": { "id": "ImportedUserByAttributesPath", "path": "aws-cdk-iam-user/ImportedUserByAttributesPath", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "ImportedUserByAttributesPathMultiple": { "id": "ImportedUserByAttributesPathMultiple", "path": "aws-cdk-iam-user/ImportedUserByAttributesPathMultiple", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "ImportedUserByName": { "id": "ImportedUserByName", "path": "aws-cdk-iam-user/ImportedUserByName", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "NameForUserImportedByArn": { "id": "NameForUserImportedByArn", "path": "aws-cdk-iam-user/NameForUserImportedByArn", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "NameForUserImportedByArnPath": { "id": "NameForUserImportedByArnPath", "path": "aws-cdk-iam-user/NameForUserImportedByArnPath", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "NameForUserImportedByArnPathMultiple": { "id": "NameForUserImportedByArnPathMultiple", "path": "aws-cdk-iam-user/NameForUserImportedByArnPathMultiple", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "NameForUserImportedByAttributes": { "id": "NameForUserImportedByAttributes", "path": "aws-cdk-iam-user/NameForUserImportedByAttributes", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "NameForUserImportedByAttributesPath": { "id": "NameForUserImportedByAttributesPath", "path": "aws-cdk-iam-user/NameForUserImportedByAttributesPath", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "NameForUserImportedByAttributesPathMultiple": { "id": "NameForUserImportedByAttributesPathMultiple", "path": "aws-cdk-iam-user/NameForUserImportedByAttributesPathMultiple", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "NameForUserImportedByName": { "id": "NameForUserImportedByName", "path": "aws-cdk-iam-user/NameForUserImportedByName", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-iam-user/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-iam-user/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" } } }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "iam-user-test": { + "id": "iam-user-test", + "path": "iam-user-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "iam-user-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "iam-user-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "iam-user-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "iam-user-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "iam-user-test/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.249" } } }, "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-iam/test/integ.user.ts b/packages/@aws-cdk/aws-iam/test/integ.user.ts index 173929674b65a..85faf94386a30 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.user.ts +++ b/packages/@aws-cdk/aws-iam/test/integ.user.ts @@ -1,4 +1,5 @@ import { App, CfnOutput, SecretValue, Stack } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import { User } from '../lib'; const app = new App(); @@ -33,4 +34,8 @@ new CfnOutput(stack, 'NameForUserImportedByAttributesPath', { value: userImporte new CfnOutput(stack, 'NameForUserImportedByAttributesPathMultiple', { value: userImportedByAttributesPathMultiple.userName }); new CfnOutput(stack, 'NameForUserImportedByName', { value: userImportedByName.userName }); +new IntegTest(app, 'iam-user-test', { + testCases: [stack], +}); + app.synth(); diff --git a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/cdk.out b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/iamroletestDefaultTestDeployAssert00952CFF.assets.json b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/iamroletestDefaultTestDeployAssert00952CFF.assets.json new file mode 100644 index 0000000000000..064c16f349528 --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/iamroletestDefaultTestDeployAssert00952CFF.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "iamroletestDefaultTestDeployAssert00952CFF.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-iam/test/integ.users-and-groups.js.snapshot/iamroletestDefaultTestDeployAssert00952CFF.template.json b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/iamroletestDefaultTestDeployAssert00952CFF.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/iamroletestDefaultTestDeployAssert00952CFF.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-iam/test/integ.users-and-groups.js.snapshot/integ-iam-role-1.assets.json b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/integ-iam-role-1.assets.json index e6094373dceee..0f9470165efaf 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/integ-iam-role-1.assets.json +++ b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/integ-iam-role-1.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { "54ec88b09f07e129ef1f190291d7256decc51f3c69059a12e4e117dcdc341027": { "source": { diff --git a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/integ.json b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/integ.json index 367b5c632f6a8..858e086de6246 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { - "integ.users-and-groups": { + "iam-role-test/DefaultTest": { "stacks": [ "integ-iam-role-1" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "iam-role-test/DefaultTest/DeployAssert", + "assertionStackName": "iamroletestDefaultTestDeployAssert00952CFF" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/manifest.json b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/manifest.json index c1b9564e35659..ba03f84f576cc 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "integ-iam-role-1.assets": { "type": "cdk:asset-manifest", "properties": { @@ -101,6 +95,59 @@ ] }, "displayName": "integ-iam-role-1" + }, + "iamroletestDefaultTestDeployAssert00952CFF.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "iamroletestDefaultTestDeployAssert00952CFF.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "iamroletestDefaultTestDeployAssert00952CFF": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "iamroletestDefaultTestDeployAssert00952CFF.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": [ + "iamroletestDefaultTestDeployAssert00952CFF.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": [ + "iamroletestDefaultTestDeployAssert00952CFF.assets" + ], + "metadata": { + "/iam-role-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/iam-role-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "iam-role-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/tree.json b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/tree.json index 7b030674010cc..08de0171390a2 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.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-iam-role-1": { "id": "integ-iam-role-1", "path": "integ-iam-role-1", @@ -258,17 +250,95 @@ "fqn": "@aws-cdk/aws-iam.Policy", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-iam-role-1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-iam-role-1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "iam-role-test": { + "id": "iam-role-test", + "path": "iam-role-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "iam-role-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "iam-role-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "iam-role-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "iam-role-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "iam-role-test/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.249" } } }, "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-iam/test/integ.users-and-groups.ts b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.ts index 160efa5e2af22..45c8ddeb58c9d 100644 --- a/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.ts +++ b/packages/@aws-cdk/aws-iam/test/integ.users-and-groups.ts @@ -1,4 +1,5 @@ import { App, Stack } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import { Group, Policy, PolicyStatement, User } from '../lib'; const app = new App(); @@ -21,4 +22,8 @@ policy.addStatements(new PolicyStatement({ actions: ['iam:*'], })); +new IntegTest(app, 'iam-role-test', { + testCases: [stack], +}); + app.synth(); diff --git a/packages/@aws-cdk/aws-ivs/package.json b/packages/@aws-cdk/aws-ivs/package.json index 7d759895b97ca..a6a335fd868b5 100644 --- a/packages/@aws-cdk/aws-ivs/package.json +++ b/packages/@aws-cdk/aws-ivs/package.json @@ -95,6 +95,7 @@ "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", + "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.5.2" diff --git a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.assets.json b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.assets.json index e591026341980..78dab35b7d3dd 100644 --- a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.assets.json +++ b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.assets.json @@ -1,7 +1,7 @@ { - "version": "20.0.0", + "version": "30.0.0", "files": { - "b36ed5e0442d45ac76fe1b3f5b5145badac1a90491b827d69d0abf253f7b5a39": { + "71d02f468f201d8c79d33a72cd8debac3b538f4e0efb492c6c06aca0055029f8": { "source": { "path": "aws-cdk-ivs.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b36ed5e0442d45ac76fe1b3f5b5145badac1a90491b827d69d0abf253f7b5a39.json", + "objectKey": "71d02f468f201d8c79d33a72cd8debac3b538f4e0efb492c6c06aca0055029f8.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-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.template.json b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.template.json index cbea3cc4f2b9a..d84b0c8826002 100644 --- a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.template.json +++ b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/aws-cdk-ivs.template.json @@ -3,8 +3,8 @@ "PlaybackKeyPairBE17315B": { "Type": "AWS::IVS::PlaybackKeyPair", "Properties": { - "PublicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs6k8Xf6WyFq3yZXoup8G/gH6DntSATqD\nYfo83eX0GJCKxJ8fr09h9LP9HDGof8/bo66P+SGHeAARGF/O9WPAQVUgSlm/KMFX\nEPtPtOm1s0GR9k1ydU5hkI++f9CoZ5lM\n-----END PUBLIC KEY-----", - "Name": "IVSIntegrationTestPlaybackKeyPair" + "Name": "IVSIntegrationTestPlaybackKeyPair", + "PublicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs6k8Xf6WyFq3yZXoup8G/gH6DntSATqD\nYfo83eX0GJCKxJ8fr09h9LP9HDGof8/bo66P+SGHeAARGF/O9WPAQVUgSlm/KMFX\nEPtPtOm1s0GR9k1ydU5hkI++f9CoZ5lM\n-----END PUBLIC KEY-----" } }, "Channel4048F119": { diff --git a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/cdk.out b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/cdk.out index 588d7b269d34f..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/integ.json b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/integ.json index 0fdde1a26e898..2e9520959e157 100644 --- a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "20.0.0", + "version": "30.0.0", "testCases": { - "integ.ivs": { + "ivs-test/DefaultTest": { "stacks": [ "aws-cdk-ivs" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "ivs-test/DefaultTest/DeployAssert", + "assertionStackName": "ivstestDefaultTestDeployAssertDCE80D47" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/ivstestDefaultTestDeployAssertDCE80D47.assets.json b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/ivstestDefaultTestDeployAssertDCE80D47.assets.json new file mode 100644 index 0000000000000..2de961928c03b --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/ivstestDefaultTestDeployAssertDCE80D47.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "ivstestDefaultTestDeployAssertDCE80D47.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-ivs/test/integ.ivs.js.snapshot/ivstestDefaultTestDeployAssertDCE80D47.template.json b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/ivstestDefaultTestDeployAssertDCE80D47.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/ivstestDefaultTestDeployAssertDCE80D47.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-ivs/test/integ.ivs.js.snapshot/manifest.json b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/manifest.json index 6fb3c69b467d2..6307a0ba7f9d9 100644 --- a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "aws-cdk-ivs.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}/b36ed5e0442d45ac76fe1b3f5b5145badac1a90491b827d69d0abf253f7b5a39.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/71d02f468f201d8c79d33a72cd8debac3b538f4e0efb492c6c06aca0055029f8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -89,6 +83,59 @@ ] }, "displayName": "aws-cdk-ivs" + }, + "ivstestDefaultTestDeployAssertDCE80D47.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "ivstestDefaultTestDeployAssertDCE80D47.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "ivstestDefaultTestDeployAssertDCE80D47": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "ivstestDefaultTestDeployAssertDCE80D47.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": [ + "ivstestDefaultTestDeployAssertDCE80D47.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": [ + "ivstestDefaultTestDeployAssertDCE80D47.assets" + ], + "metadata": { + "/ivs-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/ivs-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "ivs-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/tree.json b/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/tree.json index d224305afeb8d..def06fccd26a2 100644 --- a/packages/@aws-cdk/aws-ivs/test/integ.ivs.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-ivs/test/integ.ivs.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-ivs": { "id": "aws-cdk-ivs", "path": "aws-cdk-ivs", @@ -26,8 +18,8 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::IVS::PlaybackKeyPair", "aws:cdk:cloudformation:props": { - "publicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs6k8Xf6WyFq3yZXoup8G/gH6DntSATqD\nYfo83eX0GJCKxJ8fr09h9LP9HDGof8/bo66P+SGHeAARGF/O9WPAQVUgSlm/KMFX\nEPtPtOm1s0GR9k1ydU5hkI++f9CoZ5lM\n-----END PUBLIC KEY-----", - "name": "IVSIntegrationTestPlaybackKeyPair" + "name": "IVSIntegrationTestPlaybackKeyPair", + "publicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs6k8Xf6WyFq3yZXoup8G/gH6DntSATqD\nYfo83eX0GJCKxJ8fr09h9LP9HDGof8/bo66P+SGHeAARGF/O9WPAQVUgSlm/KMFX\nEPtPtOm1s0GR9k1ydU5hkI++f9CoZ5lM\n-----END PUBLIC KEY-----" } }, "constructInfo": { @@ -101,36 +93,114 @@ "id": "PlaybackKeyPairArn", "path": "aws-cdk-ivs/PlaybackKeyPairArn", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "ChannelArn": { "id": "ChannelArn", "path": "aws-cdk-ivs/ChannelArn", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } }, "StreamKeyArn": { "id": "StreamKeyArn", "path": "aws-cdk-ivs/StreamKeyArn", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-ivs/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-ivs/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" } } }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "ivs-test": { + "id": "ivs-test", + "path": "ivs-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "ivs-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "ivs-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.249" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "ivs-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "ivs-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "ivs-test/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.249" } } }, "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-ivs/test/integ.ivs.ts b/packages/@aws-cdk/aws-ivs/test/integ.ivs.ts index 49845ea221287..990fb7287470b 100644 --- a/packages/@aws-cdk/aws-ivs/test/integ.ivs.ts +++ b/packages/@aws-cdk/aws-ivs/test/integ.ivs.ts @@ -1,4 +1,5 @@ import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; import * as ivs from '../lib'; /* @@ -41,4 +42,8 @@ new CfnOutput(stack, 'PlaybackKeyPairArn', { value: keypair.playbackKeyPairArn } new CfnOutput(stack, 'ChannelArn', { value: channel.channelArn }); new CfnOutput(stack, 'StreamKeyArn', { value: streamKey.streamKeyArn }); +new IntegTest(app, 'ivs-test', { + testCases: [stack], +}); + app.synth(); diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts index 1c123166bfac1..20e6bbcb0f90b 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/types.ts @@ -50,10 +50,10 @@ export interface BundlingOptions extends DockerRunOptions { * Configuring a loader for a given file type lets you load that file type with * an `import` statement or a `require` call. * - * @see https://esbuild.github.io/api/#loader - * * For example, `{ '.png': 'dataurl' }`. * + * @see https://esbuild.github.io/api/#loader + * * @default - use esbuild default loaders */ readonly loader?: { [ext: string]: string }; diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 090c17f2cf391..c0a233f9b1e00 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.7" + "esbuild": "^0.17.8" }, "dependencies": { "@aws-cdk/aws-lambda": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda-python/README.md b/packages/@aws-cdk/aws-lambda-python/README.md index f399d1559c81a..065ba66d68c88 100644 --- a/packages/@aws-cdk/aws-lambda-python/README.md +++ b/packages/@aws-cdk/aws-lambda-python/README.md @@ -109,6 +109,22 @@ Packaging is executed using the `Packaging` class, which: ├── poetry.lock # your poetry lock file has to be present at the entry path ``` +**Excluding source files** + +You can exclude files from being copied using the optional bundling string array parameter `assetExcludes` + +```ts +new python.PythonFunction(this, 'function', { + entry: '/path/to/poetry-function', + runtime: Runtime.PYTHON_3_8, + bundling: { + // translates to `rsync --exclude='.venv'` + assetExcludes: ['.venv'], + }, +}); +``` + + ## Custom Bundling Custom bundling can be performed by passing in additional build arguments that point to index URLs to private repos, or by using an entirely custom Docker images for bundling dependencies. The build args currently supported are: diff --git a/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts b/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts index fad11266bb0cb..8e11381d22187 100644 --- a/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts +++ b/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts @@ -83,6 +83,7 @@ export class Bundling implements CdkBundlingOptions { image, poetryIncludeHashes, commandHooks, + assetExcludes = [], } = props; const outputPath = path.posix.join(AssetStaging.BUNDLING_OUTPUT_DIR, outputPathSuffix); @@ -93,6 +94,7 @@ export class Bundling implements CdkBundlingOptions { outputDir: outputPath, poetryIncludeHashes, commandHooks, + assetExcludes, }); this.image = image ?? DockerImage.fromBuild(path.join(__dirname, '../lib'), { @@ -118,7 +120,10 @@ export class Bundling implements CdkBundlingOptions { const packaging = Packaging.fromEntry(options.entry, options.poetryIncludeHashes); let bundlingCommands: string[] = []; bundlingCommands.push(...options.commandHooks?.beforeBundling(options.inputDir, options.outputDir) ?? []); - bundlingCommands.push(`cp -rTL ${options.inputDir}/ ${options.outputDir}`); + const exclusionStr = options.assetExcludes?.map(item => `--exclude='${item}'`).join(' '); + bundlingCommands.push([ + 'rsync', '-rLv', exclusionStr ?? '', `${options.inputDir}/`, options.outputDir, + ].filter(item => item).join(' ')); bundlingCommands.push(`cd ${options.outputDir}`); bundlingCommands.push(packaging.exportCommand ?? ''); if (packaging.dependenciesFile) { @@ -133,8 +138,9 @@ interface BundlingCommandOptions { readonly entry: string; readonly inputDir: string; readonly outputDir: string; + readonly assetExcludes?: string[]; readonly poetryIncludeHashes?: boolean; - readonly commandHooks?: ICommandHooks + readonly commandHooks?: ICommandHooks; } /** diff --git a/packages/@aws-cdk/aws-lambda-python/lib/types.ts b/packages/@aws-cdk/aws-lambda-python/lib/types.ts index e0d328e68c858..9503a05005b7a 100644 --- a/packages/@aws-cdk/aws-lambda-python/lib/types.ts +++ b/packages/@aws-cdk/aws-lambda-python/lib/types.ts @@ -15,6 +15,13 @@ export interface BundlingOptions extends DockerRunOptions { */ readonly poetryIncludeHashes?: boolean; + /** + * List of file patterns to exclude when copying assets from source for bundling. + * + * @default - Empty list + */ + readonly assetExcludes?: string[]; + /** * Output path suffix: the suffix for the directory into which the bundled output is written. * diff --git a/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts index b51e8bb046acc..e78f4a5247e71 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/bundling.test.ts @@ -37,7 +37,7 @@ test('Bundling a function without dependencies', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - 'cp -rTL /asset-input/ /asset-output && cd /asset-output', + 'rsync -rLv /asset-input/ /asset-output && cd /asset-output', ], }), })); @@ -66,7 +66,32 @@ test('Bundling a function with requirements.txt', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - 'cp -rTL /asset-input/ /asset-output && cd /asset-output && python -m pip install -r requirements.txt -t /asset-output', + 'rsync -rLv /asset-input/ /asset-output && cd /asset-output && python -m pip install -r requirements.txt -t /asset-output', + ], + }), + })); + + const files = fs.readdirSync(assetCode.path); + expect(files).toContain('index.py'); + expect(files).toContain('requirements.txt'); + expect(files).toContain('.ignorelist'); +}); + +test('Bundling a function with requirements.txt using assetExcludes', () => { + const entry = path.join(__dirname, 'lambda-handler'); + const assetCode = Bundling.bundle({ + entry: entry, + runtime: Runtime.PYTHON_3_7, + architecture: Architecture.X86_64, + assetExcludes: ['.ignorelist'], + }); + + // Correctly bundles + expect(Code.fromAsset).toHaveBeenCalledWith(entry, expect.objectContaining({ + bundling: expect.objectContaining({ + command: [ + 'bash', '-c', + "rsync -rLv --exclude='.ignorelist' /asset-input/ /asset-output && cd /asset-output && python -m pip install -r requirements.txt -t /asset-output", ], }), })); @@ -89,7 +114,26 @@ test('Bundling Python 2.7 with requirements.txt installed', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - 'cp -rTL /asset-input/ /asset-output && cd /asset-output && python -m pip install -r requirements.txt -t /asset-output', + 'rsync -rLv /asset-input/ /asset-output && cd /asset-output && python -m pip install -r requirements.txt -t /asset-output', + ], + }), + })); +}); + +test('Bundling Python 2.7 with requirements.txt installed', () => { + const entry = path.join(__dirname, 'lambda-handler'); + Bundling.bundle({ + entry: entry, + runtime: Runtime.PYTHON_2_7, + architecture: Architecture.X86_64, + }); + + // Correctly bundles with requirements.txt pip installed + expect(Code.fromAsset).toHaveBeenCalledWith(entry, expect.objectContaining({ + bundling: expect.objectContaining({ + command: [ + 'bash', '-c', + 'rsync -rLv /asset-input/ /asset-output && cd /asset-output && python -m pip install -r requirements.txt -t /asset-output', ], }), })); @@ -109,7 +153,7 @@ test('Bundling a layer with dependencies', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - 'cp -rTL /asset-input/ /asset-output/python && cd /asset-output/python && python -m pip install -r requirements.txt -t /asset-output/python', + 'rsync -rLv /asset-input/ /asset-output/python && cd /asset-output/python && python -m pip install -r requirements.txt -t /asset-output/python', ], }), })); @@ -129,7 +173,7 @@ test('Bundling a python code layer', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - 'cp -rTL /asset-input/ /asset-output/python && cd /asset-output/python', + 'rsync -rLv /asset-input/ /asset-output/python && cd /asset-output/python', ], }), })); @@ -149,7 +193,35 @@ test('Bundling a function with pipenv dependencies', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - 'cp -rTL /asset-input/ /asset-output/python && cd /asset-output/python && PIPENV_VENV_IN_PROJECT=1 pipenv lock -r > requirements.txt && rm -rf .venv && python -m pip install -r requirements.txt -t /asset-output/python', + 'rsync -rLv /asset-input/ /asset-output/python && cd /asset-output/python && PIPENV_VENV_IN_PROJECT=1 pipenv lock -r > requirements.txt && rm -rf .venv && python -m pip install -r requirements.txt -t /asset-output/python', + ], + }), + })); + + const files = fs.readdirSync(assetCode.path); + expect(files).toContain('index.py'); + expect(files).toContain('Pipfile'); + expect(files).toContain('Pipfile.lock'); + // Contains hidden files. + expect(files).toContain('.ignorefile'); +}); + +test('Bundling a function with pipenv dependencies with assetExcludes', () => { + const entry = path.join(__dirname, 'lambda-handler-pipenv'); + + const assetCode = Bundling.bundle({ + entry: path.join(entry, '.'), + runtime: Runtime.PYTHON_3_9, + architecture: Architecture.X86_64, + outputPathSuffix: 'python', + assetExcludes: ['.ignorefile'], + }); + + expect(Code.fromAsset).toHaveBeenCalledWith(entry, expect.objectContaining({ + bundling: expect.objectContaining({ + command: [ + 'bash', '-c', + "rsync -rLv --exclude='.ignorefile' /asset-input/ /asset-output/python && cd /asset-output/python && PIPENV_VENV_IN_PROJECT=1 pipenv lock -r > requirements.txt && rm -rf .venv && python -m pip install -r requirements.txt -t /asset-output/python", ], }), })); @@ -176,7 +248,7 @@ test('Bundling a function with poetry dependencies', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - 'cp -rTL /asset-input/ /asset-output/python && cd /asset-output/python && poetry export --without-hashes --with-credentials --format requirements.txt --output requirements.txt && python -m pip install -r requirements.txt -t /asset-output/python', + 'rsync -rLv /asset-input/ /asset-output/python && cd /asset-output/python && poetry export --without-hashes --with-credentials --format requirements.txt --output requirements.txt && python -m pip install -r requirements.txt -t /asset-output/python', ], }), })); @@ -189,6 +261,48 @@ test('Bundling a function with poetry dependencies', () => { expect(files).toContain('.ignorefile'); }); +test('Bundling a function with poetry and assetExcludes', () => { + const entry = path.join(__dirname, 'lambda-handler-poetry'); + + Bundling.bundle({ + entry: path.join(entry, '.'), + runtime: Runtime.PYTHON_3_9, + architecture: Architecture.X86_64, + outputPathSuffix: 'python', + assetExcludes: ['.ignorefile'], + }); + + expect(Code.fromAsset).toHaveBeenCalledWith(entry, expect.objectContaining({ + bundling: expect.objectContaining({ + command: [ + 'bash', '-c', + "rsync -rLv --exclude='.ignorefile' /asset-input/ /asset-output/python && cd /asset-output/python && poetry export --without-hashes --with-credentials --format requirements.txt --output requirements.txt && python -m pip install -r requirements.txt -t /asset-output/python", + ], + }), + })); + +}); + +test('Bundling a function with poetry and no assetExcludes', () => { + const entry = path.join(__dirname, 'lambda-handler-poetry'); + + Bundling.bundle({ + entry: path.join(entry, '.'), + runtime: Runtime.PYTHON_3_9, + architecture: Architecture.X86_64, + outputPathSuffix: 'python', + }); + + expect(Code.fromAsset).toHaveBeenCalledWith(entry, expect.objectContaining({ + bundling: expect.objectContaining({ + command: [ + 'bash', '-c', + expect.not.stringContaining('--exclude'), + ], + }), + })); +}); + test('Bundling a function with poetry dependencies, with hashes', () => { const entry = path.join(__dirname, 'lambda-handler-poetry'); @@ -204,7 +318,7 @@ test('Bundling a function with poetry dependencies, with hashes', () => { bundling: expect.objectContaining({ command: [ 'bash', '-c', - 'cp -rTL /asset-input/ /asset-output/python && cd /asset-output/python && poetry export --with-credentials --format requirements.txt --output requirements.txt && python -m pip install -r requirements.txt -t /asset-output/python', + 'rsync -rLv /asset-input/ /asset-output/python && cd /asset-output/python && poetry export --with-credentials --format requirements.txt --output requirements.txt && python -m pip install -r requirements.txt -t /asset-output/python', ], }), })); @@ -234,7 +348,7 @@ test('Bundling a function with custom bundling image', () => { image, command: [ 'bash', '-c', - 'cp -rTL /asset-input/ /asset-output/python && cd /asset-output/python && python -m pip install -r requirements.txt -t /asset-output/python', + 'rsync -rLv /asset-input/ /asset-output/python && cd /asset-output/python && python -m pip install -r requirements.txt -t /asset-output/python', ], }), })); diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js similarity index 59% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js rename to packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js index 2d6c2f0e85497..58bcb1ef7f38e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.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-lambda-python/test/integ.function.js.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js deleted file mode 100644 index ba956d47f51fe..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js +++ /dev/null @@ -1,612 +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 { - console.log(`Event: ${JSON.stringify({ ...this.event, ResponseURL: "..." })}`); - const response = await this.processEvent(this.event.ResourceProperties); - console.log(`Event output : ${JSON.stringify(response)}`); - await this.respond({ - status: "SUCCESS", - reason: "OK", - data: response - }); - } catch (e) { - console.log(e); - await this.respond({ - status: "FAILED", - reason: e.message ?? "Internal Error" - }); - } 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 = { - data: JSON.stringify({ - status: "fail", - message: [ - ...matchResult.toHumanStrings(), - JSON.stringify(matchResult.target, void 0, 2) - ].join("\n") - }) - }; - if (request2.failDeployment) { - throw new Error(result.data); - } - } else { - result = { - data: 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) => { - 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) - ); -} -var AwsApiCallHandler = class extends CustomResourceHandler { - async processEvent(request2) { - const AWS = require("aws-sdk"); - console.log(`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) - }; - return request2.flattenResponse === "true" ? flatData : respond; - } -}; - -// 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) { - const provider = createResourceHandler(event, context); - await provider.handle(); -} -function createResourceHandler(event, context) { - if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { - return new AwsApiCallHandler(event, context); - } - switch (event.ResourceType) { - case ASSERT_RESOURCE_TYPE: - return new AssertionHandler(event, context); - default: - 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-lambda-python/test/integ.function.js.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/cdk.out index 8ecc185e9dbee..d8b441d447f8a 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.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-lambda-python/test/integ.function.js.snapshot/integ-lambda-python-function.assets.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ-lambda-python-function.assets.json index 43f3d57a184f8..2db813a1704fd 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ-lambda-python-function.assets.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ-lambda-python-function.assets.json @@ -1,20 +1,33 @@ { - "version": "21.0.0", + "version": "29.0.0", "files": { - "75eef6be4f79fab5d65ef63569aac0de3aab47ca778c063cdea466e47c4ea755": { + "74aba657619dfbc372ad5df5cf98a022a4322098a338ee81683de7c8d01d4664": { "source": { - "path": "asset.75eef6be4f79fab5d65ef63569aac0de3aab47ca778c063cdea466e47c4ea755", + "path": "asset.74aba657619dfbc372ad5df5cf98a022a4322098a338ee81683de7c8d01d4664", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "75eef6be4f79fab5d65ef63569aac0de3aab47ca778c063cdea466e47c4ea755.zip", + "objectKey": "74aba657619dfbc372ad5df5cf98a022a4322098a338ee81683de7c8d01d4664.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "d759a2959a657473cc039ac933b56005d266cfc872bb8a2cb0b6a4c07aafff56": { + "8e8d2a8b3838f7d231d348e1c27c9f8e682c8dd4ff9af71d88795db2009a6d51": { + "source": { + "path": "asset.8e8d2a8b3838f7d231d348e1c27c9f8e682c8dd4ff9af71d88795db2009a6d51", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "8e8d2a8b3838f7d231d348e1c27c9f8e682c8dd4ff9af71d88795db2009a6d51.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "85ce1d521db629d713f3de5e618c84c51c48944e22ff2e64d3a6d12770a8199d": { "source": { "path": "integ-lambda-python-function.template.json", "packaging": "file" @@ -22,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d759a2959a657473cc039ac933b56005d266cfc872bb8a2cb0b6a4c07aafff56.json", + "objectKey": "85ce1d521db629d713f3de5e618c84c51c48944e22ff2e64d3a6d12770a8199d.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-python/test/integ.function.js.snapshot/integ-lambda-python-function.template.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ-lambda-python-function.template.json index 154f82a3e4dd6..54bbe0249ec00 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ-lambda-python-function.template.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ-lambda-python-function.template.json @@ -38,7 +38,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "75eef6be4f79fab5d65ef63569aac0de3aab47ca778c063cdea466e47c4ea755.zip" + "S3Key": "74aba657619dfbc372ad5df5cf98a022a4322098a338ee81683de7c8d01d4664.zip" }, "Role": { "Fn::GetAtt": [ @@ -52,10 +52,63 @@ "DependsOn": [ "myhandlerServiceRole77891068" ] + }, + "myhandlerexcludesServiceRoleBB475DCC": { + "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" + ] + ] + } + ] + } + }, + "myhandlerexcludes0437E0D2": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "8e8d2a8b3838f7d231d348e1c27c9f8e682c8dd4ff9af71d88795db2009a6d51.zip" + }, + "Role": { + "Fn::GetAtt": [ + "myhandlerexcludesServiceRoleBB475DCC", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.9" + }, + "DependsOn": [ + "myhandlerexcludesServiceRoleBB475DCC" + ] } }, "Outputs": { - "FunctionArn": { + "DefaultFunctionArn": { "Value": { "Fn::GetAtt": [ "myhandlerD202FA8E", @@ -63,6 +116,14 @@ ] } }, + "FunctionArnWithExcludes": { + "Value": { + "Fn::GetAtt": [ + "myhandlerexcludes0437E0D2", + "Arn" + ] + } + }, "ExportsOutputRefmyhandlerD202FA8E369E8804": { "Value": { "Ref": "myhandlerD202FA8E" @@ -70,6 +131,14 @@ "Export": { "Name": "integ-lambda-python-function:ExportsOutputRefmyhandlerD202FA8E369E8804" } + }, + "ExportsOutputRefmyhandlerexcludes0437E0D23D81F234": { + "Value": { + "Ref": "myhandlerexcludes0437E0D2" + }, + "Export": { + "Name": "integ-lambda-python-function:ExportsOutputRefmyhandlerexcludes0437E0D23D81F234" + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ.json index c9e27957a3b6a..2a091993572eb 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "29.0.0", "testCases": { "lambda-python-function/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/lambdapythonfunctionDefaultTestDeployAssertC9C6EE6F.assets.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/lambdapythonfunctionDefaultTestDeployAssertC9C6EE6F.assets.json index 3197f8c05ca02..aad6c70a7e233 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/lambdapythonfunctionDefaultTestDeployAssertC9C6EE6F.assets.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/lambdapythonfunctionDefaultTestDeployAssertC9C6EE6F.assets.json @@ -1,20 +1,20 @@ { - "version": "21.0.0", + "version": "29.0.0", "files": { - "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": { "source": { - "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.zip", + "objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "f6fe40c0c1113210f5fd8c07b8e5ded3f7c35a6cfb554b207fc1523f10d9eaa9": { + "4d65bf80ba312f74702ad54f1b55f5f18667457d4867535222323470d0ae5194": { "source": { "path": "lambdapythonfunctionDefaultTestDeployAssertC9C6EE6F.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f6fe40c0c1113210f5fd8c07b8e5ded3f7c35a6cfb554b207fc1523f10d9eaa9.json", + "objectKey": "4d65bf80ba312f74702ad54f1b55f5f18667457d4867535222323470d0ae5194.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-python/test/integ.function.js.snapshot/lambdapythonfunctionDefaultTestDeployAssertC9C6EE6F.template.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/lambdapythonfunctionDefaultTestDeployAssertC9C6EE6F.template.json index e35047e6cae8d..e83b2eaf357f4 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/lambdapythonfunctionDefaultTestDeployAssertC9C6EE6F.template.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/lambdapythonfunctionDefaultTestDeployAssertC9C6EE6F.template.json @@ -11,13 +11,14 @@ }, "service": "Lambda", "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", "parameters": { "FunctionName": { "Fn::ImportValue": "integ-lambda-python-function:ExportsOutputRefmyhandlerD202FA8E369E8804" } }, "flattenResponse": "false", - "salt": "1662643989220" + "salt": "1676327434136" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -37,27 +38,6 @@ } } }, - "LambdaInvoke431773224924ebf10c8a31d363a6bf16AssertEqualsLambdainvokeF6179C6B": { - "Type": "Custom::DeployAssert@AssertEquals", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", - "Arn" - ] - }, - "actual": { - "Fn::GetAtt": [ - "LambdaInvoke431773224924ebf10c8a31d363a6bf16", - "apiCallResponse" - ] - }, - "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", - "salt": "1662643989220" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": { "Type": "AWS::IAM::Role", "Properties": { @@ -123,6 +103,46 @@ ] } ] + }, + { + "Action": [ + "lambda:Invoke" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "lambda:InvokeFunction" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":lambda:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":function:", + { + "Fn::ImportValue": "integ-lambda-python-function:ExportsOutputRefmyhandlerexcludes0437E0D23D81F234" + } + ] + ] + } + ] } ] } @@ -138,7 +158,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -149,14 +169,60 @@ ] } } + }, + "LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14": { + "Type": "Custom::DeployAssert@SdkCallLambdainvoke", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Lambda", + "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", + "parameters": { + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-function:ExportsOutputRefmyhandlerexcludes0437E0D23D81F234" + } + }, + "flattenResponse": "false", + "salt": "1676327434137" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14InvokeD7AA9E7A": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-function:ExportsOutputRefmyhandlerexcludes0437E0D23D81F234" + }, + "Principal": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } } }, "Outputs": { - "AssertionResultsAssertEqualsLambdainvoke64d766e0ddfdf2e2979fef994a5cd2aa": { + "AssertionResultsLambdaInvoke431773224924ebf10c8a31d363a6bf16": { + "Value": { + "Fn::GetAtt": [ + "LambdaInvoke431773224924ebf10c8a31d363a6bf16", + "assertion" + ] + } + }, + "AssertionResultsLambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14": { "Value": { "Fn::GetAtt": [ - "LambdaInvoke431773224924ebf10c8a31d363a6bf16AssertEqualsLambdainvokeF6179C6B", - "data" + "LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14", + "assertion" ] } } diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/manifest.json index 1e64a7aae2f14..eb41f8ed61560 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "21.0.0", + "version": "29.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "integ-lambda-python-function.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}/d759a2959a657473cc039ac933b56005d266cfc872bb8a2cb0b6a4c07aafff56.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/85ce1d521db629d713f3de5e618c84c51c48944e22ff2e64d3a6d12770a8199d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -51,10 +45,28 @@ "data": "myhandlerD202FA8E" } ], - "/integ-lambda-python-function/FunctionArn": [ + "/integ-lambda-python-function/DefaultFunctionArn": [ + { + "type": "aws:cdk:logicalId", + "data": "DefaultFunctionArn" + } + ], + "/integ-lambda-python-function/my_handler_excludes/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerexcludesServiceRoleBB475DCC" + } + ], + "/integ-lambda-python-function/my_handler_excludes/Resource": [ { "type": "aws:cdk:logicalId", - "data": "FunctionArn" + "data": "myhandlerexcludes0437E0D2" + } + ], + "/integ-lambda-python-function/FunctionArnWithExcludes": [ + { + "type": "aws:cdk:logicalId", + "data": "FunctionArnWithExcludes" } ], "/integ-lambda-python-function/Exports/Output{\"Ref\":\"myhandlerD202FA8E\"}": [ @@ -63,6 +75,12 @@ "data": "ExportsOutputRefmyhandlerD202FA8E369E8804" } ], + "/integ-lambda-python-function/Exports/Output{\"Ref\":\"myhandlerexcludes0437E0D2\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefmyhandlerexcludes0437E0D23D81F234" + } + ], "/integ-lambda-python-function/BootstrapVersion": [ { "type": "aws:cdk:logicalId", @@ -94,7 +112,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}/f6fe40c0c1113210f5fd8c07b8e5ded3f7c35a6cfb554b207fc1523f10d9eaa9.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4d65bf80ba312f74702ad54f1b55f5f18667457d4867535222323470d0ae5194.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -123,16 +141,10 @@ "data": "LambdaInvoke431773224924ebf10c8a31d363a6bf16Invoke9BC0E67F" } ], - "/lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertEqualsLambdainvoke/Default/Default": [ + "/lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertionResults": [ { "type": "aws:cdk:logicalId", - "data": "LambdaInvoke431773224924ebf10c8a31d363a6bf16AssertEqualsLambdainvokeF6179C6B" - } - ], - "/lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertEqualsLambdainvoke/AssertionResults": [ - { - "type": "aws:cdk:logicalId", - "data": "AssertionResultsAssertEqualsLambdainvoke64d766e0ddfdf2e2979fef994a5cd2aa" + "data": "AssertionResultsLambdaInvoke431773224924ebf10c8a31d363a6bf16" } ], "/lambda-python-function/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ @@ -147,6 +159,24 @@ "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], + "/lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14" + } + ], + "/lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14InvokeD7AA9E7A" + } + ], + "/lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14" + } + ], "/lambda-python-function/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", @@ -161,6 +191,12 @@ ] }, "displayName": "lambda-python-function/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/tree.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/tree.json index fb6f36cb47f0c..bee46863b8e55 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda-python/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.95" - } - }, "integ-lambda-python-function": { "id": "integ-lambda-python-function", "path": "integ-lambda-python-function", @@ -24,6 +16,14 @@ "id": "ServiceRole", "path": "integ-lambda-python-function/my_handler/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-function/my_handler/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-lambda-python-function/my_handler/ServiceRole/Resource", @@ -105,7 +105,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "75eef6be4f79fab5d65ef63569aac0de3aab47ca778c063cdea466e47c4ea755.zip" + "s3Key": "74aba657619dfbc372ad5df5cf98a022a4322098a338ee81683de7c8d01d4664.zip" }, "role": { "Fn::GetAtt": [ @@ -128,9 +128,137 @@ "version": "0.0.0" } }, - "FunctionArn": { - "id": "FunctionArn", - "path": "integ-lambda-python-function/FunctionArn", + "DefaultFunctionArn": { + "id": "DefaultFunctionArn", + "path": "integ-lambda-python-function/DefaultFunctionArn", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "my_handler_excludes": { + "id": "my_handler_excludes", + "path": "integ-lambda-python-function/my_handler_excludes", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-lambda-python-function/my_handler_excludes/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-function/my_handler_excludes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-function/my_handler_excludes/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": "integ-lambda-python-function/my_handler_excludes/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-lambda-python-function/my_handler_excludes/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-lambda-python-function/my_handler_excludes/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": "integ-lambda-python-function/my_handler_excludes/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": "8e8d2a8b3838f7d231d348e1c27c9f8e682c8dd4ff9af71d88795db2009a6d51.zip" + }, + "role": { + "Fn::GetAtt": [ + "myhandlerexcludesServiceRoleBB475DCC", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "python3.9" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda-python.PythonFunction", + "version": "0.0.0" + } + }, + "FunctionArnWithExcludes": { + "id": "FunctionArnWithExcludes", + "path": "integ-lambda-python-function/FunctionArnWithExcludes", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -147,11 +275,35 @@ "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" } + }, + "Output{\"Ref\":\"myhandlerexcludes0437E0D2\"}": { + "id": "Output{\"Ref\":\"myhandlerexcludes0437E0D2\"}", + "path": "integ-lambda-python-function/Exports/Output{\"Ref\":\"myhandlerexcludes0437E0D2\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-lambda-python-function/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-lambda-python-function/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" } } }, @@ -173,7 +325,7 @@ "path": "lambda-python-function/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" } }, "DeployAssert": { @@ -193,13 +345,13 @@ "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" } }, "Default": { @@ -228,64 +380,18 @@ "version": "0.0.0" } }, - "AssertEqualsLambdainvoke": { - "id": "AssertEqualsLambdainvoke", - "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertEqualsLambdainvoke", - "children": { - "AssertionProvider": { - "id": "AssertionProvider", - "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertEqualsLambdainvoke/AssertionProvider", - "children": { - "AssertionsProvider": { - "id": "AssertionsProvider", - "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertEqualsLambdainvoke/AssertionProvider/AssertionsProvider", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" - } - }, - "Default": { - "id": "Default", - "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertEqualsLambdainvoke/Default", - "children": { - "Default": { - "id": "Default", - "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertEqualsLambdainvoke/Default/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } - }, - "AssertionResults": { - "id": "AssertionResults", - "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertEqualsLambdainvoke/AssertionResults", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" - } - } - }, + "AssertionResults": { + "id": "AssertionResults", + "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke431773224924ebf10c8a31d363a6bf16/AssertionResults", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" } }, "SingletonFunction1488541a7b23466481b69b4408076b81": { @@ -319,7 +425,85 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" + } + }, + "LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14": { + "id": "LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14", + "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14/Default", + "children": { + "Default": { + "id": "Default", + "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "Invoke": { + "id": "Invoke", + "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14/Invoke", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "lambda-python-function/DefaultTest/DeployAssert/LambdaInvoke0e6bc88fc58c90a2753e79d6caf4bc14/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "lambda-python-function/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "lambda-python-function/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" } } }, @@ -330,14 +514,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "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.95" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js new file mode 100644 index 0000000000000..58bcb1ef7f38e --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js @@ -0,0 +1,1205 @@ +"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( + // 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-lambda-python/test/integ.function.pipenv.js.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js deleted file mode 100644 index ba956d47f51fe..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js +++ /dev/null @@ -1,612 +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 { - console.log(`Event: ${JSON.stringify({ ...this.event, ResponseURL: "..." })}`); - const response = await this.processEvent(this.event.ResourceProperties); - console.log(`Event output : ${JSON.stringify(response)}`); - await this.respond({ - status: "SUCCESS", - reason: "OK", - data: response - }); - } catch (e) { - console.log(e); - await this.respond({ - status: "FAILED", - reason: e.message ?? "Internal Error" - }); - } 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 = { - data: JSON.stringify({ - status: "fail", - message: [ - ...matchResult.toHumanStrings(), - JSON.stringify(matchResult.target, void 0, 2) - ].join("\n") - }) - }; - if (request2.failDeployment) { - throw new Error(result.data); - } - } else { - result = { - data: 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) => { - 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) - ); -} -var AwsApiCallHandler = class extends CustomResourceHandler { - async processEvent(request2) { - const AWS = require("aws-sdk"); - console.log(`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) - }; - return request2.flattenResponse === "true" ? flatData : respond; - } -}; - -// 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) { - const provider = createResourceHandler(event, context); - await provider.handle(); -} -function createResourceHandler(event, context) { - if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { - return new AwsApiCallHandler(event, context); - } - switch (event.ResourceType) { - case ASSERT_RESOURCE_TYPE: - return new AssertionHandler(event, context); - default: - 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-lambda-python/test/integ.function.pipenv.js.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/cdk.out index 8ecc185e9dbee..d8b441d447f8a 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.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-lambda-python/test/integ.function.pipenv.js.snapshot/integ-lambda-python-pipenv.assets.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ-lambda-python-pipenv.assets.json index 06fc3c46efd8b..8cfdfddad8d20 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ-lambda-python-pipenv.assets.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ-lambda-python-pipenv.assets.json @@ -1,46 +1,85 @@ { - "version": "21.0.0", + "version": "29.0.0", "files": { - "803e66cf17a8155efd491fa5e68f796bb74ae8337c455b23b5e52d0e5927b2a7": { + "2f3bbbf29fb95dea832d2f407fb3af92e2179a31a179650c1e9bad3d5d51afaf": { "source": { - "path": "asset.803e66cf17a8155efd491fa5e68f796bb74ae8337c455b23b5e52d0e5927b2a7", + "path": "asset.2f3bbbf29fb95dea832d2f407fb3af92e2179a31a179650c1e9bad3d5d51afaf", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "803e66cf17a8155efd491fa5e68f796bb74ae8337c455b23b5e52d0e5927b2a7.zip", + "objectKey": "2f3bbbf29fb95dea832d2f407fb3af92e2179a31a179650c1e9bad3d5d51afaf.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "2a6fcac567a26e1be604dec572e270fbd091180dccf23a209e21c5900ce24ff0": { + "393d0817d83ce87664be2c627863e3f448f1106ceeb687e3f3c370b7957b9a21": { "source": { - "path": "asset.2a6fcac567a26e1be604dec572e270fbd091180dccf23a209e21c5900ce24ff0", + "path": "asset.393d0817d83ce87664be2c627863e3f448f1106ceeb687e3f3c370b7957b9a21", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2a6fcac567a26e1be604dec572e270fbd091180dccf23a209e21c5900ce24ff0.zip", + "objectKey": "393d0817d83ce87664be2c627863e3f448f1106ceeb687e3f3c370b7957b9a21.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e223ff54d4d46f8f1e5876b5697de59a81ba36113fa0bf2b46d29917fcbee403": { + "f4e3739faf89086835a11fc5cdc60f9f437560fdc808ba5f7b8c717b280eb2b1": { "source": { - "path": "asset.e223ff54d4d46f8f1e5876b5697de59a81ba36113fa0bf2b46d29917fcbee403", + "path": "asset.f4e3739faf89086835a11fc5cdc60f9f437560fdc808ba5f7b8c717b280eb2b1", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e223ff54d4d46f8f1e5876b5697de59a81ba36113fa0bf2b46d29917fcbee403.zip", + "objectKey": "f4e3739faf89086835a11fc5cdc60f9f437560fdc808ba5f7b8c717b280eb2b1.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "0ed561f0d555914dbd2d0c6af29be68dd27eb65ee922d0f6eee6d50d3a0b5362": { + "6259c1fcafbecaa6547531670fa651cce171cf49a597b58343c28ad4c6a4ba04": { + "source": { + "path": "asset.6259c1fcafbecaa6547531670fa651cce171cf49a597b58343c28ad4c6a4ba04", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "6259c1fcafbecaa6547531670fa651cce171cf49a597b58343c28ad4c6a4ba04.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "7885d5d20a5bca7141b637a7e9db57f95730b26b0c4a5d7a6e6db0f392042f7e": { + "source": { + "path": "asset.7885d5d20a5bca7141b637a7e9db57f95730b26b0c4a5d7a6e6db0f392042f7e", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "7885d5d20a5bca7141b637a7e9db57f95730b26b0c4a5d7a6e6db0f392042f7e.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "53f2ca7d739f5ee14104a478b820bb6f429b8afaa9c00a9aed6cf32538cf7207": { + "source": { + "path": "asset.53f2ca7d739f5ee14104a478b820bb6f429b8afaa9c00a9aed6cf32538cf7207", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "53f2ca7d739f5ee14104a478b820bb6f429b8afaa9c00a9aed6cf32538cf7207.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "0dac102ffa4d6e4e405149901d1ae37f467ad83c0906696eef73df546a839e0d": { "source": { "path": "integ-lambda-python-pipenv.template.json", "packaging": "file" @@ -48,7 +87,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0ed561f0d555914dbd2d0c6af29be68dd27eb65ee922d0f6eee6d50d3a0b5362.json", + "objectKey": "0dac102ffa4d6e4e405149901d1ae37f467ad83c0906696eef73df546a839e0d.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-python/test/integ.function.pipenv.js.snapshot/integ-lambda-python-pipenv.template.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ-lambda-python-pipenv.template.json index 3e664aeb17e51..4f40fb40c66e6 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ-lambda-python-pipenv.template.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ-lambda-python-pipenv.template.json @@ -38,7 +38,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "803e66cf17a8155efd491fa5e68f796bb74ae8337c455b23b5e52d0e5927b2a7.zip" + "S3Key": "2f3bbbf29fb95dea832d2f407fb3af92e2179a31a179650c1e9bad3d5d51afaf.zip" }, "Role": { "Fn::GetAtt": [ @@ -91,7 +91,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2a6fcac567a26e1be604dec572e270fbd091180dccf23a209e21c5900ce24ff0.zip" + "S3Key": "393d0817d83ce87664be2c627863e3f448f1106ceeb687e3f3c370b7957b9a21.zip" }, "Role": { "Fn::GetAtt": [ @@ -144,7 +144,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "e223ff54d4d46f8f1e5876b5697de59a81ba36113fa0bf2b46d29917fcbee403.zip" + "S3Key": "f4e3739faf89086835a11fc5cdc60f9f437560fdc808ba5f7b8c717b280eb2b1.zip" }, "Role": { "Fn::GetAtt": [ @@ -158,6 +158,165 @@ "DependsOn": [ "myhandlerpython37ServiceRole45CBD18D" ] + }, + "myhandlerinlineexcludesServiceRoleFF9028A3": { + "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" + ] + ] + } + ] + } + }, + "myhandlerinlineexcludes9ACF1422": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "6259c1fcafbecaa6547531670fa651cce171cf49a597b58343c28ad4c6a4ba04.zip" + }, + "Role": { + "Fn::GetAtt": [ + "myhandlerinlineexcludesServiceRoleFF9028A3", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.9" + }, + "DependsOn": [ + "myhandlerinlineexcludesServiceRoleFF9028A3" + ] + }, + "myhandlerpython38excludesServiceRole05CD433C": { + "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" + ] + ] + } + ] + } + }, + "myhandlerpython38excludes1CEDD615": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "7885d5d20a5bca7141b637a7e9db57f95730b26b0c4a5d7a6e6db0f392042f7e.zip" + }, + "Role": { + "Fn::GetAtt": [ + "myhandlerpython38excludesServiceRole05CD433C", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.8" + }, + "DependsOn": [ + "myhandlerpython38excludesServiceRole05CD433C" + ] + }, + "myhandlerpython37excludesServiceRole083BD595": { + "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" + ] + ] + } + ] + } + }, + "myhandlerpython37excludes977F9CDF": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "53f2ca7d739f5ee14104a478b820bb6f429b8afaa9c00a9aed6cf32538cf7207.zip" + }, + "Role": { + "Fn::GetAtt": [ + "myhandlerpython37excludesServiceRole083BD595", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.7" + }, + "DependsOn": [ + "myhandlerpython37excludesServiceRole083BD595" + ] } }, "Outputs": { @@ -184,6 +343,30 @@ "Export": { "Name": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython37C34039A7BB71D94D" } + }, + "ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9": { + "Value": { + "Ref": "myhandlerinlineexcludes9ACF1422" + }, + "Export": { + "Name": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" + } + }, + "ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35": { + "Value": { + "Ref": "myhandlerpython38excludes1CEDD615" + }, + "Export": { + "Name": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" + } + }, + "ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3": { + "Value": { + "Ref": "myhandlerpython37excludes977F9CDF" + }, + "Export": { + "Name": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ.json index 37e33ee99af21..e492fff5d5158 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "29.0.0", "testCases": { "pipenv/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/manifest.json index 7758c7d1f91fe..a8ef03dd5872a 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "21.0.0", + "version": "29.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "integ-lambda-python-pipenv.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}/0ed561f0d555914dbd2d0c6af29be68dd27eb65ee922d0f6eee6d50d3a0b5362.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0dac102ffa4d6e4e405149901d1ae37f467ad83c0906696eef73df546a839e0d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -75,6 +69,42 @@ "data": "myhandlerpython37C34039A7" } ], + "/integ-lambda-python-pipenv/my_handler_inline_excludes/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerinlineexcludesServiceRoleFF9028A3" + } + ], + "/integ-lambda-python-pipenv/my_handler_inline_excludes/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerinlineexcludes9ACF1422" + } + ], + "/integ-lambda-python-pipenv/my_handler_python_38_excludes/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython38excludesServiceRole05CD433C" + } + ], + "/integ-lambda-python-pipenv/my_handler_python_38_excludes/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython38excludes1CEDD615" + } + ], + "/integ-lambda-python-pipenv/my_handler_python_37_excludes/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython37excludesServiceRole083BD595" + } + ], + "/integ-lambda-python-pipenv/my_handler_python_37_excludes/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython37excludes977F9CDF" + } + ], "/integ-lambda-python-pipenv/Exports/Output{\"Ref\":\"myhandlerinline53D120C7\"}": [ { "type": "aws:cdk:logicalId", @@ -93,6 +123,24 @@ "data": "ExportsOutputRefmyhandlerpython37C34039A7BB71D94D" } ], + "/integ-lambda-python-pipenv/Exports/Output{\"Ref\":\"myhandlerinlineexcludes9ACF1422\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" + } + ], + "/integ-lambda-python-pipenv/Exports/Output{\"Ref\":\"myhandlerpython38excludes1CEDD615\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" + } + ], + "/integ-lambda-python-pipenv/Exports/Output{\"Ref\":\"myhandlerpython37excludes977F9CDF\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" + } + ], "/integ-lambda-python-pipenv/BootstrapVersion": [ { "type": "aws:cdk:logicalId", @@ -124,7 +172,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}/60915425ae6d91c88b04adf7c9631b4ea5f48c4764bbff1edc0bc70d57705d3f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/18850596c8959107f64d5dfdacaa5c53015e0bb3e8dd6d3f4ba039dad52e576b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -153,16 +201,10 @@ "data": "LambdaInvoke81c9998b1b428b309c8501e21b919d3dInvokeEBA46CA4" } ], - "/pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertEqualsLambdainvoke/Default/Default": [ - { - "type": "aws:cdk:logicalId", - "data": "LambdaInvoke81c9998b1b428b309c8501e21b919d3dAssertEqualsLambdainvoke0BDD9934" - } - ], - "/pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertEqualsLambdainvoke/AssertionResults": [ + "/pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertionResults": [ { "type": "aws:cdk:logicalId", - "data": "AssertionResultsAssertEqualsLambdainvoke556559ea7575e3a52e6d6c32e2c07934" + "data": "AssertionResultsLambdaInvoke81c9998b1b428b309c8501e21b919d3d" } ], "/pipenv/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ @@ -189,16 +231,10 @@ "data": "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292InvokeFD76DE7B" } ], - "/pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertEqualsLambdainvoke/Default/Default": [ - { - "type": "aws:cdk:logicalId", - "data": "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292AssertEqualsLambdainvoke3F6858A2" - } - ], - "/pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertEqualsLambdainvoke/AssertionResults": [ + "/pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertionResults": [ { "type": "aws:cdk:logicalId", - "data": "AssertionResultsAssertEqualsLambdainvoke921b66a1d8c9b23c2c2caef76d4b249b" + "data": "AssertionResultsLambdaInvoke9a0beb4ea6cc38db92e9ff664c085292" } ], "/pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Default/Default": [ @@ -213,16 +249,64 @@ "data": "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75Invoke11F9A252" } ], - "/pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertEqualsLambdainvoke/Default/Default": [ + "/pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75" + } + ], + "/pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c" + } + ], + "/pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36cInvoke7568F400" + } + ], + "/pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c" + } + ], + "/pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75AssertEqualsLambdainvoke2346EE1F" + "data": "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7" } ], - "/pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertEqualsLambdainvoke/AssertionResults": [ + "/pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Invoke": [ { "type": "aws:cdk:logicalId", - "data": "AssertionResultsAssertEqualsLambdainvoke98ea6f3253baf793823267fb4d86d1ed" + "data": "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7Invoke1AF08F67" + } + ], + "/pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvokefbdb1fc975f2f372fd64335aa07b46b7" + } + ], + "/pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172" + } + ], + "/pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172Invoke5D442C14" + } + ], + "/pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvoke26ce5a20d1ffee210d056cd2aa005172" } ], "/pipenv/DefaultTest/DeployAssert/BootstrapVersion": [ @@ -239,6 +323,12 @@ ] }, "displayName": "pipenv/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/pipenvDefaultTestDeployAssertF8231517.assets.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/pipenvDefaultTestDeployAssertF8231517.assets.json index 636ffaeafc5ce..0483f3451c18a 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/pipenvDefaultTestDeployAssertF8231517.assets.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/pipenvDefaultTestDeployAssertF8231517.assets.json @@ -1,20 +1,20 @@ { - "version": "21.0.0", + "version": "29.0.0", "files": { - "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": { "source": { - "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.zip", + "objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "60915425ae6d91c88b04adf7c9631b4ea5f48c4764bbff1edc0bc70d57705d3f": { + "18850596c8959107f64d5dfdacaa5c53015e0bb3e8dd6d3f4ba039dad52e576b": { "source": { "path": "pipenvDefaultTestDeployAssertF8231517.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "60915425ae6d91c88b04adf7c9631b4ea5f48c4764bbff1edc0bc70d57705d3f.json", + "objectKey": "18850596c8959107f64d5dfdacaa5c53015e0bb3e8dd6d3f4ba039dad52e576b.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-python/test/integ.function.pipenv.js.snapshot/pipenvDefaultTestDeployAssertF8231517.template.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/pipenvDefaultTestDeployAssertF8231517.template.json index 4c9ade29468ec..34e4c1e79d66a 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/pipenvDefaultTestDeployAssertF8231517.template.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/pipenvDefaultTestDeployAssertF8231517.template.json @@ -11,13 +11,14 @@ }, "service": "Lambda", "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", "parameters": { "FunctionName": { "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerinline53D120C7B0898676" } }, "flattenResponse": "false", - "salt": "1662643820432" + "salt": "1676321224706" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -37,27 +38,6 @@ } } }, - "LambdaInvoke81c9998b1b428b309c8501e21b919d3dAssertEqualsLambdainvoke0BDD9934": { - "Type": "Custom::DeployAssert@AssertEquals", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", - "Arn" - ] - }, - "actual": { - "Fn::GetAtt": [ - "LambdaInvoke81c9998b1b428b309c8501e21b919d3d", - "apiCallResponse" - ] - }, - "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", - "salt": "1662643820433" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": { "Type": "AWS::IAM::Role", "Properties": { @@ -203,6 +183,126 @@ ] } ] + }, + { + "Action": [ + "lambda:Invoke" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "lambda:InvokeFunction" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":lambda:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":function:", + { + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" + } + ] + ] + } + ] + }, + { + "Action": [ + "lambda:Invoke" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "lambda:InvokeFunction" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":lambda:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":function:", + { + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" + } + ] + ] + } + ] + }, + { + "Action": [ + "lambda:Invoke" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "lambda:InvokeFunction" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":lambda:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":function:", + { + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" + } + ] + ] + } + ] } ] } @@ -218,7 +318,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -241,13 +341,14 @@ }, "service": "Lambda", "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", "parameters": { "FunctionName": { "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython384D62BBB58AA8B940" } }, "flattenResponse": "false", - "salt": "1662643820434" + "salt": "1676321224707" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -267,8 +368,8 @@ } } }, - "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292AssertEqualsLambdainvoke3F6858A2": { - "Type": "Custom::DeployAssert@AssertEquals", + "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75": { + "Type": "Custom::DeployAssert@SdkCallLambdainvoke", "Properties": { "ServiceToken": { "Fn::GetAtt": [ @@ -276,19 +377,36 @@ "Arn" ] }, - "actual": { - "Fn::GetAtt": [ - "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292", - "apiCallResponse" - ] - }, + "service": "Lambda", + "api": "invoke", "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", - "salt": "1662643820434" + "parameters": { + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython37C34039A7BB71D94D" + } + }, + "flattenResponse": "false", + "salt": "1676321224707" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75": { + "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75Invoke11F9A252": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython37C34039A7BB71D94D" + }, + "Principal": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + }, + "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c": { "Type": "Custom::DeployAssert@SdkCallLambdainvoke", "Properties": { "ServiceToken": { @@ -299,23 +417,24 @@ }, "service": "Lambda", "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", "parameters": { "FunctionName": { - "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython37C34039A7BB71D94D" + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" } }, "flattenResponse": "false", - "salt": "1662643820434" + "salt": "1676321224708" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75Invoke11F9A252": { + "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36cInvoke7568F400": { "Type": "AWS::Lambda::Permission", "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { - "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython37C34039A7BB71D94D" + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" }, "Principal": { "Fn::GetAtt": [ @@ -325,8 +444,8 @@ } } }, - "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75AssertEqualsLambdainvoke2346EE1F": { - "Type": "Custom::DeployAssert@AssertEquals", + "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7": { + "Type": "Custom::DeployAssert@SdkCallLambdainvoke", "Properties": { "ServiceToken": { "Fn::GetAtt": [ @@ -334,41 +453,120 @@ "Arn" ] }, - "actual": { + "service": "Lambda", + "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", + "parameters": { + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" + } + }, + "flattenResponse": "false", + "salt": "1676321224708" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7Invoke1AF08F67": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" + }, + "Principal": { "Fn::GetAtt": [ - "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", - "apiCallResponse" + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + }, + "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172": { + "Type": "Custom::DeployAssert@SdkCallLambdainvoke", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" ] }, + "service": "Lambda", + "api": "invoke", "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", - "salt": "1662643820434" + "parameters": { + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" + } + }, + "flattenResponse": "false", + "salt": "1676321224708" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" + }, + "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172Invoke5D442C14": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-pipenv:ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" + }, + "Principal": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } } }, "Outputs": { - "AssertionResultsAssertEqualsLambdainvoke556559ea7575e3a52e6d6c32e2c07934": { + "AssertionResultsLambdaInvoke81c9998b1b428b309c8501e21b919d3d": { + "Value": { + "Fn::GetAtt": [ + "LambdaInvoke81c9998b1b428b309c8501e21b919d3d", + "assertion" + ] + } + }, + "AssertionResultsLambdaInvoke9a0beb4ea6cc38db92e9ff664c085292": { + "Value": { + "Fn::GetAtt": [ + "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292", + "assertion" + ] + } + }, + "AssertionResultsLambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75": { + "Value": { + "Fn::GetAtt": [ + "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", + "assertion" + ] + } + }, + "AssertionResultsLambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c": { "Value": { "Fn::GetAtt": [ - "LambdaInvoke81c9998b1b428b309c8501e21b919d3dAssertEqualsLambdainvoke0BDD9934", - "data" + "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c", + "assertion" ] } }, - "AssertionResultsAssertEqualsLambdainvoke921b66a1d8c9b23c2c2caef76d4b249b": { + "AssertionResultsLambdaInvokefbdb1fc975f2f372fd64335aa07b46b7": { "Value": { "Fn::GetAtt": [ - "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292AssertEqualsLambdainvoke3F6858A2", - "data" + "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7", + "assertion" ] } }, - "AssertionResultsAssertEqualsLambdainvoke98ea6f3253baf793823267fb4d86d1ed": { + "AssertionResultsLambdaInvoke26ce5a20d1ffee210d056cd2aa005172": { "Value": { "Fn::GetAtt": [ - "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75AssertEqualsLambdainvoke2346EE1F", - "data" + "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172", + "assertion" ] } } diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/tree.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/tree.json index c8fc3ed91b09b..8c19769996a99 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.js.snapshot/tree.json @@ -4,14 +4,6 @@ "id": "App", "path": "", "children": { - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" - } - }, "integ-lambda-python-pipenv": { "id": "integ-lambda-python-pipenv", "path": "integ-lambda-python-pipenv", @@ -22,11 +14,379 @@ "children": { "ServiceRole": { "id": "ServiceRole", - "path": "integ-lambda-python-pipenv/my_handler_inline/ServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_inline/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_inline/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-pipenv/my_handler_inline/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": "integ-lambda-python-pipenv/my_handler_inline/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-lambda-python-pipenv/my_handler_inline/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-lambda-python-pipenv/my_handler_inline/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": "integ-lambda-python-pipenv/my_handler_inline/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": "2f3bbbf29fb95dea832d2f407fb3af92e2179a31a179650c1e9bad3d5d51afaf.zip" + }, + "role": { + "Fn::GetAtt": [ + "myhandlerinlineServiceRole10C681F6", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "python3.9" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda-python.PythonFunction", + "version": "0.0.0" + } + }, + "my_handler_python_38": { + "id": "my_handler_python_38", + "path": "integ-lambda-python-pipenv/my_handler_python_38", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_python_38/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_python_38/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-pipenv/my_handler_python_38/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": "integ-lambda-python-pipenv/my_handler_python_38/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-lambda-python-pipenv/my_handler_python_38/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-lambda-python-pipenv/my_handler_python_38/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": "integ-lambda-python-pipenv/my_handler_python_38/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": "393d0817d83ce87664be2c627863e3f448f1106ceeb687e3f3c370b7957b9a21.zip" + }, + "role": { + "Fn::GetAtt": [ + "myhandlerpython38ServiceRole2049AFF7", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "python3.8" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda-python.PythonFunction", + "version": "0.0.0" + } + }, + "my_handler_python_37": { + "id": "my_handler_python_37", + "path": "integ-lambda-python-pipenv/my_handler_python_37", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_python_37/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_python_37/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-pipenv/my_handler_python_37/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": "integ-lambda-python-pipenv/my_handler_python_37/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-lambda-python-pipenv/my_handler_python_37/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-lambda-python-pipenv/my_handler_python_37/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": "integ-lambda-python-pipenv/my_handler_python_37/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": "f4e3739faf89086835a11fc5cdc60f9f437560fdc808ba5f7b8c717b280eb2b1.zip" + }, + "role": { + "Fn::GetAtt": [ + "myhandlerpython37ServiceRole45CBD18D", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "python3.7" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda-python.PythonFunction", + "version": "0.0.0" + } + }, + "my_handler_inline_excludes": { + "id": "my_handler_inline_excludes", + "path": "integ-lambda-python-pipenv/my_handler_inline_excludes", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_inline_excludes/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_inline_excludes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", - "path": "integ-lambda-python-pipenv/my_handler_inline/ServiceRole/Resource", + "path": "integ-lambda-python-pipenv/my_handler_inline_excludes/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -71,11 +431,11 @@ }, "Code": { "id": "Code", - "path": "integ-lambda-python-pipenv/my_handler_inline/Code", + "path": "integ-lambda-python-pipenv/my_handler_inline_excludes/Code", "children": { "Stage": { "id": "Stage", - "path": "integ-lambda-python-pipenv/my_handler_inline/Code/Stage", + "path": "integ-lambda-python-pipenv/my_handler_inline_excludes/Code/Stage", "constructInfo": { "fqn": "@aws-cdk/core.AssetStaging", "version": "0.0.0" @@ -83,7 +443,7 @@ }, "AssetBucket": { "id": "AssetBucket", - "path": "integ-lambda-python-pipenv/my_handler_inline/Code/AssetBucket", + "path": "integ-lambda-python-pipenv/my_handler_inline_excludes/Code/AssetBucket", "constructInfo": { "fqn": "@aws-cdk/aws-s3.BucketBase", "version": "0.0.0" @@ -97,7 +457,7 @@ }, "Resource": { "id": "Resource", - "path": "integ-lambda-python-pipenv/my_handler_inline/Resource", + "path": "integ-lambda-python-pipenv/my_handler_inline_excludes/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Lambda::Function", "aws:cdk:cloudformation:props": { @@ -105,11 +465,11 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "803e66cf17a8155efd491fa5e68f796bb74ae8337c455b23b5e52d0e5927b2a7.zip" + "s3Key": "6259c1fcafbecaa6547531670fa651cce171cf49a597b58343c28ad4c6a4ba04.zip" }, "role": { "Fn::GetAtt": [ - "myhandlerinlineServiceRole10C681F6", + "myhandlerinlineexcludesServiceRoleFF9028A3", "Arn" ] }, @@ -128,17 +488,25 @@ "version": "0.0.0" } }, - "my_handler_python_38": { - "id": "my_handler_python_38", - "path": "integ-lambda-python-pipenv/my_handler_python_38", + "my_handler_python_38_excludes": { + "id": "my_handler_python_38_excludes", + "path": "integ-lambda-python-pipenv/my_handler_python_38_excludes", "children": { "ServiceRole": { "id": "ServiceRole", - "path": "integ-lambda-python-pipenv/my_handler_python_38/ServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_python_38_excludes/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_python_38_excludes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", - "path": "integ-lambda-python-pipenv/my_handler_python_38/ServiceRole/Resource", + "path": "integ-lambda-python-pipenv/my_handler_python_38_excludes/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -183,11 +551,11 @@ }, "Code": { "id": "Code", - "path": "integ-lambda-python-pipenv/my_handler_python_38/Code", + "path": "integ-lambda-python-pipenv/my_handler_python_38_excludes/Code", "children": { "Stage": { "id": "Stage", - "path": "integ-lambda-python-pipenv/my_handler_python_38/Code/Stage", + "path": "integ-lambda-python-pipenv/my_handler_python_38_excludes/Code/Stage", "constructInfo": { "fqn": "@aws-cdk/core.AssetStaging", "version": "0.0.0" @@ -195,7 +563,7 @@ }, "AssetBucket": { "id": "AssetBucket", - "path": "integ-lambda-python-pipenv/my_handler_python_38/Code/AssetBucket", + "path": "integ-lambda-python-pipenv/my_handler_python_38_excludes/Code/AssetBucket", "constructInfo": { "fqn": "@aws-cdk/aws-s3.BucketBase", "version": "0.0.0" @@ -209,7 +577,7 @@ }, "Resource": { "id": "Resource", - "path": "integ-lambda-python-pipenv/my_handler_python_38/Resource", + "path": "integ-lambda-python-pipenv/my_handler_python_38_excludes/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Lambda::Function", "aws:cdk:cloudformation:props": { @@ -217,11 +585,11 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "2a6fcac567a26e1be604dec572e270fbd091180dccf23a209e21c5900ce24ff0.zip" + "s3Key": "7885d5d20a5bca7141b637a7e9db57f95730b26b0c4a5d7a6e6db0f392042f7e.zip" }, "role": { "Fn::GetAtt": [ - "myhandlerpython38ServiceRole2049AFF7", + "myhandlerpython38excludesServiceRole05CD433C", "Arn" ] }, @@ -240,17 +608,25 @@ "version": "0.0.0" } }, - "my_handler_python_37": { - "id": "my_handler_python_37", - "path": "integ-lambda-python-pipenv/my_handler_python_37", + "my_handler_python_37_excludes": { + "id": "my_handler_python_37_excludes", + "path": "integ-lambda-python-pipenv/my_handler_python_37_excludes", "children": { "ServiceRole": { "id": "ServiceRole", - "path": "integ-lambda-python-pipenv/my_handler_python_37/ServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_python_37_excludes/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-pipenv/my_handler_python_37_excludes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", - "path": "integ-lambda-python-pipenv/my_handler_python_37/ServiceRole/Resource", + "path": "integ-lambda-python-pipenv/my_handler_python_37_excludes/ServiceRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -295,11 +671,11 @@ }, "Code": { "id": "Code", - "path": "integ-lambda-python-pipenv/my_handler_python_37/Code", + "path": "integ-lambda-python-pipenv/my_handler_python_37_excludes/Code", "children": { "Stage": { "id": "Stage", - "path": "integ-lambda-python-pipenv/my_handler_python_37/Code/Stage", + "path": "integ-lambda-python-pipenv/my_handler_python_37_excludes/Code/Stage", "constructInfo": { "fqn": "@aws-cdk/core.AssetStaging", "version": "0.0.0" @@ -307,7 +683,7 @@ }, "AssetBucket": { "id": "AssetBucket", - "path": "integ-lambda-python-pipenv/my_handler_python_37/Code/AssetBucket", + "path": "integ-lambda-python-pipenv/my_handler_python_37_excludes/Code/AssetBucket", "constructInfo": { "fqn": "@aws-cdk/aws-s3.BucketBase", "version": "0.0.0" @@ -321,7 +697,7 @@ }, "Resource": { "id": "Resource", - "path": "integ-lambda-python-pipenv/my_handler_python_37/Resource", + "path": "integ-lambda-python-pipenv/my_handler_python_37_excludes/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Lambda::Function", "aws:cdk:cloudformation:props": { @@ -329,11 +705,11 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "e223ff54d4d46f8f1e5876b5697de59a81ba36113fa0bf2b46d29917fcbee403.zip" + "s3Key": "53f2ca7d739f5ee14104a478b820bb6f429b8afaa9c00a9aed6cf32538cf7207.zip" }, "role": { "Fn::GetAtt": [ - "myhandlerpython37ServiceRole45CBD18D", + "myhandlerpython37excludesServiceRole083BD595", "Arn" ] }, @@ -379,11 +755,51 @@ "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" } + }, + "Output{\"Ref\":\"myhandlerinlineexcludes9ACF1422\"}": { + "id": "Output{\"Ref\":\"myhandlerinlineexcludes9ACF1422\"}", + "path": "integ-lambda-python-pipenv/Exports/Output{\"Ref\":\"myhandlerinlineexcludes9ACF1422\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython38excludes1CEDD615\"}": { + "id": "Output{\"Ref\":\"myhandlerpython38excludes1CEDD615\"}", + "path": "integ-lambda-python-pipenv/Exports/Output{\"Ref\":\"myhandlerpython38excludes1CEDD615\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython37excludes977F9CDF\"}": { + "id": "Output{\"Ref\":\"myhandlerpython37excludes977F9CDF\"}", + "path": "integ-lambda-python-pipenv/Exports/Output{\"Ref\":\"myhandlerpython37excludes977F9CDF\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-lambda-python-pipenv/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-lambda-python-pipenv/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" } } }, @@ -405,7 +821,7 @@ "path": "pipenv/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" } }, "DeployAssert": { @@ -425,13 +841,13 @@ "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" } }, "Default": { @@ -460,64 +876,18 @@ "version": "0.0.0" } }, - "AssertEqualsLambdainvoke": { - "id": "AssertEqualsLambdainvoke", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertEqualsLambdainvoke", - "children": { - "AssertionProvider": { - "id": "AssertionProvider", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertEqualsLambdainvoke/AssertionProvider", - "children": { - "AssertionsProvider": { - "id": "AssertionsProvider", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertEqualsLambdainvoke/AssertionProvider/AssertionsProvider", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" - } - }, - "Default": { - "id": "Default", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertEqualsLambdainvoke/Default", - "children": { - "Default": { - "id": "Default", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertEqualsLambdainvoke/Default/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } - }, - "AssertionResults": { - "id": "AssertionResults", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertEqualsLambdainvoke/AssertionResults", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" - } - } - }, + "AssertionResults": { + "id": "AssertionResults", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertionResults", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" } }, "SingletonFunction1488541a7b23466481b69b4408076b81": { @@ -551,7 +921,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" } }, "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292": { @@ -567,13 +937,13 @@ "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" } }, "Default": { @@ -602,95 +972,111 @@ "version": "0.0.0" } }, - "AssertEqualsLambdainvoke": { - "id": "AssertEqualsLambdainvoke", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertEqualsLambdainvoke", + "AssertionResults": { + "id": "AssertionResults", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" + } + }, + "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75": { + "id": "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/SdkProvider", "children": { - "AssertionProvider": { - "id": "AssertionProvider", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertEqualsLambdainvoke/AssertionProvider", - "children": { - "AssertionsProvider": { - "id": "AssertionsProvider", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertEqualsLambdainvoke/AssertionProvider/AssertionsProvider", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" - } - } - }, + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" } - }, + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Default", + "children": { "Default": { "id": "Default", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertEqualsLambdainvoke/Default", - "children": { - "Default": { - "id": "Default", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertEqualsLambdainvoke/Default/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } - }, - "AssertionResults": { - "id": "AssertionResults", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertEqualsLambdainvoke/AssertionResults", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "Invoke": { + "id": "Invoke", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Invoke", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" } }, - "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75": { - "id": "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", + "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c": { + "id": "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/SdkProvider", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/SdkProvider/AssertionsProvider", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" } }, "Default": { "id": "Default", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Default", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Default", "children": { "Default": { "id": "Default", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Default/Default", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Default/Default", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -704,70 +1090,164 @@ }, "Invoke": { "id": "Invoke", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Invoke", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Invoke", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, - "AssertEqualsLambdainvoke": { - "id": "AssertEqualsLambdainvoke", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertEqualsLambdainvoke", + "AssertionResults": { + "id": "AssertionResults", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" + } + }, + "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7": { + "id": "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/SdkProvider", "children": { - "AssertionProvider": { - "id": "AssertionProvider", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertEqualsLambdainvoke/AssertionProvider", - "children": { - "AssertionsProvider": { - "id": "AssertionsProvider", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertEqualsLambdainvoke/AssertionProvider/AssertionsProvider", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" - } - } - }, + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.237" } - }, + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Default", + "children": { "Default": { "id": "Default", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertEqualsLambdainvoke/Default", - "children": { - "Default": { - "id": "Default", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertEqualsLambdainvoke/Default/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } - }, - "AssertionResults": { - "id": "AssertionResults", - "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertEqualsLambdainvoke/AssertionResults", + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "Invoke": { + "id": "Invoke", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Invoke", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" + } + }, + "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172": { + "id": "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Default", + "children": { + "Default": { + "id": "Default", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "Invoke": { + "id": "Invoke", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Invoke", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "pipenv/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "pipenv/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "pipenv/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" } } }, @@ -778,14 +1258,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.95" + "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.95" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts index 3d5a31dac63f9..ef43660f67a66 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.pipenv.ts @@ -35,6 +35,33 @@ class TestStack extends Stack { runtime: Runtime.PYTHON_3_7, }); this.functionNames.push(pythonFunction37.functionName); + + const pythonFunction39Excludes = new lambda.PythonFunction(this, 'my_handler_inline_excludes', { + entry: path.join(__dirname, 'lambda-handler-pipenv'), + runtime: Runtime.PYTHON_3_9, + bundling: { + assetExcludes: ['.ignorefile'], + }, + }); + this.functionNames.push(pythonFunction39Excludes.functionName); + + const pythonFunction38Excludes = new lambda.PythonFunction(this, 'my_handler_python_38_excludes', { + entry: path.join(__dirname, 'lambda-handler-pipenv'), + runtime: Runtime.PYTHON_3_8, + bundling: { + assetExcludes: ['.ignorefile'], + }, + }); + this.functionNames.push(pythonFunction38Excludes.functionName); + + const pythonFunction37Excludes = new lambda.PythonFunction(this, 'my_handler_python_37_excludes', { + entry: path.join(__dirname, 'lambda-handler-pipenv'), + runtime: Runtime.PYTHON_3_7, + bundling: { + assetExcludes: ['.ignorefile'], + }, + }); + this.functionNames.push(pythonFunction37Excludes.functionName); } } diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js new file mode 100644 index 0000000000000..58bcb1ef7f38e --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js @@ -0,0 +1,1205 @@ +"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( + // 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-lambda-python/test/integ.function.poetry.js.snapshot/asset.d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.bundle/index.js b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/asset.d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.bundle/index.js deleted file mode 100644 index a9e7e7241efc7..0000000000000 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.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-lambda-python/test/integ.function.poetry.js.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/cdk.out index 8ecc185e9dbee..d8b441d447f8a 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.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-lambda-python/test/integ.function.poetry.js.snapshot/integ-lambda-python-poetry.assets.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ-lambda-python-poetry.assets.json index c1f2d26c393c1..2f7c3109d01de 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ-lambda-python-poetry.assets.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ-lambda-python-poetry.assets.json @@ -1,85 +1,150 @@ { - "version": "21.0.0", + "version": "29.0.0", "files": { - "08c3ae261768dd649ee56933737731af6e347329cb3e1faae2d767714e16c4ca": { + "4f1c60ea53236f3b51047f358750768c203c18bf8a96f637477e41205671054a": { "source": { - "path": "asset.08c3ae261768dd649ee56933737731af6e347329cb3e1faae2d767714e16c4ca", + "path": "asset.4f1c60ea53236f3b51047f358750768c203c18bf8a96f637477e41205671054a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "08c3ae261768dd649ee56933737731af6e347329cb3e1faae2d767714e16c4ca.zip", + "objectKey": "4f1c60ea53236f3b51047f358750768c203c18bf8a96f637477e41205671054a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "14d630e3e802caab7154afce187aade52a56a39aa16c7e510afbfdd6e1e7594e": { + "1676e8f6ce596977ce658377e74033e19d8bde0ab07624a629b7d06fe65247a7": { "source": { - "path": "asset.14d630e3e802caab7154afce187aade52a56a39aa16c7e510afbfdd6e1e7594e", + "path": "asset.1676e8f6ce596977ce658377e74033e19d8bde0ab07624a629b7d06fe65247a7", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "14d630e3e802caab7154afce187aade52a56a39aa16c7e510afbfdd6e1e7594e.zip", + "objectKey": "1676e8f6ce596977ce658377e74033e19d8bde0ab07624a629b7d06fe65247a7.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "1b8c70cb81031c22ef2063a87fcf090a5ce97ad10dcd400e98b01d902760ed35": { + "4888c4716b0076d774aee118a3d18e956968da2de4ccd0fbe8f8c32218e65873": { "source": { - "path": "asset.1b8c70cb81031c22ef2063a87fcf090a5ce97ad10dcd400e98b01d902760ed35", + "path": "asset.4888c4716b0076d774aee118a3d18e956968da2de4ccd0fbe8f8c32218e65873", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1b8c70cb81031c22ef2063a87fcf090a5ce97ad10dcd400e98b01d902760ed35.zip", + "objectKey": "4888c4716b0076d774aee118a3d18e956968da2de4ccd0fbe8f8c32218e65873.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "b973a843566f0b8fcccb1188a899a6ee551a5a57d9460ee11c6270226fa2c745": { + "d5ea1207bacefbceffeec7ca81f7c3d4dfe29a6ddad941c128a8068f3dccff17": { "source": { - "path": "asset.b973a843566f0b8fcccb1188a899a6ee551a5a57d9460ee11c6270226fa2c745", + "path": "asset.d5ea1207bacefbceffeec7ca81f7c3d4dfe29a6ddad941c128a8068f3dccff17", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b973a843566f0b8fcccb1188a899a6ee551a5a57d9460ee11c6270226fa2c745.zip", + "objectKey": "d5ea1207bacefbceffeec7ca81f7c3d4dfe29a6ddad941c128a8068f3dccff17.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "65a6feb33ba221a1468300006b7fd9b123b8894e7eeb1be0e63ef23f6cf9b63e": { + "98dfac4193108bbc1a86f3e2579dd9537edd4896520ad70faefa913f156cceba": { "source": { - "path": "asset.65a6feb33ba221a1468300006b7fd9b123b8894e7eeb1be0e63ef23f6cf9b63e", + "path": "asset.98dfac4193108bbc1a86f3e2579dd9537edd4896520ad70faefa913f156cceba", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "65a6feb33ba221a1468300006b7fd9b123b8894e7eeb1be0e63ef23f6cf9b63e.zip", + "objectKey": "98dfac4193108bbc1a86f3e2579dd9537edd4896520ad70faefa913f156cceba.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "12b313bdc8543ea07689a76b42fb9faa74b6dfb6775de53df4e33d1041b8fe12": { + "93bc4017bed4959830121b1c93b7b9d4be293243966fac22561a1158b5760b17": { "source": { - "path": "asset.12b313bdc8543ea07689a76b42fb9faa74b6dfb6775de53df4e33d1041b8fe12", + "path": "asset.93bc4017bed4959830121b1c93b7b9d4be293243966fac22561a1158b5760b17", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "12b313bdc8543ea07689a76b42fb9faa74b6dfb6775de53df4e33d1041b8fe12.zip", + "objectKey": "93bc4017bed4959830121b1c93b7b9d4be293243966fac22561a1158b5760b17.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "531f02a0310a61f667b94d14b955adbdc98e5290659054cb1039dc4e3a147271": { + "6b80491454eeddb9d632f174e7ce9983ed75a439f5b29fec29558e2a4bfc5b4f": { + "source": { + "path": "asset.6b80491454eeddb9d632f174e7ce9983ed75a439f5b29fec29558e2a4bfc5b4f", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "6b80491454eeddb9d632f174e7ce9983ed75a439f5b29fec29558e2a4bfc5b4f.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "0f311a5a9cf1d4ff2e6ad5cc8e338faf33c4a7f2ee54e5976d23bd639a837684": { + "source": { + "path": "asset.0f311a5a9cf1d4ff2e6ad5cc8e338faf33c4a7f2ee54e5976d23bd639a837684", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "0f311a5a9cf1d4ff2e6ad5cc8e338faf33c4a7f2ee54e5976d23bd639a837684.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "27b2083b4131c590e0b4d22e3d3c89fcee23d169cb409d0a57cd07c45ece2710": { + "source": { + "path": "asset.27b2083b4131c590e0b4d22e3d3c89fcee23d169cb409d0a57cd07c45ece2710", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "27b2083b4131c590e0b4d22e3d3c89fcee23d169cb409d0a57cd07c45ece2710.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "dd7440548d85039b21ad5395bdfc6b62d17762b3a46b4db664a7051f011014c9": { + "source": { + "path": "asset.dd7440548d85039b21ad5395bdfc6b62d17762b3a46b4db664a7051f011014c9", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "dd7440548d85039b21ad5395bdfc6b62d17762b3a46b4db664a7051f011014c9.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "b9674d8cf39b951341a2d609a07272d0673d3fa9eec90ca4d1a8e46c41918416": { + "source": { + "path": "asset.b9674d8cf39b951341a2d609a07272d0673d3fa9eec90ca4d1a8e46c41918416", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "b9674d8cf39b951341a2d609a07272d0673d3fa9eec90ca4d1a8e46c41918416.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "5229b23937027d2d04e79cc15b60f173089f8b3cd504ce2d6de98d0549179da9": { "source": { "path": "integ-lambda-python-poetry.template.json", "packaging": "file" @@ -87,7 +152,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "531f02a0310a61f667b94d14b955adbdc98e5290659054cb1039dc4e3a147271.json", + "objectKey": "5229b23937027d2d04e79cc15b60f173089f8b3cd504ce2d6de98d0549179da9.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-python/test/integ.function.poetry.js.snapshot/integ-lambda-python-poetry.template.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ-lambda-python-poetry.template.json index 572bc92550af7..ed5854db3bf83 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ-lambda-python-poetry.template.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ-lambda-python-poetry.template.json @@ -38,7 +38,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "08c3ae261768dd649ee56933737731af6e347329cb3e1faae2d767714e16c4ca.zip" + "S3Key": "4f1c60ea53236f3b51047f358750768c203c18bf8a96f637477e41205671054a.zip" }, "Role": { "Fn::GetAtt": [ @@ -91,7 +91,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "14d630e3e802caab7154afce187aade52a56a39aa16c7e510afbfdd6e1e7594e.zip" + "S3Key": "1676e8f6ce596977ce658377e74033e19d8bde0ab07624a629b7d06fe65247a7.zip" }, "Role": { "Fn::GetAtt": [ @@ -144,7 +144,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "1b8c70cb81031c22ef2063a87fcf090a5ce97ad10dcd400e98b01d902760ed35.zip" + "S3Key": "4888c4716b0076d774aee118a3d18e956968da2de4ccd0fbe8f8c32218e65873.zip" }, "Role": { "Fn::GetAtt": [ @@ -197,7 +197,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b973a843566f0b8fcccb1188a899a6ee551a5a57d9460ee11c6270226fa2c745.zip" + "S3Key": "d5ea1207bacefbceffeec7ca81f7c3d4dfe29a6ddad941c128a8068f3dccff17.zip" }, "Role": { "Fn::GetAtt": [ @@ -250,7 +250,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "65a6feb33ba221a1468300006b7fd9b123b8894e7eeb1be0e63ef23f6cf9b63e.zip" + "S3Key": "98dfac4193108bbc1a86f3e2579dd9537edd4896520ad70faefa913f156cceba.zip" }, "Role": { "Fn::GetAtt": [ @@ -303,7 +303,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "12b313bdc8543ea07689a76b42fb9faa74b6dfb6775de53df4e33d1041b8fe12.zip" + "S3Key": "93bc4017bed4959830121b1c93b7b9d4be293243966fac22561a1158b5760b17.zip" }, "Role": { "Fn::GetAtt": [ @@ -317,6 +317,271 @@ "DependsOn": [ "myhandlerpython37withhashesServiceRoleD9828997" ] + }, + "myhandlerinlineexcludesServiceRoleFF9028A3": { + "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" + ] + ] + } + ] + } + }, + "myhandlerinlineexcludes9ACF1422": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "6b80491454eeddb9d632f174e7ce9983ed75a439f5b29fec29558e2a4bfc5b4f.zip" + }, + "Role": { + "Fn::GetAtt": [ + "myhandlerinlineexcludesServiceRoleFF9028A3", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.9" + }, + "DependsOn": [ + "myhandlerinlineexcludesServiceRoleFF9028A3" + ] + }, + "myhandlerpython38excludesServiceRole05CD433C": { + "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" + ] + ] + } + ] + } + }, + "myhandlerpython38excludes1CEDD615": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "0f311a5a9cf1d4ff2e6ad5cc8e338faf33c4a7f2ee54e5976d23bd639a837684.zip" + }, + "Role": { + "Fn::GetAtt": [ + "myhandlerpython38excludesServiceRole05CD433C", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.8" + }, + "DependsOn": [ + "myhandlerpython38excludesServiceRole05CD433C" + ] + }, + "myhandlerpython38withhashesexcludesServiceRole8D904BB8": { + "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" + ] + ] + } + ] + } + }, + "myhandlerpython38withhashesexcludes46724D0B": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "27b2083b4131c590e0b4d22e3d3c89fcee23d169cb409d0a57cd07c45ece2710.zip" + }, + "Role": { + "Fn::GetAtt": [ + "myhandlerpython38withhashesexcludesServiceRole8D904BB8", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.8" + }, + "DependsOn": [ + "myhandlerpython38withhashesexcludesServiceRole8D904BB8" + ] + }, + "myhandlerpython37excludesServiceRole083BD595": { + "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" + ] + ] + } + ] + } + }, + "myhandlerpython37excludes977F9CDF": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "dd7440548d85039b21ad5395bdfc6b62d17762b3a46b4db664a7051f011014c9.zip" + }, + "Role": { + "Fn::GetAtt": [ + "myhandlerpython37excludesServiceRole083BD595", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.7" + }, + "DependsOn": [ + "myhandlerpython37excludesServiceRole083BD595" + ] + }, + "myhandlerpython37withhashesexcludesServiceRole3D0EC328": { + "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" + ] + ] + } + ] + } + }, + "myhandlerpython37withhashesexcludes1C88AD13": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "b9674d8cf39b951341a2d609a07272d0673d3fa9eec90ca4d1a8e46c41918416.zip" + }, + "Role": { + "Fn::GetAtt": [ + "myhandlerpython37withhashesexcludesServiceRole3D0EC328", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.7" + }, + "DependsOn": [ + "myhandlerpython37withhashesexcludesServiceRole3D0EC328" + ] } }, "Outputs": { @@ -367,6 +632,46 @@ "Export": { "Name": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython37withhashesE95C48AC15D1F7B4" } + }, + "ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9": { + "Value": { + "Ref": "myhandlerinlineexcludes9ACF1422" + }, + "Export": { + "Name": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" + } + }, + "ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35": { + "Value": { + "Ref": "myhandlerpython38excludes1CEDD615" + }, + "Export": { + "Name": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" + } + }, + "ExportsOutputRefmyhandlerpython38withhashesexcludes46724D0BA6D5A35D": { + "Value": { + "Ref": "myhandlerpython38withhashesexcludes46724D0B" + }, + "Export": { + "Name": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython38withhashesexcludes46724D0BA6D5A35D" + } + }, + "ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3": { + "Value": { + "Ref": "myhandlerpython37excludes977F9CDF" + }, + "Export": { + "Name": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" + } + }, + "ExportsOutputRefmyhandlerpython37withhashesexcludes1C88AD136E888C09": { + "Value": { + "Ref": "myhandlerpython37withhashesexcludes1C88AD13" + }, + "Export": { + "Name": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython37withhashesexcludes1C88AD136E888C09" + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ.json index 373db0c4530d7..23880dcaba239 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "29.0.0", "testCases": { "poetry/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/manifest.json index 3ed278b19b21d..9854bb499a325 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "21.0.0", + "version": "29.0.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "integ-lambda-python-poetry.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}/531f02a0310a61f667b94d14b955adbdc98e5290659054cb1039dc4e3a147271.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5229b23937027d2d04e79cc15b60f173089f8b3cd504ce2d6de98d0549179da9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -111,6 +105,66 @@ "data": "myhandlerpython37withhashesE95C48AC" } ], + "/integ-lambda-python-poetry/my_handler_inline_excludes/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerinlineexcludesServiceRoleFF9028A3" + } + ], + "/integ-lambda-python-poetry/my_handler_inline_excludes/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerinlineexcludes9ACF1422" + } + ], + "/integ-lambda-python-poetry/my_handler_python_38_excludes/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython38excludesServiceRole05CD433C" + } + ], + "/integ-lambda-python-poetry/my_handler_python_38_excludes/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython38excludes1CEDD615" + } + ], + "/integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython38withhashesexcludesServiceRole8D904BB8" + } + ], + "/integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython38withhashesexcludes46724D0B" + } + ], + "/integ-lambda-python-poetry/my_handler_python_37_excludes/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython37excludesServiceRole083BD595" + } + ], + "/integ-lambda-python-poetry/my_handler_python_37_excludes/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython37excludes977F9CDF" + } + ], + "/integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython37withhashesexcludesServiceRole3D0EC328" + } + ], + "/integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myhandlerpython37withhashesexcludes1C88AD13" + } + ], "/integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerinline53D120C7\"}": [ { "type": "aws:cdk:logicalId", @@ -147,70 +201,46 @@ "data": "ExportsOutputRefmyhandlerpython37withhashesE95C48AC15D1F7B4" } ], - "/integ-lambda-python-poetry/BootstrapVersion": [ + "/integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerinlineexcludes9ACF1422\"}": [ { "type": "aws:cdk:logicalId", - "data": "BootstrapVersion" - } - ], - "/integ-lambda-python-poetry/CheckBootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "CheckBootstrapVersion" + "data": "ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" } ], - "myhandlerinlinenohashesServiceRole792CBFEE": [ + "/integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython38excludes1CEDD615\"}": [ { "type": "aws:cdk:logicalId", - "data": "myhandlerinlinenohashesServiceRole792CBFEE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" } ], - "myhandlerinlinenohashes9F4AC298": [ + "/integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython38withhashesexcludes46724D0B\"}": [ { "type": "aws:cdk:logicalId", - "data": "myhandlerinlinenohashes9F4AC298", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "ExportsOutputRefmyhandlerpython38withhashesexcludes46724D0BA6D5A35D" } ], - "myhandlerpython38nohashesServiceRole95183D41": [ + "/integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython37excludes977F9CDF\"}": [ { "type": "aws:cdk:logicalId", - "data": "myhandlerpython38nohashesServiceRole95183D41", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" } ], - "myhandlerpython38nohashesAC448740": [ + "/integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython37withhashesexcludes1C88AD13\"}": [ { "type": "aws:cdk:logicalId", - "data": "myhandlerpython38nohashesAC448740", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "ExportsOutputRefmyhandlerpython37withhashesexcludes1C88AD136E888C09" } ], - "myhandlerpython37nohashesServiceRoleCB0A268B": [ + "/integ-lambda-python-poetry/BootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "myhandlerpython37nohashesServiceRoleCB0A268B", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "BootstrapVersion" } ], - "myhandlerpython37nohashes751F0455": [ + "/integ-lambda-python-poetry/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "myhandlerpython37nohashes751F0455", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "CheckBootstrapVersion" } ] }, @@ -232,7 +262,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}/01462ebb52e8f49b3e2b2706bba447690a46e44b6f000448dac39836d7ccdd8f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/058c58fd505683a76c8707c01d8058cc9c7b13a980cffbbe91b038e2383165a4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -369,6 +399,96 @@ "data": "AssertionResultsLambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89" } ], + "/poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36cInvoke7568F400" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7Invoke1AF08F67" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvokefbdb1fc975f2f372fd64335aa07b46b7" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4Invoke7F9FE784" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172Invoke5D442C14" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvoke26ce5a20d1ffee210d056cd2aa005172" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512Invoke20E8DC10" + } + ], + "/poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsLambdaInvoke6fd2d93b0d07a2b4220fae7c91786512" + } + ], "/poetry/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", @@ -383,6 +503,12 @@ ] }, "displayName": "poetry/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/poetryDefaultTestDeployAssertE9C9CB8F.assets.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/poetryDefaultTestDeployAssertE9C9CB8F.assets.json index c1f5ffea39539..eee0404959223 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/poetryDefaultTestDeployAssertE9C9CB8F.assets.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/poetryDefaultTestDeployAssertE9C9CB8F.assets.json @@ -1,20 +1,20 @@ { - "version": "21.0.0", + "version": "29.0.0", "files": { - "d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb": { + "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": { "source": { - "path": "asset.d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.bundle", + "path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.zip", + "objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "01462ebb52e8f49b3e2b2706bba447690a46e44b6f000448dac39836d7ccdd8f": { + "058c58fd505683a76c8707c01d8058cc9c7b13a980cffbbe91b038e2383165a4": { "source": { "path": "poetryDefaultTestDeployAssertE9C9CB8F.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "01462ebb52e8f49b3e2b2706bba447690a46e44b6f000448dac39836d7ccdd8f.json", + "objectKey": "058c58fd505683a76c8707c01d8058cc9c7b13a980cffbbe91b038e2383165a4.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-python/test/integ.function.poetry.js.snapshot/poetryDefaultTestDeployAssertE9C9CB8F.template.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/poetryDefaultTestDeployAssertE9C9CB8F.template.json index 14f2e1c399cea..3c7eceab71ef7 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/poetryDefaultTestDeployAssertE9C9CB8F.template.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/poetryDefaultTestDeployAssertE9C9CB8F.template.json @@ -18,7 +18,7 @@ } }, "flattenResponse": "false", - "salt": "1665153703471" + "salt": "1676321196191" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -303,6 +303,206 @@ ] } ] + }, + { + "Action": [ + "lambda:Invoke" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "lambda:InvokeFunction" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":lambda:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":function:", + { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" + } + ] + ] + } + ] + }, + { + "Action": [ + "lambda:Invoke" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "lambda:InvokeFunction" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":lambda:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":function:", + { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" + } + ] + ] + } + ] + }, + { + "Action": [ + "lambda:Invoke" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "lambda:InvokeFunction" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":lambda:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":function:", + { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython38withhashesexcludes46724D0BA6D5A35D" + } + ] + ] + } + ] + }, + { + "Action": [ + "lambda:Invoke" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "lambda:InvokeFunction" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":lambda:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":function:", + { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" + } + ] + ] + } + ] + }, + { + "Action": [ + "lambda:Invoke" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "lambda:InvokeFunction" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":lambda:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":function:", + { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython37withhashesexcludes1C88AD136E888C09" + } + ] + ] + } + ] } ] } @@ -318,7 +518,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "d47f7e6772bfdf47ecbc070ffe204baf53bacbfbf7814eb407bd8ea108c1c1bb.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -348,7 +548,7 @@ } }, "flattenResponse": "false", - "salt": "1665153703472" + "salt": "1676321196192" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -386,7 +586,7 @@ } }, "flattenResponse": "false", - "salt": "1665153703472" + "salt": "1676321196192" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -424,7 +624,7 @@ } }, "flattenResponse": "false", - "salt": "1665153703472" + "salt": "1676321196192" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -462,7 +662,7 @@ } }, "flattenResponse": "false", - "salt": "1665153703472" + "salt": "1676321196192" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -500,7 +700,7 @@ } }, "flattenResponse": "false", - "salt": "1665153703472" + "salt": "1676321196192" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -519,6 +719,196 @@ ] } } + }, + "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c": { + "Type": "Custom::DeployAssert@SdkCallLambdainvoke", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Lambda", + "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", + "parameters": { + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" + } + }, + "flattenResponse": "false", + "salt": "1676321196193" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36cInvoke7568F400": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerinlineexcludes9ACF1422FA94AAF9" + }, + "Principal": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + }, + "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7": { + "Type": "Custom::DeployAssert@SdkCallLambdainvoke", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Lambda", + "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", + "parameters": { + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" + } + }, + "flattenResponse": "false", + "salt": "1676321196193" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7Invoke1AF08F67": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython38excludes1CEDD61508A85D35" + }, + "Principal": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + }, + "LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4": { + "Type": "Custom::DeployAssert@SdkCallLambdainvoke", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Lambda", + "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", + "parameters": { + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython38withhashesexcludes46724D0BA6D5A35D" + } + }, + "flattenResponse": "false", + "salt": "1676321196193" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4Invoke7F9FE784": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython38withhashesexcludes46724D0BA6D5A35D" + }, + "Principal": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + }, + "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172": { + "Type": "Custom::DeployAssert@SdkCallLambdainvoke", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Lambda", + "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", + "parameters": { + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" + } + }, + "flattenResponse": "false", + "salt": "1676321196193" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172Invoke5D442C14": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython37excludes977F9CDF40301DA3" + }, + "Principal": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + }, + "LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512": { + "Type": "Custom::DeployAssert@SdkCallLambdainvoke", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Lambda", + "api": "invoke", + "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", + "parameters": { + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython37withhashesexcludes1C88AD136E888C09" + } + }, + "flattenResponse": "false", + "salt": "1676321196193" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512Invoke20E8DC10": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::ImportValue": "integ-lambda-python-poetry:ExportsOutputRefmyhandlerpython37withhashesexcludes1C88AD136E888C09" + }, + "Principal": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } } }, "Outputs": { @@ -569,6 +959,46 @@ "assertion" ] } + }, + "AssertionResultsLambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c": { + "Value": { + "Fn::GetAtt": [ + "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c", + "assertion" + ] + } + }, + "AssertionResultsLambdaInvokefbdb1fc975f2f372fd64335aa07b46b7": { + "Value": { + "Fn::GetAtt": [ + "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7", + "assertion" + ] + } + }, + "AssertionResultsLambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4": { + "Value": { + "Fn::GetAtt": [ + "LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4", + "assertion" + ] + } + }, + "AssertionResultsLambdaInvoke26ce5a20d1ffee210d056cd2aa005172": { + "Value": { + "Fn::GetAtt": [ + "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172", + "assertion" + ] + } + }, + "AssertionResultsLambdaInvoke6fd2d93b0d07a2b4220fae7c91786512": { + "Value": { + "Fn::GetAtt": [ + "LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512", + "assertion" + ] + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/tree.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/tree.json index 3d1428fb4d593..e9258dfb67908 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.js.snapshot/tree.json @@ -4,14 +4,6 @@ "id": "App", "path": "", "children": { - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.123" - } - }, "integ-lambda-python-poetry": { "id": "integ-lambda-python-poetry", "path": "integ-lambda-python-poetry", @@ -24,6 +16,14 @@ "id": "ServiceRole", "path": "integ-lambda-python-poetry/my_handler_inline/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_inline/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-lambda-python-poetry/my_handler_inline/ServiceRole/Resource", @@ -105,7 +105,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "08c3ae261768dd649ee56933737731af6e347329cb3e1faae2d767714e16c4ca.zip" + "s3Key": "4f1c60ea53236f3b51047f358750768c203c18bf8a96f637477e41205671054a.zip" }, "role": { "Fn::GetAtt": [ @@ -136,6 +136,14 @@ "id": "ServiceRole", "path": "integ-lambda-python-poetry/my_handler_inline_with_hashes/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_inline_with_hashes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-lambda-python-poetry/my_handler_inline_with_hashes/ServiceRole/Resource", @@ -217,7 +225,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "14d630e3e802caab7154afce187aade52a56a39aa16c7e510afbfdd6e1e7594e.zip" + "s3Key": "1676e8f6ce596977ce658377e74033e19d8bde0ab07624a629b7d06fe65247a7.zip" }, "role": { "Fn::GetAtt": [ @@ -248,6 +256,14 @@ "id": "ServiceRole", "path": "integ-lambda-python-poetry/my_handler_python_38/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_38/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-lambda-python-poetry/my_handler_python_38/ServiceRole/Resource", @@ -329,7 +345,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "1b8c70cb81031c22ef2063a87fcf090a5ce97ad10dcd400e98b01d902760ed35.zip" + "s3Key": "4888c4716b0076d774aee118a3d18e956968da2de4ccd0fbe8f8c32218e65873.zip" }, "role": { "Fn::GetAtt": [ @@ -360,6 +376,14 @@ "id": "ServiceRole", "path": "integ-lambda-python-poetry/my_handler_python_38_with_hashes/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_38_with_hashes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-lambda-python-poetry/my_handler_python_38_with_hashes/ServiceRole/Resource", @@ -441,7 +465,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "b973a843566f0b8fcccb1188a899a6ee551a5a57d9460ee11c6270226fa2c745.zip" + "s3Key": "d5ea1207bacefbceffeec7ca81f7c3d4dfe29a6ddad941c128a8068f3dccff17.zip" }, "role": { "Fn::GetAtt": [ @@ -472,6 +496,14 @@ "id": "ServiceRole", "path": "integ-lambda-python-poetry/my_handler_python_37/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_37/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-lambda-python-poetry/my_handler_python_37/ServiceRole/Resource", @@ -553,7 +585,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "65a6feb33ba221a1468300006b7fd9b123b8894e7eeb1be0e63ef23f6cf9b63e.zip" + "s3Key": "98dfac4193108bbc1a86f3e2579dd9537edd4896520ad70faefa913f156cceba.zip" }, "role": { "Fn::GetAtt": [ @@ -584,6 +616,14 @@ "id": "ServiceRole", "path": "integ-lambda-python-poetry/my_handler_python_37_with_hashes/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_37_with_hashes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-lambda-python-poetry/my_handler_python_37_with_hashes/ServiceRole/Resource", @@ -665,7 +705,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "12b313bdc8543ea07689a76b42fb9faa74b6dfb6775de53df4e33d1041b8fe12.zip" + "s3Key": "93bc4017bed4959830121b1c93b7b9d4be293243966fac22561a1158b5760b17.zip" }, "role": { "Fn::GetAtt": [ @@ -688,84 +728,740 @@ "version": "0.0.0" } }, - "Exports": { - "id": "Exports", - "path": "integ-lambda-python-poetry/Exports", + "my_handler_inline_excludes": { + "id": "my_handler_inline_excludes", + "path": "integ-lambda-python-poetry/my_handler_inline_excludes", "children": { - "Output{\"Ref\":\"myhandlerinline53D120C7\"}": { - "id": "Output{\"Ref\":\"myhandlerinline53D120C7\"}", - "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerinline53D120C7\"}", + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-lambda-python-poetry/my_handler_inline_excludes/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_inline_excludes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-poetry/my_handler_inline_excludes/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/core.CfnOutput", + "fqn": "@aws-cdk/aws-iam.Role", "version": "0.0.0" } }, - "Output{\"Ref\":\"myhandlerinlinewithhashes352ED54D\"}": { - "id": "Output{\"Ref\":\"myhandlerinlinewithhashes352ED54D\"}", - "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerinlinewithhashes352ED54D\"}", + "Code": { + "id": "Code", + "path": "integ-lambda-python-poetry/my_handler_inline_excludes/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-lambda-python-poetry/my_handler_inline_excludes/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-lambda-python-poetry/my_handler_inline_excludes/Code/AssetBucket", + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketBase", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", + "fqn": "@aws-cdk/aws-s3-assets.Asset", "version": "0.0.0" } }, - "Output{\"Ref\":\"myhandlerpython384D62BBB5\"}": { - "id": "Output{\"Ref\":\"myhandlerpython384D62BBB5\"}", - "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython384D62BBB5\"}", + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-poetry/my_handler_inline_excludes/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": "6b80491454eeddb9d632f174e7ce9983ed75a439f5b29fec29558e2a4bfc5b4f.zip" + }, + "role": { + "Fn::GetAtt": [ + "myhandlerinlineexcludesServiceRoleFF9028A3", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "python3.9" + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", + "fqn": "@aws-cdk/aws-lambda.CfnFunction", "version": "0.0.0" } - }, - "Output{\"Ref\":\"myhandlerpython38withhashesF2275091\"}": { - "id": "Output{\"Ref\":\"myhandlerpython38withhashesF2275091\"}", - "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython38withhashesF2275091\"}", + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda-python.PythonFunction", + "version": "0.0.0" + } + }, + "my_handler_python_38_excludes": { + "id": "my_handler_python_38_excludes", + "path": "integ-lambda-python-poetry/my_handler_python_38_excludes", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_38_excludes/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_38_excludes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-poetry/my_handler_python_38_excludes/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/core.CfnOutput", + "fqn": "@aws-cdk/aws-iam.Role", "version": "0.0.0" } }, - "Output{\"Ref\":\"myhandlerpython37C34039A7\"}": { - "id": "Output{\"Ref\":\"myhandlerpython37C34039A7\"}", - "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython37C34039A7\"}", + "Code": { + "id": "Code", + "path": "integ-lambda-python-poetry/my_handler_python_38_excludes/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-lambda-python-poetry/my_handler_python_38_excludes/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-lambda-python-poetry/my_handler_python_38_excludes/Code/AssetBucket", + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketBase", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", + "fqn": "@aws-cdk/aws-s3-assets.Asset", "version": "0.0.0" } }, - "Output{\"Ref\":\"myhandlerpython37withhashesE95C48AC\"}": { - "id": "Output{\"Ref\":\"myhandlerpython37withhashesE95C48AC\"}", - "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython37withhashesE95C48AC\"}", + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-poetry/my_handler_python_38_excludes/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": "0f311a5a9cf1d4ff2e6ad5cc8e338faf33c4a7f2ee54e5976d23bd639a837684.zip" + }, + "role": { + "Fn::GetAtt": [ + "myhandlerpython38excludesServiceRole05CD433C", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "python3.8" + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", + "fqn": "@aws-cdk/aws-lambda.CfnFunction", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.123" + "fqn": "@aws-cdk/aws-lambda-python.PythonFunction", + "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" - } - }, - "poetry": { - "id": "poetry", - "path": "poetry", - "children": { - "DefaultTest": { - "id": "DefaultTest", - "path": "poetry/DefaultTest", + }, + "my_handler_python_38_with_hashes_excludes": { + "id": "my_handler_python_38_with_hashes_excludes", + "path": "integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes/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": "integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes/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": "integ-lambda-python-poetry/my_handler_python_38_with_hashes_excludes/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": "27b2083b4131c590e0b4d22e3d3c89fcee23d169cb409d0a57cd07c45ece2710.zip" + }, + "role": { + "Fn::GetAtt": [ + "myhandlerpython38withhashesexcludesServiceRole8D904BB8", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "python3.8" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda-python.PythonFunction", + "version": "0.0.0" + } + }, + "my_handler_python_37_excludes": { + "id": "my_handler_python_37_excludes", + "path": "integ-lambda-python-poetry/my_handler_python_37_excludes", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_37_excludes/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_37_excludes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-poetry/my_handler_python_37_excludes/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": "integ-lambda-python-poetry/my_handler_python_37_excludes/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-lambda-python-poetry/my_handler_python_37_excludes/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-lambda-python-poetry/my_handler_python_37_excludes/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": "integ-lambda-python-poetry/my_handler_python_37_excludes/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": "dd7440548d85039b21ad5395bdfc6b62d17762b3a46b4db664a7051f011014c9.zip" + }, + "role": { + "Fn::GetAtt": [ + "myhandlerpython37excludesServiceRole083BD595", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "python3.7" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda-python.PythonFunction", + "version": "0.0.0" + } + }, + "my_handler_python_37_with_hashes_excludes": { + "id": "my_handler_python_37_with_hashes_excludes", + "path": "integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes/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": "integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes/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": "integ-lambda-python-poetry/my_handler_python_37_with_hashes_excludes/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": "b9674d8cf39b951341a2d609a07272d0673d3fa9eec90ca4d1a8e46c41918416.zip" + }, + "role": { + "Fn::GetAtt": [ + "myhandlerpython37withhashesexcludesServiceRole3D0EC328", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "python3.7" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda-python.PythonFunction", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "integ-lambda-python-poetry/Exports", + "children": { + "Output{\"Ref\":\"myhandlerinline53D120C7\"}": { + "id": "Output{\"Ref\":\"myhandlerinline53D120C7\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerinline53D120C7\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerinlinewithhashes352ED54D\"}": { + "id": "Output{\"Ref\":\"myhandlerinlinewithhashes352ED54D\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerinlinewithhashes352ED54D\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython384D62BBB5\"}": { + "id": "Output{\"Ref\":\"myhandlerpython384D62BBB5\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython384D62BBB5\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython38withhashesF2275091\"}": { + "id": "Output{\"Ref\":\"myhandlerpython38withhashesF2275091\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython38withhashesF2275091\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython37C34039A7\"}": { + "id": "Output{\"Ref\":\"myhandlerpython37C34039A7\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython37C34039A7\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython37withhashesE95C48AC\"}": { + "id": "Output{\"Ref\":\"myhandlerpython37withhashesE95C48AC\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython37withhashesE95C48AC\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerinlineexcludes9ACF1422\"}": { + "id": "Output{\"Ref\":\"myhandlerinlineexcludes9ACF1422\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerinlineexcludes9ACF1422\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython38excludes1CEDD615\"}": { + "id": "Output{\"Ref\":\"myhandlerpython38excludes1CEDD615\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython38excludes1CEDD615\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython38withhashesexcludes46724D0B\"}": { + "id": "Output{\"Ref\":\"myhandlerpython38withhashesexcludes46724D0B\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython38withhashesexcludes46724D0B\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython37excludes977F9CDF\"}": { + "id": "Output{\"Ref\":\"myhandlerpython37excludes977F9CDF\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython37excludes977F9CDF\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"myhandlerpython37withhashesexcludes1C88AD13\"}": { + "id": "Output{\"Ref\":\"myhandlerpython37withhashesexcludes1C88AD13\"}", + "path": "integ-lambda-python-poetry/Exports/Output{\"Ref\":\"myhandlerpython37withhashesexcludes1C88AD13\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-lambda-python-poetry/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-lambda-python-poetry/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "poetry": { + "id": "poetry", + "path": "poetry", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "poetry/DefaultTest", "children": { "Default": { "id": "Default", "path": "poetry/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.123" + "version": "10.1.237" } }, "DeployAssert": { @@ -778,14 +1474,172 @@ "children": { "SdkProvider": { "id": "SdkProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/Default", + "children": { + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "Invoke": { + "id": "Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/Invoke", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81": { + "id": "SingletonFunction1488541a7b23466481b69b4408076b81", + "path": "poetry/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", + "children": { + "Staging": { + "id": "Staging", + "path": "poetry/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "poetry/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "poetry/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + }, + "LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8": { + "id": "LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/Default", + "children": { + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "Invoke": { + "id": "Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/Invoke", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" + } + }, + "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292": { + "id": "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/SdkProvider/AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.123" + "version": "10.1.237" } } }, @@ -796,11 +1650,11 @@ }, "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/Default", "children": { "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/Default/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/Default/Default", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -814,7 +1668,7 @@ }, "Invoke": { "id": "Invoke", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/Invoke", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -822,7 +1676,7 @@ }, "AssertionResults": { "id": "AssertionResults", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke81c9998b1b428b309c8501e21b919d3d/AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertionResults", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -834,54 +1688,206 @@ "version": "0.0.0" } }, - "SingletonFunction1488541a7b23466481b69b4408076b81": { - "id": "SingletonFunction1488541a7b23466481b69b4408076b81", - "path": "poetry/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", + "LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e": { + "id": "LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e", "children": { - "Staging": { - "id": "Staging", - "path": "poetry/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", + "SdkProvider": { + "id": "SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", "version": "0.0.0" } }, - "Role": { - "id": "Role", - "path": "poetry/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/Default", + "children": { + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "Invoke": { + "id": "Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/Invoke", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, - "Handler": { - "id": "Handler", - "path": "poetry/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", + "AssertionResults": { + "id": "AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" + } + }, + "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75": { + "id": "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Default", + "children": { + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "Invoke": { + "id": "Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Invoke", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" + } + }, + "LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89": { + "id": "LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/Default", + "children": { + "Default": { + "id": "Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "Invoke": { + "id": "Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/Invoke", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.123" + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "version": "0.0.0" } }, - "LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8": { - "id": "LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8", + "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c": { + "id": "LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/SdkProvider/AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.123" + "version": "10.1.237" } } }, @@ -892,11 +1898,11 @@ }, "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Default", "children": { "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/Default/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Default/Default", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -910,7 +1916,7 @@ }, "Invoke": { "id": "Invoke", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/Invoke", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -918,7 +1924,7 @@ }, "AssertionResults": { "id": "AssertionResults", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke82a73e0d5d0fdcb04565e4d81ef342b8/AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fb5582f0ea96db4d3c0326fb42fe36c/AssertionResults", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -930,20 +1936,20 @@ "version": "0.0.0" } }, - "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292": { - "id": "LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292", + "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7": { + "id": "LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/SdkProvider/AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.123" + "version": "10.1.237" } } }, @@ -954,11 +1960,11 @@ }, "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Default", "children": { "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/Default/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Default/Default", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -972,7 +1978,7 @@ }, "Invoke": { "id": "Invoke", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/Invoke", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -980,7 +1986,7 @@ }, "AssertionResults": { "id": "AssertionResults", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke9a0beb4ea6cc38db92e9ff664c085292/AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokefbdb1fc975f2f372fd64335aa07b46b7/AssertionResults", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -992,20 +1998,20 @@ "version": "0.0.0" } }, - "LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e": { - "id": "LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e", + "LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4": { + "id": "LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/SdkProvider/AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.123" + "version": "10.1.237" } } }, @@ -1016,11 +2022,11 @@ }, "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4/Default", "children": { "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/Default/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4/Default/Default", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -1034,7 +2040,7 @@ }, "Invoke": { "id": "Invoke", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4/Invoke", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -1042,7 +2048,7 @@ }, "AssertionResults": { "id": "AssertionResults", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26497bb1c12c14ed3deada8d7d76b39e/AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvokeead1d1e2cc2d2a843a514ffdc015b2c4/AssertionResults", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -1054,20 +2060,20 @@ "version": "0.0.0" } }, - "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75": { - "id": "LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75", + "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172": { + "id": "LambdaInvoke26ce5a20d1ffee210d056cd2aa005172", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/SdkProvider/AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.123" + "version": "10.1.237" } } }, @@ -1078,11 +2084,11 @@ }, "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Default", "children": { "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Default/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Default/Default", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -1096,7 +2102,7 @@ }, "Invoke": { "id": "Invoke", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/Invoke", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -1104,7 +2110,7 @@ }, "AssertionResults": { "id": "AssertionResults", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke631dde0680edf7d2f0eea8d9b9c06c75/AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke26ce5a20d1ffee210d056cd2aa005172/AssertionResults", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -1116,20 +2122,20 @@ "version": "0.0.0" } }, - "LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89": { - "id": "LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89", + "LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512": { + "id": "LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/SdkProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/SdkProvider/AssertionsProvider", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.123" + "version": "10.1.237" } } }, @@ -1140,11 +2146,11 @@ }, "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512/Default", "children": { "Default": { "id": "Default", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/Default/Default", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512/Default/Default", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -1158,7 +2164,7 @@ }, "Invoke": { "id": "Invoke", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/Invoke", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512/Invoke", "constructInfo": { "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" @@ -1166,7 +2172,7 @@ }, "AssertionResults": { "id": "AssertionResults", - "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke8cbaf98b5be6e4f6f81f5f10b5b8dc89/AssertionResults", + "path": "poetry/DefaultTest/DeployAssert/LambdaInvoke6fd2d93b0d07a2b4220fae7c91786512/AssertionResults", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -1177,6 +2183,22 @@ "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "poetry/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "poetry/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1195,6 +2217,14 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts index 64ef3a8da3a70..3f791886e8d7d 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.poetry.ts @@ -60,6 +60,53 @@ class TestStack extends Stack { }); this.functionNames.push(pythonFunction37WithHashes.functionName); + const pythonFunction39Excludes = new lambda.PythonFunction(this, 'my_handler_inline_excludes', { + entry: path.join(__dirname, 'lambda-handler-poetry'), + runtime: Runtime.PYTHON_3_9, + bundling: { + assetExcludes: ['.ignorefile'], + }, + }); + this.functionNames.push(pythonFunction39Excludes.functionName); + + const pythonFunction38Excludes = new lambda.PythonFunction(this, 'my_handler_python_38_excludes', { + entry: path.join(__dirname, 'lambda-handler-poetry'), + runtime: Runtime.PYTHON_3_8, + bundling: { + assetExcludes: ['.ignorefile'], + }, + }); + this.functionNames.push(pythonFunction38Excludes.functionName); + + const pythonFunction38WithHashesExcludes = new lambda.PythonFunction(this, 'my_handler_python_38_with_hashes_excludes', { + entry: path.join(__dirname, 'lambda-handler-poetry'), + runtime: Runtime.PYTHON_3_8, + bundling: { + poetryIncludeHashes: true, + assetExcludes: ['.ignorefile'], + }, + }); + this.functionNames.push(pythonFunction38WithHashesExcludes.functionName); + + const pythonFunction37Excludes = new lambda.PythonFunction(this, 'my_handler_python_37_excludes', { + entry: path.join(__dirname, 'lambda-handler-poetry'), + runtime: Runtime.PYTHON_3_7, + bundling: { + assetExcludes: ['.ignorefile'], + }, + }); + this.functionNames.push(pythonFunction37Excludes.functionName); + + const pythonFunction37WithHashesExcludes = new lambda.PythonFunction(this, 'my_handler_python_37_with_hashes_excludes', { + entry: path.join(__dirname, 'lambda-handler-poetry'), + runtime: Runtime.PYTHON_3_7, + bundling: { + poetryIncludeHashes: true, + assetExcludes: ['.ignorefile'], + }, + }); + this.functionNames.push(pythonFunction37WithHashesExcludes.functionName); + } } diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.ts b/packages/@aws-cdk/aws-lambda-python/test/integ.function.ts index e794c7afbb7a8..93e5b0d403b23 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.ts @@ -14,19 +14,33 @@ import * as lambda from '../lib'; */ class TestStack extends Stack { - public readonly functionName: string; + public readonly functionNames: string[] = []; constructor(scope: Construct, id: string, props?: StackProps) { super(scope, id, props); - const fn = new lambda.PythonFunction(this, 'my_handler', { + const defaultFunction = new lambda.PythonFunction(this, 'my_handler', { entry: path.join(__dirname, 'lambda-handler'), runtime: Runtime.PYTHON_3_9, }); - this.functionName = fn.functionName; + this.functionNames.push(defaultFunction.functionName); - new CfnOutput(this, 'FunctionArn', { - value: fn.functionArn, + new CfnOutput(this, 'DefaultFunctionArn', { + value: defaultFunction.functionArn, }); + + const functionWithExcludes = new lambda.PythonFunction(this, 'my_handler_excludes', { + entry: path.join(__dirname, 'lambda-handler'), + runtime: Runtime.PYTHON_3_9, + bundling: { + assetExcludes: ['.ignorefiles'], + }, + }); + this.functionNames.push(functionWithExcludes.functionName); + + new CfnOutput(this, 'FunctionArnWithExcludes', { + value: functionWithExcludes.functionArn, + }); + } } @@ -37,12 +51,14 @@ const integ = new IntegTest(app, 'lambda-python-function', { stackUpdateWorkflow: false, }); -const invoke = integ.assertions.invokeFunction({ - functionName: testCase.functionName, -}); +testCase.functionNames.forEach(functionName => { + const invoke = integ.assertions.invokeFunction({ + functionName: functionName, + }); -invoke.expect(ExpectedResult.objectLike({ - Payload: '200', -})); + invoke.expect(ExpectedResult.objectLike({ + Payload: '200', + })); +}); app.synth(); diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/.ignorelist b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/.ignorelist new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/@aws-cdk/aws-logs/README.md b/packages/@aws-cdk/aws-logs/README.md index 784ab7e91760c..5a6a28f74547d 100644 --- a/packages/@aws-cdk/aws-logs/README.md +++ b/packages/@aws-cdk/aws-logs/README.md @@ -330,6 +330,14 @@ new logs.QueryDefinition(this, 'QueryDefinition', { queryDefinitionName: 'MyQuery', queryString: new logs.QueryString({ fields: ['@timestamp', '@message'], + parseStatements: [ + '@message "[*] *" as loggingType, loggingMessage', + '@message "<*>: *" as differentLoggingType, differentLoggingMessage', + ], + filterStatements: [ + 'loggingType = "ERROR"', + 'loggingMessage = "A very strange error occurred!"', + ], sort: '@timestamp desc', limit: 20, }), diff --git a/packages/@aws-cdk/aws-logs/lib/query-definition.ts b/packages/@aws-cdk/aws-logs/lib/query-definition.ts index 2dff1ad3d93e1..09594756d4cb2 100644 --- a/packages/@aws-cdk/aws-logs/lib/query-definition.ts +++ b/packages/@aws-cdk/aws-logs/lib/query-definition.ts @@ -16,19 +16,43 @@ export interface QueryStringProps { readonly fields?: string[]; /** - * Extracts data from a log field and creates one or more ephemeral fields that you can process further in the query. + * A single statement for parsing data from a log field and creating ephemeral fields that can + * be processed further in the query. * + * @deprecated Use `parseStatements` instead * @default - no parse in QueryString */ readonly parse?: string; /** - * Filters the results of a query that's based on one or more conditions. + * An array of one or more statements for parsing data from a log field and creating ephemeral + * fields that can be processed further in the query. Each provided statement generates a separate + * parse line in the query string. * + * Note: If provided, this property overrides any value provided for the `parse` property. + * + * @default - no parse in QueryString + */ + readonly parseStatements?: string[]; + + /** + * A single statement for filtering the results of a query based on a boolean expression. + * + * @deprecated Use `filterStatements` instead * @default - no filter in QueryString */ readonly filter?: string; + /** + * An array of one or more statements for filtering the results of a query based on a boolean + * expression. Each provided statement generates a separate filter line in the query string. + * + * Note: If provided, this property overrides any value provided for the `filter` property. + * + * @default - no filter in QueryString + */ + readonly filterStatements?: string[]; + /** * Uses log field values to calculate aggregate statistics. * @@ -58,23 +82,13 @@ export interface QueryStringProps { readonly display?: string; } -interface QueryStringMap { - readonly fields?: string, - readonly parse?: string, - readonly filter?: string, - readonly stats?: string, - readonly sort?: string, - readonly limit?: Number, - readonly display?: string, -} - /** * Define a QueryString */ export class QueryString { private readonly fields?: string[]; - private readonly parse?: string; - private readonly filter?: string; + private readonly parse: string[]; + private readonly filter: string[]; private readonly stats?: string; private readonly sort?: string; private readonly limit?: Number; @@ -82,38 +96,74 @@ export class QueryString { constructor(props: QueryStringProps = {}) { this.fields = props.fields; - this.parse = props.parse; - this.filter = props.filter; this.stats = props.stats; this.sort = props.sort; this.limit = props.limit; this.display = props.display; + + // Determine parsing by either the parseStatements or parse properties, or default to empty array + if (props.parseStatements) { + this.parse = props.parseStatements; + } else if (props.parse) { + this.parse = [props.parse]; + } else { + this.parse = []; + } + + // Determine filtering by either the filterStatements or filter properties, or default to empty array + if (props.filterStatements) { + this.filter = props.filterStatements; + } else if (props.filter) { + this.filter = [props.filter]; + } else { + this.filter = []; + } } /** * String representation of this QueryString. */ public toString(): string { - return noUndef({ - fields: this.fields !== undefined ? this.fields.join(', ') : this.fields, - parse: this.parse, - filter: this.filter, - stats: this.stats, - sort: this.sort, - limit: this.limit, - display: this.display, - }).join('\n| '); + return [ + this.buildQueryLine('fields', this.fields?.join(', ')), + ...this.buildQueryLines('parse', this.parse), + ...this.buildQueryLines('filter', this.filter), + this.buildQueryLine('stats', this.stats), + this.buildQueryLine('sort', this.sort), + this.buildQueryLine('limit', this.limit?.toString()), + this.buildQueryLine('display', this.display), + ].filter( + (queryLine) => queryLine !== undefined && queryLine.length > 0, + ).join('\n| '); } -} -function noUndef(x: QueryStringMap): string[] { - const ret: string[] = []; - for (const [key, value] of Object.entries(x)) { - if (value !== undefined) { - ret.push(`${key} ${value}`); + /** + * Build an array of query lines given a command and statement(s). + * + * @param command a query command + * @param statements one or more query statements for the specified command, or undefined + * @returns an array of the query string lines generated from the provided command and statements + */ + private buildQueryLines(command: string, statements?: string[]): string[] { + if (statements === undefined) { + return []; } + + return statements.map( + (statement: string): string => this.buildQueryLine(command, statement), + ); + } + + /** + * Build a single query line given a command and statement. + * + * @param command a query command + * @param statement a single query statement + * @returns a single query string line generated from the provided command and statement + */ + private buildQueryLine(command: string, statement?: string): string { + return statement ? `${command} ${statement}` : ''; } - return ret; } /** diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index a01d8565ff923..41dff1f9d17dd 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.110", "@types/jest": "^27.5.2", "@types/sinon": "^9.0.11", - "aws-sdk": "^2.1211.0", + "aws-sdk": "^2.1317.0", "aws-sdk-mock": "5.6.0", "jest": "^27.5.1", "nock": "^13.3.0", diff --git a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/LogsInsightsQueryDefinitionIntegTestDefaultTestDeployAssert902BAAD5.assets.json b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/LogsInsightsQueryDefinitionIntegTestDefaultTestDeployAssert902BAAD5.assets.json index faca19c9ec2b8..7e7b72e0995a4 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/LogsInsightsQueryDefinitionIntegTestDefaultTestDeployAssert902BAAD5.assets.json +++ b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/LogsInsightsQueryDefinitionIntegTestDefaultTestDeployAssert902BAAD5.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "29.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/aws-cdk-logs-insights-querydefinition-integ.assets.json b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/aws-cdk-logs-insights-querydefinition-integ.assets.json index 7388475903110..98998264c32c0 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/aws-cdk-logs-insights-querydefinition-integ.assets.json +++ b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/aws-cdk-logs-insights-querydefinition-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "29.0.0", "files": { - "e6a0a51961925fbc37d9b81431449c256ed453f98089eb70f83850f237b4d722": { + "3546c78647ea20567832041c960a034787f9bfc0128226ea8fbc0894366a4dd0": { "source": { "path": "aws-cdk-logs-insights-querydefinition-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e6a0a51961925fbc37d9b81431449c256ed453f98089eb70f83850f237b4d722.json", + "objectKey": "3546c78647ea20567832041c960a034787f9bfc0128226ea8fbc0894366a4dd0.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-logs/test/integ.save-logs-insights-query-definition.js.snapshot/aws-cdk-logs-insights-querydefinition-integ.template.json b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/aws-cdk-logs-insights-querydefinition-integ.template.json index d4df6bf7837ca..16808c0ca7ef0 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/aws-cdk-logs-insights-querydefinition-integ.template.json +++ b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/aws-cdk-logs-insights-querydefinition-integ.template.json @@ -19,6 +19,18 @@ } ] } + }, + "QueryDefinitionWithMultipleStatements58A3EF74": { + "Type": "AWS::Logs::QueryDefinition", + "Properties": { + "Name": "QueryDefinitionWithMultipleStatements", + "QueryString": "fields @timestamp, @message\n| parse @message \"[*] *\" as loggingType, loggingMessage\n| parse @message \"<*>: *\" as differentLoggingType, differentLoggingMessage\n| filter loggingType = \"ERROR\"\n| filter loggingMessage = \"A very strange error occurred!\"\n| sort @timestamp desc\n| limit 20\n| display loggingMessage", + "LogGroupNames": [ + { + "Ref": "LogGroupF5B46931" + } + ] + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/cdk.out b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/cdk.out index 8ecc185e9dbee..d8b441d447f8a 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.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-logs/test/integ.save-logs-insights-query-definition.js.snapshot/integ.json b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/integ.json index 5c5e893333693..f445dff967844 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "29.0.0", "testCases": { "LogsInsightsQueryDefinitionIntegTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/manifest.json b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/manifest.json index d6fb5b02dcca8..a975ff9d5fae9 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "29.0.0", "artifacts": { "aws-cdk-logs-insights-querydefinition-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}/e6a0a51961925fbc37d9b81431449c256ed453f98089eb70f83850f237b4d722.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3546c78647ea20567832041c960a034787f9bfc0128226ea8fbc0894366a4dd0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -45,6 +45,12 @@ "data": "QueryDefinition4190BC36" } ], + "/aws-cdk-logs-insights-querydefinition-integ/QueryDefinitionWithMultipleStatements/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "QueryDefinitionWithMultipleStatements58A3EF74" + } + ], "/aws-cdk-logs-insights-querydefinition-integ/BootstrapVersion": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/tree.json b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/tree.json index 9e04ca4a9a7fa..1bbbc61ba797b 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.js.snapshot/tree.json @@ -62,6 +62,36 @@ "version": "0.0.0" } }, + "QueryDefinitionWithMultipleStatements": { + "id": "QueryDefinitionWithMultipleStatements", + "path": "aws-cdk-logs-insights-querydefinition-integ/QueryDefinitionWithMultipleStatements", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-logs-insights-querydefinition-integ/QueryDefinitionWithMultipleStatements/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::QueryDefinition", + "aws:cdk:cloudformation:props": { + "name": "QueryDefinitionWithMultipleStatements", + "queryString": "fields @timestamp, @message\n| parse @message \"[*] *\" as loggingType, loggingMessage\n| parse @message \"<*>: *\" as differentLoggingType, differentLoggingMessage\n| filter loggingType = \"ERROR\"\n| filter loggingMessage = \"A very strange error occurred!\"\n| sort @timestamp desc\n| limit 20\n| display loggingMessage", + "logGroupNames": [ + { + "Ref": "LogGroupF5B46931" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnQueryDefinition", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.QueryDefinition", + "version": "0.0.0" + } + }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-cdk-logs-insights-querydefinition-integ/BootstrapVersion", @@ -97,7 +127,7 @@ "path": "LogsInsightsQueryDefinitionIntegTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } }, "DeployAssert": { @@ -143,7 +173,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.ts b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.ts index b3f19a5940d11..ad022bcc486a7 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.ts +++ b/packages/@aws-cdk/aws-logs/test/integ.save-logs-insights-query-definition.ts @@ -11,6 +11,7 @@ class LogsInsightsQueryDefinitionIntegStack extends Stack { removalPolicy: RemovalPolicy.DESTROY, }); + // Test query creation with single parse and filter statements new QueryDefinition(this, 'QueryDefinition', { queryDefinitionName: 'QueryDefinition', queryString: new QueryString({ @@ -23,6 +24,26 @@ class LogsInsightsQueryDefinitionIntegStack extends Stack { }), logGroups: [logGroup], }); + + // Test query creation with multiple parse and filter statements + new QueryDefinition(this, 'QueryDefinitionWithMultipleStatements', { + queryDefinitionName: 'QueryDefinitionWithMultipleStatements', + queryString: new QueryString({ + fields: ['@timestamp', '@message'], + parseStatements: [ + '@message "[*] *" as loggingType, loggingMessage', + '@message "<*>: *" as differentLoggingType, differentLoggingMessage', + ], + filterStatements: [ + 'loggingType = "ERROR"', + 'loggingMessage = "A very strange error occurred!"', + ], + sort: '@timestamp desc', + limit: 20, + display: 'loggingMessage', + }), + logGroups: [logGroup], + }); } } diff --git a/packages/@aws-cdk/aws-logs/test/query-definition.test.ts b/packages/@aws-cdk/aws-logs/test/query-definition.test.ts index 7b9fd5cb7d4ff..10593be3c35f6 100644 --- a/packages/@aws-cdk/aws-logs/test/query-definition.test.ts +++ b/packages/@aws-cdk/aws-logs/test/query-definition.test.ts @@ -1,4 +1,5 @@ import { Template } from '@aws-cdk/assertions'; +import { testDeprecated } from '@aws-cdk/cdk-build-tools'; import { Stack } from '@aws-cdk/core'; import { LogGroup, QueryDefinition, QueryString } from '../lib'; @@ -49,7 +50,7 @@ describe('query definition', () => { }); }); - test('create a query definition with all commands', () => { + testDeprecated('create a query definition with all commands', () => { // GIVEN const stack = new Stack(); @@ -75,4 +76,64 @@ describe('query definition', () => { QueryString: 'fields @timestamp, @message\n| parse @message "[*] *" as loggingType, loggingMessage\n| filter loggingType = "ERROR"\n| sort @timestamp desc\n| limit 20\n| display loggingMessage', }); }); + + test('create a query definition with multiple statements for supported commands', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + new QueryDefinition(stack, 'QueryDefinition', { + queryDefinitionName: 'MyQuery', + queryString: new QueryString({ + fields: ['@timestamp', '@message'], + parseStatements: [ + '@message "[*] *" as loggingType, loggingMessage', + '@message "<*>: *" as differentLoggingType, differentLoggingMessage', + ], + filterStatements: [ + 'loggingType = "ERROR"', + 'loggingMessage = "A very strange error occurred!"', + ], + sort: '@timestamp desc', + limit: 20, + }), + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Logs::QueryDefinition', { + Name: 'MyQuery', + QueryString: 'fields @timestamp, @message\n| parse @message "[*] *" as loggingType, loggingMessage\n| parse @message "<*>: *" as differentLoggingType, differentLoggingMessage\n| filter loggingType = "ERROR"\n| filter loggingMessage = "A very strange error occurred!"\n| sort @timestamp desc\n| limit 20', + }); + }); + + testDeprecated('create a query with both single and multi statement properties for filtering and parsing', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + new QueryDefinition(stack, 'QueryDefinition', { + queryDefinitionName: 'MyQuery', + queryString: new QueryString({ + fields: ['@timestamp', '@message'], + parse: '@message "[*] *" as loggingType, loggingMessage', + parseStatements: [ + '@message "[*] *" as loggingType, loggingMessage', + '@message "<*>: *" as differentLoggingType, differentLoggingMessage', + ], + filter: 'loggingType = "ERROR"', + filterStatements: [ + 'loggingType = "ERROR"', + 'loggingMessage = "A very strange error occurred!"', + ], + sort: '@timestamp desc', + limit: 20, + }), + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Logs::QueryDefinition', { + Name: 'MyQuery', + QueryString: 'fields @timestamp, @message\n| parse @message "[*] *" as loggingType, loggingMessage\n| parse @message "<*>: *" as differentLoggingType, differentLoggingMessage\n| filter loggingType = "ERROR"\n| filter loggingMessage = "A very strange error occurred!"\n| sort @timestamp desc\n| limit 20', + }); + }); }); diff --git a/packages/@aws-cdk/aws-redshift/README.md b/packages/@aws-cdk/aws-redshift/README.md index 1f701abe84c09..e73ee4c361732 100644 --- a/packages/@aws-cdk/aws-redshift/README.md +++ b/packages/@aws-cdk/aws-redshift/README.md @@ -200,32 +200,17 @@ new Table(this, 'Table', { }); ``` -Tables and their respective columns can be configured to contain comments: +Tables can also be configured with a comment: ```ts fixture=cluster new Table(this, 'Table', { tableColumns: [ - { name: 'col1', dataType: 'varchar(4)', comment: 'This is a column comment' }, - { name: 'col2', dataType: 'float', comment: 'This is a another column comment' } - ], - cluster: cluster, - databaseName: 'databaseName', - tableComment: 'This is a table comment', -}); -``` - -Table columns can be configured to use a specific compression encoding: - -```ts fixture=cluster -import { ColumnEncoding } from '@aws-cdk/aws-redshift'; - -new Table(this, 'Table', { - tableColumns: [ - { name: 'col1', dataType: 'varchar(4)', encoding: ColumnEncoding.TEXT32K }, - { name: 'col2', dataType: 'float', encoding: ColumnEncoding.DELTA32K }, + { name: 'col1', dataType: 'varchar(4)' }, + { name: 'col2', dataType: 'float' } ], cluster: cluster, databaseName: 'databaseName', + comment: 'This is a comment', }); ``` @@ -364,6 +349,25 @@ const cluster = new Cluster(this, 'Cluster', { cluster.addToParameterGroup('enable_user_activity_logging', 'true'); ``` +## Rebooting for Parameter Updates + +In most cases, existing clusters [must be manually rebooted](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) to apply parameter changes. You can automate parameter related reboots by setting the cluster's `rebootForParameterChanges` property to `true` , or by using `Cluster.enableRebootForParameterChanges()`. + +```ts +declare const vpc: ec2.Vpc; + +const cluster = new Cluster(this, 'Cluster', { + masterUser: { + masterUsername: 'admin', + masterPassword: cdk.SecretValue.unsafePlainText('tooshort'), + }, + vpc, +}); + +cluster.addToParameterGroup('enable_user_activity_logging', 'true'); +cluster.enableRebootForParameterChanges() +``` + ## Elastic IP If you configure your cluster to be publicly accessible, you can optionally select an *elastic IP address* to use for the external IP address. An elastic IP address is a static IP address that is associated with your AWS account. You can use an elastic IP address to connect to your cluster from outside the VPC. An elastic IP address gives you the ability to change your underlying configuration without affecting the IP address that clients use to connect to your cluster. This approach can be helpful for situations such as recovery after a failure. @@ -432,8 +436,6 @@ Some Amazon Redshift features require Amazon Redshift to access other AWS servic When you create an IAM role and set it as the default for the cluster using console, you don't have to provide the IAM role's Amazon Resource Name (ARN) to perform authentication and authorization. ```ts -import * as ec2 from '@aws-cdk/aws-ec2'; -import * as iam from '@aws-cdk/aws-iam'; declare const vpc: ec2.Vpc; const defaultRole = new iam.Role(this, 'DefaultRole', { @@ -441,7 +443,7 @@ const defaultRole = new iam.Role(this, 'DefaultRole', { }, ); -new Cluster(this, 'Redshift', { +new Cluster(stack, 'Redshift', { masterUser: { masterUsername: 'admin', }, @@ -454,8 +456,6 @@ new Cluster(this, 'Redshift', { A default role can also be added to a cluster using the `addDefaultIamRole` method. ```ts -import * as ec2 from '@aws-cdk/aws-ec2'; -import * as iam from '@aws-cdk/aws-iam'; declare const vpc: ec2.Vpc; const defaultRole = new iam.Role(this, 'DefaultRole', { @@ -463,7 +463,7 @@ const defaultRole = new iam.Role(this, 'DefaultRole', { }, ); -const redshiftCluster = new Cluster(this, 'Redshift', { +const redshiftCluster = new Cluster(stack, 'Redshift', { masterUser: { masterUsername: 'admin', }, diff --git a/packages/@aws-cdk/aws-redshift/lib/cluster-parameter-change-reboot-handler/index.ts b/packages/@aws-cdk/aws-redshift/lib/cluster-parameter-change-reboot-handler/index.ts new file mode 100644 index 0000000000000..ab7432375fc55 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/lib/cluster-parameter-change-reboot-handler/index.ts @@ -0,0 +1,53 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { Redshift } from 'aws-sdk'; + +const redshift = new Redshift(); + +export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent): Promise { + if (event.RequestType !== 'Delete') { + return rebootClusterIfRequired(event.ResourceProperties?.ClusterId, event.ResourceProperties?.ParameterGroupName); + } else { + return; + } +} + +async function rebootClusterIfRequired(clusterId: string, parameterGroupName: string): Promise { + return executeActionForStatus(await getApplyStatus()); + + // https://docs.aws.amazon.com/redshift/latest/APIReference/API_ClusterParameterStatus.html + async function executeActionForStatus(status: string, retryDurationMs?: number): Promise { + await sleep(retryDurationMs ?? 0); + if (['pending-reboot', 'apply-deferred', 'apply-error'].includes(status)) { + try { + await redshift.rebootCluster({ ClusterIdentifier: clusterId }).promise(); + } catch (err) { + if ((err as any).code === 'InvalidClusterState') { + return await executeActionForStatus(status, 30000); + } else { + throw err; + } + } + return; + } else if (['applying', 'retry'].includes(status)) { + return executeActionForStatus(await getApplyStatus(), 30000); + } + return; + } + + async function getApplyStatus(): Promise { + const clusterDetails = await redshift.describeClusters({ ClusterIdentifier: clusterId }).promise(); + if (clusterDetails.Clusters?.[0].ClusterParameterGroups === undefined) { + throw new Error(`Unable to find any Parameter Groups associated with ClusterId "${clusterId}".`); + } + for (const group of clusterDetails.Clusters?.[0].ClusterParameterGroups) { + if (group.ParameterGroupName === parameterGroupName) { + return group.ParameterApplyStatus ?? 'retry'; + } + } + throw new Error(`Unable to find Parameter Group named "${parameterGroupName}" associated with ClusterId "${clusterId}".`); + } +} + +function sleep(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)); +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/lib/cluster.ts b/packages/@aws-cdk/aws-redshift/lib/cluster.ts index 50e3e5e1265a7..3e415604d035a 100644 --- a/packages/@aws-cdk/aws-redshift/lib/cluster.ts +++ b/packages/@aws-cdk/aws-redshift/lib/cluster.ts @@ -1,17 +1,18 @@ +import * as path from 'path'; 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 lambda from '@aws-cdk/aws-lambda'; import * as s3 from '@aws-cdk/aws-s3'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; -import { Duration, IResource, Lazy, RemovalPolicy, Resource, SecretValue, Token } from '@aws-cdk/core'; -import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId } from '@aws-cdk/custom-resources'; +import { ArnFormat, CustomResource, Duration, IResource, Lazy, RemovalPolicy, Resource, SecretValue, Stack, Token } from '@aws-cdk/core'; +import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId, Provider } from '@aws-cdk/custom-resources'; import { Construct } from 'constructs'; import { DatabaseSecret } from './database-secret'; import { Endpoint } from './endpoint'; import { ClusterParameterGroup, IClusterParameterGroup } from './parameter-group'; import { CfnCluster } from './redshift.generated'; import { ClusterSubnetGroup, IClusterSubnetGroup } from './subnet-group'; - /** * Possible Node Types to use in the cluster * used for defining `ClusterProps.nodeType`. @@ -364,6 +365,12 @@ export interface ClusterProps { */ readonly elasticIp?: string + /** + * If this flag is set, the cluster will be rebooted when changes to the cluster's parameter group that require a restart to apply. + * @default false + */ + readonly rebootForParameterChanges?: boolean + /** * If this flag is set, Amazon Redshift forces all COPY and UNLOAD traffic between your cluster and your data repositories through your virtual private cloud (VPC). * @@ -592,7 +599,9 @@ export class Cluster extends ClusterBase { const defaultPort = ec2.Port.tcp(this.clusterEndpoint.port); this.connections = new ec2.Connections({ securityGroups, defaultPort }); - + if (props.rebootForParameterChanges) { + this.enableRebootForParameterChanges(); + } // Add default role if specified and also available in the roles list if (props.defaultRole) { if (props.roles?.some(x => x === props.defaultRole)) { @@ -689,6 +698,71 @@ export class Cluster extends ClusterBase { } } + /** + * Enables automatic cluster rebooting when changes to the cluster's parameter group require a restart to apply. + */ + public enableRebootForParameterChanges(): void { + if (this.node.tryFindChild('RedshiftClusterRebooterCustomResource')) { + return; + } + const rebootFunction = new lambda.SingletonFunction(this, 'RedshiftClusterRebooterFunction', { + uuid: '511e207f-13df-4b8b-b632-c32b30b65ac2', + runtime: lambda.Runtime.NODEJS_16_X, + code: lambda.Code.fromAsset(path.join(__dirname, 'cluster-parameter-change-reboot-handler')), + handler: 'index.handler', + timeout: Duration.seconds(900), + }); + rebootFunction.addToRolePolicy(new iam.PolicyStatement({ + actions: ['redshift:DescribeClusters'], + resources: ['*'], + })); + rebootFunction.addToRolePolicy(new iam.PolicyStatement({ + actions: ['redshift:RebootCluster'], + resources: [ + Stack.of(this).formatArn({ + service: 'redshift', + resource: 'cluster', + resourceName: this.clusterName, + arnFormat: ArnFormat.COLON_RESOURCE_NAME, + }), + ], + })); + const provider = new Provider(this, 'ResourceProvider', { + onEventHandler: rebootFunction, + }); + const customResource = new CustomResource(this, 'RedshiftClusterRebooterCustomResource', { + resourceType: 'Custom::RedshiftClusterRebooter', + serviceToken: provider.serviceToken, + properties: { + ClusterId: this.clusterName, + ParameterGroupName: Lazy.string({ + produce: () => { + if (!this.parameterGroup) { + throw new Error('Cannot enable reboot for parameter changes when there is no associated ClusterParameterGroup.'); + } + return this.parameterGroup.clusterParameterGroupName; + }, + }), + ParametersString: Lazy.string({ + produce: () => { + if (!(this.parameterGroup instanceof ClusterParameterGroup)) { + throw new Error('Cannot enable reboot for parameter changes when using an imported parameter group.'); + } + return JSON.stringify(this.parameterGroup.parameters); + }, + }), + }, + }); + Lazy.any({ + produce: () => { + if (!this.parameterGroup) { + throw new Error('Cannot enable reboot for parameter changes when there is no associated ClusterParameterGroup.'); + } + customResource.node.addDependency(this, this.parameterGroup); + }, + }); + } + /** * Adds default IAM role to cluster. The default IAM role must be already associated to the cluster to be added as the default role. * diff --git a/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/index.ts b/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/index.ts index 186d4c6f2e0ff..60eb2a009173c 100644 --- a/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/index.ts +++ b/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/index.ts @@ -18,5 +18,3 @@ export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent } return subHandler(event.ResourceProperties, event); } - -export { ColumnEncoding } from './types'; diff --git a/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/table.ts b/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/table.ts index 53783088b2ee9..15b206c12c654 100644 --- a/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/table.ts +++ b/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/table.ts @@ -1,7 +1,7 @@ /* eslint-disable-next-line import/no-unresolved */ import * as AWSLambda from 'aws-lambda'; import { executeStatement } from './redshift-data'; -import { ClusterProps, ColumnEncoding, TableAndClusterProps, TableSortStyle } from './types'; +import { ClusterProps, TableAndClusterProps, TableSortStyle } from './types'; import { areColumnsEqual, getDistKeyColumn, getSortKeyColumns } from './util'; import { Column } from '../../table'; @@ -40,7 +40,7 @@ async function createTable( tableAndClusterProps: TableAndClusterProps, ): Promise { const tableName = tableNamePrefix + tableNameSuffix; - const tableColumnsString = tableColumns.map(column => `${column.name} ${column.dataType}${getEncodingColumnString(column)}`).join(); + const tableColumnsString = tableColumns.map(column => `${column.name} ${column.dataType}`).join(); let statement = `CREATE TABLE ${tableName} (${tableColumnsString})`; @@ -61,11 +61,6 @@ async function createTable( await executeStatement(statement, tableAndClusterProps); - for (const column of tableColumns) { - if (column.comment) { - await executeStatement(`COMMENT ON COLUMN ${tableName}.${column.name} IS '${column.comment}'`, tableAndClusterProps); - } - } if (tableAndClusterProps.tableComment) { await executeStatement(`COMMENT ON TABLE ${tableName} IS '${tableAndClusterProps.tableComment}'`, tableAndClusterProps); } @@ -112,20 +107,6 @@ async function updateTable( alterationStatements.push(...columnAdditions.map(addition => `ALTER TABLE ${tableName} ${addition}`)); } - const columnEncoding = tableColumns.filter(column => { - return oldTableColumns.some(oldColumn => column.name === oldColumn.name && column.encoding !== oldColumn.encoding); - }).map(column => `ALTER COLUMN ${column.name} ENCODE ${column.encoding || ColumnEncoding.AUTO}`); - if (columnEncoding.length > 0) { - alterationStatements.push(`ALTER TABLE ${tableName} ${columnEncoding.join(', ')}`); - } - - const columnComments = tableColumns.filter(column => { - return oldTableColumns.some(oldColumn => column.name === oldColumn.name && column.comment !== oldColumn.comment); - }).map(column => `COMMENT ON COLUMN ${tableName}.${column.name} IS ${column.comment ? `'${column.comment}'` : 'NULL'}`); - if (columnComments.length > 0) { - alterationStatements.push(...columnComments); - } - const oldDistStyle = oldResourceProperties.distStyle; if ((!oldDistStyle && tableAndClusterProps.distStyle) || (oldDistStyle && !tableAndClusterProps.distStyle)) { @@ -181,10 +162,3 @@ async function updateTable( function getSortKeyColumnsString(sortKeyColumns: Column[]) { return sortKeyColumns.map(column => column.name).join(); } - -function getEncodingColumnString(column: Column): string { - if (column.encoding) { - return ` ENCODE ${column.encoding}`; - } - return ''; -} diff --git a/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/types.ts b/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/types.ts index cb2bee59ea26a..6d80398b7f41b 100644 --- a/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/types.ts +++ b/packages/@aws-cdk/aws-redshift/lib/private/database-query-provider/types.ts @@ -24,112 +24,3 @@ export enum TableSortStyle { */ INTERLEAVED = 'INTERLEAVED', } - -/** - * The compression encoding of a column. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Compression_encodings.html - */ -export enum ColumnEncoding { - /** - * Amazon Redshift assigns an optimal encoding based on the column data. - * This is the default. - */ - AUTO = 'AUTO', - - /** - * The column is not compressed. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Raw_encoding.html - */ - RAW = 'RAW', - - /** - * The column is compressed using the AZ64 algorithm. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/az64-encoding.html - */ - AZ64 = 'AZ64', - - /** - * The column is compressed using a separate dictionary for each block column value on disk. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Byte_dictionary_encoding.html - */ - BYTEDICT = 'BYTEDICT', - - /** - * The column is compressed based on the difference between values in the column. - * This records differences as 1-byte values. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Delta_encoding.html - */ - DELTA = 'DELTA', - - /** - * The column is compressed based on the difference between values in the column. - * This records differences as 2-byte values. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Delta_encoding.html - */ - DELTA32K = 'DELTA32K', - - /** - * The column is compressed using the LZO algorithm. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/lzo-encoding.html - */ - LZO = 'LZO', - - /** - * The column is compressed to a smaller storage size than the original data type. - * The compressed storage size is 1 byte. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_MostlyN_encoding.html - */ - MOSTLY8 = 'MOSTLY8', - - /** - * The column is compressed to a smaller storage size than the original data type. - * The compressed storage size is 2 bytes. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_MostlyN_encoding.html - */ - MOSTLY16 = 'MOSTLY16', - - /** - * The column is compressed to a smaller storage size than the original data type. - * The compressed storage size is 4 bytes. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_MostlyN_encoding.html - */ - MOSTLY32 = 'MOSTLY32', - - /** - * The column is compressed by recording the number of occurrences of each value in the column. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Runlength_encoding.html - */ - RUNLENGTH = 'RUNLENGTH', - - /** - * The column is compressed by recording the first 245 unique words and then using a 1-byte index to represent each word. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Text255_encoding.html - */ - TEXT255 = 'TEXT255', - - /** - * The column is compressed by recording the first 32K unique words and then using a 2-byte index to represent each word. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Text255_encoding.html - */ - TEXT32K = 'TEXT32K', - - /** - * The column is compressed using the ZSTD algorithm. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/zstd-encoding.html - */ - ZSTD = 'ZSTD', -} diff --git a/packages/@aws-cdk/aws-redshift/lib/table.ts b/packages/@aws-cdk/aws-redshift/lib/table.ts index d2169fa9695d7..147e50fa1248b 100644 --- a/packages/@aws-cdk/aws-redshift/lib/table.ts +++ b/packages/@aws-cdk/aws-redshift/lib/table.ts @@ -3,7 +3,6 @@ import { Construct, IConstruct } from 'constructs'; import { ICluster } from './cluster'; import { DatabaseOptions } from './database-options'; import { DatabaseQuery } from './private/database-query'; -import { ColumnEncoding } from './private/database-query-provider'; import { HandlerName } from './private/database-query-provider/handler-name'; import { getDistKeyColumn, getSortKeyColumns } from './private/database-query-provider/util'; import { TableHandlerProps } from './private/handler-props'; @@ -80,20 +79,6 @@ export interface Column { * @default - column is not a SORTKEY */ readonly sortKey?: boolean; - - /** - * The encoding to use for the column. - * - * @default - Amazon Redshift determines the encoding based on the data type. - */ - readonly encoding?: ColumnEncoding; - - /** - * A comment to attach to the column. - * - * @default - no comment - */ - readonly comment?: string; } /** @@ -359,5 +344,3 @@ export enum TableSortStyle { */ INTERLEAVED = 'INTERLEAVED', } - -export { ColumnEncoding } from './private/database-query-provider'; diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index 7d3a9b832f79e..84a493a4d7a9f 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.1211.0", + "aws-sdk": "^2.1317.0", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e/index.d.ts b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e/index.d.ts new file mode 100644 index 0000000000000..3554dc94d4617 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e/index.d.ts @@ -0,0 +1 @@ +export declare function handler(event: AWSLambda.CloudFormationCustomResourceEvent): Promise; diff --git a/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e/index.js b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e/index.js new file mode 100644 index 0000000000000..1113eac7f709c --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e/index.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +// eslint-disable-next-line import/no-extraneous-dependencies +const aws_sdk_1 = require("aws-sdk"); +const redshift = new aws_sdk_1.Redshift(); +async function handler(event) { + if (event.RequestType !== 'Delete') { + return rebootClusterIfRequired(event.ResourceProperties?.ClusterId, event.ResourceProperties?.ParameterGroupName); + } + else { + return; + } +} +exports.handler = handler; +async function rebootClusterIfRequired(clusterId, parameterGroupName) { + return executeActionForStatus(await getApplyStatus()); + // https://docs.aws.amazon.com/redshift/latest/APIReference/API_ClusterParameterStatus.html + async function executeActionForStatus(status, retryDurationMs) { + await sleep(retryDurationMs ?? 0); + if (['pending-reboot', 'apply-deferred', 'apply-error', 'unknown-error'].includes(status)) { + try { + await redshift.rebootCluster({ ClusterIdentifier: clusterId }).promise(); + } + catch (err) { + if (err.code === 'InvalidClusterState') { + return await executeActionForStatus(status, 30000); + } + else { + throw err; + } + } + return; + } + else if (['applying', 'retry'].includes(status)) { + return executeActionForStatus(await getApplyStatus(), 30000); + } + return; + } + async function getApplyStatus() { + const clusterDetails = await redshift.describeClusters({ ClusterIdentifier: clusterId }).promise(); + if (clusterDetails.Clusters?.[0].ClusterParameterGroups === undefined) { + throw new Error(`Unable to find any Parameter Groups associated with ClusterId "${clusterId}".`); + } + for (const group of clusterDetails.Clusters?.[0].ClusterParameterGroups) { + if (group.ParameterGroupName === parameterGroupName) { + return group.ParameterApplyStatus ?? 'retry'; + } + } + throw new Error(`Unable to find Parameter Group named "${parameterGroupName}" associated with ClusterId "${clusterId}".`); + } +} +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290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zID0gYXdhaXQgcmVkc2hpZnQuZGVzY3JpYmVDbHVzdGVycyh7IENsdXN0ZXJJZGVudGlmaWVyOiBjbHVzdGVySWQgfSkucHJvbWlzZSgpO1xuICAgIGlmIChjbHVzdGVyRGV0YWlscy5DbHVzdGVycz8uWzBdLkNsdXN0ZXJQYXJhbWV0ZXJHcm91cHMgPT09IHVuZGVmaW5lZCkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmFibGUgdG8gZmluZCBhbnkgUGFyYW1ldGVyIEdyb3VwcyBhc3NvY2lhdGVkIHdpdGggQ2x1c3RlcklkIFwiJHtjbHVzdGVySWR9XCIuYCk7XG4gICAgfVxuICAgIGZvciAoY29uc3QgZ3JvdXAgb2YgY2x1c3RlckRldGFpbHMuQ2x1c3RlcnM/LlswXS5DbHVzdGVyUGFyYW1ldGVyR3JvdXBzKSB7XG4gICAgICBpZiAoZ3JvdXAuUGFyYW1ldGVyR3JvdXBOYW1lID09PSBwYXJhbWV0ZXJHcm91cE5hbWUpIHtcbiAgICAgICAgcmV0dXJuIGdyb3VwLlBhcmFtZXRlckFwcGx5U3RhdHVzID8/ICdyZXRyeSc7XG4gICAgICB9XG4gICAgfVxuICAgIHRocm93IG5ldyBFcnJvcihgVW5hYmxlIHRvIGZpbmQgUGFyYW1ldGVyIEdyb3VwIG5hbWVkIFwiJHtwYXJhbWV0ZXJHcm91cE5hbWV9XCIgYXNzb2NpYXRlZCB3aXRoIENsdXN0ZXJJZCBcIiR7Y2x1c3RlcklkfVwiLmApO1xuICB9XG59XG5cbmZ1bmN0aW9uIHNsZWVwKG1zOiBudW1iZXIpIHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKHJlc29sdmUgPT4gc2V0VGltZW91dChyZXNvbHZlLCBtcykpO1xufSJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e/index.ts b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e/index.ts new file mode 100644 index 0000000000000..f69314783b600 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e/index.ts @@ -0,0 +1,53 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { Redshift } from 'aws-sdk'; + +const redshift = new Redshift(); + +export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent): Promise { + if (event.RequestType !== 'Delete') { + return rebootClusterIfRequired(event.ResourceProperties?.ClusterId, event.ResourceProperties?.ParameterGroupName); + } else { + return; + } +} + +async function rebootClusterIfRequired(clusterId: string, parameterGroupName: string): Promise { + return executeActionForStatus(await getApplyStatus()); + + // https://docs.aws.amazon.com/redshift/latest/APIReference/API_ClusterParameterStatus.html + async function executeActionForStatus(status: string, retryDurationMs?: number): Promise { + await sleep(retryDurationMs ?? 0); + if (['pending-reboot', 'apply-deferred', 'apply-error', 'unknown-error'].includes(status)) { + try { + await redshift.rebootCluster({ ClusterIdentifier: clusterId }).promise(); + } catch (err) { + if ((err).code === 'InvalidClusterState') { + return await executeActionForStatus(status, 30000); + } else { + throw err; + } + } + return; + } else if (['applying', 'retry'].includes(status)) { + return executeActionForStatus(await getApplyStatus(), 30000); + } + return; + } + + async function getApplyStatus(): Promise { + const clusterDetails = await redshift.describeClusters({ ClusterIdentifier: clusterId }).promise(); + if (clusterDetails.Clusters?.[0].ClusterParameterGroups === undefined) { + throw new Error(`Unable to find any Parameter Groups associated with ClusterId "${clusterId}".`); + } + for (const group of clusterDetails.Clusters?.[0].ClusterParameterGroups) { + if (group.ParameterGroupName === parameterGroupName) { + return group.ParameterApplyStatus ?? 'retry'; + } + } + throw new Error(`Unable to find Parameter Group named "${parameterGroupName}" associated with ClusterId "${clusterId}".`); + } +} + +function sleep(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)); +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/cfn-response.js b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/cfn-response.js similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/cfn-response.js rename to packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/cfn-response.js diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/consts.js b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/consts.js similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/consts.js rename to packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/consts.js diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/framework.js b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/framework.js similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/framework.js rename to packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/framework.js diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/outbound.js b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/outbound.js similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/outbound.js rename to packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/outbound.js diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/util.js b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/util.js similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/util.js rename to packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037/util.js diff --git a/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-create.assets.json b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-create.assets.json new file mode 100644 index 0000000000000..32f731309e1e8 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-create.assets.json @@ -0,0 +1,45 @@ +{ + "version": "21.0.0", + "files": { + "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e": { + "source": { + "path": "asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037": { + "source": { + "path": "asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "0615d9633720df23ed3ec04f24f592c61f3b60ed92abd110e96e5ed52be73605": { + "source": { + "path": "aws-cdk-redshift-cluster-create.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "0615d9633720df23ed3ec04f24f592c61f3b60ed92abd110e96e5ed52be73605.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-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-create.template.json b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-create.template.json new file mode 100644 index 0000000000000..2dbd05dfbd459 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-create.template.json @@ -0,0 +1,553 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1Subnet77A7FDC6": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/17", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "foobar" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1RouteTableAF4E5874": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1RouteTableAssociation502CBE55": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcfoobarSubnet1RouteTableAF4E5874" + }, + "SubnetId": { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2Subnet85B013AD": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/17", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "foobar" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2RouteTable5127598D": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2RouteTableAssociation5013D70B": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcfoobarSubnet2RouteTable5127598D" + }, + "SubnetId": { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ParameterGroup5E32DECB": { + "Type": "AWS::Redshift::ClusterParameterGroup", + "Properties": { + "Description": "Cluster parameter group for family redshift-1.0", + "ParameterGroupFamily": "redshift-1.0", + "Parameters": [ + { + "ParameterName": "enable_user_activity_logging", + "ParameterValue": "true" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSubnetsDCFA5CB7": { + "Type": "AWS::Redshift::ClusterSubnetGroup", + "Properties": { + "Description": "Subnets for Cluster Redshift cluster", + "SubnetIds": [ + { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + }, + { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecurityGroup0921994B": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Redshift security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecret6368BD0F": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "GenerateSecretString": { + "ExcludeCharacters": "\"@/\\ '", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"admin\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecretAttachment769E6258": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "TargetId": { + "Ref": "ClusterEB0386A7" + }, + "TargetType": "AWS::Redshift::Cluster" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterEB0386A7": { + "Type": "AWS::Redshift::Cluster", + "Properties": { + "ClusterType": "multi-node", + "DBName": "default_db", + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "NodeType": "dc2.large", + "AllowVersionUpgrade": true, + "AutomatedSnapshotRetentionPeriod": 1, + "ClusterParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "ClusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "Encrypted": true, + "NumberOfNodes": 2, + "PubliclyAccessible": false, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE": { + "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" + ] + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "Roles": [ + { + "Ref": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEvent15BB3722": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + }, + "Role": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE", + "Arn" + ] + }, + "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-create/Cluster/ResourceProvider)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + } + } + }, + "Handler": "framework.onEvent", + "Runtime": "nodejs14.x", + "Timeout": 900 + }, + "DependsOn": [ + "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterRedshiftClusterRebooterCustomResource773361E1": { + "Type": "Custom::RedshiftClusterRebooter", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEvent15BB3722", + "Arn" + ] + }, + "ClusterId": { + "Ref": "ClusterEB0386A7" + }, + "ParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "ParametersString": "{\"enable_user_activity_logging\":\"true\"}" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525": { + "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" + ] + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "Roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip" + }, + "Role": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "nodejs16.x", + "Timeout": 900 + }, + "DependsOn": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "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-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-update.assets.json b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-update.assets.json new file mode 100644 index 0000000000000..cb546e95f709b --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-update.assets.json @@ -0,0 +1,45 @@ +{ + "version": "21.0.0", + "files": { + "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e": { + "source": { + "path": "asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037": { + "source": { + "path": "asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "d2c10b460302950fe5b01e119da8d706f03cced8872d296f6721d3f607defc94": { + "source": { + "path": "aws-cdk-redshift-cluster-update.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "d2c10b460302950fe5b01e119da8d706f03cced8872d296f6721d3f607defc94.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-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-update.template.json b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-update.template.json new file mode 100644 index 0000000000000..1e653b14c0a28 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/aws-cdk-redshift-cluster-update.template.json @@ -0,0 +1,557 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1Subnet77A7FDC6": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/17", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "foobar" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1RouteTableAF4E5874": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1RouteTableAssociation502CBE55": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcfoobarSubnet1RouteTableAF4E5874" + }, + "SubnetId": { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2Subnet85B013AD": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/17", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "foobar" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2RouteTable5127598D": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2RouteTableAssociation5013D70B": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcfoobarSubnet2RouteTable5127598D" + }, + "SubnetId": { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ParameterGroup5E32DECB": { + "Type": "AWS::Redshift::ClusterParameterGroup", + "Properties": { + "Description": "Cluster parameter group for family redshift-1.0", + "ParameterGroupFamily": "redshift-1.0", + "Parameters": [ + { + "ParameterName": "enable_user_activity_logging", + "ParameterValue": "false" + }, + { + "ParameterName": "use_fips_ssl", + "ParameterValue": "true" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSubnetsDCFA5CB7": { + "Type": "AWS::Redshift::ClusterSubnetGroup", + "Properties": { + "Description": "Subnets for Cluster Redshift cluster", + "SubnetIds": [ + { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + }, + { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecurityGroup0921994B": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Redshift security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecret6368BD0F": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "GenerateSecretString": { + "ExcludeCharacters": "\"@/\\ '", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"admin\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecretAttachment769E6258": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "TargetId": { + "Ref": "ClusterEB0386A7" + }, + "TargetType": "AWS::Redshift::Cluster" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterEB0386A7": { + "Type": "AWS::Redshift::Cluster", + "Properties": { + "ClusterType": "multi-node", + "DBName": "default_db", + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "NodeType": "dc2.large", + "AllowVersionUpgrade": true, + "AutomatedSnapshotRetentionPeriod": 1, + "ClusterParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "ClusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "Encrypted": true, + "NumberOfNodes": 2, + "PubliclyAccessible": false, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE": { + "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" + ] + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "Roles": [ + { + "Ref": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEvent15BB3722": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + }, + "Role": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE", + "Arn" + ] + }, + "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-update/Cluster/ResourceProvider)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + } + } + }, + "Handler": "framework.onEvent", + "Runtime": "nodejs14.x", + "Timeout": 900 + }, + "DependsOn": [ + "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterRedshiftClusterRebooterCustomResource773361E1": { + "Type": "Custom::RedshiftClusterRebooter", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEvent15BB3722", + "Arn" + ] + }, + "ClusterId": { + "Ref": "ClusterEB0386A7" + }, + "ParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "ParametersString": "{\"enable_user_activity_logging\":\"false\",\"use_fips_ssl\":\"true\"}" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525": { + "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" + ] + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "Roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip" + }, + "Role": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "nodejs16.x", + "Timeout": 900 + }, + "DependsOn": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "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-redshift/test/cluster-reboot.integ.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json new file mode 100644 index 0000000000000..84fbb303ccb99 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json @@ -0,0 +1,19 @@ +{ + "version": "21.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.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-redshift/test/cluster-reboot.integ.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.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-redshift/test/cluster-reboot.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/cdk.out new file mode 100644 index 0000000000000..8ecc185e9dbee --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/integ.json b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/integ.json new file mode 100644 index 0000000000000..8323a65d93e55 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/integ.json @@ -0,0 +1,14 @@ +{ + "version": "21.0.0", + "testCases": { + "aws-cdk-redshift-reboot-test/DefaultTest": { + "stacks": [ + "aws-cdk-redshift-cluster-create", + "aws-cdk-redshift-cluster-update" + ], + "stackUpdateWorkflow": true, + "assertionStack": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert", + "assertionStackName": "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/manifest.json new file mode 100644 index 0000000000000..b5212572f6de6 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/manifest.json @@ -0,0 +1,395 @@ +{ + "version": "21.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "aws-cdk-redshift-cluster-create.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-redshift-cluster-create.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-redshift-cluster-create": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-redshift-cluster-create.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}/0615d9633720df23ed3ec04f24f592c61f3b60ed92abd110e96e5ed52be73605.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-redshift-cluster-create.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" + }, + "stackName": "aws-cdk-redshift-cluster-reboot-integ" + }, + "dependencies": [ + "aws-cdk-redshift-cluster-create.assets" + ], + "metadata": { + "/aws-cdk-redshift-cluster-create/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1Subnet77A7FDC6" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1RouteTableAF4E5874" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1RouteTableAssociation502CBE55" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2Subnet85B013AD" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2RouteTable5127598D" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2RouteTableAssociation5013D70B" + } + ], + "/aws-cdk-redshift-cluster-create/ParameterGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ParameterGroup5E32DECB" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/Subnets/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSubnetsDCFA5CB7" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecurityGroup0921994B" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecret6368BD0F" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecretAttachment769E6258" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterEB0386A7" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEvent15BB3722" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterRedshiftClusterRebooterCustomResource773361E1" + } + ], + "/aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ], + "/aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF" + } + ], + "/aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5" + } + ], + "/aws-cdk-redshift-cluster-create/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-redshift-cluster-create/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-redshift-cluster-create" + }, + "aws-cdk-redshift-cluster-update.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-redshift-cluster-update.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-redshift-cluster-update": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-redshift-cluster-update.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}/d2c10b460302950fe5b01e119da8d706f03cced8872d296f6721d3f607defc94.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-redshift-cluster-update.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" + }, + "stackName": "aws-cdk-redshift-cluster-reboot-integ" + }, + "dependencies": [ + "aws-cdk-redshift-cluster-create", + "aws-cdk-redshift-cluster-update.assets" + ], + "metadata": { + "/aws-cdk-redshift-cluster-update/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1Subnet77A7FDC6" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1RouteTableAF4E5874" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1RouteTableAssociation502CBE55" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2Subnet85B013AD" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2RouteTable5127598D" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2RouteTableAssociation5013D70B" + } + ], + "/aws-cdk-redshift-cluster-update/ParameterGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ParameterGroup5E32DECB" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/Subnets/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSubnetsDCFA5CB7" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecurityGroup0921994B" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecret6368BD0F" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecretAttachment769E6258" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterEB0386A7" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEvent15BB3722" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterRedshiftClusterRebooterCustomResource773361E1" + } + ], + "/aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ], + "/aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF" + } + ], + "/aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5" + } + ], + "/aws-cdk-redshift-cluster-update/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-redshift-cluster-update/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-redshift-cluster-update" + }, + "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.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": [ + "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.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": [ + "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets" + ], + "metadata": { + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/tree.json b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/tree.json new file mode 100644 index 0000000000000..09d0274a71891 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/cluster-reboot.integ.snapshot/tree.json @@ -0,0 +1,1791 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.129" + } + }, + "aws-cdk-redshift-cluster-create": { + "id": "aws-cdk-redshift-cluster-create", + "path": "aws-cdk-redshift-cluster-create", + "children": { + "Vpc": { + "id": "Vpc", + "path": "aws-cdk-redshift-cluster-create/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Vpc/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "version": "0.0.0" + } + }, + "foobarSubnet1": { + "id": "foobarSubnet1", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/17", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "foobar" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Isolated" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcfoobarSubnet1RouteTableAF4E5874" + }, + "subnetId": { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "foobarSubnet2": { + "id": "foobarSubnet2", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/17", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "foobar" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Isolated" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcfoobarSubnet2RouteTable5127598D" + }, + "subnetId": { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Vpc", + "version": "0.0.0" + } + }, + "ParameterGroup": { + "id": "ParameterGroup", + "path": "aws-cdk-redshift-cluster-create/ParameterGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/ParameterGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterParameterGroup", + "aws:cdk:cloudformation:props": { + "description": "Cluster parameter group for family redshift-1.0", + "parameterGroupFamily": "redshift-1.0", + "parameters": [ + { + "parameterName": "enable_user_activity_logging", + "parameterValue": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnClusterParameterGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.ClusterParameterGroup", + "version": "0.0.0" + } + }, + "Cluster": { + "id": "Cluster", + "path": "aws-cdk-redshift-cluster-create/Cluster", + "children": { + "Subnets": { + "id": "Subnets", + "path": "aws-cdk-redshift-cluster-create/Cluster/Subnets", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-cluster-create/Cluster/Subnets/Default", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterSubnetGroup", + "aws:cdk:cloudformation:props": { + "description": "Subnets for Cluster Redshift cluster", + "subnetIds": [ + { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + }, + { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnClusterSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.ClusterSubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-redshift-cluster-create/Cluster/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Redshift security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Secret": { + "id": "Secret", + "path": "aws-cdk-redshift-cluster-create/Cluster/Secret", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/Secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "generateSecretString": { + "passwordLength": 30, + "secretStringTemplate": "{\"username\":\"admin\"}", + "generateStringKey": "password", + "excludeCharacters": "\"@/\\ '" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "version": "0.0.0" + } + }, + "Attachment": { + "id": "Attachment", + "path": "aws-cdk-redshift-cluster-create/Cluster/Secret/Attachment", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/Secret/Attachment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", + "aws:cdk:cloudformation:props": { + "secretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "targetId": { + "Ref": "ClusterEB0386A7" + }, + "targetType": "AWS::Redshift::Cluster" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.SecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.DatabaseSecret", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::Cluster", + "aws:cdk:cloudformation:props": { + "clusterType": "multi-node", + "dbName": "default_db", + "masterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "masterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "nodeType": "dc2.large", + "allowVersionUpgrade": true, + "automatedSnapshotRetentionPeriod": 1, + "clusterParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "clusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "encrypted": true, + "numberOfNodes": 2, + "publiclyAccessible": false, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnCluster", + "version": "0.0.0" + } + }, + "RedshiftClusterRebooterFunction": { + "id": "RedshiftClusterRebooterFunction", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterFunction", + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.SingletonFunction", + "version": "0.0.0" + } + }, + "ResourceProvider": { + "id": "ResourceProvider", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider", + "children": { + "framework-onEvent": { + "id": "framework-onEvent", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/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" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "roles": [ + { + "Ref": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ] + } + }, + "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" + } + }, + "Code": { + "id": "Code", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/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": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/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": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + }, + "role": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE", + "Arn" + ] + }, + "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-create/Cluster/ResourceProvider)", + "environment": { + "variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + } + } + }, + "handler": "framework.onEvent", + "runtime": "nodejs14.x", + "timeout": 900 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/custom-resources.Provider", + "version": "0.0.0" + } + }, + "RedshiftClusterRebooterCustomResource": { + "id": "RedshiftClusterRebooterCustomResource", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterCustomResource/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.Cluster", + "version": "0.0.0" + } + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2": { + "id": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + } + }, + "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" + } + }, + "Code": { + "id": "Code", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip" + }, + "role": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "nodejs16.x", + "timeout": 900 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "aws-cdk-redshift-cluster-update": { + "id": "aws-cdk-redshift-cluster-update", + "path": "aws-cdk-redshift-cluster-update", + "children": { + "Vpc": { + "id": "Vpc", + "path": "aws-cdk-redshift-cluster-update/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Vpc/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "version": "0.0.0" + } + }, + "foobarSubnet1": { + "id": "foobarSubnet1", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/17", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "foobar" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Isolated" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcfoobarSubnet1RouteTableAF4E5874" + }, + "subnetId": { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "foobarSubnet2": { + "id": "foobarSubnet2", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/17", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "foobar" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Isolated" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcfoobarSubnet2RouteTable5127598D" + }, + "subnetId": { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Vpc", + "version": "0.0.0" + } + }, + "ParameterGroup": { + "id": "ParameterGroup", + "path": "aws-cdk-redshift-cluster-update/ParameterGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/ParameterGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterParameterGroup", + "aws:cdk:cloudformation:props": { + "description": "Cluster parameter group for family redshift-1.0", + "parameterGroupFamily": "redshift-1.0", + "parameters": [ + { + "parameterName": "enable_user_activity_logging", + "parameterValue": "false" + }, + { + "parameterName": "use_fips_ssl", + "parameterValue": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnClusterParameterGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.ClusterParameterGroup", + "version": "0.0.0" + } + }, + "Cluster": { + "id": "Cluster", + "path": "aws-cdk-redshift-cluster-update/Cluster", + "children": { + "Subnets": { + "id": "Subnets", + "path": "aws-cdk-redshift-cluster-update/Cluster/Subnets", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-cluster-update/Cluster/Subnets/Default", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterSubnetGroup", + "aws:cdk:cloudformation:props": { + "description": "Subnets for Cluster Redshift cluster", + "subnetIds": [ + { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + }, + { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnClusterSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.ClusterSubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-redshift-cluster-update/Cluster/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Redshift security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Secret": { + "id": "Secret", + "path": "aws-cdk-redshift-cluster-update/Cluster/Secret", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/Secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "generateSecretString": { + "passwordLength": 30, + "secretStringTemplate": "{\"username\":\"admin\"}", + "generateStringKey": "password", + "excludeCharacters": "\"@/\\ '" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "version": "0.0.0" + } + }, + "Attachment": { + "id": "Attachment", + "path": "aws-cdk-redshift-cluster-update/Cluster/Secret/Attachment", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/Secret/Attachment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", + "aws:cdk:cloudformation:props": { + "secretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "targetId": { + "Ref": "ClusterEB0386A7" + }, + "targetType": "AWS::Redshift::Cluster" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.SecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.DatabaseSecret", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::Cluster", + "aws:cdk:cloudformation:props": { + "clusterType": "multi-node", + "dbName": "default_db", + "masterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "masterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "nodeType": "dc2.large", + "allowVersionUpgrade": true, + "automatedSnapshotRetentionPeriod": 1, + "clusterParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "clusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "encrypted": true, + "numberOfNodes": 2, + "publiclyAccessible": false, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnCluster", + "version": "0.0.0" + } + }, + "RedshiftClusterRebooterFunction": { + "id": "RedshiftClusterRebooterFunction", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterFunction", + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.SingletonFunction", + "version": "0.0.0" + } + }, + "ResourceProvider": { + "id": "ResourceProvider", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider", + "children": { + "framework-onEvent": { + "id": "framework-onEvent", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/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" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "roles": [ + { + "Ref": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ] + } + }, + "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" + } + }, + "Code": { + "id": "Code", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/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": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/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": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + }, + "role": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE", + "Arn" + ] + }, + "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-update/Cluster/ResourceProvider)", + "environment": { + "variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + } + } + }, + "handler": "framework.onEvent", + "runtime": "nodejs14.x", + "timeout": 900 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/custom-resources.Provider", + "version": "0.0.0" + } + }, + "RedshiftClusterRebooterCustomResource": { + "id": "RedshiftClusterRebooterCustomResource", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterCustomResource/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.Cluster", + "version": "0.0.0" + } + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2": { + "id": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + } + }, + "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" + } + }, + "Code": { + "id": "Code", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip" + }, + "role": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "nodejs16.x", + "timeout": 900 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "aws-cdk-redshift-reboot-test": { + "id": "aws-cdk-redshift-reboot-test", + "path": "aws-cdk-redshift-reboot-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "aws-cdk-redshift-reboot-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.129" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert", + "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" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/cluster.test.ts b/packages/@aws-cdk/aws-redshift/test/cluster.test.ts index b05188bc300d9..45b71e307a6b8 100644 --- a/packages/@aws-cdk/aws-redshift/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-redshift/test/cluster.test.ts @@ -614,12 +614,142 @@ test('elastic ip address', () => { }); }); +describe('reboot for Parameter Changes', () => { + test('throw error for cluster without parameter group', () => { + // Given + const cluster = new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + }); + cluster.enableRebootForParameterChanges(); + // WHEN + expect(() => Template.fromStack(stack)) + // THEN + .toThrowError(/Cannot enable reboot for parameter changes/); + }); + + test('throw error for cluster with imported parameter group', () => { + // Given + const cluster = new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + parameterGroup: ClusterParameterGroup.fromClusterParameterGroupName(stack, 'foo', 'bar'), + }); + cluster.enableRebootForParameterChanges(); + // WHEN + expect(() => Template.fromStack(stack)) + // THEN + .toThrowError(/Cannot enable reboot for parameter changes/); + }); + + test('not throw error when parameter group is created after enabling reboots', () => { + // Given + const cluster = new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + rebootForParameterChanges: true, + }); + cluster.addToParameterGroup('foo', 'bar'); + // WHEN + expect(() => Template.fromStack(stack)) + // THEN + .not.toThrowError(/Cannot enable reboot for parameter changes/); + }); + + test('not create duplicate resources when reboot feature is enabled multiple times on a cluster', () => { + // Given + const cluster = new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + rebootForParameterChanges: true, + }); + cluster.addToParameterGroup('foo', 'bar'); + //WHEN + cluster.enableRebootForParameterChanges(); + // THEN + Template.fromStack(stack).resourceCountIs('Custom::RedshiftClusterRebooter', 1); + }); + + test('cluster with parameter group', () => { + // Given + const cluster = new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + }); + cluster.addToParameterGroup('foo', 'bar'); + + const cluster2 = new Cluster(stack, 'Redshift2', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + }); + cluster2.addToParameterGroup('foo', 'bar'); + + // WHEN + cluster.enableRebootForParameterChanges(); + cluster2.enableRebootForParameterChanges(); + + //THEN + const template = Template.fromStack(stack); + template.resourceCountIs('Custom::RedshiftClusterRebooter', 2); + template.templateMatches({ + Resources: { + SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5: { + Type: 'AWS::Lambda::Function', + Properties: { + Handler: 'index.handler', + Runtime: 'nodejs16.x', + Timeout: 900, + }, + }, + }, + }); + }); + + test('Custom resource ParametersString property updates', () => { + // Given + const cluster = new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + }, + vpc, + }); + cluster.addToParameterGroup('foo', 'bar'); + cluster.enableRebootForParameterChanges(); + + // WHEN + cluster.addToParameterGroup('lorem', 'ipsum'); + + //THEN + const template = Template.fromStack(stack); + template.hasResourceProperties('Custom::RedshiftClusterRebooter', { + ParametersString: JSON.stringify( + { + foo: 'bar', + lorem: 'ipsum', + }, + ), + }); + }); +}); + describe('default IAM role', () => { test('Default role not in role list', () => { // GIVEN - const clusterRole1 = new iam.Role(stack, 'clusterRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') } ); - const defaultRole1 = new iam.Role(stack, 'defaultRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') } ); + const clusterRole1 = new iam.Role(stack, 'clusterRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') }); + const defaultRole1 = new iam.Role(stack, 'defaultRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') }); expect(() => { new Cluster(stack, 'Redshift', { @@ -634,7 +764,7 @@ describe('default IAM role', () => { }); test('throws error when default role not attached to cluster when adding default role post creation', () => { - const defaultRole1 = new iam.Role(stack, 'defaultRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') } ); + const defaultRole1 = new iam.Role(stack, 'defaultRole1', { assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com') }); const cluster = new Cluster(stack, 'Redshift', { masterUser: { masterUsername: 'admin', @@ -740,7 +870,7 @@ describe('IAM role', () => { expect(() => // WHEN cluster.addIamRole(role), - // THEN + // THEN ).toThrow(`Role '${role.roleArn}' is already attached to the cluster`); }); }); diff --git a/packages/@aws-cdk/aws-redshift/test/database-query-provider/table.test.ts b/packages/@aws-cdk/aws-redshift/test/database-query-provider/table.test.ts index e9fc64820e38f..96c1adebf8a1d 100644 --- a/packages/@aws-cdk/aws-redshift/test/database-query-provider/table.test.ts +++ b/packages/@aws-cdk/aws-redshift/test/database-query-provider/table.test.ts @@ -8,7 +8,7 @@ jest.mock('aws-sdk/clients/redshiftdata', () => class { }); import { Column, TableDistStyle, TableSortStyle } from '../../lib'; import { handler as manageTable } from '../../lib/private/database-query-provider/table'; -import { ColumnEncoding, TableAndClusterProps } from '../../lib/private/database-query-provider/types'; +import { TableAndClusterProps } from '../../lib/private/database-query-provider/types'; type ResourcePropertiesType = TableAndClusterProps & { ServiceToken: string }; @@ -423,7 +423,7 @@ describe('update', () => { })); }); - test('replaces when different sortStyle: INTERLEAVED', async () => { + test('replaces when differnt sortStyle: INTERLEAVED', async () => { const newEvent: AWSLambda.CloudFormationCustomResourceEvent = { ...event, OldResourceProperties: { @@ -552,96 +552,4 @@ describe('update', () => { })); }); }); - - describe('column comment', () => { - test('does not replace if comment added on column', async () => { - const newComment = 'newComment'; - const newResourceProperties = { - ...resourceProperties, - tableColumns: [{ name: 'col1', dataType: 'varchar(1)', comment: newComment }], - }; - - await expect(manageTable(newResourceProperties, event)).resolves.toMatchObject({ - PhysicalResourceId: physicalResourceId, - }); - expect(mockExecuteStatement).toHaveBeenCalledWith(expect.objectContaining({ - Sql: `COMMENT ON COLUMN ${physicalResourceId}.col1 IS '${newComment}'`, - })); - }); - - test('does not replace if comment removed on column', async () => { - const newEvent = { - ...event, - OldResourceProperties: { - ...event.OldResourceProperties, - tableColumns: [{ name: 'col1', dataType: 'varchar(1)', comment: 'oldComment' }], - }, - }; - - await expect(manageTable(resourceProperties, newEvent)).resolves.toMatchObject({ - PhysicalResourceId: physicalResourceId, - }); - expect(mockExecuteStatement).toHaveBeenCalledWith(expect.objectContaining({ - Sql: `COMMENT ON COLUMN ${physicalResourceId}.col1 IS NULL`, - })); - }); - }); - - describe('column encoding', () => { - test('does not replace if encoding added on column', async () => { - const newResourceProperties = { - ...resourceProperties, - tableColumns: [{ name: 'col1', dataType: 'varchar(1)', encoding: ColumnEncoding.RAW }], - }; - - await expect(manageTable(newResourceProperties, event)).resolves.toMatchObject({ - PhysicalResourceId: physicalResourceId, - }); - expect(mockExecuteStatement).toHaveBeenCalledWith(expect.objectContaining({ - Sql: `ALTER TABLE ${physicalResourceId} ALTER COLUMN col1 ENCODE RAW`, - })); - }); - - test('does not replace if encoding removed on column', async () => { - const newEvent = { - ...event, - OldResourceProperties: { - ...event.OldResourceProperties, - tableColumns: [{ name: 'col1', dataType: 'varchar(1)', encoding: ColumnEncoding.RAW }], - }, - }; - const newResourceProperties = { - ...resourceProperties, - }; - - await expect(manageTable(newResourceProperties, newEvent)).resolves.toMatchObject({ - PhysicalResourceId: physicalResourceId, - }); - expect(mockExecuteStatement).toHaveBeenCalledWith(expect.objectContaining({ - Sql: `ALTER TABLE ${physicalResourceId} ALTER COLUMN col1 ENCODE AUTO`, - })); - }); - - test('adds a comma between multiple statements', async () => { - const newEvent = { - ...event, - OldResourceProperties: { - ...event.OldResourceProperties, - tableColumns: [{ name: 'col1', dataType: 'varchar(1)' }, { name: 'col2', dataType: 'varchar(1)' }], - }, - }; - - const newResourceProperties = { - ...resourceProperties, - tableColumns: [{ name: 'col1', dataType: 'varchar(1)', encoding: ColumnEncoding.RAW }, { name: 'col2', dataType: 'varchar(1)', encoding: ColumnEncoding.RAW }], - }; - - await expect(manageTable(newResourceProperties, newEvent)).resolves.toMatchObject({ - PhysicalResourceId: physicalResourceId, - }); - expect(mockExecuteStatement).toHaveBeenCalledWith(expect.objectContaining({ - Sql: `ALTER TABLE ${physicalResourceId} ALTER COLUMN col1 ENCODE RAW, ALTER COLUMN col2 ENCODE RAW`, - })); - }); - }); }); diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-defaultiamrole.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-defaultiamrole.js.snapshot/tree.json index fc2f90bd8896c..8f43d13c0da06 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-defaultiamrole.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-defaultiamrole.js.snapshot/tree.json @@ -1442,7 +1442,7 @@ "path": "DefaultIamRoleInteg/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.209" } }, "DeployAssert": { @@ -1488,7 +1488,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.209" } } }, diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/aws-cdk-redshift-cluster-database.assets.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/aws-cdk-redshift-cluster-database.assets.json index 10aa2697f70f7..caaeb45bb105b 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/aws-cdk-redshift-cluster-database.assets.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/aws-cdk-redshift-cluster-database.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "20.0.0", "files": { "df6d8dd1b5d25c8d69910f850500b42f43ae98b5dfe06f5f0d1843148539d7f3": { "source": { diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/awscdkredshiftelasticiptestDefaultTestDeployAssertEAC4B798.assets.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/awscdkredshiftelasticiptestDefaultTestDeployAssertEAC4B798.assets.json index a3b98377b3ccb..064832a9333cf 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/awscdkredshiftelasticiptestDefaultTestDeployAssertEAC4B798.assets.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/awscdkredshiftelasticiptestDefaultTestDeployAssertEAC4B798.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "20.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/cdk.out b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/cdk.out index d8b441d447f8a..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"29.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/integ.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/integ.json index 3a506f7fa9f7b..880550223b63c 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/integ.json @@ -1,12 +1,11 @@ { - "version": "29.0.0", + "version": "20.0.0", "testCases": { "aws-cdk-redshift-elastic-ip-test/DefaultTest": { "stacks": [ "aws-cdk-redshift-cluster-database" ], - "assertionStack": "aws-cdk-redshift-elastic-ip-test/DefaultTest/DeployAssert", - "assertionStackName": "awscdkredshiftelasticiptestDefaultTestDeployAssertEAC4B798" + "assertionStack": "aws-cdk-redshift-elastic-ip-test/DefaultTest/DeployAssert" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/manifest.json index f34589ba81960..ff7f0c20bd19b 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/manifest.json @@ -1,6 +1,12 @@ { - "version": "29.0.0", + "version": "20.0.0", "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, "aws-cdk-redshift-cluster-database.assets": { "type": "cdk:asset-manifest", "properties": { @@ -268,12 +274,6 @@ ] }, "displayName": "aws-cdk-redshift-elastic-ip-test/DefaultTest/DeployAssert" - }, - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/tree.json index 64d523ec1e681..5705868482891 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-elasticip.js.snapshot/tree.json @@ -4,6 +4,14 @@ "id": "App", "path": "", "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, "aws-cdk-redshift-cluster-database": { "id": "aws-cdk-redshift-cluster-database", "path": "aws-cdk-redshift-cluster-database", @@ -95,8 +103,8 @@ "id": "Acl", "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -262,8 +270,8 @@ "id": "Acl", "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -429,8 +437,8 @@ "id": "Acl", "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -548,8 +556,8 @@ "id": "Acl", "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -856,27 +864,11 @@ "fqn": "@aws-cdk/aws-redshift.Cluster", "version": "0.0.0" } - }, - "BootstrapVersion": { - "id": "BootstrapVersion", - "path": "aws-cdk-redshift-cluster-database/BootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" - } - }, - "CheckBootstrapVersion": { - "id": "CheckBootstrapVersion", - "path": "aws-cdk-redshift-cluster-database/CheckBootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnRule", - "version": "0.0.0" - } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "aws-cdk-redshift-elastic-ip-test": { @@ -892,33 +884,15 @@ "path": "aws-cdk-redshift-elastic-ip-test/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.85" } }, "DeployAssert": { "id": "DeployAssert", "path": "aws-cdk-redshift-elastic-ip-test/DefaultTest/DeployAssert", - "children": { - "BootstrapVersion": { - "id": "BootstrapVersion", - "path": "aws-cdk-redshift-elastic-ip-test/DefaultTest/DeployAssert/BootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" - } - }, - "CheckBootstrapVersion": { - "id": "CheckBootstrapVersion", - "path": "aws-cdk-redshift-elastic-ip-test/DefaultTest/DeployAssert/CheckBootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnRule", - "version": "0.0.0" - } - } - }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -932,19 +906,11 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } - }, - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.235" - } } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/EnhancedVpcRoutingDefaultTestDeployAssert10B513A1.assets.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/EnhancedVpcRoutingDefaultTestDeployAssert10B513A1.assets.json index dba684834eca7..00fd66f1b4bc2 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/EnhancedVpcRoutingDefaultTestDeployAssert10B513A1.assets.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/EnhancedVpcRoutingDefaultTestDeployAssert10B513A1.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "21.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/cdk.out b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/cdk.out index d8b441d447f8a..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"29.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/integ.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/integ.json index 28ad1346532c3..dd54e06e8a6f1 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "21.0.0", "testCases": { "EnhancedVpcRouting/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/manifest.json index a0fb6e711b75e..88ff20370e7aa 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/manifest.json @@ -1,6 +1,12 @@ { - "version": "29.0.0", + "version": "21.0.0", "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, "redshift-enhancedvpcrouting-integ.assets": { "type": "cdk:asset-manifest", "properties": { @@ -262,12 +268,6 @@ ] }, "displayName": "EnhancedVpcRouting/DefaultTest/DeployAssert" - }, - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/redshift-enhancedvpcrouting-integ.assets.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/redshift-enhancedvpcrouting-integ.assets.json index f281b06ac61ea..02aab1b89f83b 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/redshift-enhancedvpcrouting-integ.assets.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/redshift-enhancedvpcrouting-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "21.0.0", "files": { "88e2010a08d484eca3203f7e1bcffce43eaa10faedbd092b56c3d70967765b7a": { "source": { diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/tree.json index 7997ed915c513..ebc0d8772046a 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-enhancedvpcrouting.js.snapshot/tree.json @@ -4,6 +4,14 @@ "id": "App", "path": "", "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.129" + } + }, "redshift-enhancedvpcrouting-integ": { "id": "redshift-enhancedvpcrouting-integ", "path": "redshift-enhancedvpcrouting-integ", @@ -842,22 +850,6 @@ "fqn": "@aws-cdk/aws-redshift.Cluster", "version": "0.0.0" } - }, - "BootstrapVersion": { - "id": "BootstrapVersion", - "path": "redshift-enhancedvpcrouting-integ/BootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" - } - }, - "CheckBootstrapVersion": { - "id": "CheckBootstrapVersion", - "path": "redshift-enhancedvpcrouting-integ/CheckBootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnRule", - "version": "0.0.0" - } } }, "constructInfo": { @@ -878,30 +870,12 @@ "path": "EnhancedVpcRouting/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.129" } }, "DeployAssert": { "id": "DeployAssert", "path": "EnhancedVpcRouting/DefaultTest/DeployAssert", - "children": { - "BootstrapVersion": { - "id": "BootstrapVersion", - "path": "EnhancedVpcRouting/DefaultTest/DeployAssert/BootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" - } - }, - "CheckBootstrapVersion": { - "id": "CheckBootstrapVersion", - "path": "EnhancedVpcRouting/DefaultTest/DeployAssert/CheckBootstrapVersion", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnRule", - "version": "0.0.0" - } - } - }, "constructInfo": { "fqn": "@aws-cdk/core.Stack", "version": "0.0.0" @@ -918,14 +892,6 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } - }, - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.235" - } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/asset.382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.bundle/index.js similarity index 97% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js rename to packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/asset.382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.bundle/index.js index 2d6c2f0e85497..ffbf23bc9533f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/asset.382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.bundle/index.js @@ -614,11 +614,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); diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.assets.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.assets.json new file mode 100644 index 0000000000000..9d403bee01fcb --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.assets.json @@ -0,0 +1,45 @@ +{ + "version": "22.0.0", + "files": { + "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e": { + "source": { + "path": "asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585": { + "source": { + "path": "asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "93a411da5664a42e1702532262aa281227dd5fc1f136148d06a42addd7c763c0": { + "source": { + "path": "aws-cdk-redshift-cluster-create.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "93a411da5664a42e1702532262aa281227dd5fc1f136148d06a42addd7c763c0.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-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.template.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.template.json new file mode 100644 index 0000000000000..f7c7f21326370 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.template.json @@ -0,0 +1,553 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1Subnet77A7FDC6": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/17", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "foobar" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1RouteTableAF4E5874": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1RouteTableAssociation502CBE55": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcfoobarSubnet1RouteTableAF4E5874" + }, + "SubnetId": { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2Subnet85B013AD": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/17", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "foobar" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2RouteTable5127598D": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2RouteTableAssociation5013D70B": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcfoobarSubnet2RouteTable5127598D" + }, + "SubnetId": { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ParameterGroup5E32DECB": { + "Type": "AWS::Redshift::ClusterParameterGroup", + "Properties": { + "Description": "Cluster parameter group for family redshift-1.0", + "ParameterGroupFamily": "redshift-1.0", + "Parameters": [ + { + "ParameterName": "enable_user_activity_logging", + "ParameterValue": "true" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSubnetsDCFA5CB7": { + "Type": "AWS::Redshift::ClusterSubnetGroup", + "Properties": { + "Description": "Subnets for Cluster Redshift cluster", + "SubnetIds": [ + { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + }, + { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecurityGroup0921994B": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Redshift security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecret6368BD0F": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "GenerateSecretString": { + "ExcludeCharacters": "\"@/\\ '", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"admin\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecretAttachment769E6258": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "TargetId": { + "Ref": "ClusterEB0386A7" + }, + "TargetType": "AWS::Redshift::Cluster" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterEB0386A7": { + "Type": "AWS::Redshift::Cluster", + "Properties": { + "ClusterType": "multi-node", + "DBName": "default_db", + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "NodeType": "dc2.large", + "AllowVersionUpgrade": true, + "AutomatedSnapshotRetentionPeriod": 1, + "ClusterParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "ClusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "Encrypted": true, + "NumberOfNodes": 2, + "PubliclyAccessible": false, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE": { + "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" + ] + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "Roles": [ + { + "Ref": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEvent15BB3722": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" + }, + "Role": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE", + "Arn" + ] + }, + "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-create/Cluster/ResourceProvider)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + } + } + }, + "Handler": "framework.onEvent", + "Runtime": "nodejs14.x", + "Timeout": 900 + }, + "DependsOn": [ + "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterRedshiftClusterRebooterCustomResource773361E1": { + "Type": "Custom::RedshiftClusterRebooter", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEvent15BB3722", + "Arn" + ] + }, + "ClusterId": { + "Ref": "ClusterEB0386A7" + }, + "ParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "ParametersString": "{\"enable_user_activity_logging\":\"true\"}" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525": { + "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" + ] + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "Roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip" + }, + "Role": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "nodejs16.x", + "Timeout": 900 + }, + "DependsOn": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "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-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.assets.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.assets.json new file mode 100644 index 0000000000000..4349cdb12e9be --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.assets.json @@ -0,0 +1,45 @@ +{ + "version": "22.0.0", + "files": { + "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e": { + "source": { + "path": "asset.1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585": { + "source": { + "path": "asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "5a23231417fb67ed1d1d3f790c75060c7ca5f2b45a1e8b532dcaf9d8d40171cd": { + "source": { + "path": "aws-cdk-redshift-cluster-update.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "5a23231417fb67ed1d1d3f790c75060c7ca5f2b45a1e8b532dcaf9d8d40171cd.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-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.template.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.template.json new file mode 100644 index 0000000000000..a06dc5062ed6b --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.template.json @@ -0,0 +1,575 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1Subnet77A7FDC6": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/17", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "foobar" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1RouteTableAF4E5874": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet1RouteTableAssociation502CBE55": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcfoobarSubnet1RouteTableAF4E5874" + }, + "SubnetId": { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2Subnet85B013AD": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/17", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "foobar" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2RouteTable5127598D": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "VpcfoobarSubnet2RouteTableAssociation5013D70B": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcfoobarSubnet2RouteTable5127598D" + }, + "SubnetId": { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ParameterGroup5E32DECB": { + "Type": "AWS::Redshift::ClusterParameterGroup", + "Properties": { + "Description": "Cluster parameter group for family redshift-1.0", + "ParameterGroupFamily": "redshift-1.0", + "Parameters": [ + { + "ParameterName": "enable_user_activity_logging", + "ParameterValue": "false" + }, + { + "ParameterName": "use_fips_ssl", + "ParameterValue": "true" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSubnetsDCFA5CB7": { + "Type": "AWS::Redshift::ClusterSubnetGroup", + "Properties": { + "Description": "Subnets for Cluster Redshift cluster", + "SubnetIds": [ + { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + }, + { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecurityGroup0921994B": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Redshift security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecret6368BD0F": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "GenerateSecretString": { + "ExcludeCharacters": "\"@/\\ '", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"admin\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterSecretAttachment769E6258": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "TargetId": { + "Ref": "ClusterEB0386A7" + }, + "TargetType": "AWS::Redshift::Cluster" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterEB0386A7": { + "Type": "AWS::Redshift::Cluster", + "Properties": { + "ClusterType": "multi-node", + "DBName": "default_db", + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "NodeType": "dc2.large", + "AllowVersionUpgrade": true, + "AutomatedSnapshotRetentionPeriod": 1, + "ClusterParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "ClusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "Encrypted": true, + "NumberOfNodes": 2, + "PubliclyAccessible": false, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE": { + "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" + ] + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "Roles": [ + { + "Ref": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterResourceProviderframeworkonEvent15BB3722": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" + }, + "Role": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE", + "Arn" + ] + }, + "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-update/Cluster/ResourceProvider)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + } + } + }, + "Handler": "framework.onEvent", + "Runtime": "nodejs14.x", + "Timeout": 900 + }, + "DependsOn": [ + "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterRedshiftClusterRebooterCustomResource773361E1": { + "Type": "Custom::RedshiftClusterRebooter", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEvent15BB3722", + "Arn" + ] + }, + "ClusterId": { + "Ref": "ClusterEB0386A7" + }, + "ParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "ParametersString": "{\"enable_user_activity_logging\":\"false\",\"use_fips_ssl\":\"true\"}" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525": { + "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" + ] + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "Roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip" + }, + "Role": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "nodejs16.x", + "Timeout": 900 + }, + "DependsOn": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ExportsOutputRefClusterEB0386A796A0E3FE": { + "Value": { + "Ref": "ClusterEB0386A7" + }, + "Export": { + "Name": "aws-cdk-redshift-cluster-reboot-integ:ExportsOutputRefClusterEB0386A796A0E3FE" + } + }, + "ExportsOutputRefParameterGroup5E32DECBB33EA140": { + "Value": { + "Ref": "ParameterGroup5E32DECB" + }, + "Export": { + "Name": "aws-cdk-redshift-cluster-reboot-integ:ExportsOutputRefParameterGroup5E32DECBB33EA140" + } + } + }, + "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-redshift/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json new file mode 100644 index 0000000000000..3db8d2f9bd63d --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json @@ -0,0 +1,32 @@ +{ + "version": "22.0.0", + "files": { + "382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674": { + "source": { + "path": "asset.382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.bundle", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "02ba7e5975057b784436be8170fb2b40a050d51601ba1ed065a7339ea2cd67ae": { + "source": { + "path": "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "02ba7e5975057b784436be8170fb2b40a050d51601ba1ed065a7339ea2cd67ae.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-redshift/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json new file mode 100644 index 0000000000000..8cb906f08a943 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json @@ -0,0 +1,177 @@ +{ + "Resources": { + "AwsApiCallRedshiftdescribeClusters": { + "Type": "Custom::DeployAssert@SdkCallRedshiftdescribeClusters", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Redshift", + "api": "describeClusters", + "expected": "{\"$StringLike\":\"in-sync\"}", + "actualPath": "Clusters.0.ClusterParameterGroups.0.ParameterApplyStatus", + "parameters": { + "ClusterIdentifier": { + "Fn::ImportValue": "aws-cdk-redshift-cluster-reboot-integ:ExportsOutputRefClusterEB0386A796A0E3FE" + } + }, + "flattenResponse": "true", + "outputPaths": [ + "Clusters.0.ClusterParameterGroups.0.ParameterApplyStatus" + ], + "salt": "1671057311528" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "redshift:DescribeClusters" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "redshift:DescribeClusterParameters" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + } + ] + } + } + ] + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "382ba2a8fd0a13f6782aec5543e465f988f5c100f35ed20f90cd96b8ee53f674.zip" + }, + "Timeout": 120, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + }, + "AwsApiCallRedshiftdescribeClusterParameters": { + "Type": "Custom::DeployAssert@SdkCallRedshiftdescribeClusterParameter", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "Redshift", + "api": "describeClusterParameters", + "expected": "{\"$ObjectLike\":{\"Parameters\":{\"$ArrayWith\":[{\"$ObjectLike\":{\"ParameterName\":\"enable_user_activity_logging\",\"ParameterValue\":\"false\"}},{\"$ObjectLike\":{\"ParameterName\":\"use_fips_ssl\",\"ParameterValue\":\"true\"}}]}}}", + "parameters": { + "ParameterGroupName": { + "Fn::ImportValue": "aws-cdk-redshift-cluster-reboot-integ:ExportsOutputRefParameterGroup5E32DECBB33EA140" + }, + "Source": "user" + }, + "flattenResponse": "false", + "salt": "1671057311529" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "AssertionResultsAwsApiCallRedshiftdescribeClusters": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallRedshiftdescribeClusters", + "assertion" + ] + } + }, + "AssertionResultsAwsApiCallRedshiftdescribeClusterParameters": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallRedshiftdescribeClusterParameters", + "assertion" + ] + } + } + }, + "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-redshift/test/integ.cluster-reboot.js.snapshot/cdk.out b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/cdk.out new file mode 100644 index 0000000000000..145739f539580 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/integ.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/integ.json new file mode 100644 index 0000000000000..9cdefdeec7bab --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/integ.json @@ -0,0 +1,14 @@ +{ + "version": "22.0.0", + "testCases": { + "aws-cdk-redshift-reboot-test/DefaultTest": { + "stacks": [ + "aws-cdk-redshift-cluster-create", + "aws-cdk-redshift-cluster-update" + ], + "stackUpdateWorkflow": false, + "assertionStack": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert", + "assertionStackName": "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/manifest.json new file mode 100644 index 0000000000000..614f41d6c6a65 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/manifest.json @@ -0,0 +1,444 @@ +{ + "version": "22.0.0", + "artifacts": { + "aws-cdk-redshift-cluster-create.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-redshift-cluster-create.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-redshift-cluster-create": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-redshift-cluster-create.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}/93a411da5664a42e1702532262aa281227dd5fc1f136148d06a42addd7c763c0.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-redshift-cluster-create.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" + }, + "stackName": "aws-cdk-redshift-cluster-reboot-integ" + }, + "dependencies": [ + "aws-cdk-redshift-cluster-create.assets" + ], + "metadata": { + "/aws-cdk-redshift-cluster-create/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1Subnet77A7FDC6" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1RouteTableAF4E5874" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1RouteTableAssociation502CBE55" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2Subnet85B013AD" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2RouteTable5127598D" + } + ], + "/aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2RouteTableAssociation5013D70B" + } + ], + "/aws-cdk-redshift-cluster-create/ParameterGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ParameterGroup5E32DECB" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/Subnets/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSubnetsDCFA5CB7" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecurityGroup0921994B" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecret6368BD0F" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecretAttachment769E6258" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterEB0386A7" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEvent15BB3722" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterRedshiftClusterRebooterCustomResource773361E1" + } + ], + "/aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ], + "/aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF" + } + ], + "/aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5" + } + ], + "/aws-cdk-redshift-cluster-create/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-redshift-cluster-create/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-redshift-cluster-create" + }, + "aws-cdk-redshift-cluster-update.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-redshift-cluster-update.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-redshift-cluster-update": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-redshift-cluster-update.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}/5a23231417fb67ed1d1d3f790c75060c7ca5f2b45a1e8b532dcaf9d8d40171cd.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-redshift-cluster-update.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" + }, + "stackName": "aws-cdk-redshift-cluster-reboot-integ" + }, + "dependencies": [ + "aws-cdk-redshift-cluster-create", + "aws-cdk-redshift-cluster-update.assets" + ], + "metadata": { + "/aws-cdk-redshift-cluster-update/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1Subnet77A7FDC6" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1RouteTableAF4E5874" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet1RouteTableAssociation502CBE55" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2Subnet85B013AD" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2RouteTable5127598D" + } + ], + "/aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcfoobarSubnet2RouteTableAssociation5013D70B" + } + ], + "/aws-cdk-redshift-cluster-update/ParameterGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ParameterGroup5E32DECB" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/Subnets/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSubnetsDCFA5CB7" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecurityGroup0921994B" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecret6368BD0F" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterSecretAttachment769E6258" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterEB0386A7" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterResourceProviderframeworkonEvent15BB3722" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterRedshiftClusterRebooterCustomResource773361E1" + } + ], + "/aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ], + "/aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF" + } + ], + "/aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5" + } + ], + "/aws-cdk-redshift-cluster-update/Exports/Output{\"Ref\":\"ClusterEB0386A7\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefClusterEB0386A796A0E3FE" + } + ], + "/aws-cdk-redshift-cluster-update/Exports/Output{\"Ref\":\"ParameterGroup5E32DECB\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefParameterGroup5E32DECBB33EA140" + } + ], + "/aws-cdk-redshift-cluster-update/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-redshift-cluster-update/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-redshift-cluster-update" + }, + "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.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}/02ba7e5975057b784436be8170fb2b40a050d51601ba1ed065a7339ea2cd67ae.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.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": [ + "aws-cdk-redshift-cluster-update", + "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets" + ], + "metadata": { + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusters/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallRedshiftdescribeClusters" + } + ], + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusters/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallRedshiftdescribeClusters" + } + ], + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" + } + ], + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" + } + ], + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusterParameters/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallRedshiftdescribeClusterParameters" + } + ], + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusterParameters/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallRedshiftdescribeClusterParameters" + } + ], + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/tree.json new file mode 100644 index 0000000000000..f4bf2ad97974e --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.js.snapshot/tree.json @@ -0,0 +1,2041 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-redshift-cluster-create": { + "id": "aws-cdk-redshift-cluster-create", + "path": "aws-cdk-redshift-cluster-create", + "children": { + "Vpc": { + "id": "Vpc", + "path": "aws-cdk-redshift-cluster-create/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Vpc/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "version": "0.0.0" + } + }, + "foobarSubnet1": { + "id": "foobarSubnet1", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/17", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "foobar" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Isolated" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcfoobarSubnet1RouteTableAF4E5874" + }, + "subnetId": { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "foobarSubnet2": { + "id": "foobarSubnet2", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/17", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "foobar" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Isolated" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcfoobarSubnet2RouteTable5127598D" + }, + "subnetId": { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Vpc", + "version": "0.0.0" + } + }, + "ParameterGroup": { + "id": "ParameterGroup", + "path": "aws-cdk-redshift-cluster-create/ParameterGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/ParameterGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterParameterGroup", + "aws:cdk:cloudformation:props": { + "description": "Cluster parameter group for family redshift-1.0", + "parameterGroupFamily": "redshift-1.0", + "parameters": [ + { + "parameterName": "enable_user_activity_logging", + "parameterValue": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnClusterParameterGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.ClusterParameterGroup", + "version": "0.0.0" + } + }, + "Cluster": { + "id": "Cluster", + "path": "aws-cdk-redshift-cluster-create/Cluster", + "children": { + "Subnets": { + "id": "Subnets", + "path": "aws-cdk-redshift-cluster-create/Cluster/Subnets", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-cluster-create/Cluster/Subnets/Default", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterSubnetGroup", + "aws:cdk:cloudformation:props": { + "description": "Subnets for Cluster Redshift cluster", + "subnetIds": [ + { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + }, + { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnClusterSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.ClusterSubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-redshift-cluster-create/Cluster/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Redshift security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Secret": { + "id": "Secret", + "path": "aws-cdk-redshift-cluster-create/Cluster/Secret", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/Secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "generateSecretString": { + "passwordLength": 30, + "secretStringTemplate": "{\"username\":\"admin\"}", + "generateStringKey": "password", + "excludeCharacters": "\"@/\\ '" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "version": "0.0.0" + } + }, + "Attachment": { + "id": "Attachment", + "path": "aws-cdk-redshift-cluster-create/Cluster/Secret/Attachment", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/Secret/Attachment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", + "aws:cdk:cloudformation:props": { + "secretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "targetId": { + "Ref": "ClusterEB0386A7" + }, + "targetType": "AWS::Redshift::Cluster" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.SecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.DatabaseSecret", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::Cluster", + "aws:cdk:cloudformation:props": { + "clusterType": "multi-node", + "dbName": "default_db", + "masterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "masterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "nodeType": "dc2.large", + "allowVersionUpgrade": true, + "automatedSnapshotRetentionPeriod": 1, + "clusterParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "clusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "encrypted": true, + "numberOfNodes": 2, + "publiclyAccessible": false, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnCluster", + "version": "0.0.0" + } + }, + "RedshiftClusterRebooterFunction": { + "id": "RedshiftClusterRebooterFunction", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterFunction", + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.SingletonFunction", + "version": "0.0.0" + } + }, + "ResourceProvider": { + "id": "ResourceProvider", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider", + "children": { + "framework-onEvent": { + "id": "framework-onEvent", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/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" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "roles": [ + { + "Ref": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ] + } + }, + "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" + } + }, + "Code": { + "id": "Code", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/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": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/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": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" + }, + "role": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE", + "Arn" + ] + }, + "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-create/Cluster/ResourceProvider)", + "environment": { + "variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + } + } + }, + "handler": "framework.onEvent", + "runtime": "nodejs14.x", + "timeout": 900 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/custom-resources.Provider", + "version": "0.0.0" + } + }, + "RedshiftClusterRebooterCustomResource": { + "id": "RedshiftClusterRebooterCustomResource", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterCustomResource/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.Cluster", + "version": "0.0.0" + } + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2": { + "id": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + } + }, + "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" + } + }, + "Code": { + "id": "Code", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip" + }, + "role": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "nodejs16.x", + "timeout": 900 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-redshift-cluster-create/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-redshift-cluster-create/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "aws-cdk-redshift-cluster-update": { + "id": "aws-cdk-redshift-cluster-update", + "path": "aws-cdk-redshift-cluster-update", + "children": { + "Vpc": { + "id": "Vpc", + "path": "aws-cdk-redshift-cluster-update/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Vpc/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "version": "0.0.0" + } + }, + "foobarSubnet1": { + "id": "foobarSubnet1", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/17", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "foobar" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Isolated" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcfoobarSubnet1RouteTableAF4E5874" + }, + "subnetId": { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "foobarSubnet2": { + "id": "foobarSubnet2", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/17", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "foobar" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Isolated" + }, + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcfoobarSubnet2RouteTable5127598D" + }, + "subnetId": { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Vpc", + "version": "0.0.0" + } + }, + "ParameterGroup": { + "id": "ParameterGroup", + "path": "aws-cdk-redshift-cluster-update/ParameterGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/ParameterGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterParameterGroup", + "aws:cdk:cloudformation:props": { + "description": "Cluster parameter group for family redshift-1.0", + "parameterGroupFamily": "redshift-1.0", + "parameters": [ + { + "parameterName": "enable_user_activity_logging", + "parameterValue": "false" + }, + { + "parameterName": "use_fips_ssl", + "parameterValue": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnClusterParameterGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.ClusterParameterGroup", + "version": "0.0.0" + } + }, + "Cluster": { + "id": "Cluster", + "path": "aws-cdk-redshift-cluster-update/Cluster", + "children": { + "Subnets": { + "id": "Subnets", + "path": "aws-cdk-redshift-cluster-update/Cluster/Subnets", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-cluster-update/Cluster/Subnets/Default", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::ClusterSubnetGroup", + "aws:cdk:cloudformation:props": { + "description": "Subnets for Cluster Redshift cluster", + "subnetIds": [ + { + "Ref": "VpcfoobarSubnet1Subnet77A7FDC6" + }, + { + "Ref": "VpcfoobarSubnet2Subnet85B013AD" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnClusterSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.ClusterSubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-cdk-redshift-cluster-update/Cluster/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "Redshift security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Secret": { + "id": "Secret", + "path": "aws-cdk-redshift-cluster-update/Cluster/Secret", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/Secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "generateSecretString": { + "passwordLength": 30, + "secretStringTemplate": "{\"username\":\"admin\"}", + "generateStringKey": "password", + "excludeCharacters": "\"@/\\ '" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "version": "0.0.0" + } + }, + "Attachment": { + "id": "Attachment", + "path": "aws-cdk-redshift-cluster-update/Cluster/Secret/Attachment", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/Secret/Attachment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", + "aws:cdk:cloudformation:props": { + "secretId": { + "Ref": "ClusterSecret6368BD0F" + }, + "targetId": { + "Ref": "ClusterEB0386A7" + }, + "targetType": "AWS::Redshift::Cluster" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.SecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.DatabaseSecret", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Redshift::Cluster", + "aws:cdk:cloudformation:props": { + "clusterType": "multi-node", + "dbName": "default_db", + "masterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:username::}}" + ] + ] + }, + "masterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "ClusterSecret6368BD0F" + }, + ":SecretString:password::}}" + ] + ] + }, + "nodeType": "dc2.large", + "allowVersionUpgrade": true, + "automatedSnapshotRetentionPeriod": 1, + "clusterParameterGroupName": { + "Ref": "ParameterGroup5E32DECB" + }, + "clusterSubnetGroupName": { + "Ref": "ClusterSubnetsDCFA5CB7" + }, + "encrypted": true, + "numberOfNodes": 2, + "publiclyAccessible": false, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterSecurityGroup0921994B", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.CfnCluster", + "version": "0.0.0" + } + }, + "RedshiftClusterRebooterFunction": { + "id": "RedshiftClusterRebooterFunction", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterFunction", + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.SingletonFunction", + "version": "0.0.0" + } + }, + "ResourceProvider": { + "id": "ResourceProvider", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider", + "children": { + "framework-onEvent": { + "id": "framework-onEvent", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/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" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterResourceProviderframeworkonEventServiceRoleDefaultPolicy525CDD86", + "roles": [ + { + "Ref": "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE" + } + ] + } + }, + "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" + } + }, + "Code": { + "id": "Code", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/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": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/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": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" + }, + "role": { + "Fn::GetAtt": [ + "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE", + "Arn" + ] + }, + "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-update/Cluster/ResourceProvider)", + "environment": { + "variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5", + "Arn" + ] + } + } + }, + "handler": "framework.onEvent", + "runtime": "nodejs14.x", + "timeout": 900 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/custom-resources.Provider", + "version": "0.0.0" + } + }, + "RedshiftClusterRebooterCustomResource": { + "id": "RedshiftClusterRebooterCustomResource", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterCustomResource/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-redshift.Cluster", + "version": "0.0.0" + } + }, + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2": { + "id": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", + "roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + } + }, + "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" + } + }, + "Code": { + "id": "Code", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code/Stage", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/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": "1b88b7c3e3e0f8d3e27ded1bde51b7a80c75f3d8733872af7952c3a6d902147e.zip" + }, + "role": { + "Fn::GetAtt": [ + "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525", + "Arn" + ] + }, + "handler": "index.handler", + "runtime": "nodejs16.x", + "timeout": 900 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "aws-cdk-redshift-cluster-update/Exports", + "children": { + "Output{\"Ref\":\"ClusterEB0386A7\"}": { + "id": "Output{\"Ref\":\"ClusterEB0386A7\"}", + "path": "aws-cdk-redshift-cluster-update/Exports/Output{\"Ref\":\"ClusterEB0386A7\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"ParameterGroup5E32DECB\"}": { + "id": "Output{\"Ref\":\"ParameterGroup5E32DECB\"}", + "path": "aws-cdk-redshift-cluster-update/Exports/Output{\"Ref\":\"ParameterGroup5E32DECB\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.182" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-redshift-cluster-update/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-redshift-cluster-update/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "aws-cdk-redshift-reboot-test": { + "id": "aws-cdk-redshift-reboot-test", + "path": "aws-cdk-redshift-reboot-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "aws-cdk-redshift-reboot-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.182" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert", + "children": { + "AwsApiCallRedshiftdescribeClusters": { + "id": "AwsApiCallRedshiftdescribeClusters", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusters", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusters/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusters/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.182" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusters/Default", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusters/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusters/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AwsApiCall", + "version": "0.0.0" + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81": { + "id": "SingletonFunction1488541a7b23466481b69b4408076b81", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", + "children": { + "Staging": { + "id": "Staging", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.182" + } + }, + "AwsApiCallRedshiftdescribeClusterParameters": { + "id": "AwsApiCallRedshiftdescribeClusterParameters", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusterParameters", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusterParameters/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusterParameters/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.182" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusterParameters/Default", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusterParameters/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/AwsApiCallRedshiftdescribeClusterParameters/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AwsApiCall", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-redshift-reboot-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-redshift-reboot-test/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.182" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.ts b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.ts new file mode 100644 index 0000000000000..2645ee74dd686 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.cluster-reboot.ts @@ -0,0 +1,101 @@ +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as cdk from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; +import { Match } from '@aws-cdk/integ-tests'; +import * as constructs from 'constructs'; +import * as redshift from '../lib'; + +/** + * This test does the following + * + * 1. Creates a stack with a Redshift cluster. + * 2. Creates a second stack with the same name to update the parameter group and cause the custom resource to run. + * + * The diff assets flag (used when testing custom resources) has been commented out due to snapshots not properly verifying in CodeBuild. + */ + +const app = new cdk.App(); + + +interface RedshiftRebootStackProps extends cdk.StackProps { + parameterGroupParams: { [name: string]: string }, +} + +const requiredStackName: Partial = { + stackName: 'aws-cdk-redshift-cluster-reboot-integ', +}; + +class RedshiftRebootStack extends cdk.Stack { + + readonly cluster: redshift.Cluster; + readonly parameterGroup: redshift.ClusterParameterGroup; + + constructor(scope: constructs.Construct, id: string, props: RedshiftRebootStackProps) { + props = { ...props, ...requiredStackName }; + super(scope, id, props); + const vpc = new ec2.Vpc(this, 'Vpc', { + subnetConfiguration: [{ + subnetType: ec2.SubnetType.PRIVATE_ISOLATED, + name: 'foobar', + }], + }); + this.parameterGroup = new redshift.ClusterParameterGroup(this, 'ParameterGroup', { + parameters: props.parameterGroupParams, + }); + this.cluster = new redshift.Cluster(this, 'Cluster', { + vpc: vpc, + vpcSubnets: { + subnetType: ec2.SubnetType.PRIVATE_ISOLATED, + }, + masterUser: { + masterUsername: 'admin', + }, + parameterGroup: this.parameterGroup, + rebootForParameterChanges: true, + }); + } +} + +const createStack = new RedshiftRebootStack(app, 'aws-cdk-redshift-cluster-create', { + parameterGroupParams: { enable_user_activity_logging: 'true' }, +}); + +const updateStack = new RedshiftRebootStack(app, 'aws-cdk-redshift-cluster-update', { + parameterGroupParams: { enable_user_activity_logging: 'false', use_fips_ssl: 'true' }, +}); + +updateStack.addDependency(createStack); +const stacks = [createStack, updateStack]; +stacks.forEach(s => { + cdk.Aspects.of(s).add({ + visit(node: constructs.IConstruct) { + if (cdk.CfnResource.isCfnResource(node)) { + node.applyRemovalPolicy(cdk.RemovalPolicy.DESTROY); + } + }, + }); +}); + +const test = new integ.IntegTest(app, 'aws-cdk-redshift-reboot-test', { + testCases: stacks, + stackUpdateWorkflow: false, + // diffAssets: true, +}); + +const describeClusters = test.assertions.awsApiCall('Redshift', 'describeClusters', { ClusterIdentifier: updateStack.cluster.clusterName }); +describeClusters.assertAtPath('Clusters.0.ClusterParameterGroups.0.ParameterGroupName', integ.ExpectedResult.stringLikeRegexp(updateStack.parameterGroup.clusterParameterGroupName)); +describeClusters.assertAtPath('Clusters.0.ClusterParameterGroups.0.ParameterApplyStatus', integ.ExpectedResult.stringLikeRegexp('in-sync')); + +const describeParams = test.assertions.awsApiCall('Redshift', 'describeClusterParameters', + { + ParameterGroupName: updateStack.parameterGroup.clusterParameterGroupName, + Source: 'user', + }, +); +describeParams.expect(integ.ExpectedResult.objectLike({ + Parameters: Match.arrayWith([ + Match.objectLike({ ParameterName: 'enable_user_activity_logging', ParameterValue: 'false' }), + Match.objectLike({ ParameterName: 'use_fips_ssl', ParameterValue: 'true' }), + ]), +})); +app.synth(); diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/table.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/table.js deleted file mode 100644 index 1294ed3cd80c4..0000000000000 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/table.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = void 0; -const redshift_data_1 = require("./redshift-data"); -const types_1 = require("./types"); -const util_1 = require("./util"); -async function handler(props, event) { - const tableNamePrefix = props.tableName.prefix; - const tableNameSuffix = props.tableName.generateSuffix === 'true' ? `${event.RequestId.substring(0, 8)}` : ''; - const tableColumns = props.tableColumns; - const tableAndClusterProps = props; - if (event.RequestType === 'Create') { - const tableName = await createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); - return { PhysicalResourceId: tableName }; - } - else if (event.RequestType === 'Delete') { - await dropTable(event.PhysicalResourceId, tableAndClusterProps); - return; - } - else if (event.RequestType === 'Update') { - const tableName = await updateTable(event.PhysicalResourceId, tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps, event.OldResourceProperties); - return { PhysicalResourceId: tableName }; - } - else { - /* eslint-disable-next-line dot-notation */ - throw new Error(`Unrecognized event type: ${event['RequestType']}`); - } -} -exports.handler = handler; -async function createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps) { - const tableName = tableNamePrefix + tableNameSuffix; - const tableColumnsString = tableColumns.map(column => `${column.name} ${column.dataType}${getEncodingColumnString(column)}`).join(); - let statement = `CREATE TABLE ${tableName} (${tableColumnsString})`; - if (tableAndClusterProps.distStyle) { - statement += ` DISTSTYLE ${tableAndClusterProps.distStyle}`; - } - const distKeyColumn = util_1.getDistKeyColumn(tableColumns); - if (distKeyColumn) { - statement += ` DISTKEY(${distKeyColumn.name})`; - } - const sortKeyColumns = util_1.getSortKeyColumns(tableColumns); - if (sortKeyColumns.length > 0) { - const sortKeyColumnsString = getSortKeyColumnsString(sortKeyColumns); - statement += ` ${tableAndClusterProps.sortStyle} SORTKEY(${sortKeyColumnsString})`; - } - await redshift_data_1.executeStatement(statement, tableAndClusterProps); - for (const column of tableColumns) { - if (column.comment) { - await redshift_data_1.executeStatement(`COMMENT ON COLUMN ${tableName}.${column.name} IS '${column.comment}'`, tableAndClusterProps); - } - } - if (tableAndClusterProps.tableComment) { - await redshift_data_1.executeStatement(`COMMENT ON TABLE ${tableName} IS '${tableAndClusterProps.tableComment}'`, tableAndClusterProps); - } - return tableName; -} -async function dropTable(tableName, clusterProps) { - await redshift_data_1.executeStatement(`DROP TABLE ${tableName}`, clusterProps); -} -async function updateTable(tableName, tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps, oldResourceProperties) { - const alterationStatements = []; - const oldClusterProps = oldResourceProperties; - if (tableAndClusterProps.clusterName !== oldClusterProps.clusterName || tableAndClusterProps.databaseName !== oldClusterProps.databaseName) { - return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); - } - const oldTableNamePrefix = oldResourceProperties.tableName.prefix; - if (tableNamePrefix !== oldTableNamePrefix) { - return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); - } - const oldTableColumns = oldResourceProperties.tableColumns; - const columnDeletions = oldTableColumns.filter(oldColumn => (tableColumns.every(column => oldColumn.name !== column.name))); - if (columnDeletions.length > 0) { - alterationStatements.push(...columnDeletions.map(column => `ALTER TABLE ${tableName} DROP COLUMN ${column.name}`)); - } - const columnAdditions = tableColumns.filter(column => { - return !oldTableColumns.some(oldColumn => column.name === oldColumn.name && column.dataType === oldColumn.dataType); - }).map(column => `ADD ${column.name} ${column.dataType}`); - if (columnAdditions.length > 0) { - alterationStatements.push(...columnAdditions.map(addition => `ALTER TABLE ${tableName} ${addition}`)); - } - const columnEncoding = tableColumns.filter(column => { - return oldTableColumns.some(oldColumn => column.name === oldColumn.name && column.encoding !== oldColumn.encoding); - }).map(column => `ALTER COLUMN ${column.name} ENCODE ${column.encoding || types_1.ColumnEncoding.AUTO}`); - if (columnEncoding.length > 0) { - alterationStatements.push(`ALTER TABLE ${tableName} ${columnEncoding.join(', ')}`); - } - const columnComments = tableColumns.filter(column => { - return oldTableColumns.some(oldColumn => column.name === oldColumn.name && column.comment !== oldColumn.comment); - }).map(column => `COMMENT ON COLUMN ${tableName}.${column.name} IS ${column.comment ? `'${column.comment}'` : 'NULL'}`); - if (columnComments.length > 0) { - alterationStatements.push(...columnComments); - } - const oldDistStyle = oldResourceProperties.distStyle; - if ((!oldDistStyle && tableAndClusterProps.distStyle) || - (oldDistStyle && !tableAndClusterProps.distStyle)) { - return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); - } - else if (oldDistStyle !== tableAndClusterProps.distStyle) { - alterationStatements.push(`ALTER TABLE ${tableName} ALTER DISTSTYLE ${tableAndClusterProps.distStyle}`); - } - const oldDistKey = util_1.getDistKeyColumn(oldTableColumns)?.name; - const newDistKey = util_1.getDistKeyColumn(tableColumns)?.name; - if ((!oldDistKey && newDistKey) || (oldDistKey && !newDistKey)) { - return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); - } - else if (oldDistKey !== newDistKey) { - alterationStatements.push(`ALTER TABLE ${tableName} ALTER DISTKEY ${newDistKey}`); - } - const oldSortKeyColumns = util_1.getSortKeyColumns(oldTableColumns); - const newSortKeyColumns = util_1.getSortKeyColumns(tableColumns); - const oldSortStyle = oldResourceProperties.sortStyle; - const newSortStyle = tableAndClusterProps.sortStyle; - if ((oldSortStyle === newSortStyle && !util_1.areColumnsEqual(oldSortKeyColumns, newSortKeyColumns)) - || (oldSortStyle !== newSortStyle)) { - switch (newSortStyle) { - case types_1.TableSortStyle.INTERLEAVED: - // INTERLEAVED sort key addition requires replacement. - // https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html - return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); - case types_1.TableSortStyle.COMPOUND: { - const sortKeyColumnsString = getSortKeyColumnsString(newSortKeyColumns); - alterationStatements.push(`ALTER TABLE ${tableName} ALTER ${newSortStyle} SORTKEY(${sortKeyColumnsString})`); - break; - } - case types_1.TableSortStyle.AUTO: { - alterationStatements.push(`ALTER TABLE ${tableName} ALTER SORTKEY ${newSortStyle}`); - break; - } - } - } - const oldComment = oldResourceProperties.tableComment; - const newComment = tableAndClusterProps.tableComment; - if (oldComment !== newComment) { - alterationStatements.push(`COMMENT ON TABLE ${tableName} IS ${newComment ? `'${newComment}'` : 'NULL'}`); - } - await Promise.all(alterationStatements.map(statement => redshift_data_1.executeStatement(statement, tableAndClusterProps))); - return tableName; -} -function getSortKeyColumnsString(sortKeyColumns) { - return sortKeyColumns.map(column => column.name).join(); -} -function getEncodingColumnString(column) { - if (column.encoding) { - return ` ENCODE ${column.encoding}`; - } - return ''; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxtREFBbUQ7QUFDbkQsbUNBQTZGO0FBQzdGLGlDQUE4RTtBQUd2RSxLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQTJCLEVBQUUsS0FBa0Q7SUFDM0csTUFBTSxlQUFlLEdBQUcsS0FBSyxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUM7SUFDL0MsTUFBTSxlQUFlLEdBQUcsS0FBSyxDQUFDLFNBQVMsQ0FBQyxjQUFjLEtBQUssTUFBTSxDQUFDLENBQUMsQ0FBQyxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUM7SUFDOUcsTUFBTSxZQUFZLEdBQUcsS0FBSyxDQUFDLFlBQVksQ0FBQztJQUN4QyxNQUFNLG9CQUFvQixHQUFHLEtBQUssQ0FBQztJQUVuQyxJQUFJLEtBQUssQ0FBQyxXQUFXLEtBQUssUUFBUSxFQUFFO1FBQ2xDLE1BQU0sU0FBUyxHQUFHLE1BQU0sV0FBVyxDQUFDLGVBQWUsRUFBRSxlQUFlLEVBQUUsWUFBWSxFQUFFLG9CQUFvQixDQUFDLENBQUM7UUFDMUcsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFNBQVMsRUFBRSxDQUFDO0tBQzFDO1NBQU0sSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsRU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uICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIGNvbnN0IG9sZENvbW1lbnQgPSBvbGRSZXNvdXJjZVByb3BlcnRpZXMudGFibGVDb21tZW50O1xuICBjb25zdCBuZXdDb21tZW50ID0gdGFibGVBbmRDbHVzdGVyUHJvcHMudGFibGVDb21tZW50O1xuICBpZiAob2xkQ29tbWVudCAhPT0gbmV3Q29tbWVudCkge1xuICAgIGFsdGVyYXRpb25TdGF0ZW1lbnRzLnB1c2goYENPTU1FTlQgT04gVEFCTEUgJHt0YWJsZU5hbWV9IElTICR7bmV3Q29tbWVudCA/IGAnJHtuZXdDb21tZW50fSdgIDogJ05VTEwnfWApO1xuICB9XG5cbiAgYXdhaXQgUHJvbWlzZS5hbGwoYWx0ZXJhdGlvblN0YXRlbWVudHMubWFwKHN0YXRlbWVudCA9PiBleGVjdXRlU3RhdGVtZW50KHN0YXRlbWVudCwgdGFibGVBbmRDbHVzdGVyUHJvcHMpKSk7XG5cbiAgcmV0dXJuIHRhYmxlTmFtZTtcbn1cblxuZnVuY3Rpb24gZ2V0U29ydEtleUNvbHVtbnNTdHJpbmcoc29ydEtleUNvbHVtbnM6IENvbHVtbltdKSB7XG4gIHJldHVybiBzb3J0S2V5Q29sdW1ucy5tYXAoY29sdW1uID0+IGNvbHVtbi5uYW1lKS5qb2luKCk7XG59XG5cbmZ1bmN0aW9uIGdldEVuY29kaW5nQ29sdW1uU3RyaW5nKGNvbHVtbjogQ29sdW1uKTogc3RyaW5nIHtcbiAgaWYgKGNvbHVtbi5lbmNvZGluZykge1xuICAgIHJldHVybiBgIEVOQ09ERSAke2NvbHVtbi5lbmNvZGluZ31gO1xuICB9XG4gIHJldHVybiAnJztcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/types.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/types.js deleted file mode 100644 index c19cbf576b891..0000000000000 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/types.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ColumnEncoding = exports.TableSortStyle = void 0; -/** - * The sort style of a table. - * This has been duplicated here to exporting private types. - */ -var TableSortStyle; -(function (TableSortStyle) { - /** - * Amazon Redshift assigns an optimal sort key based on the table data. - */ - TableSortStyle["AUTO"] = "AUTO"; - /** - * Specifies that the data is sorted using a compound key made up of all of the listed columns, - * in the order they are listed. - */ - TableSortStyle["COMPOUND"] = "COMPOUND"; - /** - * Specifies that the data is sorted using an interleaved sort key. - */ - TableSortStyle["INTERLEAVED"] = "INTERLEAVED"; -})(TableSortStyle = exports.TableSortStyle || (exports.TableSortStyle = {})); -/** - * The compression encoding of a column. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Compression_encodings.html - */ -var ColumnEncoding; -(function (ColumnEncoding) { - /** - * Amazon Redshift assigns an optimal encoding based on the column data. - * This is the default. - */ - ColumnEncoding["AUTO"] = "AUTO"; - /** - * The column is not compressed. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Raw_encoding.html - */ - ColumnEncoding["RAW"] = "RAW"; - /** - * The column is compressed using the AZ64 algorithm. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/az64-encoding.html - */ - ColumnEncoding["AZ64"] = "AZ64"; - /** - * The column is compressed using a separate dictionary for each block column value on disk. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Byte_dictionary_encoding.html - */ - ColumnEncoding["BYTEDICT"] = "BYTEDICT"; - /** - * The column is compressed based on the difference between values in the column. - * This records differences as 1-byte values. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Delta_encoding.html - */ - ColumnEncoding["DELTA"] = "DELTA"; - /** - * The column is compressed based on the difference between values in the column. - * This records differences as 2-byte values. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Delta_encoding.html - */ - ColumnEncoding["DELTA32K"] = "DELTA32K"; - /** - * The column is compressed using the LZO algorithm. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/lzo-encoding.html - */ - ColumnEncoding["LZO"] = "LZO"; - /** - * The column is compressed to a smaller storage size than the original data type. - * The compressed storage size is 1 byte. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_MostlyN_encoding.html - */ - ColumnEncoding["MOSTLY8"] = "MOSTLY8"; - /** - * The column is compressed to a smaller storage size than the original data type. - * The compressed storage size is 2 bytes. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_MostlyN_encoding.html - */ - ColumnEncoding["MOSTLY16"] = "MOSTLY16"; - /** - * The column is compressed to a smaller storage size than the original data type. - * The compressed storage size is 4 bytes. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_MostlyN_encoding.html - */ - ColumnEncoding["MOSTLY32"] = "MOSTLY32"; - /** - * The column is compressed by recording the number of occurrences of each value in the column. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Runlength_encoding.html - */ - ColumnEncoding["RUNLENGTH"] = "RUNLENGTH"; - /** - * The column is compressed by recording the first 245 unique words and then using a 1-byte index to represent each word. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Text255_encoding.html - */ - ColumnEncoding["TEXT255"] = "TEXT255"; - /** - * The column is compressed by recording the first 32K unique words and then using a 2-byte index to represent each word. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/c_Text255_encoding.html - */ - ColumnEncoding["TEXT32K"] = "TEXT32K"; - /** - * The column is compressed using the ZSTD algorithm. - * - * @see https://docs.aws.amazon.com/redshift/latest/dg/zstd-encoding.html - */ - ColumnEncoding["ZSTD"] = "ZSTD"; -})(ColumnEncoding = exports.ColumnEncoding || (exports.ColumnEncoding = {})); -//# source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9kZy96c3RkLWVuY29kaW5nLmh0bWxcbiAgICovXG4gIFpTVEQgPSAnWlNURCcsXG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/handler-name.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/handler-name.js similarity index 100% rename from packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/handler-name.js rename to packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/handler-name.js diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/index.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/index.js similarity index 51% rename from packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/index.js rename to packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/index.js index d91935764b9bf..d7a8b52f2944c 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/index.js +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/index.js @@ -18,6 +18,4 @@ async function handler(event) { return subHandler(event.ResourceProperties, event); } exports.handler = handler; -var types_1 = require("./types"); -Object.defineProperty(exports, "ColumnEncoding", { enumerable: true, get: function () { return types_1.ColumnEncoding; } }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxpREFBNkM7QUFDN0MsNkNBQTJEO0FBQzNELG1DQUFpRDtBQUNqRCxpQ0FBK0M7QUFFL0MsTUFBTSxRQUFRLEdBQWlIO0lBQzdILENBQUMsMEJBQVcsQ0FBQyxLQUFLLENBQUMsRUFBRSxlQUFXO0lBQ2hDLENBQUMsMEJBQVcsQ0FBQyxJQUFJLENBQUMsRUFBRSxjQUFVO0lBQzlCLENBQUMsMEJBQVcsQ0FBQyxtQkFBbUIsQ0FBQyxFQUFFLG9CQUFnQjtDQUNwRCxDQUFDO0FBRUssS0FBSyxVQUFVLE9BQU8sQ0FBQyxLQUFrRDtJQUM5RSxNQUFNLFVBQVUsR0FBRyxRQUFRLENBQUMsS0FBSyxDQUFDLGtCQUFrQixDQUFDLE9BQXNCLENBQUMsQ0FBQztJQUM3RSxJQUFJLENBQUMsVUFBVSxFQUFFO1FBQ2YsTUFBTSxJQUFJLEtBQUssQ0FBQyxxQkFBcUIsS0FBSyxDQUFDLGtCQUFrQixDQUFDLE9BQU8sNkJBQTZCLElBQUksQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQztLQUM1STtJQUNELE9BQU8sVUFBVSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsRUFBRSxLQUFLLENBQUMsQ0FBQztBQUNyRCxDQUFDO0FBTkQsMEJBTUM7QUFFRCxpQ0FBeUM7QUFBaEMsdUdBQUEsY0FBYyxPQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyogZXN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QU5ETEVSU1tldmVudC5SZXNvdXJjZVByb3BlcnRpZXMuaGFuZGxlciBhcyBIYW5kbGVyTmFtZV07XG4gIGlmICghc3ViSGFuZGxlcikge1xuICAgIHRocm93IG5ldyBFcnJvcihgUmVxdWVzdGVkIGhhbmRsZXIgJHtldmVudC5SZXNvdXJjZVByb3BlcnRpZXMuaGFuZGxlcn0gaXMgbm90IGluIHN1cHBvcnRlZCBzZXQ6ICR7SlNPTi5zdHJpbmdpZnkoT2JqZWN0LmtleXMoSEFORExFUlMpKX1gKTtcbiAgfVxuICByZXR1cm4gc3ViSGFuZGxlcihldmVudC5SZXNvdXJjZVByb3BlcnRpZXMsIGV2ZW50KTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/privileges.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/privileges.js similarity index 96% rename from packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/privileges.js rename to packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/privileges.js index 8770142deb498..0f91b63fdad4d 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/privileges.js +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/privileges.js @@ -55,4 +55,4 @@ async function updatePrivileges(username, tablePrivileges, clusterProps, oldReso } return { replace: false }; } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozL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gIT09IG9sZENsdXN0ZXJQcm9wcy5jbHVzdGVyTmFtZSB8fCBjbHVzdGVyUHJvcHMuZGF0YWJhc2VOYW1lICE9PSBvbGRDbHVzdGVyUHJvcHMuZGF0YWJhc2VOYW1lKSB7XG4gICAgYXdhaXQgZ3JhbnRQcml2aWxlZ2VzKHVzZXJuYW1lLCB0YWJsZVByaXZpbGVnZXMsIGNsdXN0ZXJQcm9wcyk7XG4gICAgcmV0dXJuIHsgcmVwbGFjZTogdHJ1ZSB9O1xuICB9XG5cbiAgY29uc3Qgb2xkVXNlcm5hbWUgPSBvbGRSZXNvdXJjZVByb3BlcnRpZXMudXNlcm5hbWU7XG4gIGlmIChvbGRVc2VybmFtZSAhPT0gdXNlcm5hbWUpIHtcbiAgICBhd2FpdCBncmFudFByaXZpbGVnZXModXNlcm5hbWUsIHRhYmxlUHJpdmlsZWdlcywgY2x1c3RlclByb3BzKTtcbiAgICByZXR1cm4geyByZXBsYWNlOiB0cnVlIH07XG4gIH1cblxuICBjb25zdCBvbGRUYWJsZVByaXZpbGVnZXMgPSBvbGRSZXNvdXJjZVByb3BlcnRpZXMudGFibGVQcml2aWxlZ2VzO1xuICBpZiAob2xkVGFibGVQcml2aWxlZ2VzICE9PSB0YWJsZVByaXZpbGVnZXMpIHtcbiAgICBhd2FpdCByZXZva2VQcml2aWxlZ2VzKHVzZXJuYW1lLCBvbGRUYWJsZVByaXZpbGVnZXMsIGNsdXN0ZXJQcm9wcyk7XG4gICAgYXdhaXQgZ3JhbnRQcml2aWxlZ2VzKHVzZXJuYW1lLCB0YWJsZVByaXZpbGVnZXMsIGNsdXN0ZXJQcm9wcyk7XG4gICAgcmV0dXJuIHsgcmVwbGFjZTogZmFsc2UgfTtcbiAgfVxuXG4gIHJldHVybiB7IHJlcGxhY2U6IGZhbHNlIH07XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/redshift-data.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/redshift-data.js similarity index 100% rename from packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/redshift-data.js rename to packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/redshift-data.js diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/table.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/table.js new file mode 100644 index 0000000000000..2566b1d2890c7 --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/table.js @@ -0,0 +1,125 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +const redshift_data_1 = require("./redshift-data"); +const types_1 = require("./types"); +const util_1 = require("./util"); +async function handler(props, event) { + const tableNamePrefix = props.tableName.prefix; + const tableNameSuffix = props.tableName.generateSuffix === 'true' ? `${event.RequestId.substring(0, 8)}` : ''; + const tableColumns = props.tableColumns; + const tableAndClusterProps = props; + if (event.RequestType === 'Create') { + const tableName = await createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); + return { PhysicalResourceId: tableName }; + } + else if (event.RequestType === 'Delete') { + await dropTable(event.PhysicalResourceId, tableAndClusterProps); + return; + } + else if (event.RequestType === 'Update') { + const tableName = await updateTable(event.PhysicalResourceId, tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps, event.OldResourceProperties); + return { PhysicalResourceId: tableName }; + } + else { + /* eslint-disable-next-line dot-notation */ + throw new Error(`Unrecognized event type: ${event['RequestType']}`); + } +} +exports.handler = handler; +async function createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps) { + const tableName = tableNamePrefix + tableNameSuffix; + const tableColumnsString = tableColumns.map(column => `${column.name} ${column.dataType}`).join(); + let statement = `CREATE TABLE ${tableName} (${tableColumnsString})`; + if (tableAndClusterProps.distStyle) { + statement += ` DISTSTYLE ${tableAndClusterProps.distStyle}`; + } + const distKeyColumn = util_1.getDistKeyColumn(tableColumns); + if (distKeyColumn) { + statement += ` DISTKEY(${distKeyColumn.name})`; + } + const sortKeyColumns = util_1.getSortKeyColumns(tableColumns); + if (sortKeyColumns.length > 0) { + const sortKeyColumnsString = getSortKeyColumnsString(sortKeyColumns); + statement += ` ${tableAndClusterProps.sortStyle} SORTKEY(${sortKeyColumnsString})`; + } + await redshift_data_1.executeStatement(statement, tableAndClusterProps); + if (tableAndClusterProps.tableComment) { + await redshift_data_1.executeStatement(`COMMENT ON TABLE ${tableName} IS '${tableAndClusterProps.tableComment}'`, tableAndClusterProps); + } + return tableName; +} +async function dropTable(tableName, clusterProps) { + await redshift_data_1.executeStatement(`DROP TABLE ${tableName}`, clusterProps); +} +async function updateTable(tableName, tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps, oldResourceProperties) { + const alterationStatements = []; + const oldClusterProps = oldResourceProperties; + if (tableAndClusterProps.clusterName !== oldClusterProps.clusterName || tableAndClusterProps.databaseName !== oldClusterProps.databaseName) { + return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); + } + const oldTableNamePrefix = oldResourceProperties.tableName.prefix; + if (tableNamePrefix !== oldTableNamePrefix) { + return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); + } + const oldTableColumns = oldResourceProperties.tableColumns; + const columnDeletions = oldTableColumns.filter(oldColumn => (tableColumns.every(column => oldColumn.name !== column.name))); + if (columnDeletions.length > 0) { + alterationStatements.push(...columnDeletions.map(column => `ALTER TABLE ${tableName} DROP COLUMN ${column.name}`)); + } + const columnAdditions = tableColumns.filter(column => { + return !oldTableColumns.some(oldColumn => column.name === oldColumn.name && column.dataType === oldColumn.dataType); + }).map(column => `ADD ${column.name} ${column.dataType}`); + if (columnAdditions.length > 0) { + alterationStatements.push(...columnAdditions.map(addition => `ALTER TABLE ${tableName} ${addition}`)); + } + const oldDistStyle = oldResourceProperties.distStyle; + if ((!oldDistStyle && tableAndClusterProps.distStyle) || + (oldDistStyle && !tableAndClusterProps.distStyle)) { + return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); + } + else if (oldDistStyle !== tableAndClusterProps.distStyle) { + alterationStatements.push(`ALTER TABLE ${tableName} ALTER DISTSTYLE ${tableAndClusterProps.distStyle}`); + } + const oldDistKey = util_1.getDistKeyColumn(oldTableColumns)?.name; + const newDistKey = util_1.getDistKeyColumn(tableColumns)?.name; + if ((!oldDistKey && newDistKey) || (oldDistKey && !newDistKey)) { + return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); + } + else if (oldDistKey !== newDistKey) { + alterationStatements.push(`ALTER TABLE ${tableName} ALTER DISTKEY ${newDistKey}`); + } + const oldSortKeyColumns = util_1.getSortKeyColumns(oldTableColumns); + const newSortKeyColumns = util_1.getSortKeyColumns(tableColumns); + const oldSortStyle = oldResourceProperties.sortStyle; + const newSortStyle = tableAndClusterProps.sortStyle; + if ((oldSortStyle === newSortStyle && !util_1.areColumnsEqual(oldSortKeyColumns, newSortKeyColumns)) + || (oldSortStyle !== newSortStyle)) { + switch (newSortStyle) { + case types_1.TableSortStyle.INTERLEAVED: + // INTERLEAVED sort key addition requires replacement. + // https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html + return createTable(tableNamePrefix, tableNameSuffix, tableColumns, tableAndClusterProps); + case types_1.TableSortStyle.COMPOUND: { + const sortKeyColumnsString = getSortKeyColumnsString(newSortKeyColumns); + alterationStatements.push(`ALTER TABLE ${tableName} ALTER ${newSortStyle} SORTKEY(${sortKeyColumnsString})`); + break; + } + case types_1.TableSortStyle.AUTO: { + alterationStatements.push(`ALTER TABLE ${tableName} ALTER SORTKEY ${newSortStyle}`); + break; + } + } + } + const oldComment = oldResourceProperties.tableComment; + const newComment = tableAndClusterProps.tableComment; + if (oldComment !== newComment) { + alterationStatements.push(`COMMENT ON TABLE ${tableName} IS ${newComment ? `'${newComment}'` : 'NULL'}`); + } + await Promise.all(alterationStatements.map(statement => redshift_data_1.executeStatement(statement, tableAndClusterProps))); + return tableName; +} +function getSortKeyColumnsString(sortKeyColumns) { + return sortKeyColumns.map(column => column.name).join(); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFHQSxtREFBbUQ7QUFDbkQsbUNBQTZFO0FBQzdFLGlDQUE4RTtBQUV2RSxLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQTJCLEVBQUUsS0FBa0Q7SUFDM0csTUFBTSxlQUFlLEdBQUcsS0FBSyxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUM7SUFDL0MsTUFBTSxlQUFlLEdBQUcsS0FBSyxDQUFDLFNBQVMsQ0FBQyxjQUFjLEtBQUssTUFBTSxDQUFDLENBQUMsQ0FBQyxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUM7SUFDOUcsTUFBTSxZQUFZLEdBQUcsS0FBSyxDQUFDLFlBQVksQ0FBQztJQUN4QyxNQUFNLG9CQUFvQixHQUFHLEtBQUssQ0FBQztJQUVuQyxJQUFJLEtBQUssQ0FBQyxXQUFXLEtBQUssUU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-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/types.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/types.js new file mode 100644 index 0000000000000..070bb11c1600e --- /dev/null +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/types.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TableSortStyle = void 0; +/** + * The sort style of a table. + * This has been duplicated here to exporting private types. + */ +var TableSortStyle; +(function (TableSortStyle) { + /** + * Amazon Redshift assigns an optimal sort key based on the table data. + */ + TableSortStyle["AUTO"] = "AUTO"; + /** + * Specifies that the data is sorted using a compound key made up of all of the listed columns, + * in the order they are listed. + */ + TableSortStyle["COMPOUND"] = "COMPOUND"; + /** + * Specifies that the data is sorted using an interleaved sort key. + */ + TableSortStyle["INTERLEAVED"] = "INTERLEAVED"; +})(TableSortStyle = exports.TableSortStyle || (exports.TableSortStyle = {})); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFLQTs7O0dBR0c7QUFDSCxJQUFZLGNBZ0JYO0FBaEJELFdBQVksY0FBYztJQUN4Qjs7T0FFRztJQUNILCtCQUFhLENBQUE7SUFFYjs7O09BR0c7SUFDSCx1Q0FBcUIsQ0FBQTtJQUVyQjs7T0FFRztJQUNILDZDQUEyQixDQUFBO0FBQzdCLENBQUMsRUFoQlcsY0FBYyxHQUFkLHNCQUFjLEtBQWQsc0JBQWMsUUFnQnpCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsg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.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/user.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/user.js similarity index 97% rename from packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/user.js rename to packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/user.js index f097ae1836462..f9d12f6798565 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/user.js +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/user.js @@ -67,4 +67,4 @@ async function getPasswordFromSecret(passwordSecretArn) { const { password } = JSON.parse(secretString); return password; } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInVzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsZ0VBQWdFO0FBQ2hFLGlFQUFpRTtBQUNqRSxtREFBbUQ7QUFFbkQsaUNBQXdDO0FBR3hDLE1BQU0sY0FBYyxHQUFHLElBQUksY0FBYyxFQUFFLENBQUM7QUFFckMsS0FBSyxVQUFVLE9BQU8sQ0FBQyxLQUFzQyxFQUFFLEtBQWtEO0lBQ3RILE1BQU0sUUFBUSxHQUFHLEtBQUssQ0FBQyxRQUFRLENBQUM7SUFDaEMsTUFBTSxpQkFBaUIsR0FBRyxLQUFLLENBQUMsaUJBQWlCLENBQUM7SUFDbEQsTUFBTSxZQUFZLEd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0IHN0cmluZyBmb3IgJHtwYXNzd29yZFNlY3JldEFybn0gd2FzIGVtcHR5YCk7XG4gIH1cbiAgY29uc3QgeyBwYXNzd29yZCB9ID0gSlNPTi5wYXJzZShzZWNyZXRTdHJpbmcpO1xuXG4gIHJldHVybiBwYXNzd29yZDtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/util.js b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/util.js similarity index 97% rename from packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/util.js rename to packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/util.js index d8dc8cad799c9..cbf618fd1a521 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8/util.js +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08/util.js @@ -31,4 +31,4 @@ function areColumnsEqual(columnsA, columnsB) { }); } exports.areColumnsEqual = areColumnsEqual; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsU0FBZ0IsY0FBYyxDQUFDLFlBQW9CLEVBQUUsWUFBMEIsRUFBRSxTQUFpQjtJQUNoRyxPQUFPLEdBQUcsWUFBWSxDQUFDL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NvbHVtbnNCLmxlbmd0aCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuICByZXR1cm4gY29sdW1uc0EuZXZlcnkoY29sdW1uQSA9PiB7XG4gICAgcmV0dXJuIGNvbHVtbnNCLmZpbmQoY29sdW1uID0+IGNvbHVtbi5uYW1lID09PSBjb2x1bW5BLm5hbWUgJiYgY29sdW1uLmRhdGFUeXBlID09PSBjb2x1bW5BLmRhdGFUeXBlKTtcbiAgfSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.assets.json b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.assets.json index 9b3b5b9d025d4..c8185e2fb4f7e 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.assets.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.assets.json @@ -1,15 +1,15 @@ { "version": "29.0.0", "files": { - "847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8": { + "ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08": { "source": { - "path": "asset.847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8", + "path": "asset.ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8.zip", + "objectKey": "ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "423bfefa0ac0e00b63d5f088ed6102eb7bb0c4da2607c958caafe55011d51645": { + "fd9bc22f4d8ca7fabbbe054d374117616ffa6a2393152ecb529d2b385432d259": { "source": { "path": "aws-cdk-redshift-cluster-database.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "423bfefa0ac0e00b63d5f088ed6102eb7bb0c4da2607c958caafe55011d51645.json", + "objectKey": "fd9bc22f4d8ca7fabbbe054d374117616ffa6a2393152ecb529d2b385432d259.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-redshift/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.template.json b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.template.json index ea741836135ed..d5f58647d06cc 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.template.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.template.json @@ -1004,7 +1004,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8.zip" + "S3Key": "ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08.zip" }, "Role": { "Fn::GetAtt": [ @@ -1162,21 +1162,17 @@ { "name": "col1", "dataType": "varchar(4)", - "distKey": true, - "comment": "A test column", - "encoding": "LZO" + "distKey": true }, { "name": "col2", "dataType": "float", - "sortKey": true, - "comment": "A test column" + "sortKey": true }, { "name": "col3", - "dataType": "int", - "comment": "A test column", - "encoding": "RAW" + "dataType": "float", + "sortKey": true } ], "distStyle": "KEY", diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/manifest.json index ccee2a0ec2e64..80db4b0c589f9 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.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}/423bfefa0ac0e00b63d5f088ed6102eb7bb0c4da2607c958caafe55011d51645.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fd9bc22f4d8ca7fabbbe054d374117616ffa6a2393152ecb529d2b385432d259.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/tree.json index 75417f093ed7f..3cad05f851971 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.js.snapshot/tree.json @@ -1228,7 +1228,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.209" } }, "TablePrivileges": { @@ -1470,13 +1470,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.209" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.209" } } }, @@ -1639,7 +1639,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "847e15feeb180b356ab9a8094d8b9459ea8ec26fc27957794d583ed9eb3a79d8.zip" + "s3Key": "ab58b1384030fef0fc8663c06f6fd62196fb3ae8807ab82e4559967d3b885b08.zip" }, "role": { "Fn::GetAtt": [ @@ -1902,7 +1902,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.209" } } }, @@ -1946,7 +1946,7 @@ "path": "redshift-cluster-database-integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.209" } }, "DeployAssert": { @@ -1992,7 +1992,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.235" + "version": "10.1.209" } } }, diff --git a/packages/@aws-cdk/aws-redshift/test/integ.database.ts b/packages/@aws-cdk/aws-redshift/test/integ.database.ts index cccb591b22922..b3997e9e161de 100644 --- a/packages/@aws-cdk/aws-redshift/test/integ.database.ts +++ b/packages/@aws-cdk/aws-redshift/test/integ.database.ts @@ -43,9 +43,9 @@ const user = new redshift.User(stack, 'User', databaseOptions); const table = new redshift.Table(stack, 'Table', { ...databaseOptions, tableColumns: [ - { name: 'col1', dataType: 'varchar(4)', distKey: true, comment: 'A test column', encoding: redshift.ColumnEncoding.LZO }, - { name: 'col2', dataType: 'float', sortKey: true, comment: 'A test column' }, - { name: 'col3', dataType: 'int', comment: 'A test column', encoding: redshift.ColumnEncoding.RAW }, + { name: 'col1', dataType: 'varchar(4)', distKey: true }, + { name: 'col2', dataType: 'float', sortKey: true }, + { name: 'col3', dataType: 'float', sortKey: true }, ], distStyle: redshift.TableDistStyle.KEY, sortStyle: redshift.TableSortStyle.INTERLEAVED, diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 87d9eb9eed250..70fe58b64d860 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.110", "@types/jest": "^27.5.2", - "aws-sdk": "^2.1211.0", + "aws-sdk": "^2.1317.0", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts index 68e77d73031ff..4cfc387a90e67 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts @@ -10,8 +10,8 @@ export interface TargetApplicationCommonOptions extends cdk.StackProps { * Stack ID in which application will be created or imported. The id of a stack is also the identifier that you use to * refer to it in the [AWS CDK Toolkit](https://docs.aws.amazon.com/cdk/v2/guide/cli.html). * - * @default - ApplicationAssociatorStack - * @deprecated - Use `stackName` instead to control the name of the stack + * @default - The value of `stackName` will be used as stack id + * @deprecated - Use `stackName` instead to control the name and id of the stack */ readonly stackId?: string; } @@ -91,9 +91,9 @@ class CreateTargetApplication extends TargetApplication { super(); } public bind(scope: Construct): BindTargetApplicationResult { - const stackId = this.applicationOptions.stackId ?? 'ApplicationAssociatorStack'; (this.applicationOptions.stackName as string) = this.applicationOptions.stackName || `Application-${this.applicationOptions.applicationName}-Stack`; + const stackId = this.applicationOptions.stackName; (this.applicationOptions.description as string) = this.applicationOptions.description || 'Stack to create AppRegistry application'; (this.applicationOptions.env as cdk.Environment) = @@ -122,9 +122,9 @@ class ExistingTargetApplication extends TargetApplication { public bind(scope: Construct): BindTargetApplicationResult { const arnComponents = cdk.Arn.split(this.applicationOptions.applicationArnValue, cdk.ArnFormat.SLASH_RESOURCE_SLASH_RESOURCE_NAME); const applicationId = arnComponents.resourceName; - const stackId = this.applicationOptions.stackId ?? 'ApplicationAssociatorStack'; (this.applicationOptions.stackName as string) = this.applicationOptions.stackName || `Application-${applicationId}-Stack`; + const stackId = this.applicationOptions.stackName; const applicationStack = new cdk.Stack(scope, stackId, this.applicationOptions); const appRegApplication = Application.fromApplicationArn(applicationStack, 'ExistingApplication', this.applicationOptions.applicationArnValue); return { diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorStack.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/Application-AppRegistryAssociatedApplication-Stack.assets.json similarity index 84% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorStack.assets.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/Application-AppRegistryAssociatedApplication-Stack.assets.json index 70221d811cb08..74162339e9012 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorStack.assets.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/Application-AppRegistryAssociatedApplication-Stack.assets.json @@ -1,9 +1,9 @@ { - "version": "29.0.0", + "version": "30.0.0", "files": { "c4d674e9642d6dbbd0df5c93890473101fc95bbc70de7e28d79ba771b5284de8": { "source": { - "path": "ApplicationAssociatorStack.template.json", + "path": "Application-AppRegistryAssociatedApplication-Stack.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorStack.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/Application-AppRegistryAssociatedApplication-Stack.template.json similarity index 100% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorStack.template.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/Application-AppRegistryAssociatedApplication-Stack.template.json diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json similarity index 96% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json index 19cf0cfbe5262..c141cef89ac42 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "files": { "19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc": { "source": { diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.template.json similarity index 100% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.template.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.template.json diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/cdk.out b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/cdk.out new file mode 100644 index 0000000000000..ae4b03c54e770 --- /dev/null +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integ-servicecatalogappregistry-application.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integ-servicecatalogappregistry-application.assets.json similarity index 96% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integ-servicecatalogappregistry-application.assets.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integ-servicecatalogappregistry-application.assets.json index 465a46f897a34..f1e120d999314 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integ-servicecatalogappregistry-application.assets.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integ-servicecatalogappregistry-application.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "files": { "19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc": { "source": { diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integ-servicecatalogappregistry-application.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integ-servicecatalogappregistry-application.template.json similarity index 100% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integ-servicecatalogappregistry-application.template.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integ-servicecatalogappregistry-application.template.json diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integ.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integ.json similarity index 93% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integ.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integ.json index 6f9dd948020ab..71cb8691fb18e 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "testCases": { "ApplicationAssociatorTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json similarity index 96% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json index 9ca55e04832e1..721234bcc5aec 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.assets.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "files": { "19dd33f3c17e59cafd22b9459b0a8d9bedbd42252737fedb06b2bcdbcf7809cc": { "source": { diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.template.json similarity index 100% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.template.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/integservicecatalogappregistryapplicationresourcesStack4399A149.template.json diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/manifest.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/manifest.json similarity index 90% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/manifest.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/manifest.json index 60176a0715996..a6c88f1f852df 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "artifacts": { "integservicecatalogappregistryapplicationresourcesStack4399A149.assets": { "type": "cdk:asset-manifest", @@ -30,7 +30,7 @@ } }, "dependencies": [ - "ApplicationAssociatorStack", + "Application-AppRegistryAssociatedApplication-Stack", "integservicecatalogappregistryapplicationresourcesStack4399A149.assets" ], "metadata": { @@ -94,7 +94,7 @@ } }, "dependencies": [ - "ApplicationAssociatorStack", + "Application-AppRegistryAssociatedApplication-Stack", "integ-servicecatalogappregistry-application.assets" ], "metadata": { @@ -129,19 +129,19 @@ }, "displayName": "integ-servicecatalogappregistry-application" }, - "ApplicationAssociatorStack.assets": { + "Application-AppRegistryAssociatedApplication-Stack.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "ApplicationAssociatorStack.assets.json", + "file": "Application-AppRegistryAssociatedApplication-Stack.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "ApplicationAssociatorStack": { + "Application-AppRegistryAssociatedApplication-Stack": { "type": "aws:cloudformation:stack", "environment": "aws://416623072619/us-east-1", "properties": { - "templateFile": "ApplicationAssociatorStack.template.json", + "templateFile": "Application-AppRegistryAssociatedApplication-Stack.template.json", "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::416623072619:role/cdk-hnb659fds-deploy-role-416623072619-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::416623072619:role/cdk-hnb659fds-cfn-exec-role-416623072619-us-east-1", @@ -149,51 +149,50 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "ApplicationAssociatorStack.assets" + "Application-AppRegistryAssociatedApplication-Stack.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::416623072619:role/cdk-hnb659fds-lookup-role-416623072619-us-east-1", "requiresBootstrapStackVersion": 8, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" - }, - "stackName": "Application-AppRegistryAssociatedApplication-Stack" + } }, "dependencies": [ - "ApplicationAssociatorStack.assets" + "Application-AppRegistryAssociatedApplication-Stack.assets" ], "metadata": { - "/ApplicationAssociatorStack/DefaultCdkApplication/Resource": [ + "/Application-AppRegistryAssociatedApplication-Stack/DefaultCdkApplication/Resource": [ { "type": "aws:cdk:logicalId", "data": "DefaultCdkApplication4573D5A3" } ], - "/ApplicationAssociatorStack/DefaultCdkApplication/ApplicationManagerUrl": [ + "/Application-AppRegistryAssociatedApplication-Stack/DefaultCdkApplication/ApplicationManagerUrl": [ { "type": "aws:cdk:logicalId", "data": "DefaultCdkApplicationApplicationManagerUrl27C138EF" } ], - "/ApplicationAssociatorStack/AppRegistryAssociation": [ + "/Application-AppRegistryAssociatedApplication-Stack/AppRegistryAssociation": [ { "type": "aws:cdk:logicalId", "data": "AppRegistryAssociation" } ], - "/ApplicationAssociatorStack/BootstrapVersion": [ + "/Application-AppRegistryAssociatedApplication-Stack/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/ApplicationAssociatorStack/CheckBootstrapVersion": [ + "/Application-AppRegistryAssociatedApplication-Stack/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "ApplicationAssociatorStack" + "displayName": "Application-AppRegistryAssociatedApplication-Stack" }, "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets": { "type": "cdk:asset-manifest", @@ -224,7 +223,7 @@ } }, "dependencies": [ - "ApplicationAssociatorStack", + "Application-AppRegistryAssociatedApplication-Stack", "ApplicationAssociatorTestDefaultTestDeployAssert2A5F2DB9.assets" ], "metadata": { diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/tree.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/tree.json similarity index 92% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/tree.json rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/tree.json index cdc1e803cbc18..1ff61db9ea6f7 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.js.snapshot/tree.json @@ -100,17 +100,17 @@ "version": "0.0.0" } }, - "ApplicationAssociatorStack": { - "id": "ApplicationAssociatorStack", - "path": "ApplicationAssociatorStack", + "Application-AppRegistryAssociatedApplication-Stack": { + "id": "Application-AppRegistryAssociatedApplication-Stack", + "path": "Application-AppRegistryAssociatedApplication-Stack", "children": { "DefaultCdkApplication": { "id": "DefaultCdkApplication", - "path": "ApplicationAssociatorStack/DefaultCdkApplication", + "path": "Application-AppRegistryAssociatedApplication-Stack/DefaultCdkApplication", "children": { "Resource": { "id": "Resource", - "path": "ApplicationAssociatorStack/DefaultCdkApplication/Resource", + "path": "Application-AppRegistryAssociatedApplication-Stack/DefaultCdkApplication/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ServiceCatalogAppRegistry::Application", "aws:cdk:cloudformation:props": { @@ -128,7 +128,7 @@ }, "ApplicationManagerUrl": { "id": "ApplicationManagerUrl", - "path": "ApplicationAssociatorStack/DefaultCdkApplication/ApplicationManagerUrl", + "path": "Application-AppRegistryAssociatedApplication-Stack/DefaultCdkApplication/ApplicationManagerUrl", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -142,7 +142,7 @@ }, "AppRegistryAssociation": { "id": "AppRegistryAssociation", - "path": "ApplicationAssociatorStack/AppRegistryAssociation", + "path": "Application-AppRegistryAssociatedApplication-Stack/AppRegistryAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation", "aws:cdk:cloudformation:props": { @@ -165,7 +165,7 @@ }, "BootstrapVersion": { "id": "BootstrapVersion", - "path": "ApplicationAssociatorStack/BootstrapVersion", + "path": "Application-AppRegistryAssociatedApplication-Stack/BootstrapVersion", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -173,7 +173,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "ApplicationAssociatorStack/CheckBootstrapVersion", + "path": "Application-AppRegistryAssociatedApplication-Stack/CheckBootstrapVersion", "constructInfo": { "fqn": "@aws-cdk/core.CfnRule", "version": "0.0.0" diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.ts similarity index 100% rename from packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-name.ts rename to packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application-associator.all-stacks-association-no-stack-id-or-name.ts diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 496e349f6dd42..764aaf0c2da92 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.1211.0", + "aws-sdk": "^2.1317.0", "jest": "^27.5.1" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/CallHttpApiInteg.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/CallHttpApiInteg.assets.json index 2c25eaff63678..f8ecd247519e9 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/CallHttpApiInteg.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/CallHttpApiInteg.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "98e2d07ff30129aa5321a49eb6aaafeef6fb87a7222cd36d85edd66ee13cf8c4": { + "27b3ee7de550afbdc0e7b81a044c44d3a5739fd50df908417bc07f296a47b34b": { "source": { "path": "CallHttpApiInteg.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "98e2d07ff30129aa5321a49eb6aaafeef6fb87a7222cd36d85edd66ee13cf8c4.json", + "objectKey": "27b3ee7de550afbdc0e7b81a044c44d3a5739fd50df908417bc07f296a47b34b.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-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/CallHttpApiInteg.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/CallHttpApiInteg.template.json index ab938f5375382..5bfaa8c36cff0 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/CallHttpApiInteg.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/CallHttpApiInteg.template.json @@ -239,7 +239,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/integ.json index 229b8f48abe28..27e18dd50fc32 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.call-http-api": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/manifest.json index af118a6667e6b..2385cacb5ad9a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "CallHttpApiInteg.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}/98e2d07ff30129aa5321a49eb6aaafeef6fb87a7222cd36d85edd66ee13cf8c4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/27b3ee7de550afbdc0e7b81a044c44d3a5739fd50df908417bc07f296a47b34b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/tree.json index a56fb963c6a3d..fa241baf331dd 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-http-api.js.snapshot/tree.json @@ -187,6 +187,14 @@ "id": "ServiceRole", "path": "CallHttpApiInteg/HelloHandler/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "CallHttpApiInteg/HelloHandler/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "CallHttpApiInteg/HelloHandler/ServiceRole/Resource", @@ -278,6 +286,14 @@ "id": "Role", "path": "CallHttpApiInteg/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "CallHttpApiInteg/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "CallHttpApiInteg/StateMachine/Role/Resource", @@ -455,7 +471,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/CallRestApiInteg.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/CallRestApiInteg.assets.json index 0e40b6691e190..79211932f82f1 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/CallRestApiInteg.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/CallRestApiInteg.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "c1a33822c6158e2b62c75dec45f2c2ea30a40575e55cf69828e4e165a3e4310c": { + "ecfcbd0a2d410e9f630396940687f171f2a6a2b36583446ad7c7ae7660c7eba6": { "source": { "path": "CallRestApiInteg.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c1a33822c6158e2b62c75dec45f2c2ea30a40575e55cf69828e4e165a3e4310c.json", + "objectKey": "ecfcbd0a2d410e9f630396940687f171f2a6a2b36583446ad7c7ae7660c7eba6.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-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/CallRestApiInteg.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/CallRestApiInteg.template.json index 7866fc10fb626..71556c7fd7c4c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/CallRestApiInteg.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/CallRestApiInteg.template.json @@ -351,7 +351,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/callrestapiDefaultTestDeployAssert9913150A.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/callrestapiDefaultTestDeployAssert9913150A.assets.json index 01f3aca8cd96d..a69898c5bc544 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/callrestapiDefaultTestDeployAssert9913150A.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/callrestapiDefaultTestDeployAssert9913150A.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/integ.json index 78a7d7f1581b4..625c1ce9f887e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "call-rest-api/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/manifest.json index abd8e104893d2..6c9618ae103dd 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "CallRestApiInteg.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}/c1a33822c6158e2b62c75dec45f2c2ea30a40575e55cf69828e4e165a3e4310c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ecfcbd0a2d410e9f630396940687f171f2a6a2b36583446ad7c7ae7660c7eba6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/tree.json index 8f4f4691d837e..a1a58dff17edc 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/apigateway/integ.call-rest-api.js.snapshot/tree.json @@ -30,6 +30,14 @@ "id": "CloudWatchRole", "path": "CallRestApiInteg/MyRestApi/CloudWatchRole", "children": { + "ImportCloudWatchRole": { + "id": "ImportCloudWatchRole", + "path": "CallRestApiInteg/MyRestApi/CloudWatchRole/ImportCloudWatchRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "CallRestApiInteg/MyRestApi/CloudWatchRole/Resource", @@ -338,6 +346,14 @@ "id": "ServiceRole", "path": "CallRestApiInteg/Hello/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "CallRestApiInteg/Hello/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "CallRestApiInteg/Hello/ServiceRole/Resource", @@ -429,6 +445,14 @@ "id": "Role", "path": "CallRestApiInteg/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "CallRestApiInteg/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "CallRestApiInteg/StateMachine/Role/Resource", @@ -614,7 +638,7 @@ "path": "call-rest-api/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "DeployAssert": { @@ -660,7 +684,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-get-query-execution-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-get-query-execution-integ.assets.json index 44aa7cd3a1935..d153b6cad9764 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-get-query-execution-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-get-query-execution-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "76156c0ff9be440ddab67bcf367f08566ccf044a654c82bc9cf23d8c2c8f2fdd": { + "9bff879f4a3894c00902391ad20a7306f0489672d7b0ba46b0f66cdc2f8dd6ab": { "source": { "path": "aws-stepfunctions-tasks-athena-get-query-execution-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "76156c0ff9be440ddab67bcf367f08566ccf044a654c82bc9cf23d8c2c8f2fdd.json", + "objectKey": "9bff879f4a3894c00902391ad20a7306f0489672d7b0ba46b0f66cdc2f8dd6ab.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-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-get-query-execution-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-get-query-execution-integ.template.json index 1dab3c360f36c..c3df29408cb38 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-get-query-execution-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-get-query-execution-integ.template.json @@ -234,7 +234,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/integ.json index 5fc6bfaec77c4..0dfbe8e81c69f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.get-query-execution": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/manifest.json index fcf63aa6e82a2..456b6a89953ec 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-athena-get-query-execution-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}/76156c0ff9be440ddab67bcf367f08566ccf044a654c82bc9cf23d8c2c8f2fdd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9bff879f4a3894c00902391ad20a7306f0489672d7b0ba46b0f66cdc2f8dd6ab.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/tree.json index 38c1b347ad920..5a3c48b2c66f4 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-execution.js.snapshot/tree.json @@ -32,6 +32,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-athena-get-query-execution-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-athena-get-query-execution-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-athena-get-query-execution-integ/StateMachine/Role/Resource", @@ -345,7 +353,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/aws-stepfunctions-tasks-athena-get-query-results-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/aws-stepfunctions-tasks-athena-get-query-results-integ.assets.json index b94a673236c4f..a439e4eaaab0b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/aws-stepfunctions-tasks-athena-get-query-results-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/aws-stepfunctions-tasks-athena-get-query-results-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "d03245f05e76f761d52cf247e20a05b9fe32ff4f4e39d3c971c637d615e68c80": { + "a9105bdb0c162917235ac4de2918bfef3d7c03434d9c230d6ce28144129689c2": { "source": { "path": "aws-stepfunctions-tasks-athena-get-query-results-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d03245f05e76f761d52cf247e20a05b9fe32ff4f4e39d3c971c637d615e68c80.json", + "objectKey": "a9105bdb0c162917235ac4de2918bfef3d7c03434d9c230d6ce28144129689c2.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-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/aws-stepfunctions-tasks-athena-get-query-results-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/aws-stepfunctions-tasks-athena-get-query-results-integ.template.json index b9c3262d1914f..ff69e9f97c887 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/aws-stepfunctions-tasks-athena-get-query-results-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/aws-stepfunctions-tasks-athena-get-query-results-integ.template.json @@ -234,7 +234,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/integ.json index 753ae4f8dee25..f3260681d2fa8 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.get-query-results": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/manifest.json index e9b9018f7ab29..f43aaf775acbc 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-athena-get-query-results-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}/d03245f05e76f761d52cf247e20a05b9fe32ff4f4e39d3c971c637d615e68c80.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a9105bdb0c162917235ac4de2918bfef3d7c03434d9c230d6ce28144129689c2.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/tree.json index e4dd7793c143c..9805a0b532805 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.get-query-results.js.snapshot/tree.json @@ -40,6 +40,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-athena-get-query-results-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-athena-get-query-results-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-athena-get-query-results-integ/StateMachine/Role/Resource", @@ -353,7 +361,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-start-query-execution-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-start-query-execution-integ.assets.json index c79f802e76015..36f0b46f269d3 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-start-query-execution-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-start-query-execution-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "19991adf124f956fd00b8c6d43afb5aa808b9288efcf86cf6c910284d1277445": { + "4c057537867d65c4b98525bdce151c8a8c2babbe4117b04526bf194d8c82d40f": { "source": { "path": "aws-stepfunctions-tasks-athena-start-query-execution-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "19991adf124f956fd00b8c6d43afb5aa808b9288efcf86cf6c910284d1277445.json", + "objectKey": "4c057537867d65c4b98525bdce151c8a8c2babbe4117b04526bf194d8c82d40f.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-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-start-query-execution-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-start-query-execution-integ.template.json index f2ad5728e83f3..398dfa71cd6e5 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-start-query-execution-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-start-query-execution-integ.template.json @@ -246,7 +246,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/integ.json index e9ae4d978b1e9..56cccf8b1cf53 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.start-query-execution": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/manifest.json index 4ffe106878175..c0a51b9c3df8c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-athena-start-query-execution-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}/19991adf124f956fd00b8c6d43afb5aa808b9288efcf86cf6c910284d1277445.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c057537867d65c4b98525bdce151c8a8c2babbe4117b04526bf194d8c82d40f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/tree.json index b972f409fc0b6..194ba0c904a64 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.start-query-execution.js.snapshot/tree.json @@ -24,6 +24,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-athena-start-query-execution-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-athena-start-query-execution-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-athena-start-query-execution-integ/StateMachine/Role/Resource", @@ -349,7 +357,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-stop-query-execution-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-stop-query-execution-integ.assets.json index 1898932eaba94..04aa8de4b03d2 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-stop-query-execution-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-stop-query-execution-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "98838102ff60f5cd506b4feb042763e362dcb7b0b7a43aeab0c5f32b50821982": { + "29b43d7a0cdbdaed34821e6c55c4b89c92e6baff69f82b3d74dd6f12b8093879": { "source": { "path": "aws-stepfunctions-tasks-athena-stop-query-execution-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "98838102ff60f5cd506b4feb042763e362dcb7b0b7a43aeab0c5f32b50821982.json", + "objectKey": "29b43d7a0cdbdaed34821e6c55c4b89c92e6baff69f82b3d74dd6f12b8093879.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-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-stop-query-execution-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-stop-query-execution-integ.template.json index 0ffafd57b0555..af838f2866f3d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-stop-query-execution-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/aws-stepfunctions-tasks-athena-stop-query-execution-integ.template.json @@ -234,7 +234,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/integ.json index 30439e8ead2b4..6a1c1bf8b7eef 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.stop-query-execution": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/manifest.json index 4bf599f5b1e0e..bec24c48884e0 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-athena-stop-query-execution-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}/98838102ff60f5cd506b4feb042763e362dcb7b0b7a43aeab0c5f32b50821982.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/29b43d7a0cdbdaed34821e6c55c4b89c92e6baff69f82b3d74dd6f12b8093879.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/tree.json index c9c9dfa6aa8d9..778180e969f2f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/integ.stop-query-execution.js.snapshot/tree.json @@ -32,6 +32,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-athena-stop-query-execution-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-athena-stop-query-execution-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-athena-stop-query-execution-integ/StateMachine/Role/Resource", @@ -345,7 +353,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json index 6148c62b6e667..0250489440a79 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json @@ -1,20 +1,20 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": { + "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": { "source": { - "path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle", + "path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip", + "objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "53ea1c76e8a088a3e3455a07f903c3cdc7054d8399d75bc242655e2569ec4dbe": { + "5138c59e4334051e41c6524e0a7f0bf3d075a9dad18ac57d6292565e08c47817": { "source": { "path": "IntegTestDefaultTestDeployAssertE3E7D2A4.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "53ea1c76e8a088a3e3455a07f903c3cdc7054d8399d75bc242655e2569ec4dbe.json", + "objectKey": "5138c59e4334051e41c6524e0a7f0bf3d075a9dad18ac57d6292565e08c47817.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-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json index fc708a5502a33..6832c590ecefa 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json @@ -17,7 +17,7 @@ } }, "flattenResponse": "true", - "salt": "1668703230385" + "salt": "1676026100304" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -89,7 +89,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -125,7 +125,7 @@ } }, "flattenResponse": "false", - "salt": "1668703230386" + "salt": "1676026100305" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -296,7 +296,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.isComplete", @@ -338,7 +338,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.onTimeout", diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js new file mode 100644 index 0000000000000..58bcb1ef7f38e --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js @@ -0,0 +1,1205 @@ +"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( + // 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-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/aws-stepfunctions-tasks-call-aws-service-sfn-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/aws-stepfunctions-tasks-call-aws-service-sfn-integ.assets.json index 59f47b0672a8d..1e0a1fe284075 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/aws-stepfunctions-tasks-call-aws-service-sfn-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/aws-stepfunctions-tasks-call-aws-service-sfn-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "fcef80800545996bab4797d29627b1585634a87818a16071170e90379fe35e65": { + "8d119297b7c1d884a3ca022e9e34db2e9da223ed96c46f750e5da902ad88a309": { "source": { "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fcef80800545996bab4797d29627b1585634a87818a16071170e90379fe35e65.json", + "objectKey": "8d119297b7c1d884a3ca022e9e34db2e9da223ed96c46f750e5da902ad88a309.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-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/aws-stepfunctions-tasks-call-aws-service-sfn-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/aws-stepfunctions-tasks-call-aws-service-sfn-integ.template.json index a214d3d9ec31e..68f1484adf044 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/aws-stepfunctions-tasks-call-aws-service-sfn-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/aws-stepfunctions-tasks-call-aws-service-sfn-integ.template.json @@ -63,7 +63,9 @@ "DependsOn": [ "ChildStateMachineRoleDefaultPolicy8B4560F0", "ChildStateMachineRoleA7F7AB78" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "ParentStateMachineRoleE902D002": { "Type": "AWS::IAM::Role", @@ -134,7 +136,9 @@ "DependsOn": [ "ParentStateMachineRoleDefaultPolicyA368A0BA", "ParentStateMachineRoleE902D002" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/integ.json index 03ef4432a038e..55bc6839bf192 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "IntegTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/manifest.json index 639f8b88a3695..4f2870352471b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-call-aws-service-sfn-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}/fcef80800545996bab4797d29627b1585634a87818a16071170e90379fe35e65.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8d119297b7c1d884a3ca022e9e34db2e9da223ed96c46f750e5da902ad88a309.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -106,7 +106,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}/53ea1c76e8a088a3e3455a07f903c3cdc7054d8399d75bc242655e2569ec4dbe.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5138c59e4334051e41c6524e0a7f0bf3d075a9dad18ac57d6292565e08c47817.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/tree.json index 4f6841d4358fb..2c56e6998e763 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/tree.json @@ -291,7 +291,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } }, "BootstrapVersion": { @@ -329,7 +329,7 @@ "path": "IntegTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } }, "DeployAssert": { @@ -349,7 +349,7 @@ "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } } }, @@ -413,7 +413,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } }, "AwsApiCallStepFunctionsdescribeExecution": { @@ -429,7 +429,7 @@ "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } } }, @@ -469,7 +469,7 @@ "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/IsCompleteProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } }, "Invoke": { @@ -495,7 +495,7 @@ "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/TimeoutProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } }, "Invoke": { @@ -579,7 +579,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } }, "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a": { @@ -613,7 +613,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } }, "BootstrapVersion": { @@ -655,7 +655,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/aws-stepfunctions-aws-sdk-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/aws-stepfunctions-aws-sdk-integ.assets.json index d78ecacd6ee44..47847f799537b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/aws-stepfunctions-aws-sdk-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/aws-stepfunctions-aws-sdk-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "f82963cd4659a3699bf300cec4e0302485993b7af1647f8a8266f4923c0f824b": { + "db85f69a06dc398bc0003a2ae6ed990adaaa3d4b40069585768ce33ab5757c8e": { "source": { "path": "aws-stepfunctions-aws-sdk-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f82963cd4659a3699bf300cec4e0302485993b7af1647f8a8266f4923c0f824b.json", + "objectKey": "db85f69a06dc398bc0003a2ae6ed990adaaa3d4b40069585768ce33ab5757c8e.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-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/aws-stepfunctions-aws-sdk-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/aws-stepfunctions-aws-sdk-integ.template.json index b6349806c1ea8..6e8dab7a8e60a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/aws-stepfunctions-aws-sdk-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/aws-stepfunctions-aws-sdk-integ.template.json @@ -105,7 +105,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/integ.json index ba2945f51ba1c..1ef6dafdbfe5a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.call-aws-service": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/manifest.json index d15563f92bd0f..f39ae2d7e5ee7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-aws-sdk-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}/f82963cd4659a3699bf300cec4e0302485993b7af1647f8a8266f4923c0f824b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/db85f69a06dc398bc0003a2ae6ed990adaaa3d4b40069585768ce33ab5757c8e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/tree.json index 9ad84e6fb444f..b53e47ddcb7d0 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service.js.snapshot/tree.json @@ -62,6 +62,14 @@ "id": "Role", "path": "aws-stepfunctions-aws-sdk-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-aws-sdk-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-aws-sdk-integ/StateMachine/Role/Resource", @@ -241,7 +249,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/aws-stepfunctions-integ.assets.json index 38ac3d3382fb1..9d330591267cf 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "3272ff1044ee325eaad9c5c948617662f4bc9c396c790abd13ef3cf1aca254a6": { + "911fd19ef0dac006ce95e5e937e911a5000341b539da65d789b20d398b5b0750": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3272ff1044ee325eaad9c5c948617662f4bc9c396c790abd13ef3cf1aca254a6.json", + "objectKey": "911fd19ef0dac006ce95e5e937e911a5000341b539da65d789b20d398b5b0750.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-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/aws-stepfunctions-integ.template.json index 194c9e0863d80..f9d511dd31f5b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/aws-stepfunctions-integ.template.json @@ -830,7 +830,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/integ.json index 45b0abce313d8..92166ff8d63cd 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.run-batch-job": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/manifest.json index 64ca341dddb67..27ce2ad29fd61 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/3272ff1044ee325eaad9c5c948617662f4bc9c396c790abd13ef3cf1aca254a6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/911fd19ef0dac006ce95e5e937e911a5000341b539da65d789b20d398b5b0750.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/tree.json index 2e3ca37e8983e..3dad4d1fbed55 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.run-batch-job.js.snapshot/tree.json @@ -693,6 +693,14 @@ "id": "Ecs-Instance-Role", "path": "aws-stepfunctions-integ/ComputeEnv/Ecs-Instance-Role", "children": { + "ImportEcs-Instance-Role": { + "id": "ImportEcs-Instance-Role", + "path": "aws-stepfunctions-integ/ComputeEnv/Ecs-Instance-Role/ImportEcs-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/ComputeEnv/Ecs-Instance-Role/Resource", @@ -760,6 +768,14 @@ "id": "Resource-Service-Instance-Role", "path": "aws-stepfunctions-integ/ComputeEnv/Resource-Service-Instance-Role", "children": { + "ImportResource-Service-Instance-Role": { + "id": "ImportResource-Service-Instance-Role", + "path": "aws-stepfunctions-integ/ComputeEnv/Resource-Service-Instance-Role/ImportResource-Service-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/ComputeEnv/Resource-Service-Instance-Role/Resource", @@ -1052,6 +1068,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/StateMachine/Role/Resource", @@ -1262,7 +1286,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/aws-stepfunctions-integ.assets.json index e866f3952cb5c..d36298cf4d8db 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "c45e01280c2f5667236d6456014f78fc0b3e37d763fecde1f9f281c2f03dcc11": { + "53f3e164ae01ad33e9067c8bef1f719b2c73c2d2be0b1d9acbdc179728ce1fa7": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c45e01280c2f5667236d6456014f78fc0b3e37d763fecde1f9f281c2f03dcc11.json", + "objectKey": "53f3e164ae01ad33e9067c8bef1f719b2c73c2d2be0b1d9acbdc179728ce1fa7.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-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/aws-stepfunctions-integ.template.json index b032b6be135ca..f1f6914899bb4 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/aws-stepfunctions-integ.template.json @@ -830,7 +830,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/integ.json index caed57ee7f86f..2526e894f4803 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.submit-job": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/manifest.json index 04d581fb04666..09fc9a0aab7d7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/c45e01280c2f5667236d6456014f78fc0b3e37d763fecde1f9f281c2f03dcc11.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/53f3e164ae01ad33e9067c8bef1f719b2c73c2d2be0b1d9acbdc179728ce1fa7.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/tree.json index 647da7c2ba2bf..36035db6ef9be 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/batch/integ.submit-job.js.snapshot/tree.json @@ -693,6 +693,14 @@ "id": "Ecs-Instance-Role", "path": "aws-stepfunctions-integ/ComputeEnv/Ecs-Instance-Role", "children": { + "ImportEcs-Instance-Role": { + "id": "ImportEcs-Instance-Role", + "path": "aws-stepfunctions-integ/ComputeEnv/Ecs-Instance-Role/ImportEcs-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/ComputeEnv/Ecs-Instance-Role/Resource", @@ -760,6 +768,14 @@ "id": "Resource-Service-Instance-Role", "path": "aws-stepfunctions-integ/ComputeEnv/Resource-Service-Instance-Role", "children": { + "ImportResource-Service-Instance-Role": { + "id": "ImportResource-Service-Instance-Role", + "path": "aws-stepfunctions-integ/ComputeEnv/Resource-Service-Instance-Role/ImportResource-Service-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/ComputeEnv/Resource-Service-Instance-Role/Resource", @@ -1052,6 +1068,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/StateMachine/Role/Resource", @@ -1262,7 +1286,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/aws-stepfunctions-tasks-codebuild-start-build-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/aws-stepfunctions-tasks-codebuild-start-build-integ.assets.json index 16308e5019d81..54b39b19ff355 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/aws-stepfunctions-tasks-codebuild-start-build-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/aws-stepfunctions-tasks-codebuild-start-build-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "e302bdf39d6a00d176852628f2bbf9ee495f3da64421d82fb5735f8eab496f79": { + "55afee01eb922888666aca5ed91067f975455af49e66693ddb3cf963c2e17a05": { "source": { "path": "aws-stepfunctions-tasks-codebuild-start-build-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e302bdf39d6a00d176852628f2bbf9ee495f3da64421d82fb5735f8eab496f79.json", + "objectKey": "55afee01eb922888666aca5ed91067f975455af49e66693ddb3cf963c2e17a05.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-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/aws-stepfunctions-tasks-codebuild-start-build-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/aws-stepfunctions-tasks-codebuild-start-build-integ.template.json index 6a031f5fb1557..7e556e0d9bf21 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/aws-stepfunctions-tasks-codebuild-start-build-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/aws-stepfunctions-tasks-codebuild-start-build-integ.template.json @@ -238,7 +238,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/integ.json index d2ce551ecee79..c37ecef61fa04 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.start-build": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/manifest.json index d0fd173ec53d4..2edaee5fc8cc2 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-codebuild-start-build-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}/e302bdf39d6a00d176852628f2bbf9ee495f3da64421d82fb5735f8eab496f79.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/55afee01eb922888666aca5ed91067f975455af49e66693ddb3cf963c2e17a05.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/tree.json index 7c1e4fcadd2bd..2811d68bd1c33 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.js.snapshot/tree.json @@ -16,6 +16,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-codebuild-start-build-integ/Project/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-codebuild-start-build-integ/Project/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-codebuild-start-build-integ/Project/Role/Resource", @@ -247,6 +255,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-codebuild-start-build-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-codebuild-start-build-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-codebuild-start-build-integ/StateMachine/Role/Resource", @@ -411,7 +427,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-databrew-start-job-run-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-databrew-start-job-run-integ.assets.json index bca6cc1887526..595e0e3ac2398 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-databrew-start-job-run-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-databrew-start-job-run-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "0c0b9242417cee673214b88c4554bfaa55fadb35f1235c9abbb116ea0ca39c5a": { + "acffc211330bf8a10bcc2c578affb0f11ca6e8268405e7baffc164d91724e62e": { "source": { "path": "aws-stepfunctions-tasks-databrew-start-job-run-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0c0b9242417cee673214b88c4554bfaa55fadb35f1235c9abbb116ea0ca39c5a.json", + "objectKey": "acffc211330bf8a10bcc2c578affb0f11ca6e8268405e7baffc164d91724e62e.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-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-databrew-start-job-run-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-databrew-start-job-run-integ.template.json index 0d8f56e56f693..a1e57c63a37d7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-databrew-start-job-run-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-databrew-start-job-run-integ.template.json @@ -262,7 +262,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/integ.json index 06929468e91cb..43b95ccb03110 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.start-job-run": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/manifest.json index 043d4545bfe4f..1f24043bf9585 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-databrew-start-job-run-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}/0c0b9242417cee673214b88c4554bfaa55fadb35f1235c9abbb116ea0ca39c5a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/acffc211330bf8a10bcc2c578affb0f11ca6e8268405e7baffc164d91724e62e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/tree.json index 86bb6788918cb..9b26a21806f6e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/databrew/integ.start-job-run.js.snapshot/tree.json @@ -34,6 +34,14 @@ "id": "DataBrew Role", "path": "aws-stepfunctions-tasks-databrew-start-job-run-integ/DataBrew Role", "children": { + "ImportDataBrew Role": { + "id": "ImportDataBrew Role", + "path": "aws-stepfunctions-tasks-databrew-start-job-run-integ/DataBrew Role/ImportDataBrew Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-databrew-start-job-run-integ/DataBrew Role/Resource", @@ -264,6 +272,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-databrew-start-job-run-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-databrew-start-job-run-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-databrew-start-job-run-integ/StateMachine/Role/Resource", @@ -425,7 +441,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/aws-stepfunctions-integ.assets.json index 273fb9b598408..4be3b00a598be 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "37c9db055424e51e088ea42834cc1c2f9a3b4560a7dfca8fb30eed29cec102c9": { + "d6019caaff1eef711db4a4e19a05e225321134289281bc35faefd34b08dcbaf9": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "37c9db055424e51e088ea42834cc1c2f9a3b4560a7dfca8fb30eed29cec102c9.json", + "objectKey": "d6019caaff1eef711db4a4e19a05e225321134289281bc35faefd34b08dcbaf9.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-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/aws-stepfunctions-integ.template.json index 2dacf6a2c1c73..4d223869f436f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/aws-stepfunctions-integ.template.json @@ -150,7 +150,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/integ.json index ba27cf87ed4fd..44b76e7927c27 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.call-dynamodb": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/manifest.json index 945032b26651d..8f43659886e98 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/37c9db055424e51e088ea42834cc1c2f9a3b4560a7dfca8fb30eed29cec102c9.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d6019caaff1eef711db4a4e19a05e225321134289281bc35faefd34b08dcbaf9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/tree.json index 6838eca1fa35d..8322dc06d9b81 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.call-dynamodb.js.snapshot/tree.json @@ -112,6 +112,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/StateMachine/Role/Resource", @@ -317,7 +325,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/StringSetAfterParallelDefaultTestDeployAssert649ABBB9.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/StringSetAfterParallelDefaultTestDeployAssert649ABBB9.assets.json index a7d54b83a84ba..ffc1678552347 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/StringSetAfterParallelDefaultTestDeployAssert649ABBB9.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/StringSetAfterParallelDefaultTestDeployAssert649ABBB9.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/integ.json index 66d63b50ac63b..d6fae862cce2c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "StringSetAfterParallel/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/manifest.json index 2a5f1359ea9f3..f5e553d004577 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "stringset-after-parallel.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}/539fbfb584a045a460ff1ebf5a0be9bd3ec915d85f8830f069691da19f4dcd9b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cccb9c435c2a2f464a7c03e33e7b4037762ea87021e248effeaae8b6f3996856.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/stringset-after-parallel.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/stringset-after-parallel.assets.json index 0d79ea135eabb..9c045683acff1 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/stringset-after-parallel.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/stringset-after-parallel.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "539fbfb584a045a460ff1ebf5a0be9bd3ec915d85f8830f069691da19f4dcd9b": { + "cccb9c435c2a2f464a7c03e33e7b4037762ea87021e248effeaae8b6f3996856": { "source": { "path": "stringset-after-parallel.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "539fbfb584a045a460ff1ebf5a0be9bd3ec915d85f8830f069691da19f4dcd9b.json", + "objectKey": "cccb9c435c2a2f464a7c03e33e7b4037762ea87021e248effeaae8b6f3996856.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-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/stringset-after-parallel.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/stringset-after-parallel.template.json index 666b842ee8276..4bd77af6a51ee 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/stringset-after-parallel.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/stringset-after-parallel.template.json @@ -112,7 +112,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/tree.json index 5b30c0e57231b..4f51d3e839d24 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/dynamodb/integ.stringset-after-parallel.js.snapshot/tree.json @@ -95,6 +95,14 @@ "id": "Role", "path": "stringset-after-parallel/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "stringset-after-parallel/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "stringset-after-parallel/StateMachine/Role/Resource", @@ -263,7 +271,7 @@ "path": "StringSetAfterParallel/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "DeployAssert": { @@ -309,7 +317,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-ec2-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-ec2-integ.assets.json index 89ebe08219ed0..62cf2dcc92915 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-ec2-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-ec2-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "d3a96b4f2abd05c383827508bb9798ba77c609de4527d7cf1f1eecf9843e8663": { + "76e3d991b7a5d89f7be707b1610d3e0d92a628b7a31d43e4d2d0f4239c7ba4d9": { "source": { "path": "aws-sfn-tasks-ecs-ec2-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d3a96b4f2abd05c383827508bb9798ba77c609de4527d7cf1f1eecf9843e8663.json", + "objectKey": "76e3d991b7a5d89f7be707b1610d3e0d92a628b7a31d43e4d2d0f4239c7ba4d9.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-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-ec2-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-ec2-integ.template.json index a0ad8207db48f..dfd867dbf3692 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-ec2-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-ec2-integ.template.json @@ -1230,7 +1230,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/integ.json index 6f8c542405698..34e0c1f07e92d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.ec2-run-task": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/manifest.json index 6e1d5988b2e71..3e70c7b4bb5ac 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-sfn-tasks-ecs-ec2-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}/d3a96b4f2abd05c383827508bb9798ba77c609de4527d7cf1f1eecf9843e8663.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/76e3d991b7a5d89f7be707b1610d3e0d92a628b7a31d43e4d2d0f4239c7ba4d9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/tree.json index ad7edd81735a0..fa79b54a2caed 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/tree.json @@ -715,6 +715,14 @@ "id": "InstanceRole", "path": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/InstanceRole", "children": { + "ImportInstanceRole": { + "id": "ImportInstanceRole", + "path": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/InstanceRole/Resource", @@ -933,6 +941,14 @@ "id": "ServiceRole", "path": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/Resource", @@ -1193,7 +1209,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "LifecycleHookDrainHook": { @@ -1233,6 +1249,14 @@ "id": "Role", "path": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-sfn-tasks-ecs-ec2-integ/Ec2Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/Resource", @@ -1381,6 +1405,14 @@ "id": "TaskRole", "path": "aws-sfn-tasks-ecs-ec2-integ/TaskDef/TaskRole", "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-sfn-tasks-ecs-ec2-integ/TaskDef/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-sfn-tasks-ecs-ec2-integ/TaskDef/TaskRole/Resource", @@ -1526,6 +1558,14 @@ "id": "ExecutionRole", "path": "aws-sfn-tasks-ecs-ec2-integ/TaskDef/ExecutionRole", "children": { + "ImportExecutionRole": { + "id": "ImportExecutionRole", + "path": "aws-sfn-tasks-ecs-ec2-integ/TaskDef/ExecutionRole/ImportExecutionRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-sfn-tasks-ecs-ec2-integ/TaskDef/ExecutionRole/Resource", @@ -1670,6 +1710,14 @@ "id": "Role", "path": "aws-sfn-tasks-ecs-ec2-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-sfn-tasks-ecs-ec2-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-sfn-tasks-ecs-ec2-integ/StateMachine/Role/Resource", @@ -1983,7 +2031,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-ecs-integ2.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-ecs-integ2.assets.json index e120ff10becb6..58819bb25a9d7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-ecs-integ2.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-ecs-integ2.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "173fb25b6162ac811663f7d01eed0ef86a0522b3b23358797ba93147f05cdf01": { + "2ff984c777e8723d7cc676798ba0204239c4059ecb279a35dc0d7c5124abe3d0": { "source": { "path": "aws-ecs-integ2.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "173fb25b6162ac811663f7d01eed0ef86a0522b3b23358797ba93147f05cdf01.json", + "objectKey": "2ff984c777e8723d7cc676798ba0204239c4059ecb279a35dc0d7c5124abe3d0.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-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-ecs-integ2.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-ecs-integ2.template.json index c971731db818c..e6b2145d7454e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-ecs-integ2.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-ecs-integ2.template.json @@ -1126,7 +1126,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/integ.json index 65ac766b1031b..906a5fbee7f0d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.ec2-task": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/manifest.json index 3907d5f4fb7f6..f6cb92f38df4c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-ecs-integ2.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}/173fb25b6162ac811663f7d01eed0ef86a0522b3b23358797ba93147f05cdf01.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2ff984c777e8723d7cc676798ba0204239c4059ecb279a35dc0d7c5124abe3d0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/tree.json index 22620379cbf2e..00337749a2b14 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/tree.json @@ -715,6 +715,14 @@ "id": "InstanceRole", "path": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/InstanceRole", "children": { + "ImportInstanceRole": { + "id": "ImportInstanceRole", + "path": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/InstanceRole/Resource", @@ -933,6 +941,14 @@ "id": "ServiceRole", "path": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/Resource", @@ -1193,7 +1209,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "LifecycleHookDrainHook": { @@ -1233,6 +1249,14 @@ "id": "Role", "path": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ2/FargateCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/Resource", @@ -1381,6 +1405,14 @@ "id": "TaskRole", "path": "aws-ecs-integ2/TaskDef/TaskRole", "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-ecs-integ2/TaskDef/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ2/TaskDef/TaskRole/Resource", @@ -1526,6 +1558,14 @@ "id": "ExecutionRole", "path": "aws-ecs-integ2/TaskDef/ExecutionRole", "children": { + "ImportExecutionRole": { + "id": "ImportExecutionRole", + "path": "aws-ecs-integ2/TaskDef/ExecutionRole/ImportExecutionRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ2/TaskDef/ExecutionRole/Resource", @@ -1670,6 +1710,14 @@ "id": "Role", "path": "aws-ecs-integ2/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-ecs-integ2/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ2/StateMachine/Role/Resource", @@ -1871,7 +1919,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-integ.assets.json index 71f45d83e0b33..43d2aed6b91cd 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "29.0.0", + "version": "30.0.0", "files": { - "0ee63f9e3418b742ec39af14137ee6aff6c03be8cbee3f04c27b663df1cbabd6": { + "add92abd33bdedcd7447faa84ea0fe330f8f547f3de2b71052511e602a947aa7": { "source": { "path": "aws-sfn-tasks-ecs-fargate-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0ee63f9e3418b742ec39af14137ee6aff6c03be8cbee3f04c27b663df1cbabd6.json", + "objectKey": "add92abd33bdedcd7447faa84ea0fe330f8f547f3de2b71052511e602a947aa7.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-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-integ.template.json index 0635ac943d5af..dace358976d49 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/aws-sfn-tasks-ecs-fargate-integ.template.json @@ -809,7 +809,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/cdk.out index d8b441d447f8a..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"29.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/integ.json index 161f0cebb3958..b5d886df0272f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "testCases": { "integ.fargate-run-task": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/manifest.json index 6fd820a59f666..d083ec552aba6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "29.0.0", + "version": "30.0.0", "artifacts": { "aws-sfn-tasks-ecs-fargate-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}/0ee63f9e3418b742ec39af14137ee6aff6c03be8cbee3f04c27b663df1cbabd6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/add92abd33bdedcd7447faa84ea0fe330f8f547f3de2b71052511e602a947aa7.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/tree.json index 37918ddf014a9..0e0a729a20371 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/tree.json @@ -1360,7 +1360,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.216" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/aws-ecs-integ2.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/aws-ecs-integ2.assets.json index 2b40b7a05f7d8..e060c9972f295 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/aws-ecs-integ2.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/aws-ecs-integ2.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "2d84e87fef79721717c4c5a825ab57809a18cbcd9dc338d3c558ac7167bf456b": { + "49b9ca0d3fa9d22154be9a9852e1b152c1d5c634726748270dfa1952b69f1ed6": { "source": { "path": "aws-ecs-integ2.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2d84e87fef79721717c4c5a825ab57809a18cbcd9dc338d3c558ac7167bf456b.json", + "objectKey": "49b9ca0d3fa9d22154be9a9852e1b152c1d5c634726748270dfa1952b69f1ed6.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-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/aws-ecs-integ2.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/aws-ecs-integ2.template.json index 97caf036a8fea..9838fec8fbd13 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/aws-ecs-integ2.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/aws-ecs-integ2.template.json @@ -705,7 +705,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/integ.json index e841bc13214d2..aa363769950ad 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.fargate-task": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/manifest.json index 507623f582ed5..19d1cfcb8584d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-ecs-integ2.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}/2d84e87fef79721717c4c5a825ab57809a18cbcd9dc338d3c558ac7167bf456b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/49b9ca0d3fa9d22154be9a9852e1b152c1d5c634726748270dfa1952b69f1ed6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/tree.json index 08315391afd24..78b114670600b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/ecs/integ.fargate-task.js.snapshot/tree.json @@ -681,6 +681,14 @@ "id": "TaskRole", "path": "aws-ecs-integ2/TaskDef/TaskRole", "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-ecs-integ2/TaskDef/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ2/TaskDef/TaskRole/Resource", @@ -828,6 +836,14 @@ "id": "ExecutionRole", "path": "aws-ecs-integ2/TaskDef/ExecutionRole", "children": { + "ImportExecutionRole": { + "id": "ImportExecutionRole", + "path": "aws-ecs-integ2/TaskDef/ExecutionRole/ImportExecutionRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ2/TaskDef/ExecutionRole/Resource", @@ -1008,6 +1024,14 @@ "id": "Role", "path": "aws-ecs-integ2/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-ecs-integ2/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-ecs-integ2/StateMachine/Role/Resource", @@ -1224,7 +1248,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip index 3d588b4e64ea1..298edd40a09fc 100644 Binary files a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip and b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip differ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/cluster.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/cluster.js deleted file mode 100644 index beae957f30a3b..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/cluster.js +++ /dev/null @@ -1,267 +0,0 @@ -"use strict"; -/* eslint-disable no-console */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ClusterResourceHandler = void 0; -const common_1 = require("./common"); -const MAX_CLUSTER_NAME_LEN = 100; -class ClusterResourceHandler extends common_1.ResourceHandler { - constructor(eks, event) { - super(eks, event); - this.newProps = parseProps(this.event.ResourceProperties); - this.oldProps = event.RequestType === 'Update' ? parseProps(event.OldResourceProperties) : {}; - } - get clusterName() { - if (!this.physicalResourceId) { - throw new Error('Cannot determine cluster name without physical resource ID'); - } - return this.physicalResourceId; - } - // ------ - // CREATE - // ------ - async onCreate() { - console.log('onCreate: creating cluster with options:', JSON.stringify(this.newProps, undefined, 2)); - if (!this.newProps.roleArn) { - throw new Error('"roleArn" is required'); - } - const clusterName = this.newProps.name || this.generateClusterName(); - const resp = await this.eks.createCluster({ - ...this.newProps, - name: clusterName, - }); - if (!resp.cluster) { - throw new Error(`Error when trying to create cluster ${clusterName}: CreateCluster returned without cluster information`); - } - return { - PhysicalResourceId: resp.cluster.name, - }; - } - async isCreateComplete() { - return this.isActive(); - } - // ------ - // DELETE - // ------ - async onDelete() { - console.log(`onDelete: deleting cluster ${this.clusterName}`); - try { - await this.eks.deleteCluster({ name: this.clusterName }); - } - catch (e) { - if (e.code !== 'ResourceNotFoundException') { - throw e; - } - else { - console.log(`cluster ${this.clusterName} not found, idempotently succeeded`); - } - } - return { - PhysicalResourceId: this.clusterName, - }; - } - async isDeleteComplete() { - console.log(`isDeleteComplete: waiting for cluster ${this.clusterName} to be deleted`); - try { - const resp = await this.eks.describeCluster({ name: this.clusterName }); - console.log('describeCluster returned:', JSON.stringify(resp, undefined, 2)); - } - catch (e) { - if (e.code === 'ResourceNotFoundException') { - console.log('received ResourceNotFoundException, this means the cluster has been deleted (or never existed)'); - return { IsComplete: true }; - } - console.log('describeCluster error:', e); - throw e; - } - return { - IsComplete: false, - }; - } - // ------ - // UPDATE - // ------ - async onUpdate() { - const updates = analyzeUpdate(this.oldProps, this.newProps); - console.log('onUpdate:', JSON.stringify({ updates }, undefined, 2)); - // updates to encryption config is not supported - if (updates.updateEncryption) { - throw new Error('Cannot update cluster encryption configuration'); - } - // if there is an update that requires replacement, go ahead and just create - // a new cluster with the new config. The old cluster will automatically be - // deleted by cloudformation upon success. - if (updates.replaceName || updates.replaceRole || updates.replaceVpc) { - // if we are replacing this cluster and the cluster has an explicit - // physical name, the creation of the new cluster will fail with "there is - // already a cluster with that name". this is a common behavior for - // CloudFormation resources that support specifying a physical name. - if (this.oldProps.name === this.newProps.name && this.oldProps.name) { - throw new Error(`Cannot replace cluster "${this.oldProps.name}" since it has an explicit physical name. Either rename the cluster or remove the "name" configuration`); - } - return this.onCreate(); - } - // if a version update is required, issue the version update - if (updates.updateVersion) { - if (!this.newProps.version) { - throw new Error(`Cannot remove cluster version configuration. Current version is ${this.oldProps.version}`); - } - return this.updateClusterVersion(this.newProps.version); - } - if (updates.updateLogging || updates.updateAccess) { - const config = { - name: this.clusterName, - logging: this.newProps.logging, - }; - if (updates.updateAccess) { - // Updating the cluster with securityGroupIds and subnetIds (as specified in the warning here: - // https://awscli.amazonaws.com/v2/documentation/api/latest/reference/eks/update-cluster-config.html) - // will fail, therefore we take only the access fields explicitly - config.resourcesVpcConfig = { - endpointPrivateAccess: this.newProps.resourcesVpcConfig.endpointPrivateAccess, - endpointPublicAccess: this.newProps.resourcesVpcConfig.endpointPublicAccess, - publicAccessCidrs: this.newProps.resourcesVpcConfig.publicAccessCidrs, - }; - } - const updateResponse = await this.eks.updateClusterConfig(config); - return { EksUpdateId: updateResponse.update?.id }; - } - // no updates - return; - } - async isUpdateComplete() { - console.log('isUpdateComplete'); - // if this is an EKS update, we will monitor the update event itself - if (this.event.EksUpdateId) { - const complete = await this.isEksUpdateComplete(this.event.EksUpdateId); - if (!complete) { - return { IsComplete: false }; - } - // fall through: if the update is done, we simply delegate to isActive() - // in order to extract attributes and state from the cluster itself, which - // is supposed to be in an ACTIVE state after the update is complete. - } - return this.isActive(); - } - async updateClusterVersion(newVersion) { - console.log(`updating cluster version to ${newVersion}`); - // update-cluster-version will fail if we try to update to the same version, - // so skip in this case. - const cluster = (await this.eks.describeCluster({ name: this.clusterName })).cluster; - if (cluster?.version === newVersion) { - console.log(`cluster already at version ${cluster.version}, skipping version update`); - return; - } - const updateResponse = await this.eks.updateClusterVersion({ name: this.clusterName, version: newVersion }); - return { EksUpdateId: updateResponse.update?.id }; - } - async isActive() { - console.log('waiting for cluster to become ACTIVE'); - const resp = await this.eks.describeCluster({ name: this.clusterName }); - console.log('describeCluster result:', JSON.stringify(resp, undefined, 2)); - const cluster = resp.cluster; - // if cluster is undefined (shouldnt happen) or status is not ACTIVE, we are - // not complete. note that the custom resource provider framework forbids - // returning attributes (Data) if isComplete is false. - if (cluster?.status === 'FAILED') { - // not very informative, unfortunately the response doesn't contain any error - // information :\ - throw new Error('Cluster is in a FAILED status'); - } - else if (cluster?.status !== 'ACTIVE') { - return { - IsComplete: false, - }; - } - else { - return { - IsComplete: true, - Data: { - Name: cluster.name, - Endpoint: cluster.endpoint, - Arn: cluster.arn, - // IMPORTANT: CFN expects that attributes will *always* have values, - // so return an empty string in case the value is not defined. - // Otherwise, CFN will throw with `Vendor response doesn't contain - // XXXX key`. - CertificateAuthorityData: cluster.certificateAuthority?.data ?? '', - ClusterSecurityGroupId: cluster.resourcesVpcConfig?.clusterSecurityGroupId ?? '', - OpenIdConnectIssuerUrl: cluster.identity?.oidc?.issuer ?? '', - OpenIdConnectIssuer: cluster.identity?.oidc?.issuer?.substring(8) ?? '', - // We can safely return the first item from encryption configuration array, because it has a limit of 1 item - // https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateCluster.html#AmazonEKS-CreateCluster-request-encryptionConfig - EncryptionConfigKeyArn: cluster.encryptionConfig?.shift()?.provider?.keyArn ?? '', - }, - }; - } - } - async isEksUpdateComplete(eksUpdateId) { - this.log({ isEksUpdateComplete: eksUpdateId }); - const describeUpdateResponse = await this.eks.describeUpdate({ - name: this.clusterName, - updateId: eksUpdateId, - }); - this.log({ describeUpdateResponse }); - if (!describeUpdateResponse.update) { - throw new Error(`unable to describe update with id "${eksUpdateId}"`); - } - switch (describeUpdateResponse.update.status) { - case 'InProgress': - return false; - case 'Successful': - return true; - case 'Failed': - case 'Cancelled': - throw new Error(`cluster update id "${eksUpdateId}" failed with errors: ${JSON.stringify(describeUpdateResponse.update.errors)}`); - default: - throw new Error(`unknown status "${describeUpdateResponse.update.status}" for update id "${eksUpdateId}"`); - } - } - generateClusterName() { - const suffix = this.requestId.replace(/-/g, ''); // 32 chars - const offset = MAX_CLUSTER_NAME_LEN - suffix.length - 1; - const prefix = this.logicalResourceId.slice(0, offset > 0 ? offset : 0); - return `${prefix}-${suffix}`; - } -} -exports.ClusterResourceHandler = ClusterResourceHandler; -function parseProps(props) { - const parsed = props?.Config ?? {}; - // this is weird but these boolean properties are passed by CFN as a string, and we need them to be booleanic for the SDK. - // Otherwise it fails with 'Unexpected Parameter: params.resourcesVpcConfig.endpointPrivateAccess is expected to be a boolean' - if (typeof (parsed.resourcesVpcConfig?.endpointPrivateAccess) === 'string') { - parsed.resourcesVpcConfig.endpointPrivateAccess = parsed.resourcesVpcConfig.endpointPrivateAccess === 'true'; - } - if (typeof (parsed.resourcesVpcConfig?.endpointPublicAccess) === 'string') { - parsed.resourcesVpcConfig.endpointPublicAccess = parsed.resourcesVpcConfig.endpointPublicAccess === 'true'; - } - if (typeof (parsed.logging?.clusterLogging[0].enabled) === 'string') { - parsed.logging.clusterLogging[0].enabled = parsed.logging.clusterLogging[0].enabled === 'true'; - } - return parsed; -} -function analyzeUpdate(oldProps, newProps) { - console.log('old props: ', JSON.stringify(oldProps)); - console.log('new props: ', JSON.stringify(newProps)); - const newVpcProps = newProps.resourcesVpcConfig || {}; - const oldVpcProps = oldProps.resourcesVpcConfig || {}; - const oldPublicAccessCidrs = new Set(oldVpcProps.publicAccessCidrs ?? []); - const newPublicAccessCidrs = new Set(newVpcProps.publicAccessCidrs ?? []); - const newEnc = newProps.encryptionConfig || {}; - const oldEnc = oldProps.encryptionConfig || {}; - return { - replaceName: newProps.name !== oldProps.name, - replaceVpc: JSON.stringify(newVpcProps.subnetIds) !== JSON.stringify(oldVpcProps.subnetIds) || - JSON.stringify(newVpcProps.securityGroupIds) !== JSON.stringify(oldVpcProps.securityGroupIds), - updateAccess: newVpcProps.endpointPrivateAccess !== oldVpcProps.endpointPrivateAccess || - newVpcProps.endpointPublicAccess !== oldVpcProps.endpointPublicAccess || - !setsEqual(newPublicAccessCidrs, oldPublicAccessCidrs), - replaceRole: newProps.roleArn !== oldProps.roleArn, - updateVersion: newProps.version !== oldProps.version, - updateEncryption: JSON.stringify(newEnc) !== JSON.stringify(oldEnc), - updateLogging: JSON.stringify(newProps.logging) !== JSON.stringify(oldProps.logging), - }; -} -function setsEqual(first, second) { - return first.size === second.size || [...first].every((e) => second.has(e)); -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNsdXN0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtCQUErQjs7O0FBTS9CLHFDQUFxRTtBQUVyRSxNQUFNLG9CQUFvQixHQUFHLEdBQUcsQ0FBQztBQUVqQyxNQUFhLHNCQUF1QixTQUFRLHdCQUFlO0lBWXpELFlBQVksR0FBYyxFQUFFLEtBQW9CO1FBQzlDLEtBQUssQ0FBQyxHQUFHLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFFbEIsSUFBSSxDQUFDLFFBQVEsR0FBRyxVQUFVLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO1FBQzFELElBQUksQ0FBQyxRQUFRLEdBQUcsS0FBSyxDQUFDLFdBQVcsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQU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R5R3JvdXBJZHMpLFxuICAgIHVwZGF0ZUFjY2VzczpcbiAgICAgIG5ld1ZwY1Byb3BzLmVuZHBvaW50UHJpdmF0ZUFjY2VzcyAhPT0gb2xkVnBjUHJvcHMuZW5kcG9pbnRQcml2YXRlQWNjZXNzIHx8XG4gICAgICBuZXdWcGNQcm9wcy5lbmRwb2ludFB1YmxpY0FjY2VzcyAhPT0gb2xkVnBjUHJvcHMuZW5kcG9pbnRQdWJsaWNBY2Nlc3MgfHxcbiAgICAgICFzZXRzRXF1YWwobmV3UHVibGljQWNjZXNzQ2lkcnMsIG9sZFB1YmxpY0FjY2Vzc0NpZHJzKSxcbiAgICByZXBsYWNlUm9sZTogbmV3UHJvcHMucm9sZUFybiAhPT0gb2xkUHJvcHMucm9sZUFybixcbiAgICB1cGRhdGVWZXJzaW9uOiBuZXdQcm9wcy52ZXJzaW9uICE9PSBvbGRQcm9wcy52ZXJzaW9uLFxuICAgIHVwZGF0ZUVuY3J5cHRpb246IEpTT04uc3RyaW5naWZ5KG5ld0VuYykgIT09IEpTT04uc3RyaW5naWZ5KG9sZEVuYyksXG4gICAgdXBkYXRlTG9nZ2luZzogSlNPTi5zdHJpbmdpZnkobmV3UHJvcHMubG9nZ2luZykgIT09IEpTT04uc3RyaW5naWZ5KG9sZFByb3BzLmxvZ2dpbmcpLFxuICB9O1xufVxuXG5mdW5jdGlvbiBzZXRzRXF1YWwoZmlyc3Q6IFNldDxzdHJpbmc+LCBzZWNvbmQ6IFNldDxzdHJpbmc+KSB7XG4gIHJldHVybiBmaXJzdC5zaXplID09PSBzZWNvbmQuc2l6ZSB8fCBbLi4uZmlyc3RdLmV2ZXJ5KChlOiBzdHJpbmcpID0+IHNlY29uZC5oYXMoZSkpO1xufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/common.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/common.js deleted file mode 100644 index a5480014d5fc4..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/common.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResourceHandler = void 0; -class ResourceHandler { - constructor(eks, event) { - this.eks = eks; - this.requestType = event.RequestType; - this.requestId = event.RequestId; - this.logicalResourceId = event.LogicalResourceId; - this.physicalResourceId = event.PhysicalResourceId; - this.event = event; - const roleToAssume = event.ResourceProperties.AssumeRoleArn; - if (!roleToAssume) { - throw new Error('AssumeRoleArn must be provided'); - } - eks.configureAssumeRole({ - RoleArn: roleToAssume, - RoleSessionName: `AWSCDK.EKSCluster.${this.requestType}.${this.requestId}`, - }); - } - onEvent() { - switch (this.requestType) { - case 'Create': return this.onCreate(); - case 'Update': return this.onUpdate(); - case 'Delete': return this.onDelete(); - } - throw new Error(`Invalid request type ${this.requestType}`); - } - isComplete() { - switch (this.requestType) { - case 'Create': return this.isCreateComplete(); - case 'Update': return this.isUpdateComplete(); - case 'Delete': return this.isDeleteComplete(); - } - throw new Error(`Invalid request type ${this.requestType}`); - } - log(x) { - // eslint-disable-next-line no-console - console.log(JSON.stringify(x, undefined, 2)); - } -} -exports.ResourceHandler = ResourceHandler; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQWlCQSxNQUFzQixlQUFlO0lBT25DLFlBQStCLEdBQWMsRUFBRSxLQUFvQjtRQUFwQyxRQUFHLEdBQUgsR0FBRyxDQUFXO1FBQzNDLElBQUksQ0FBQyx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hd3MuRUtTLkNyZWF0ZUZhcmdhdGVQcm9maWxlUmVzcG9uc2U+O1xuICBkZXNjcmliZUZhcmdhdGVQcm9maWxlKHJlcXVlc3Q6IGF3cy5FS1MuRGVzY3JpYmVGYXJnYXRlUHJvZmlsZVJlcXVlc3QpOiBQcm9taXNlPGF3cy5FS1MuRGVzY3JpYmVGYXJnYXRlUHJvZmlsZVJlc3BvbnNlPjtcbiAgZGVsZXRlRmFyZ2F0ZVByb2ZpbGUocmVxdWVzdDogYXdzLkVLUy5EZWxldGVGYXJnYXRlUHJvZmlsZVJlcXVlc3QpOiBQcm9taXNlPGF3cy5FS1MuRGVsZXRlRmFyZ2F0ZVByb2ZpbGVSZXNwb25zZT47XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/fargate.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/fargate.js deleted file mode 100644 index 91815a754a525..0000000000000 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/fargate.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FargateProfileResourceHandler = void 0; -const common_1 = require("./common"); -const MAX_NAME_LEN = 63; -class FargateProfileResourceHandler extends common_1.ResourceHandler { - async onCreate() { - const fargateProfileName = this.event.ResourceProperties.Config.fargateProfileName ?? this.generateProfileName(); - const createFargateProfile = { - fargateProfileName, - ...this.event.ResourceProperties.Config, - }; - this.log({ createFargateProfile }); - const createFargateProfileResponse = await this.eks.createFargateProfile(createFargateProfile); - this.log({ createFargateProfileResponse }); - if (!createFargateProfileResponse.fargateProfile) { - throw new Error('invalid CreateFargateProfile response'); - } - return { - PhysicalResourceId: createFargateProfileResponse.fargateProfile.fargateProfileName, - Data: { - fargateProfileArn: createFargateProfileResponse.fargateProfile.fargateProfileArn, - }, - }; - } - async onDelete() { - if (!this.physicalResourceId) { - throw new Error('Cannot delete a profile without a physical id'); - } - const deleteFargateProfile = { - clusterName: this.event.ResourceProperties.Config.clusterName, - fargateProfileName: this.physicalResourceId, - }; - this.log({ deleteFargateProfile }); - const deleteFargateProfileResponse = await this.eks.deleteFargateProfile(deleteFargateProfile); - this.log({ deleteFargateProfileResponse }); - return; - } - async onUpdate() { - // all updates require a replacement. as long as name is generated, we are - // good. if name is explicit, update will fail, which is common when trying - // to replace cfn resources with explicit physical names - return this.onCreate(); - } - async isCreateComplete() { - return this.isUpdateComplete(); - } - async isUpdateComplete() { - const status = await this.queryStatus(); - return { - IsComplete: status === 'ACTIVE', - }; - } - async isDeleteComplete() { - const status = await this.queryStatus(); - return { - IsComplete: status === 'NOT_FOUND', - }; - } - /** - * Generates a fargate profile name. - */ - generateProfileName() { - const suffix = this.requestId.replace(/-/g, ''); // 32 chars - const offset = MAX_NAME_LEN - suffix.length - 1; - const prefix = this.logicalResourceId.slice(0, offset > 0 ? offset : 0); - return `${prefix}-${suffix}`; - } - /** - * Queries the Fargate profile's current status and returns the status or - * NOT_FOUND if the profile doesn't exist (i.e. it has been deleted). - */ - async queryStatus() { - if (!this.physicalResourceId) { - throw new Error('Unable to determine status for fargate profile without a resource name'); - } - const describeFargateProfile = { - clusterName: this.event.ResourceProperties.Config.clusterName, - fargateProfileName: this.physicalResourceId, - }; - try { - this.log({ describeFargateProfile }); - const describeFargateProfileResponse = await this.eks.describeFargateProfile(describeFargateProfile); - this.log({ describeFargateProfileResponse }); - const status = describeFargateProfileResponse.fargateProfile?.status; - if (status === 'CREATE_FAILED' || status === 'DELETE_FAILED') { - throw new Error(status); - } - return status; - } - catch (describeFargateProfileError) { - if (describeFargateProfileError.code === 'ResourceNotFoundException') { - this.log('received ResourceNotFoundException, this means the profile has been deleted (or never existed)'); - return 'NOT_FOUND'; - } - this.log({ describeFargateProfileError }); - throw describeFargateProfileError; - } - } -} -exports.FargateProfileResourceHandler = FargateProfileResourceHandler; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFyZ2F0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImZhcmdhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EscUNBQTJDO0FBRTNDLE1BQU0sWUFBWSxHQUFHLEVBQUUsQ0FBQztBQUV4QixNQUFhLDZCQUE4QixTQUFRLHdCQUFlO0lBQ3RELEtBQUssQ0FBQyxRQUFRO1FBQ3RCLE1BQU0sa0JBQWtCLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFNLENBQUMsa0JBQWtCLElBQUksSUFBSSxDQUFDLG1CQUFtQixFQUFFLENBQUM7UUFFakgsTUFBTSxvQkFBb0IsR0FBd0M7WUFDaEUsa0JBQWtCO1lBQ2xCLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFNO1NBQ3hDLENBQUM7UUFFRixJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsb0JBQW9CLEVBQUUsQ0FBQyxDQUFDO1FBQ25DLE1BQU0sNEJBQTRCLEdBQUcsTUFBTSxJQUFJLENBQUMsR0FBRyxDQUFDLG9CQUFvQixDQUFDLG9CQUFvQixDQUFDLENBQUM7UUFDL0YsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLDRCQUE0QixFQUFFLENBQUMsQ0FBQztRQUUzQyxJQUFJLENBQUMsNEJBQTRCLENBQUMsY0FBYyxFQUFFO1lBQ2hELE1BQU0sSUFBSSxLQUFLLENBQUMsdUNBQXVDLENBQUMsQ0FBQztTQUMxRDtRQUVELE9BQU87WUFDTCxrQkFBa0IsRUFBRSw0QkFBNEI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ZpbGVFcnJvcjtcbiAgICB9XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/cluster.d.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.d.ts similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/cluster.d.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.d.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js new file mode 100644 index 0000000000000..1d08e9d7b865b --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js @@ -0,0 +1,273 @@ +"use strict"; +/* eslint-disable no-console */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ClusterResourceHandler = void 0; +const common_1 = require("./common"); +const MAX_CLUSTER_NAME_LEN = 100; +class ClusterResourceHandler extends common_1.ResourceHandler { + constructor(eks, event) { + super(eks, event); + this.newProps = parseProps(this.event.ResourceProperties); + this.oldProps = event.RequestType === 'Update' ? parseProps(event.OldResourceProperties) : {}; + } + get clusterName() { + if (!this.physicalResourceId) { + throw new Error('Cannot determine cluster name without physical resource ID'); + } + return this.physicalResourceId; + } + // ------ + // CREATE + // ------ + async onCreate() { + console.log('onCreate: creating cluster with options:', JSON.stringify(this.newProps, undefined, 2)); + if (!this.newProps.roleArn) { + throw new Error('"roleArn" is required'); + } + const clusterName = this.newProps.name || this.generateClusterName(); + const resp = await this.eks.createCluster({ + ...this.newProps, + name: clusterName, + }); + if (!resp.cluster) { + throw new Error(`Error when trying to create cluster ${clusterName}: CreateCluster returned without cluster information`); + } + return { + PhysicalResourceId: resp.cluster.name, + }; + } + async isCreateComplete() { + return this.isActive(); + } + // ------ + // DELETE + // ------ + async onDelete() { + console.log(`onDelete: deleting cluster ${this.clusterName}`); + try { + await this.eks.deleteCluster({ name: this.clusterName }); + } + catch (e) { + if (e.code !== 'ResourceNotFoundException') { + throw e; + } + else { + console.log(`cluster ${this.clusterName} not found, idempotently succeeded`); + } + } + return { + PhysicalResourceId: this.clusterName, + }; + } + async isDeleteComplete() { + console.log(`isDeleteComplete: waiting for cluster ${this.clusterName} to be deleted`); + try { + const resp = await this.eks.describeCluster({ name: this.clusterName }); + console.log('describeCluster returned:', JSON.stringify(resp, undefined, 2)); + } + catch (e) { + if (e.code === 'ResourceNotFoundException') { + console.log('received ResourceNotFoundException, this means the cluster has been deleted (or never existed)'); + return { IsComplete: true }; + } + console.log('describeCluster error:', e); + throw e; + } + return { + IsComplete: false, + }; + } + // ------ + // UPDATE + // ------ + async onUpdate() { + const updates = analyzeUpdate(this.oldProps, this.newProps); + console.log('onUpdate:', JSON.stringify({ updates }, undefined, 2)); + // updates to encryption config is not supported + if (updates.updateEncryption) { + throw new Error('Cannot update cluster encryption configuration'); + } + // if there is an update that requires replacement, go ahead and just create + // a new cluster with the new config. The old cluster will automatically be + // deleted by cloudformation upon success. + if (updates.replaceName || updates.replaceRole || updates.replaceVpc) { + // if we are replacing this cluster and the cluster has an explicit + // physical name, the creation of the new cluster will fail with "there is + // already a cluster with that name". this is a common behavior for + // CloudFormation resources that support specifying a physical name. + if (this.oldProps.name === this.newProps.name && this.oldProps.name) { + throw new Error(`Cannot replace cluster "${this.oldProps.name}" since it has an explicit physical name. Either rename the cluster or remove the "name" configuration`); + } + return this.onCreate(); + } + // if a version update is required, issue the version update + if (updates.updateVersion) { + if (!this.newProps.version) { + throw new Error(`Cannot remove cluster version configuration. Current version is ${this.oldProps.version}`); + } + return this.updateClusterVersion(this.newProps.version); + } + if (updates.updateLogging && updates.updateAccess) { + throw new Error('Cannot update logging and access at the same time'); + } + if (updates.updateLogging || updates.updateAccess) { + const config = { + name: this.clusterName, + }; + if (updates.updateLogging) { + config.logging = this.newProps.logging; + } + ; + if (updates.updateAccess) { + // Updating the cluster with securityGroupIds and subnetIds (as specified in the warning here: + // https://awscli.amazonaws.com/v2/documentation/api/latest/reference/eks/update-cluster-config.html) + // will fail, therefore we take only the access fields explicitly + config.resourcesVpcConfig = { + endpointPrivateAccess: this.newProps.resourcesVpcConfig.endpointPrivateAccess, + endpointPublicAccess: this.newProps.resourcesVpcConfig.endpointPublicAccess, + publicAccessCidrs: this.newProps.resourcesVpcConfig.publicAccessCidrs, + }; + } + const updateResponse = await this.eks.updateClusterConfig(config); + return { EksUpdateId: updateResponse.update?.id }; + } + // no updates + return; + } + async isUpdateComplete() { + console.log('isUpdateComplete'); + // if this is an EKS update, we will monitor the update event itself + if (this.event.EksUpdateId) { + const complete = await this.isEksUpdateComplete(this.event.EksUpdateId); + if (!complete) { + return { IsComplete: false }; + } + // fall through: if the update is done, we simply delegate to isActive() + // in order to extract attributes and state from the cluster itself, which + // is supposed to be in an ACTIVE state after the update is complete. + } + return this.isActive(); + } + async updateClusterVersion(newVersion) { + console.log(`updating cluster version to ${newVersion}`); + // update-cluster-version will fail if we try to update to the same version, + // so skip in this case. + const cluster = (await this.eks.describeCluster({ name: this.clusterName })).cluster; + if (cluster?.version === newVersion) { + console.log(`cluster already at version ${cluster.version}, skipping version update`); + return; + } + const updateResponse = await this.eks.updateClusterVersion({ name: this.clusterName, version: newVersion }); + return { EksUpdateId: updateResponse.update?.id }; + } + async isActive() { + console.log('waiting for cluster to become ACTIVE'); + const resp = await this.eks.describeCluster({ name: this.clusterName }); + console.log('describeCluster result:', JSON.stringify(resp, undefined, 2)); + const cluster = resp.cluster; + // if cluster is undefined (shouldnt happen) or status is not ACTIVE, we are + // not complete. note that the custom resource provider framework forbids + // returning attributes (Data) if isComplete is false. + if (cluster?.status === 'FAILED') { + // not very informative, unfortunately the response doesn't contain any error + // information :\ + throw new Error('Cluster is in a FAILED status'); + } + else if (cluster?.status !== 'ACTIVE') { + return { + IsComplete: false, + }; + } + else { + return { + IsComplete: true, + Data: { + Name: cluster.name, + Endpoint: cluster.endpoint, + Arn: cluster.arn, + // IMPORTANT: CFN expects that attributes will *always* have values, + // so return an empty string in case the value is not defined. + // Otherwise, CFN will throw with `Vendor response doesn't contain + // XXXX key`. + CertificateAuthorityData: cluster.certificateAuthority?.data ?? '', + ClusterSecurityGroupId: cluster.resourcesVpcConfig?.clusterSecurityGroupId ?? '', + OpenIdConnectIssuerUrl: cluster.identity?.oidc?.issuer ?? '', + OpenIdConnectIssuer: cluster.identity?.oidc?.issuer?.substring(8) ?? '', + // We can safely return the first item from encryption configuration array, because it has a limit of 1 item + // https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateCluster.html#AmazonEKS-CreateCluster-request-encryptionConfig + EncryptionConfigKeyArn: cluster.encryptionConfig?.shift()?.provider?.keyArn ?? '', + }, + }; + } + } + async isEksUpdateComplete(eksUpdateId) { + this.log({ isEksUpdateComplete: eksUpdateId }); + const describeUpdateResponse = await this.eks.describeUpdate({ + name: this.clusterName, + updateId: eksUpdateId, + }); + this.log({ describeUpdateResponse }); + if (!describeUpdateResponse.update) { + throw new Error(`unable to describe update with id "${eksUpdateId}"`); + } + switch (describeUpdateResponse.update.status) { + case 'InProgress': + return false; + case 'Successful': + return true; + case 'Failed': + case 'Cancelled': + throw new Error(`cluster update id "${eksUpdateId}" failed with errors: ${JSON.stringify(describeUpdateResponse.update.errors)}`); + default: + throw new Error(`unknown status "${describeUpdateResponse.update.status}" for update id "${eksUpdateId}"`); + } + } + generateClusterName() { + const suffix = this.requestId.replace(/-/g, ''); // 32 chars + const offset = MAX_CLUSTER_NAME_LEN - suffix.length - 1; + const prefix = this.logicalResourceId.slice(0, offset > 0 ? offset : 0); + return `${prefix}-${suffix}`; + } +} +exports.ClusterResourceHandler = ClusterResourceHandler; +function parseProps(props) { + const parsed = props?.Config ?? {}; + // this is weird but these boolean properties are passed by CFN as a string, and we need them to be booleanic for the SDK. + // Otherwise it fails with 'Unexpected Parameter: params.resourcesVpcConfig.endpointPrivateAccess is expected to be a boolean' + if (typeof (parsed.resourcesVpcConfig?.endpointPrivateAccess) === 'string') { + parsed.resourcesVpcConfig.endpointPrivateAccess = parsed.resourcesVpcConfig.endpointPrivateAccess === 'true'; + } + if (typeof (parsed.resourcesVpcConfig?.endpointPublicAccess) === 'string') { + parsed.resourcesVpcConfig.endpointPublicAccess = parsed.resourcesVpcConfig.endpointPublicAccess === 'true'; + } + if (typeof (parsed.logging?.clusterLogging[0].enabled) === 'string') { + parsed.logging.clusterLogging[0].enabled = parsed.logging.clusterLogging[0].enabled === 'true'; + } + return parsed; +} +function analyzeUpdate(oldProps, newProps) { + console.log('old props: ', JSON.stringify(oldProps)); + console.log('new props: ', JSON.stringify(newProps)); + const newVpcProps = newProps.resourcesVpcConfig || {}; + const oldVpcProps = oldProps.resourcesVpcConfig || {}; + const oldPublicAccessCidrs = new Set(oldVpcProps.publicAccessCidrs ?? []); + const newPublicAccessCidrs = new Set(newVpcProps.publicAccessCidrs ?? []); + const newEnc = newProps.encryptionConfig || {}; + const oldEnc = oldProps.encryptionConfig || {}; + return { + replaceName: newProps.name !== oldProps.name, + replaceVpc: JSON.stringify(newVpcProps.subnetIds) !== JSON.stringify(oldVpcProps.subnetIds) || + JSON.stringify(newVpcProps.securityGroupIds) !== JSON.stringify(oldVpcProps.securityGroupIds), + updateAccess: newVpcProps.endpointPrivateAccess !== oldVpcProps.endpointPrivateAccess || + newVpcProps.endpointPublicAccess !== oldVpcProps.endpointPublicAccess || + !setsEqual(newPublicAccessCidrs, oldPublicAccessCidrs), + replaceRole: newProps.roleArn !== oldProps.roleArn, + updateVersion: newProps.version !== oldProps.version, + updateEncryption: JSON.stringify(newEnc) !== JSON.stringify(oldEnc), + updateLogging: JSON.stringify(newProps.logging) !== JSON.stringify(oldProps.logging), + }; +} +function setsEqual(first, second) { + return first.size === second.size && [...first].every((e) => second.has(e)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNsdXN0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtCQUErQjs7O0FBTS9CLHFDQUFxRTtBQUVyRSxNQUFNLG9CQUFvQixHQUFHLEdBQUcsQ0FBQztBQUVqQyxNQUFhLHNCQUF1QixTQUFRLHdCQUFlO0lBWXpELFlBQVksR0FBYyxFQUFFLEtBQW9CO1FBQzlDLEtBQUssQ0FBQyxHQUFHLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFFbEIsSUFBSSxDQUFDLFFBQVEsR0FBRyxVQUFVLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO1FBQzFELElBQUksQ0FBQyxRQUFRLEdBQUcsS0FBSyxDQUFDLFdBQVcsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMscUJBQXFCLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDO0tBQy9GO0lBaEJELElBQVcsV0FBVztRQUNwQixJQUFJLENBQUMsSUFBSSxDQUFDLGtCQUFrQixFQUFFO1lBQzVCLE1BQU0sSUFBSSxLQUFLLENBQUMsNERBQTRELENBQUMsQ0FBQztTQUMvRTtRQUVELE9BQU8sSUFBSSxDQUFDLGtCQUF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set.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/cluster.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.ts similarity index 97% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/cluster.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.ts index 0177a7e21b695..e6930b7844d32 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/cluster.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.ts @@ -136,10 +136,16 @@ export class ClusterResourceHandler extends ResourceHandler { return this.updateClusterVersion(this.newProps.version); } + if (updates.updateLogging && updates.updateAccess) { + throw new Error('Cannot update logging and access at the same time'); + } + if (updates.updateLogging || updates.updateAccess) { const config: aws.EKS.UpdateClusterConfigRequest = { name: this.clusterName, - logging: this.newProps.logging, + }; + if (updates.updateLogging) { + config.logging = this.newProps.logging; }; if (updates.updateAccess) { // Updating the cluster with securityGroupIds and subnetIds (as specified in the warning here: @@ -334,5 +340,5 @@ function analyzeUpdate(oldProps: Partial, newProps } function setsEqual(first: Set, second: Set) { - return first.size === second.size || [...first].every((e: string) => second.has(e)); + return first.size === second.size && [...first].every((e: string) => second.has(e)); } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/common.d.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.d.ts similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/common.d.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.d.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js new file mode 100644 index 0000000000000..5dbf4000517e4 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ResourceHandler = void 0; +class ResourceHandler { + constructor(eks, event) { + this.eks = eks; + this.requestType = event.RequestType; + this.requestId = event.RequestId; + this.logicalResourceId = event.LogicalResourceId; + this.physicalResourceId = event.PhysicalResourceId; + this.event = event; + const roleToAssume = event.ResourceProperties.AssumeRoleArn; + if (!roleToAssume) { + throw new Error('AssumeRoleArn must be provided'); + } + eks.configureAssumeRole({ + RoleArn: roleToAssume, + RoleSessionName: `AWSCDK.EKSCluster.${this.requestType}.${this.requestId}`, + }); + } + onEvent() { + switch (this.requestType) { + case 'Create': return this.onCreate(); + case 'Update': return this.onUpdate(); + case 'Delete': return this.onDelete(); + } + throw new Error(`Invalid request type ${this.requestType}`); + } + isComplete() { + switch (this.requestType) { + case 'Create': return this.isCreateComplete(); + case 'Update': return this.isUpdateComplete(); + case 'Delete': return this.isDeleteComplete(); + } + throw new Error(`Invalid request type ${this.requestType}`); + } + log(x) { + // eslint-disable-next-line no-console + console.log(JSON.stringify(x, undefined, 2)); + } +} +exports.ResourceHandler = ResourceHandler; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQWlCQSxNQUFzQixlQUFlO0lBT25DLFlBQStCLEdBQWMsRUFBRSxLQUFvQjtRQUFwQyxRQUFHLEdBQUgsR0FBRyxDQUFXO1FBQzNDLElBQUksQ0FBQyxXQUFXLEdBQUcsS0FBSyxDQUFDLFdBQVcsQ0FBQztRQUNyQyxJQUFJLENBQUMsU0FBUyxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUM7UUFDakMsSUFBSSxDQUFDLGlCQUFpQixHQUFHLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQztRQUNqRCxJQUFJLENBQUMsa0JBQWtCLEdBQUksS0FBYSxDQUFDLGtCQUFrQixDQUFDO1FBQzVELElBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFDO1FBRW5CLE1BQU0sWUFBWSxHQUFHLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxhQUFhLENBQUM7UUFDNUQsSUFBSSxDQUFDLFlBQVksRUFBRTtZQUNqQixNQUFNLElBQUksS0FBSyxDQUFDLGdDQUFnQyxDQUFDLENBQUM7U0FDbkQ7UUFFRCxHQUFHLENBQUMsbUJBQW1CLENBQUM7WUFDdEIsT0FBTyxFQUFFLFlBQVk7WUFDckIsZUFBZSxFQUFFLHFCQUFxQixJQUFJLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxTQUFTLEVBQUU7U0FDM0UsQ0FBQyxDQUFDO0tBQ0o7SUFFTSxPQUFPO1FBQ1osUUFBUSxJQUFJLENBQUMsV0FB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JWZXJzaW9uKHJlcXVlc3Q6IGF3cy5FS1MuVXBkYXRlQ2x1c3RlclZlcnNpb25SZXF1ZXN0KTogUHJvbWlzZTxhd3MuRUtTLlVwZGF0ZUNsdXN0ZXJWZXJzaW9uUmVzcG9uc2U+O1xuICBkZXNjcmliZVVwZGF0ZShyZXE6IGF3cy5FS1MuRGVzY3JpYmVVcGRhdGVSZXF1ZXN0KTogUHJvbWlzZTxhd3MuRUtTLkRlc2NyaWJlVXBkYXRlUmVzcG9uc2U+O1xuICBjcmVhdGVGYXJnYXRlUHJvZmlsZShyZXF1ZXN0OiBhd3MuRUtTLkNyZWF0ZUZhcmdhdGVQcm9maWxlUmVxdWVzdCk6IFByb21pc2U8YXdzLkVLUy5DcmVhdGVGYXJnYXRlUHJvZmlsZVJlc3BvbnNlPjtcbiAgZGVzY3JpYmVGYXJnYXRlUHJvZmlsZShyZXF1ZXN0OiBhd3MuRUtTLkRlc2NyaWJlRmFyZ2F0ZVByb2ZpbGVSZXF1ZXN0KTogUHJvbWlzZTxhd3MuRUtTLkRlc2NyaWJlRmFyZ2F0ZVByb2ZpbGVSZXNwb25zZT47XG4gIGRlbGV0ZUZhcmdhdGVQcm9maWxlKHJlcXVlc3Q6IGF3cy5FS1MuRGVsZXRlRmFyZ2F0ZVByb2ZpbGVSZXF1ZXN0KTogUHJvbWlzZTxhd3MuRUtTLkRlbGV0ZUZhcmdhdGVQcm9maWxlUmVzcG9uc2U+O1xufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/common.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.ts similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/common.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/consts.d.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/consts.d.ts similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/consts.d.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/consts.d.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/consts.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/consts.js similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/consts.js rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/consts.js diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/consts.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/consts.ts similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/consts.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/consts.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/fargate.d.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.d.ts similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/fargate.d.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.d.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js new file mode 100644 index 0000000000000..f74022f9be26d --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js @@ -0,0 +1,102 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FargateProfileResourceHandler = void 0; +const common_1 = require("./common"); +const MAX_NAME_LEN = 63; +class FargateProfileResourceHandler extends common_1.ResourceHandler { + async onCreate() { + const fargateProfileName = this.event.ResourceProperties.Config.fargateProfileName ?? this.generateProfileName(); + const createFargateProfile = { + fargateProfileName, + ...this.event.ResourceProperties.Config, + }; + this.log({ createFargateProfile }); + const createFargateProfileResponse = await this.eks.createFargateProfile(createFargateProfile); + this.log({ createFargateProfileResponse }); + if (!createFargateProfileResponse.fargateProfile) { + throw new Error('invalid CreateFargateProfile response'); + } + return { + PhysicalResourceId: createFargateProfileResponse.fargateProfile.fargateProfileName, + Data: { + fargateProfileArn: createFargateProfileResponse.fargateProfile.fargateProfileArn, + }, + }; + } + async onDelete() { + if (!this.physicalResourceId) { + throw new Error('Cannot delete a profile without a physical id'); + } + const deleteFargateProfile = { + clusterName: this.event.ResourceProperties.Config.clusterName, + fargateProfileName: this.physicalResourceId, + }; + this.log({ deleteFargateProfile }); + const deleteFargateProfileResponse = await this.eks.deleteFargateProfile(deleteFargateProfile); + this.log({ deleteFargateProfileResponse }); + return; + } + async onUpdate() { + // all updates require a replacement. as long as name is generated, we are + // good. if name is explicit, update will fail, which is common when trying + // to replace cfn resources with explicit physical names + return this.onCreate(); + } + async isCreateComplete() { + return this.isUpdateComplete(); + } + async isUpdateComplete() { + const status = await this.queryStatus(); + return { + IsComplete: status === 'ACTIVE', + }; + } + async isDeleteComplete() { + const status = await this.queryStatus(); + return { + IsComplete: status === 'NOT_FOUND', + }; + } + /** + * Generates a fargate profile name. + */ + generateProfileName() { + const suffix = this.requestId.replace(/-/g, ''); // 32 chars + const offset = MAX_NAME_LEN - suffix.length - 1; + const prefix = this.logicalResourceId.slice(0, offset > 0 ? offset : 0); + return `${prefix}-${suffix}`; + } + /** + * Queries the Fargate profile's current status and returns the status or + * NOT_FOUND if the profile doesn't exist (i.e. it has been deleted). + */ + async queryStatus() { + if (!this.physicalResourceId) { + throw new Error('Unable to determine status for fargate profile without a resource name'); + } + const describeFargateProfile = { + clusterName: this.event.ResourceProperties.Config.clusterName, + fargateProfileName: this.physicalResourceId, + }; + try { + this.log({ describeFargateProfile }); + const describeFargateProfileResponse = await this.eks.describeFargateProfile(describeFargateProfile); + this.log({ describeFargateProfileResponse }); + const status = describeFargateProfileResponse.fargateProfile?.status; + if (status === 'CREATE_FAILED' || status === 'DELETE_FAILED') { + throw new Error(status); + } + return status; + } + catch (describeFargateProfileError) { + if (describeFargateProfileError.code === 'ResourceNotFoundException') { + this.log('received ResourceNotFoundException, this means the profile has been deleted (or never existed)'); + return 'NOT_FOUND'; + } + this.log({ describeFargateProfileError }); + throw describeFargateProfileError; + } + } +} +exports.FargateProfileResourceHandler = FargateProfileResourceHandler; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFyZ2F0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImZhcmdhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EscUNBQTJDO0FBRTNDLE1BQU0sWUFBWSxHQUFHLEVBQUUsQ0FBQztBQUV4QixNQUFhLDZCQUE4QixTQUFRLHdCQUFlO0lBQ3RELEtBQUssQ0FBQyxRQUFRO1FBQ3RCLE1BQU0sa0JBQWtCLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFNLENBQUMsa0JBQWtCLElBQUksSUFBSSxDQUFDLG1CQUFtQixFQUFFLENBQUM7UUFFakgsTUFBTSxvQkFBb0IsR0FBd0M7WUFDaEUsa0JBQWtCO1lBQ2xCLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFNO1NBQ3hDLENBQUM7UUFFRixJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsb0JBQW9CLEVBQUUsQ0FBQyxDQUFDO1FBQ25DLE1BQU0sNEJBQTRCLEdBQUcsTUFBTSxJQUFJLENBQUMsR0FBRyxDQUFDLG9CQUFvQixDQUFDLG9CQUFvQixDQUFDLENBQUM7UUFDL0YsSUFBSSxDQUFDLEdBQUcs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ciBleGlzdGVkKScpO1xuICAgICAgICByZXR1cm4gJ05PVF9GT1VORCc7XG4gICAgICB9XG5cbiAgICAgIHRoaXMubG9nKHsgZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yIH0pO1xuICAgICAgdGhyb3cgZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yO1xuICAgIH1cbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/fargate.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.ts similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/fargate.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/index.d.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/index.d.ts similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/index.d.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/index.d.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/index.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/index.js similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/index.js rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/index.js diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/index.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/index.ts similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517/index.ts rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/index.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7e5f48d1e79c915595d938c932b6f0101715a162780d01a55845367e014fbcda.zip b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7e5f48d1e79c915595d938c932b6f0101715a162780d01a55845367e014fbcda.zip index 22d14c992e600..4e72f4d0dd801 100644 Binary files a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7e5f48d1e79c915595d938c932b6f0101715a162780d01a55845367e014fbcda.zip and b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.7e5f48d1e79c915595d938c932b6f0101715a162780d01a55845367e014fbcda.zip differ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/apply/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/apply/__init__.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/apply/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/apply/__init__.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/get/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/get/__init__.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/get/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/get/__init__.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/helm/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/helm/__init__.py similarity index 93% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/helm/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/helm/__init__.py index b9a741c8972c4..a7b26b264118b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/helm/__init__.py +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/helm/__init__.py @@ -82,7 +82,7 @@ def helm_handler(event, context): if repository is not None and repository.startswith('oci://'): tmpdir = tempfile.TemporaryDirectory() - chart_dir = get_chart_from_oci(tmpdir.name, release, repository, version) + chart_dir = get_chart_from_oci(tmpdir.name, repository, version) chart = chart_dir helm('upgrade', release, chart, repository, values_file, namespace, version, wait, timeout, create_namespace) @@ -123,7 +123,7 @@ def get_oci_cmd(repository, version): return cmnd -def get_chart_from_oci(tmpdir, release, repository = None, version = None): +def get_chart_from_oci(tmpdir, repository = None, version = None): cmnd = get_oci_cmd(repository, version) @@ -135,7 +135,9 @@ def get_chart_from_oci(tmpdir, release, repository = None, version = None): output = subprocess.check_output(cmnd, stderr=subprocess.STDOUT, cwd=tmpdir, shell=True) logger.info(output) - return os.path.join(tmpdir, release) + # effectively returns "$tmpDir/$lastPartOfOCIUrl", because this is how helm pull saves OCI artifact. + # Eg. if we have oci://9999999999.dkr.ecr.us-east-1.amazonaws.com/foo/bar/pet-service repository, helm saves artifact under $tmpDir/pet-service + return os.path.join(tmpdir, repository.rpartition('/')[-1]) except subprocess.CalledProcessError as exc: output = exc.output if b'Broken pipe' in output: diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/index.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/index.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/index.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/index.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/patch/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/patch/__init__.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/patch/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/patch/__init__.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/cfn-response.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/cfn-response.js new file mode 100644 index 0000000000000..1966567b21646 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/cfn-response.js @@ -0,0 +1,87 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Retry = exports.safeHandler = exports.includeStackTraces = exports.submitResponse = exports.MISSING_PHYSICAL_ID_MARKER = exports.CREATE_FAILED_PHYSICAL_ID_MARKER = void 0; +/* eslint-disable max-len */ +/* eslint-disable no-console */ +const url = require("url"); +const outbound_1 = require("./outbound"); +const util_1 = require("./util"); +exports.CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; +exports.MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; +async function submitResponse(status, event, options = {}) { + const json = { + Status: status, + Reason: options.reason || status, + StackId: event.StackId, + RequestId: event.RequestId, + PhysicalResourceId: event.PhysicalResourceId || exports.MISSING_PHYSICAL_ID_MARKER, + LogicalResourceId: event.LogicalResourceId, + NoEcho: options.noEcho, + Data: event.Data, + }; + util_1.log('submit response to cloudformation', json); + const responseBody = JSON.stringify(json); + const parsedUrl = url.parse(event.ResponseURL); + const retryOptions = { + attempts: 5, + sleep: 1000, + }; + await util_1.withRetries(retryOptions, outbound_1.httpRequest)({ + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { + 'content-type': '', + 'content-length': responseBody.length, + }, + }, responseBody); +} +exports.submitResponse = submitResponse; +exports.includeStackTraces = true; // for unit tests +function safeHandler(block) { + return async (event) => { + // ignore DELETE event when the physical resource ID is the marker that + // indicates that this DELETE is a subsequent DELETE to a failed CREATE + // operation. + if (event.RequestType === 'Delete' && event.PhysicalResourceId === exports.CREATE_FAILED_PHYSICAL_ID_MARKER) { + util_1.log('ignoring DELETE event caused by a failed CREATE event'); + await submitResponse('SUCCESS', event); + return; + } + try { + await block(event); + } + catch (e) { + // tell waiter state machine to retry + if (e instanceof Retry) { + util_1.log('retry requested by handler'); + throw e; + } + if (!event.PhysicalResourceId) { + // special case: if CREATE fails, which usually implies, we usually don't + // have a physical resource id. in this case, the subsequent DELETE + // operation does not have any meaning, and will likely fail as well. to + // address this, we use a marker so the provider framework can simply + // ignore the subsequent DELETE. + if (event.RequestType === 'Create') { + util_1.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); + event.PhysicalResourceId = exports.CREATE_FAILED_PHYSICAL_ID_MARKER; + } + else { + // otherwise, if PhysicalResourceId is not specified, something is + // terribly wrong because all other events should have an ID. + util_1.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify({ ...event, ResponseURL: '...' })}`); + } + } + // this is an actual error, fail the activity altogether and exist. + await submitResponse('FAILED', event, { + reason: exports.includeStackTraces ? e.stack : e.message, + }); + } + }; +} +exports.safeHandler = safeHandler; +class Retry extends Error { +} +exports.Retry = Retry; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZuLXJlc3BvbnNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY2ZuLXJlc3BvbnNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDRCQUE0QjtBQUM1QiwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBQzNCLHlDQUF5QztBQUN6QyxpQ0FBMEM7QUFFN0IsUUFBQSxnQ0FBZ0MsR0FBRyx3REFBd0QsQ0FBQztBQUM1RixRQUFBLDBCQUEwQixHQUFHLDhEQUE4RCxDQUFDO0FBZ0JsRyxLQUFLLFVBQVUsY0FBYyxDQUFDLE1BQTRCLEVBQUUsS0FBaUMsRUFBRSxVQUF5QyxFQUFHO0lBQ2hKLE1BQU0sSUFBSSxHQUFtRDtRQUMzRCxNQUFNLEVBQUUsTUFBTTtRQUNkLE1BQU0sRUFBRSxPQU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YXRlJykge1xuICAgICAgICAgIGxvZygnQ1JFQVRFIGZhaWxlZCwgcmVzcG9uZGluZyB3aXRoIGEgbWFya2VyIHBoeXNpY2FsIHJlc291cmNlIGlkIHNvIHRoYXQgdGhlIHN1YnNlcXVlbnQgREVMRVRFIHdpbGwgYmUgaWdub3JlZCcpO1xuICAgICAgICAgIGV2ZW50LlBoeXNpY2FsUmVzb3VyY2VJZCA9IENSRUFURV9GQUlMRURfUEhZU0lDQUxfSURfTUFSS0VSO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIG90aGVyd2lzZSwgaWYgUGh5c2ljYWxSZXNvdXJjZUlkIGlzIG5vdCBzcGVjaWZpZWQsIHNvbWV0aGluZyBpc1xuICAgICAgICAgIC8vIHRlcnJpYmx5IHdyb25nIGJlY2F1c2UgYWxsIG90aGVyIGV2ZW50cyBzaG91bGQgaGF2ZSBhbiBJRC5cbiAgICAgICAgICBsb2coYEVSUk9SOiBNYWxmb3JtZWQgZXZlbnQuIFwiUGh5c2ljYWxSZXNvdXJjZUlkXCIgaXMgcmVxdWlyZWQ6ICR7SlNPTi5zdHJpbmdpZnkoeyAuLi5ldmVudCwgUmVzcG9uc2VVUkw6ICcuLi4nIH0pfWApO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIC8vIHRoaXMgaXMgYW4gYWN0dWFsIGVycm9yLCBmYWlsIHRoZSBhY3Rpdml0eSBhbHRvZ2V0aGVyIGFuZCBleGlzdC5cbiAgICAgIGF3YWl0IHN1Ym1pdFJlc3BvbnNlKCdGQUlMRUQnLCBldmVudCwge1xuICAgICAgICByZWFzb246IGluY2x1ZGVTdGFja1RyYWNlcyA/IGUuc3RhY2sgOiBlLm1lc3NhZ2UsXG4gICAgICB9KTtcbiAgICB9XG4gIH07XG59XG5cbmV4cG9ydCBjbGFzcyBSZXRyeSBleHRlbmRzIEVycm9yIHsgfVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/consts.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/consts.js new file mode 100644 index 0000000000000..31faa077ae313 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/consts.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FRAMEWORK_ON_TIMEOUT_HANDLER_NAME = exports.FRAMEWORK_IS_COMPLETE_HANDLER_NAME = exports.FRAMEWORK_ON_EVENT_HANDLER_NAME = exports.WAITER_STATE_MACHINE_ARN_ENV = exports.USER_IS_COMPLETE_FUNCTION_ARN_ENV = exports.USER_ON_EVENT_FUNCTION_ARN_ENV = void 0; +exports.USER_ON_EVENT_FUNCTION_ARN_ENV = 'USER_ON_EVENT_FUNCTION_ARN'; +exports.USER_IS_COMPLETE_FUNCTION_ARN_ENV = 'USER_IS_COMPLETE_FUNCTION_ARN'; +exports.WAITER_STATE_MACHINE_ARN_ENV = 'WAITER_STATE_MACHINE_ARN'; +exports.FRAMEWORK_ON_EVENT_HANDLER_NAME = 'onEvent'; +exports.FRAMEWORK_IS_COMPLETE_HANDLER_NAME = 'isComplete'; +exports.FRAMEWORK_ON_TIMEOUT_HANDLER_NAME = 'onTimeout'; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29uc3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFhLFFBQUEsOEJBQThCLEdBQUcsNEJBQTRCLENBQUM7QUFDOUQsUUFBQSxpQ0FBaUMsR0FBRywrQkFBK0IsQ0FBQztBQUNwRSxRQUFBLDRCQUE0QixHQUFHLDBCQUEwQixDQUFDO0FBRTFELFFBQUEsK0JBQStCLEdBQUcsU0FBUyxDQUFDO0FBQzVDLFFBQUEsa0NBQWtDLEdBQUcsWUFBWSxDQUFDO0FBQ2xELFFBQUEsaUNBQWlDLEdBQUcsV0FBVyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IFVTRVJfT05fRVZFTlRfRlVOQ1RJT05fQVJOX0VOViA9ICdVU0VSX09OX0VWRU5UX0ZVTkNUSU9OX0FSTic7XG5leHBvcnQgY29uc3QgVVNFUl9JU19DT01QTEVURV9GVU5DVElPTl9BUk5fRU5WID0gJ1VTRVJfSVNfQ09NUExFVEVfRlVOQ1RJT05fQVJOJztcbmV4cG9ydCBjb25zdCBXQUlURVJfU1RBVEVfTUFDSElORV9BUk5fRU5WID0gJ1dBSVRFUl9TVEFURV9NQUNISU5FX0FSTic7XG5cbmV4cG9ydCBjb25zdCBGUkFNRVdPUktfT05fRVZFTlRfSEFORExFUl9OQU1FID0gJ29uRXZlbnQnO1xuZXhwb3J0IGNvbnN0IEZSQU1FV09SS19JU19DT01QTEVURV9IQU5ETEVSX05BTUUgPSAnaXNDb21wbGV0ZSc7XG5leHBvcnQgY29uc3QgRlJBTUVXT1JLX09OX1RJTUVPVVRfSEFORExFUl9OQU1FID0gJ29uVGltZW91dCc7XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/framework.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/framework.js new file mode 100644 index 0000000000000..3f8a03e88aae0 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/framework.js @@ -0,0 +1,168 @@ +"use strict"; +const cfnResponse = require("./cfn-response"); +const consts = require("./consts"); +const outbound_1 = require("./outbound"); +const util_1 = require("./util"); +/** + * The main runtime entrypoint of the async custom resource lambda function. + * + * Any lifecycle event changes to the custom resources will invoke this handler, which will, in turn, + * interact with the user-defined `onEvent` and `isComplete` handlers. + * + * This function will always succeed. If an error occurs + * + * @param cfnRequest The cloudformation custom resource event. + */ +async function onEvent(cfnRequest) { + const sanitizedRequest = { ...cfnRequest, ResponseURL: '...' }; + util_1.log('onEventHandler', sanitizedRequest); + cfnRequest.ResourceProperties = cfnRequest.ResourceProperties || {}; + const onEventResult = await invokeUserFunction(consts.USER_ON_EVENT_FUNCTION_ARN_ENV, sanitizedRequest, cfnRequest.ResponseURL); + util_1.log('onEvent returned:', onEventResult); + // merge the request and the result from onEvent to form the complete resource event + // this also performs validation. + const resourceEvent = createResponseEvent(cfnRequest, onEventResult); + util_1.log('event:', onEventResult); + // determine if this is an async provider based on whether we have an isComplete handler defined. + // if it is not defined, then we are basically ready to return a positive response. + if (!process.env[consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV]) { + return cfnResponse.submitResponse('SUCCESS', resourceEvent, { noEcho: resourceEvent.NoEcho }); + } + // ok, we are not complete, so kick off the waiter workflow + const waiter = { + stateMachineArn: util_1.getEnv(consts.WAITER_STATE_MACHINE_ARN_ENV), + name: resourceEvent.RequestId, + input: JSON.stringify(resourceEvent), + }; + util_1.log('starting waiter', waiter); + // kick off waiter state machine + await outbound_1.startExecution(waiter); +} +// invoked a few times until `complete` is true or until it times out. +async function isComplete(event) { + const sanitizedRequest = { ...event, ResponseURL: '...' }; + util_1.log('isComplete', sanitizedRequest); + const isCompleteResult = await invokeUserFunction(consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV, sanitizedRequest, event.ResponseURL); + util_1.log('user isComplete returned:', isCompleteResult); + // if we are not complete, return false, and don't send a response back. + if (!isCompleteResult.IsComplete) { + if (isCompleteResult.Data && Object.keys(isCompleteResult.Data).length > 0) { + throw new Error('"Data" is not allowed if "IsComplete" is "False"'); + } + // This must be the full event, it will be deserialized in `onTimeout` to send the response to CloudFormation + throw new cfnResponse.Retry(JSON.stringify(event)); + } + const response = { + ...event, + ...isCompleteResult, + Data: { + ...event.Data, + ...isCompleteResult.Data, + }, + }; + await cfnResponse.submitResponse('SUCCESS', response, { noEcho: event.NoEcho }); +} +// invoked when completion retries are exhaused. +async function onTimeout(timeoutEvent) { + util_1.log('timeoutHandler', timeoutEvent); + const isCompleteRequest = JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage); + await cfnResponse.submitResponse('FAILED', isCompleteRequest, { + reason: 'Operation timed out', + }); +} +async function invokeUserFunction(functionArnEnv, sanitizedPayload, responseUrl) { + const functionArn = util_1.getEnv(functionArnEnv); + util_1.log(`executing user function ${functionArn} with payload`, sanitizedPayload); + // transient errors such as timeouts, throttling errors (429), and other + // errors that aren't caused by a bad request (500 series) are retried + // automatically by the JavaScript SDK. + const resp = await outbound_1.invokeFunction({ + FunctionName: functionArn, + // Cannot strip 'ResponseURL' here as this would be a breaking change even though the downstream CR doesn't need it + Payload: JSON.stringify({ ...sanitizedPayload, ResponseURL: responseUrl }), + }); + util_1.log('user function response:', resp, typeof (resp)); + const jsonPayload = parseJsonPayload(resp.Payload); + if (resp.FunctionError) { + util_1.log('user function threw an error:', resp.FunctionError); + const errorMessage = jsonPayload.errorMessage || 'error'; + // parse function name from arn + // arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName} + const arn = functionArn.split(':'); + const functionName = arn[arn.length - 1]; + // append a reference to the log group. + const message = [ + errorMessage, + '', + `Logs: /aws/lambda/${functionName}`, + '', + ].join('\n'); + const e = new Error(message); + // the output that goes to CFN is what's in `stack`, not the error message. + // if we have a remote trace, construct a nice message with log group information + if (jsonPayload.trace) { + // skip first trace line because it's the message + e.stack = [message, ...jsonPayload.trace.slice(1)].join('\n'); + } + throw e; + } + return jsonPayload; +} +function parseJsonPayload(payload) { + if (!payload) { + return {}; + } + const text = payload.toString(); + try { + return JSON.parse(text); + } + catch (e) { + throw new Error(`return values from user-handlers must be JSON objects. got: "${text}"`); + } +} +function createResponseEvent(cfnRequest, onEventResult) { + // + // validate that onEventResult always includes a PhysicalResourceId + onEventResult = onEventResult || {}; + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = onEventResult.PhysicalResourceId || defaultPhysicalResourceId(cfnRequest); + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}" during deletion`); + } + // if we are in UPDATE and physical ID was changed, it's a replacement (just log) + if (cfnRequest.RequestType === 'Update' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + util_1.log(`UPDATE: changing physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}"`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...onEventResult, + PhysicalResourceId: physicalResourceId, + }; +} +/** + * Calculates the default physical resource ID based in case user handler did + * not return a PhysicalResourceId. + * + * For "CREATE", it uses the RequestId. + * For "UPDATE" and "DELETE" and returns the current PhysicalResourceId (the one provided in `event`). + */ +function defaultPhysicalResourceId(req) { + switch (req.RequestType) { + case 'Create': + return req.RequestId; + case 'Update': + case 'Delete': + return req.PhysicalResourceId; + default: + throw new Error(`Invalid "RequestType" in request "${JSON.stringify(req)}"`); + } +} +module.exports = { + [consts.FRAMEWORK_ON_EVENT_HANDLER_NAME]: cfnResponse.safeHandler(onEvent), + [consts.FRAMEWORK_IS_COMPLETE_HANDLER_NAME]: cfnResponse.safeHandler(isComplete), + [consts.FRAMEWORK_ON_TIMEOUT_HANDLER_NAME]: onTime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FtYmRhLkNsb3VkRm9ybWF0aW9uQ3VzdG9tUmVzb3VyY2VFdmVudCk6IHN0cmluZyB7XG4gIHN3aXRjaCAocmVxLlJlcXVlc3RUeXBlKSB7XG4gICAgY2FzZSAnQ3JlYXRlJzpcbiAgICAgIHJldHVybiByZXEuUmVxdWVzdElkO1xuXG4gICAgY2FzZSAnVXBkYXRlJzpcbiAgICBjYXNlICdEZWxldGUnOlxuICAgICAgcmV0dXJuIHJlcS5QaHlzaWNhbFJlc291cmNlSWQ7XG5cbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKGBJbnZhbGlkIFwiUmVxdWVzdFR5cGVcIiBpbiByZXF1ZXN0IFwiJHtKU09OLnN0cmluZ2lmeShyZXEpfVwiYCk7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/outbound.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/outbound.js new file mode 100644 index 0000000000000..cc0667d42f0e8 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/outbound.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.httpRequest = exports.invokeFunction = exports.startExecution = void 0; +/* istanbul ignore file */ +const https = require("https"); +// eslint-disable-next-line import/no-extraneous-dependencies +const AWS = require("aws-sdk"); +const FRAMEWORK_HANDLER_TIMEOUT = 900000; // 15 minutes +// In order to honor the overall maximum timeout set for the target process, +// the default 2 minutes from AWS SDK has to be overriden: +// https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#httpOptions-property +const awsSdkConfig = { + httpOptions: { timeout: FRAMEWORK_HANDLER_TIMEOUT }, +}; +async function defaultHttpRequest(options, responseBody) { + return new Promise((resolve, reject) => { + try { + const request = https.request(options, resolve); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); +} +let sfn; +let lambda; +async function defaultStartExecution(req) { + if (!sfn) { + sfn = new AWS.StepFunctions(awsSdkConfig); + } + return sfn.startExecution(req).promise(); +} +async function defaultInvokeFunction(req) { + if (!lambda) { + lambda = new AWS.Lambda(awsSdkConfig); + } + try { + /** + * Try an initial invoke. + * + * When you try to invoke a function that is inactive, the invocation fails and Lambda sets + * the function to pending state until the function resources are recreated. + * If Lambda fails to recreate the resources, the function is set to the inactive state. + * + * We're using invoke first because `waitFor` doesn't trigger an inactive function to do anything, + * it just runs `getFunction` and checks the state. + */ + return await lambda.invoke(req).promise(); + } + catch (error) { + /** + * The status of the Lambda function is checked every second for up to 300 seconds. + * Exits the loop on 'Active' state and throws an error on 'Inactive' or 'Failed'. + * + * And now we wait. + */ + await lambda.waitFor('functionActiveV2', { + FunctionName: req.FunctionName, + }).promise(); + return await lambda.invoke(req).promise(); + } +} +exports.startExecution = defaultStartExecution; +exports.invokeFunction = defaultInvokeFunction; +exports.httpRequest = defaultHttpRequest; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0Ym91bmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJvdXRib3VuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwQkFBMEI7QUFDMUIsK0JBQStCO0FBQy9CLDZEQUE2RDtBQUM3RCwrQkFBK0I7QUFJL0IsTUFBTSx5QkFBeUIsR0FBRyxNQUFNLENBQUMsQ0FBQyxhQUFhO0FBRXZELDRFQUE0RTtBQUM1RSwwREFBMEQ7QUFDMUQsMkZBQTJGO0FBQzNGLE1BQU0sWUFBWS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CB0cmlnZ2VyIGFuIGluYWN0aXZlIGZ1bmN0aW9uIHRvIGRvIGFueXRoaW5nLFxuICAgICAqIGl0IGp1c3QgcnVucyBgZ2V0RnVuY3Rpb25gIGFuZCBjaGVja3MgdGhlIHN0YXRlLlxuICAgICAqL1xuICAgIHJldHVybiBhd2FpdCBsYW1iZGEuaW52b2tlKHJlcSkucHJvbWlzZSgpO1xuICB9IGNhdGNoIChlcnJvcikge1xuXG4gICAgLyoqXG4gICAgICogVGhlIHN0YXR1cyBvZiB0aGUgTGFtYmRhIGZ1bmN0aW9uIGlzIGNoZWNrZWQgZXZlcnkgc2Vjb25kIGZvciB1cCB0byAzMDAgc2Vjb25kcy5cbiAgICAgKiBFeGl0cyB0aGUgbG9vcCBvbiAnQWN0aXZlJyBzdGF0ZSBhbmQgdGhyb3dzIGFuIGVycm9yIG9uICdJbmFjdGl2ZScgb3IgJ0ZhaWxlZCcuXG4gICAgICpcbiAgICAgKiBBbmQgbm93IHdlIHdhaXQuXG4gICAgICovXG4gICAgYXdhaXQgbGFtYmRhLndhaXRGb3IoJ2Z1bmN0aW9uQWN0aXZlVjInLCB7XG4gICAgICBGdW5jdGlvbk5hbWU6IHJlcS5GdW5jdGlvbk5hbWUsXG4gICAgfSkucHJvbWlzZSgpO1xuICAgIHJldHVybiBhd2FpdCBsYW1iZGEuaW52b2tlKHJlcSkucHJvbWlzZSgpO1xuICB9XG59XG5cbmV4cG9ydCBsZXQgc3RhcnRFeGVjdXRpb24gPSBkZWZhdWx0U3RhcnRFeGVjdXRpb247XG5leHBvcnQgbGV0IGludm9rZUZ1bmN0aW9uID0gZGVmYXVsdEludm9rZUZ1bmN0aW9uO1xuZXhwb3J0IGxldCBodHRwUmVxdWVzdCA9IGRlZmF1bHRIdHRwUmVxdWVzdDtcbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/util.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/util.js new file mode 100644 index 0000000000000..f09276d40ac91 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585/util.js @@ -0,0 +1,39 @@ +"use strict"; +/* eslint-disable no-console */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withRetries = exports.log = exports.getEnv = void 0; +function getEnv(name) { + const value = process.env[name]; + if (!value) { + throw new Error(`The environment variable "${name}" is not defined`); + } + return value; +} +exports.getEnv = getEnv; +function log(title, ...args) { + console.log('[provider-framework]', title, ...args.map(x => typeof (x) === 'object' ? JSON.stringify(x, undefined, 2) : x)); +} +exports.log = log; +function withRetries(options, fn) { + return async (...xs) => { + let attempts = options.attempts; + let ms = options.sleep; + while (true) { + try { + return await fn(...xs); + } + catch (e) { + if (attempts-- <= 0) { + throw e; + } + await sleep(Math.floor(Math.random() * ms)); + ms *= 2; + } + } + }; +} +exports.withRetries = withRetries; +async function sleep(ms) { + return new Promise((ok) => setTimeout(ok, ms)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtCQUErQjs7O0FBRS9CLFNBQWdCLE1BQU0sQ0FBQyxJQUFZO0lBQ2pDLE1BQU0sS0FBSyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDaEMsSUFBSSxDQUFDLEtBQUssRUFBRTtRQUNWLE1BQU0sSUFBSSxLQUFLLENBQUMsNkJBQTZCLElBQUksa0JBQWtC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WJlcjtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHdpdGhSZXRyaWVzPEEgZXh0ZW5kcyBBcnJheTxhbnk+LCBCPihvcHRpb25zOiBSZXRyeU9wdGlvbnMsIGZuOiAoLi4ueHM6IEEpID0+IFByb21pc2U8Qj4pOiAoLi4ueHM6IEEpID0+IFByb21pc2U8Qj4ge1xuICByZXR1cm4gYXN5bmMgKC4uLnhzOiBBKSA9PiB7XG4gICAgbGV0IGF0dGVtcHRzID0gb3B0aW9ucy5hdHRlbXB0cztcbiAgICBsZXQgbXMgPSBvcHRpb25zLnNsZWVwO1xuICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICB0cnkge1xuICAgICAgICByZXR1cm4gYXdhaXQgZm4oLi4ueHMpO1xuICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICBpZiAoYXR0ZW1wdHMtLSA8PSAwKSB7XG4gICAgICAgICAgdGhyb3cgZTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiBtcykpO1xuICAgICAgICBtcyAqPSAyO1xuICAgICAgfVxuICAgIH1cbiAgfTtcbn1cblxuYXN5bmMgZnVuY3Rpb24gc2xlZXAobXM6IG51bWJlcik6IFByb21pc2U8dm9pZD4ge1xuICByZXR1cm4gbmV3IFByb21pc2UoKG9rKSA9PiBzZXRUaW1lb3V0KG9rLCBtcykpO1xufSJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip index 23f4ca7350c88..ce3ea448ac19d 100644 Binary files a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip and b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip differ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/aws-stepfunctions-tasks-eks-call-integ-test.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/aws-stepfunctions-tasks-eks-call-integ-test.assets.json index 5c66196cdc2ae..48c34232a2aca 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/aws-stepfunctions-tasks-eks-call-integ-test.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/aws-stepfunctions-tasks-eks-call-integ-test.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1": { "source": { @@ -14,41 +14,41 @@ } } }, - "73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517": { + "76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5": { "source": { - "path": "asset.73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517", + "path": "asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517.zip", + "objectKey": "76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037": { + "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585": { "source": { - "path": "asset.7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037", + "path": "asset.a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip", + "objectKey": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33": { + "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd": { "source": { - "path": "asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33", + "path": "asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33.zip", + "objectKey": "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -79,7 +79,7 @@ } } }, - "ab1f5372b52388fd8dceda376970ae31c23eff6f926bb1d1c90889974acd8aa6": { + "8d5969a90e2e720721ef401f4a46a8d1c61cb13e72e729538898ef747c3641ac": { "source": { "path": "awsstepfunctionstasksekscallintegtestawscdkawseksClusterResourceProvider412BC189.nested.template.json", "packaging": "file" @@ -87,12 +87,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ab1f5372b52388fd8dceda376970ae31c23eff6f926bb1d1c90889974acd8aa6.json", + "objectKey": "8d5969a90e2e720721ef401f4a46a8d1c61cb13e72e729538898ef747c3641ac.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "d9569b5b5ca48d9e729a43807b8481526445aa96dbdc41909c05a0685ca01a5a": { + "2a398731934eca1054c33c88ad3e4128309643d200092ff00c7605e8965451cc": { "source": { "path": "awsstepfunctionstasksekscallintegtestawscdkawseksKubectlProvider65D285A0.nested.template.json", "packaging": "file" @@ -100,12 +100,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d9569b5b5ca48d9e729a43807b8481526445aa96dbdc41909c05a0685ca01a5a.json", + "objectKey": "2a398731934eca1054c33c88ad3e4128309643d200092ff00c7605e8965451cc.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "24a6e6d5d9bc63ccfd8738856ecf2d3dd23da4ffff09e3c9c040cf5855108a3f": { + "9a5ccbde1de37acad0d352a3fc3a1b1615c04d758008522a66e1fb1c087310a5": { "source": { "path": "aws-stepfunctions-tasks-eks-call-integ-test.template.json", "packaging": "file" @@ -113,7 +113,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "24a6e6d5d9bc63ccfd8738856ecf2d3dd23da4ffff09e3c9c040cf5855108a3f.json", + "objectKey": "9a5ccbde1de37acad0d352a3fc3a1b1615c04d758008522a66e1fb1c087310a5.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-stepfunctions-tasks/test/eks/integ.call.js.snapshot/aws-stepfunctions-tasks-eks-call-integ-test.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/aws-stepfunctions-tasks-eks-call-integ-test.template.json index c4bfd695fd733..45b2cdc39c34c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/aws-stepfunctions-tasks-eks-call-integ-test.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/aws-stepfunctions-tasks-eks-call-integ-test.template.json @@ -996,7 +996,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/ab1f5372b52388fd8dceda376970ae31c23eff6f926bb1d1c90889974acd8aa6.json" + "/8d5969a90e2e720721ef401f4a46a8d1c61cb13e72e729538898ef747c3641ac.json" ] ] }, @@ -1031,7 +1031,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/d9569b5b5ca48d9e729a43807b8481526445aa96dbdc41909c05a0685ca01a5a.json" + "/2a398731934eca1054c33c88ad3e4128309643d200092ff00c7605e8965451cc.json" ] ] }, @@ -1131,7 +1131,9 @@ }, "DependsOn": [ "Role1ABCC5F0" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegDefaultTestDeployAssert2DF4AD1E.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegDefaultTestDeployAssert2DF4AD1E.assets.json index 16c5c870d5acf..3e37b187392c6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegDefaultTestDeployAssert2DF4AD1E.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegDefaultTestDeployAssert2DF4AD1E.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegtestawscdkawseksClusterResourceProvider412BC189.nested.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegtestawscdkawseksClusterResourceProvider412BC189.nested.template.json index bd8b9160d09d6..504a30f0d65b5 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegtestawscdkawseksClusterResourceProvider412BC189.nested.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegtestawscdkawseksClusterResourceProvider412BC189.nested.template.json @@ -73,7 +73,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517.zip" + "S3Key": "76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5.zip" }, "Role": { "Fn::GetAtt": [ @@ -162,7 +162,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517.zip" + "S3Key": "76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5.zip" }, "Role": { "Fn::GetAtt": [ @@ -297,7 +297,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + "S3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" }, "Role": { "Fn::GetAtt": [ @@ -434,7 +434,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + "S3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" }, "Role": { "Fn::GetAtt": [ @@ -568,7 +568,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + "S3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegtestawscdkawseksKubectlProvider65D285A0.nested.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegtestawscdkawseksKubectlProvider65D285A0.nested.template.json index 78460bf0f4576..c48d6b8e26afb 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegtestawscdkawseksKubectlProvider65D285A0.nested.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/awsstepfunctionstasksekscallintegtestawscdkawseksKubectlProvider65D285A0.nested.template.json @@ -92,7 +92,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33.zip" + "S3Key": "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd.zip" }, "Role": { "Fn::GetAtt": [ @@ -250,7 +250,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + "S3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/integ.json index 835b8e25b4d6c..b2e0b69af5538 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "aws-stepfunctions-tasks-eks-call-integ/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/manifest.json index 0f56d56dcb535..a2c620649373b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-eks-call-integ-test.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}/24a6e6d5d9bc63ccfd8738856ecf2d3dd23da4ffff09e3c9c040cf5855108a3f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9a5ccbde1de37acad0d352a3fc3a1b1615c04d758008522a66e1fb1c087310a5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/tree.json index f9b010aa5dd41..a80b88576947a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eks/integ.call.js.snapshot/tree.json @@ -707,6 +707,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/Role/Resource", @@ -794,6 +802,14 @@ "id": "CreationRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/Resource/CreationRole", "children": { + "ImportCreationRole": { + "id": "ImportCreationRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/Resource/CreationRole/ImportCreationRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/Resource/CreationRole/Resource", @@ -1004,7 +1020,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "KubectlReadyBarrier": { @@ -1027,6 +1043,14 @@ "id": "MastersRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/MastersRole", "children": { + "ImportMastersRole": { + "id": "ImportMastersRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/MastersRole/ImportMastersRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/MastersRole/Resource", @@ -1119,6 +1143,14 @@ "id": "NodeGroupRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/NodegroupDefaultCapacity/NodeGroupRole", "children": { + "ImportNodeGroupRole": { + "id": "ImportNodeGroupRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/NodegroupDefaultCapacity/NodeGroupRole/ImportNodeGroupRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/EksCluster/NodegroupDefaultCapacity/NodeGroupRole/Resource", @@ -1324,6 +1356,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/OnEventHandler/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/OnEventHandler/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/OnEventHandler/ServiceRole/Resource", @@ -1446,7 +1486,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517.zip" + "s3Key": "76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5.zip" }, "role": { "Fn::GetAtt": [ @@ -1489,6 +1529,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/IsCompleteHandler/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/IsCompleteHandler/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/IsCompleteHandler/ServiceRole/Resource", @@ -1611,7 +1659,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "73edfa4462023915a2f13bf570acae05c5111817c606f9837f832152920ba517.zip" + "s3Key": "76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5.zip" }, "role": { "Fn::GetAtt": [ @@ -1658,6 +1706,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/framework-onEvent/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/framework-onEvent/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/framework-onEvent/ServiceRole/Resource", @@ -1826,7 +1882,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + "s3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" }, "role": { "Fn::GetAtt": [ @@ -1878,6 +1934,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/framework-isComplete/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/framework-isComplete/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/framework-isComplete/ServiceRole/Resource", @@ -2039,7 +2103,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + "s3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" }, "role": { "Fn::GetAtt": [ @@ -2088,6 +2152,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/framework-onTimeout/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/framework-onTimeout/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/framework-onTimeout/ServiceRole/Resource", @@ -2249,7 +2321,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + "s3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" }, "role": { "Fn::GetAtt": [ @@ -2298,6 +2370,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/waiter-state-machine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/waiter-state-machine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.ClusterResourceProvider/Provider/waiter-state-machine/Role/Resource", @@ -2420,7 +2500,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, @@ -2477,7 +2557,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/ab1f5372b52388fd8dceda376970ae31c23eff6f926bb1d1c90889974acd8aa6.json" + "/8d5969a90e2e720721ef401f4a46a8d1c61cb13e72e729538898ef747c3641ac.json" ] ] }, @@ -2499,7 +2579,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "@aws-cdk--aws-eks.KubectlProvider": { @@ -2514,6 +2594,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.KubectlProvider/Handler/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.KubectlProvider/Handler/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.KubectlProvider/Handler/ServiceRole/Resource", @@ -2667,7 +2755,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33.zip" + "s3Key": "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd.zip" }, "role": { "Fn::GetAtt": [ @@ -2840,6 +2928,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.KubectlProvider/Provider/framework-onEvent/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.KubectlProvider/Provider/framework-onEvent/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/@aws-cdk--aws-eks.KubectlProvider/Provider/framework-onEvent/ServiceRole/Resource", @@ -2993,7 +3089,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "7215c88dd3e638d28329d4538b36cdbfb54233a4d972181795814f8b904d1037.zip" + "s3Key": "a8a62b989c7866e3ad5b24f3eb6228f8ca91ebff5f5c76f1da466f6c805c0585.zip" }, "role": { "Fn::GetAtt": [ @@ -3129,7 +3225,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/d9569b5b5ca48d9e729a43807b8481526445aa96dbdc41909c05a0685ca01a5a.json" + "/2a398731934eca1054c33c88ad3e4128309643d200092ff00c7605e8965451cc.json" ] ] }, @@ -3169,13 +3265,21 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "Role": { "id": "Role", "path": "aws-stepfunctions-tasks-eks-call-integ-test/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-eks-call-integ-test/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eks-call-integ-test/Role/Resource", @@ -3318,7 +3422,7 @@ "path": "aws-stepfunctions-tasks-eks-call-integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "DeployAssert": { @@ -3364,7 +3468,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip index d1065f07d934c..298edd40a09fc 100644 Binary files a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip and b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip differ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js index a4c5ba868774f..1d08e9d7b865b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js @@ -270,4 +270,4 @@ function analyzeUpdate(oldProps, newProps) { function setsEqual(first, second) { return first.size === second.size && [...first].every((e) => second.has(e)); } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNsdXN0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mluZ2lmeShuZXdFbmMpICE9PSBKU09OLnN0cmluZ2lmeShvbGRFbmMpLFxuICAgIHVwZGF0ZUxvZ2dpbmc6IEpTT04uc3RyaW5naWZ5KG5ld1Byb3BzLmxvZ2dpbmcpICE9PSBKU09OLnN0cmluZ2lmeShvbGRQcm9wcy5sb2dnaW5nKSxcbiAgfTtcbn1cblxuZnVuY3Rpb24gc2V0c0VxdWFsKGZpcnN0OiBTZXQ8c3RyaW5nPiwgc2Vjb25kOiBTZXQ8c3RyaW5nPikge1xuICByZXR1cm4gZmlyc3Quc2l6ZSA9PT0gc2Vjb25kLnNpemUgJiYgWy4uLmZpcnN0XS5ldmVyeSgoZTogc3RyaW5nKSA9PiBzZWNvbmQuaGFzKGUpKTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js index a5480014d5fc4..5dbf4000517e4 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js @@ -40,4 +40,4 @@ class ResourceHandler { } } exports.ResourceHandler = ResourceHandler; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3Mi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IGF3cy5FS1MuRGVsZXRlRmFyZ2F0ZVByb2ZpbGVSZXF1ZXN0KTogUHJvbWlzZTxhd3MuRUtTLkRlbGV0ZUZhcmdhdGVQcm9maWxlUmVzcG9uc2U+O1xufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js index 91815a754a525..f74022f9be26d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js @@ -99,4 +99,4 @@ class FargateProfileResourceHandler extends common_1.ResourceHandler { } } exports.FargateProfileResourceHandler = FargateProfileResourceHandler; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFyZ2F0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImZhcmdhdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EscUNBQTJDO0FBRTNDLE1BQU0sWUFBWSxHQUFHLEVBQUUsQ0FBQztBQUV4QixNQUFhLDZCQUE4QixTQUFRLHdCQUFlO0lBQ3RELEtBQUssQ0FBQyxRQUFRO1FBQ3RCLE1BQU0sa0JBQWtCLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFNLENBQUMsa0JBQWtCLElBQUksS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cbiAgICAgIHJldHVybiBzdGF0dXM7XG4gICAgfSBjYXRjaCAoZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yKSB7XG4gICAgICBpZiAoZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yLmNvZGUgPT09ICdSZXNvdXJjZU5vdEZvdW5kRXhjZXB0aW9uJykge1xuICAgICAgICB0aGlzLmxvZygncmVjZWl2ZWQgUmVzb3VyY2VOb3RGb3VuZEV4Y2VwdGlvbiwgdGhpcyBtZWFucyB0aGUgcHJvZmlsZSBoYXMgYmVlbiBkZWxldGVkIChvciBuZXZlciBleGlzdGVkKScpO1xuICAgICAgICByZXR1cm4gJ05PVF9GT1VORCc7XG4gICAgICB9XG5cbiAgICAgIHRoaXMubG9nKHsgZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yIH0pO1xuICAgICAgdGhyb3cgZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yO1xuICAgIH1cbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/apply/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/apply/__init__.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/apply/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/apply/__init__.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/get/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/get/__init__.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/get/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/get/__init__.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/helm/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/helm/__init__.py similarity index 93% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/helm/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/helm/__init__.py index b9a741c8972c4..a7b26b264118b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/helm/__init__.py +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/helm/__init__.py @@ -82,7 +82,7 @@ def helm_handler(event, context): if repository is not None and repository.startswith('oci://'): tmpdir = tempfile.TemporaryDirectory() - chart_dir = get_chart_from_oci(tmpdir.name, release, repository, version) + chart_dir = get_chart_from_oci(tmpdir.name, repository, version) chart = chart_dir helm('upgrade', release, chart, repository, values_file, namespace, version, wait, timeout, create_namespace) @@ -123,7 +123,7 @@ def get_oci_cmd(repository, version): return cmnd -def get_chart_from_oci(tmpdir, release, repository = None, version = None): +def get_chart_from_oci(tmpdir, repository = None, version = None): cmnd = get_oci_cmd(repository, version) @@ -135,7 +135,9 @@ def get_chart_from_oci(tmpdir, release, repository = None, version = None): output = subprocess.check_output(cmnd, stderr=subprocess.STDOUT, cwd=tmpdir, shell=True) logger.info(output) - return os.path.join(tmpdir, release) + # effectively returns "$tmpDir/$lastPartOfOCIUrl", because this is how helm pull saves OCI artifact. + # Eg. if we have oci://9999999999.dkr.ecr.us-east-1.amazonaws.com/foo/bar/pet-service repository, helm saves artifact under $tmpDir/pet-service + return os.path.join(tmpdir, repository.rpartition('/')[-1]) except subprocess.CalledProcessError as exc: output = exc.output if b'Broken pipe' in output: diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/index.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/index.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/index.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/index.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/patch/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/patch/__init__.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/patch/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/patch/__init__.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip index e3828a91bf834..ce3ea448ac19d 100644 Binary files a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip and b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip differ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/aws-stepfunctions-tasks-emr-containers-all-services-test.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/aws-stepfunctions-tasks-emr-containers-all-services-test.assets.json index 574ba8aab01e9..5264c7c63073b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/aws-stepfunctions-tasks-emr-containers-all-services-test.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/aws-stepfunctions-tasks-emr-containers-all-services-test.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "files": { "ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1": { "source": { @@ -40,15 +40,15 @@ } } }, - "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33": { + "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd": { "source": { - "path": "asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33", + "path": "asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33.zip", + "objectKey": "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -92,7 +92,7 @@ } } }, - "078e55288c69daf4cbec71071e06b4521696cfc95fc10f09a77d592a5fec7c63": { + "64935f5256b8a6a408fe03c069615fe7d74eedd9e98cfab64bfc6de60e4207bf": { "source": { "path": "awsstepfunctionstasksemrcontainersallservicestestawscdkawseksKubectlProviderD9DFA1E3.nested.template.json", "packaging": "file" @@ -100,12 +100,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "078e55288c69daf4cbec71071e06b4521696cfc95fc10f09a77d592a5fec7c63.json", + "objectKey": "64935f5256b8a6a408fe03c069615fe7d74eedd9e98cfab64bfc6de60e4207bf.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "8477280e97a587c3db83ec698c13380f4409b28c111c2dd00de269cc1d3b10a0": { + "fb60dad6258f36a2ef48b66ae220c4f7de6a319c89b75b23610f2803cbe36eb6": { "source": { "path": "aws-stepfunctions-tasks-emr-containers-all-services-test.template.json", "packaging": "file" @@ -113,7 +113,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8477280e97a587c3db83ec698c13380f4409b28c111c2dd00de269cc1d3b10a0.json", + "objectKey": "fb60dad6258f36a2ef48b66ae220c4f7de6a319c89b75b23610f2803cbe36eb6.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-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/aws-stepfunctions-tasks-emr-containers-all-services-test.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/aws-stepfunctions-tasks-emr-containers-all-services-test.template.json index 36d8d04495f9a..c53c4476e59d3 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/aws-stepfunctions-tasks-emr-containers-all-services-test.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/aws-stepfunctions-tasks-emr-containers-all-services-test.template.json @@ -956,7 +956,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/078e55288c69daf4cbec71071e06b4521696cfc95fc10f09a77d592a5fec7c63.json" + "/64935f5256b8a6a408fe03c069615fe7d74eedd9e98cfab64bfc6de60e4207bf.json" ] ] }, @@ -1320,7 +1320,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/awsstepfunctionstasksemrcontainersallservicesDefaultTestDeployAssertE09C88B0.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/awsstepfunctionstasksemrcontainersallservicesDefaultTestDeployAssertE09C88B0.assets.json index 0a04ace3db40f..7eb8c3eed5b01 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/awsstepfunctionstasksemrcontainersallservicesDefaultTestDeployAssertE09C88B0.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/awsstepfunctionstasksemrcontainersallservicesDefaultTestDeployAssertE09C88B0.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/awsstepfunctionstasksemrcontainersallservicestestawscdkawseksKubectlProviderD9DFA1E3.nested.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/awsstepfunctionstasksemrcontainersallservicestestawscdkawseksKubectlProviderD9DFA1E3.nested.template.json index 2a25bdc0c9d47..3f50a0ca1ad50 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/awsstepfunctionstasksemrcontainersallservicestestawscdkawseksKubectlProviderD9DFA1E3.nested.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/awsstepfunctionstasksemrcontainersallservicestestawscdkawseksKubectlProviderD9DFA1E3.nested.template.json @@ -92,7 +92,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33.zip" + "S3Key": "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/cdk.out index 145739f539580..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"22.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/integ.json index 2b07f3fcb6d48..ec0222b3a4e26 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "testCases": { "aws-stepfunctions-tasks-emr-containers-all-services/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/manifest.json index 0db7513e0ba3f..40f081541857e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-emr-containers-all-services-test.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}/8477280e97a587c3db83ec698c13380f4409b28c111c2dd00de269cc1d3b10a0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fb60dad6258f36a2ef48b66ae220c4f7de6a319c89b75b23610f2803cbe36eb6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -524,15 +524,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "JobExecutionRolePolicy6968CCB9": [ - { - "type": "aws:cdk:logicalId", - "data": "JobExecutionRolePolicy6968CCB9", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "aws-stepfunctions-tasks-emr-containers-all-services-test" diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/tree.json index 3a7f48baa4b20..bcfbe83192ddd 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.js.snapshot/tree.json @@ -960,7 +960,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } }, "KubectlReadyBarrier": { @@ -2440,7 +2440,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } } }, @@ -2519,7 +2519,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } }, "@aws-cdk--aws-eks.KubectlProvider": { @@ -2695,7 +2695,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33.zip" + "s3Key": "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd.zip" }, "role": { "Fn::GetAtt": [ @@ -3165,7 +3165,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/078e55288c69daf4cbec71071e06b4521696cfc95fc10f09a77d592a5fec7c63.json" + "/64935f5256b8a6a408fe03c069615fe7d74eedd9e98cfab64bfc6de60e4207bf.json" ] ] }, @@ -3205,7 +3205,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } }, "JobExecutionRole": { @@ -3748,7 +3748,7 @@ "path": "aws-stepfunctions-tasks-emr-containers-all-services/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } }, "DeployAssert": { @@ -3794,7 +3794,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip index d1065f07d934c..298edd40a09fc 100644 Binary files a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip and b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip differ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js index a4c5ba868774f..1d08e9d7b865b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/cluster.js @@ -270,4 +270,4 @@ function analyzeUpdate(oldProps, newProps) { function setsEqual(first, second) { return first.size === second.size && [...first].every((e) => second.has(e)); } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNsdXN0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtCQUErQjs7O0FBTS9CLHFDQUFxRTtBQUVyRSxNQUFNLG9CQUFvQixHQUFHLEdBQUcsQ0FBQztBQUVqQyxNQUFhLHNCQUF1QixTQUFRLHdCQUFlO0lBWXpELFlBQVksR0FBYyxFQUFFLEtBQW9CO1FBQzlDLEtBQUssQ0FBQyxHQUFHLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFFbEIsSUFBSSxDQUFDLFFBQVEsR0FBRyxVQUFVLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO1FBQzFELElBQUksQ0FBQyxRQUFRLEdBQUcsS0FBSyxDQUFDLFdBQVcsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMscUJBQXFCLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDO0lBQ2hHLENBQUM7SUFoQkQsSUFBVyxXQUFXO1FBQ3BCLElBQUksQ0FBQyxJQUFJLENBQUMsa0JBQWtCLEVBQUU7WUFDNUIsTUFBTSxJQUFJLEtBQUssQ0FBQyw0REFBNEQsQ0FBQyxDQUFDO1NBQy9FO1FBRUQsT0FBTyxJQUFJLENBQUMsa0JBQWtCLENBQUM7SUFDakMsQ0FBQztJQVlELFNBQV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ZwY1Byb3BzLmVuZHBvaW50UHVibGljQWNjZXNzIHx8XG4gICAgICAhc2V0c0VxdWFsKG5ld1B1YmxpY0FjY2Vzc0NpZHJzLCBvbGRQdWJsaWNBY2Nlc3NDaWRycyksXG4gICAgcmVwbGFjZVJvbGU6IG5ld1Byb3BzLnJvbGVBcm4gIT09IG9sZFByb3BzLnJvbGVBcm4sXG4gICAgdXBkYXRlVmVyc2lvbjogbmV3UHJvcHMudmVyc2lvbiAhPT0gb2xkUHJvcHMudmVyc2lvbixcbiAgICB1cGRhdGVFbmNyeXB0aW9uOiBKU09OLnN0cmluZ2lmeShuZXdFbmMpICE9PSBKU09OLnN0cmluZ2lmeShvbGRFbmMpLFxuICAgIHVwZGF0ZUxvZ2dpbmc6IEpTT04uc3RyaW5naWZ5KG5ld1Byb3BzLmxvZ2dpbmcpICE9PSBKU09OLnN0cmluZ2lmeShvbGRQcm9wcy5sb2dnaW5nKSxcbiAgfTtcbn1cblxuZnVuY3Rpb24gc2V0c0VxdWFsKGZpcnN0OiBTZXQ8c3RyaW5nPiwgc2Vjb25kOiBTZXQ8c3RyaW5nPikge1xuICByZXR1cm4gZmlyc3Quc2l6ZSA9PT0gc2Vjb25kLnNpemUgJiYgWy4uLmZpcnN0XS5ldmVyeSgoZTogc3RyaW5nKSA9PiBzZWNvbmQuaGFzKGUpKTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js index a5480014d5fc4..5dbf4000517e4 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/common.js @@ -40,4 +40,4 @@ class ResourceHandler { } } exports.ResourceHandler = ResourceHandler; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQWlCQSxNQUFzQixlQUFlO0lBT25DLFlBQStCLEdBQWMsRUFBRSxLQUFvQjtRQUFwQyxRQUFHLEdBQUgsR0FBRyxDQUFXO1FBQzNDLElBQUksQ0FBQyxXQUFXLEdBQUcsS0FBSyxDQUFDLFdBQVcsQ0FBQztRQUNyQyxJQUFJLENBQUMsU0FBUyxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUM7UUFDakMsSUFBSSxDQUFDLGlCQUFpQixHQUFHLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQztRQUNqRCxJQUFJLENBQUMsa0JBQWtCLEdBQUksS0FBYSxDQUFDLGtCQUFrQixDQUFDO1FBQzVELElBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFDO1FBRW5CLE1BQU0sWUFBWSxHQUFHLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxhQUFhLENBQUM7UUFDNUQsSUFBSSxDQUFDLFlBQVksRUFBRTtZQUNqQixNQUFNLElBQUksS0FBSyxDQUFDLGdDQUFnQyxDQUFDLENBQUM7U0FDbkQ7UUFFRCxHQUFHLENBQUMsbUJBQW1CLENBQUM7WUFDdEIsT0FBTyxFQUFFLFlBQVk7WUFDckIsZUFBZSxFQUFFLHFCQUFxQixJQUFJLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxTQUFTLEVBQUU7U0FDM0UsQ0FBQyxDQUFDO0lBQ0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dGVQcm9maWxlUmVxdWVzdCk6IFByb21pc2U8YXdzLkVLUy5DcmVhdGVGYXJnYXRlUHJvZmlsZVJlc3BvbnNlPjtcbiAgZGVzY3JpYmVGYXJnYXRlUHJvZmlsZShyZXF1ZXN0OiBhd3MuRUtTLkRlc2NyaWJlRmFyZ2F0ZVByb2ZpbGVSZXF1ZXN0KTogUHJvbWlzZTxhd3MuRUtTLkRlc2NyaWJlRmFyZ2F0ZVByb2ZpbGVSZXNwb25zZT47XG4gIGRlbGV0ZUZhcmdhdGVQcm9maWxlKHJlcXVlc3Q6IGF3cy5FS1MuRGVsZXRlRmFyZ2F0ZVByb2ZpbGVSZXF1ZXN0KTogUHJvbWlzZTxhd3MuRUtTLkRlbGV0ZUZhcmdhdGVQcm9maWxlUmVzcG9uc2U+O1xufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js index 91815a754a525..f74022f9be26d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.76b95b763a0d19e172361b0123e88b00854f56785669102a9ab0127f4f738bf5/fargate.js @@ -99,4 +99,4 @@ class FargateProfileResourceHandler extends common_1.ResourceHandler { } } exports.FargateProfileResourceHandler = FargateProfileResourceHandler; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFyZ2F0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3V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yZ2F0ZVByb2ZpbGVSZXNwb25zZSB9KTtcbiAgICAgIGNvbnN0IHN0YXR1cyA9IGRlc2NyaWJlRmFyZ2F0ZVByb2ZpbGVSZXNwb25zZS5mYXJnYXRlUHJvZmlsZT8uc3RhdHVzO1xuXG4gICAgICBpZiAoc3RhdHVzID09PSAnQ1JFQVRFX0ZBSUxFRCcgfHwgc3RhdHVzID09PSAnREVMRVRFX0ZBSUxFRCcpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKHN0YXR1cyk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBzdGF0dXM7XG4gICAgfSBjYXRjaCAoZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yKSB7XG4gICAgICBpZiAoZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yLmNvZGUgPT09ICdSZXNvdXJjZU5vdEZvdW5kRXhjZXB0aW9uJykge1xuICAgICAgICB0aGlzLmxvZygncmVjZWl2ZWQgUmVzb3VyY2VOb3RGb3VuZEV4Y2VwdGlvbiwgdGhpcyBtZWFucyB0aGUgcHJvZmlsZSBoYXMgYmVlbiBkZWxldGVkIChvciBuZXZlciBleGlzdGVkKScpO1xuICAgICAgICByZXR1cm4gJ05PVF9GT1VORCc7XG4gICAgICB9XG5cbiAgICAgIHRoaXMubG9nKHsgZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yIH0pO1xuICAgICAgdGhyb3cgZGVzY3JpYmVGYXJnYXRlUHJvZmlsZUVycm9yO1xuICAgIH1cbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/apply/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/apply/__init__.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/apply/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/apply/__init__.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/get/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/get/__init__.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/get/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/get/__init__.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/helm/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/helm/__init__.py similarity index 93% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/helm/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/helm/__init__.py index b9a741c8972c4..a7b26b264118b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/helm/__init__.py +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/helm/__init__.py @@ -82,7 +82,7 @@ def helm_handler(event, context): if repository is not None and repository.startswith('oci://'): tmpdir = tempfile.TemporaryDirectory() - chart_dir = get_chart_from_oci(tmpdir.name, release, repository, version) + chart_dir = get_chart_from_oci(tmpdir.name, repository, version) chart = chart_dir helm('upgrade', release, chart, repository, values_file, namespace, version, wait, timeout, create_namespace) @@ -123,7 +123,7 @@ def get_oci_cmd(repository, version): return cmnd -def get_chart_from_oci(tmpdir, release, repository = None, version = None): +def get_chart_from_oci(tmpdir, repository = None, version = None): cmnd = get_oci_cmd(repository, version) @@ -135,7 +135,9 @@ def get_chart_from_oci(tmpdir, release, repository = None, version = None): output = subprocess.check_output(cmnd, stderr=subprocess.STDOUT, cwd=tmpdir, shell=True) logger.info(output) - return os.path.join(tmpdir, release) + # effectively returns "$tmpDir/$lastPartOfOCIUrl", because this is how helm pull saves OCI artifact. + # Eg. if we have oci://9999999999.dkr.ecr.us-east-1.amazonaws.com/foo/bar/pet-service repository, helm saves artifact under $tmpDir/pet-service + return os.path.join(tmpdir, repository.rpartition('/')[-1]) except subprocess.CalledProcessError as exc: output = exc.output if b'Broken pipe' in output: diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/index.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/index.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/index.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/index.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/patch/__init__.py b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/patch/__init__.py similarity index 100% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33/patch/__init__.py rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd/patch/__init__.py diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip index e3828a91bf834..ce3ea448ac19d 100644 Binary files a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip and b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/asset.ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1.zip differ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-test.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-test.assets.json index 9129d11067159..1e3ca12d1507f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-test.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-test.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "files": { "ad44c2b0638f04871c889d78e71dea90ffae67b9cc4aa4366d5102db42435ee1": { "source": { @@ -40,15 +40,15 @@ } } }, - "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33": { + "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd": { "source": { - "path": "asset.1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33", + "path": "asset.a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33.zip", + "objectKey": "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -118,7 +118,7 @@ } } }, - "4bd82ebd8c48c4d7ad79914c3fb9457573d8513dd08022e464332010a4a1e2f5": { + "2c4bbd9bfdca8d0c8d329000c43b16b2ec52206c08b4027657c1d76a41a4185e": { "source": { "path": "awsstepfunctionstasksemrcontainersstartjobruntestawscdkawseksKubectlProviderEB85BF5A.nested.template.json", "packaging": "file" @@ -126,12 +126,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4bd82ebd8c48c4d7ad79914c3fb9457573d8513dd08022e464332010a4a1e2f5.json", + "objectKey": "2c4bbd9bfdca8d0c8d329000c43b16b2ec52206c08b4027657c1d76a41a4185e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e3d04398bcfe8416a6191a4ba94e1f76b0aa52fe33dd384dc3ab136dc2cd70f0": { + "e6eaca5f95d8be16472cdbd60817d3e874e920852d04c07132fa19e7d6be6e9e": { "source": { "path": "aws-stepfunctions-tasks-emr-containers-start-job-run-test.template.json", "packaging": "file" @@ -139,7 +139,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e3d04398bcfe8416a6191a4ba94e1f76b0aa52fe33dd384dc3ab136dc2cd70f0.json", + "objectKey": "e6eaca5f95d8be16472cdbd60817d3e874e920852d04c07132fa19e7d6be6e9e.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-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-test.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-test.template.json index 1dde8f1006016..c1627f1b76a6b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-test.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run-test.template.json @@ -1015,7 +1015,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/4bd82ebd8c48c4d7ad79914c3fb9457573d8513dd08022e464332010a4a1e2f5.json" + "/2c4bbd9bfdca8d0c8d329000c43b16b2ec52206c08b4027657c1d76a41a4185e.json" ] ] }, @@ -1657,7 +1657,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunDefaultTestDeployAssert0C0D5C7F.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunDefaultTestDeployAssert0C0D5C7F.assets.json index b0e04974ba464..d458abf6274ab 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunDefaultTestDeployAssert0C0D5C7F.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunDefaultTestDeployAssert0C0D5C7F.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobruntestawscdkawseksKubectlProviderEB85BF5A.nested.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobruntestawscdkawseksKubectlProviderEB85BF5A.nested.template.json index 0ff4fdd55628c..603f101ac4aa1 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobruntestawscdkawseksKubectlProviderEB85BF5A.nested.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobruntestawscdkawseksKubectlProviderEB85BF5A.nested.template.json @@ -92,7 +92,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33.zip" + "S3Key": "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/cdk.out index 145739f539580..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"22.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/integ.json index 676cb9581f0af..23859f1ee4f00 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "testCases": { "aws-stepfunctions-tasks-emr-containers-start-job-run/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/manifest.json index bc65fbf8d4f3e..d8c9b2b4f4be5 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-emr-containers-start-job-run-test.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}/e3d04398bcfe8416a6191a4ba94e1f76b0aa52fe33dd384dc3ab136dc2cd70f0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e6eaca5f95d8be16472cdbd60817d3e874e920852d04c07132fa19e7d6be6e9e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/tree.json index 6dd91b65b89e4..8a1f2ae75f6c1 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/tree.json @@ -960,7 +960,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } }, "KubectlReadyBarrier": { @@ -2496,7 +2496,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } } }, @@ -2575,7 +2575,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } }, "@aws-cdk--aws-eks.KubectlProvider": { @@ -2751,7 +2751,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "1f175bea1cef6137d882d0090f49e27e44bbb46a678a86fd5d6fb29ade070a33.zip" + "s3Key": "a0738c4112d1f07ba7bbb4891a2efc3b998d66ef82238a7839f604d4f6a198fd.zip" }, "role": { "Fn::GetAtt": [ @@ -3221,7 +3221,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/4bd82ebd8c48c4d7ad79914c3fb9457573d8513dd08022e464332010a4a1e2f5.json" + "/2c4bbd9bfdca8d0c8d329000c43b16b2ec52206c08b4027657c1d76a41a4185e.json" ] ] }, @@ -3261,7 +3261,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } }, "Virtual Cluster": { @@ -4327,7 +4327,7 @@ "path": "aws-stepfunctions-tasks-emr-containers-start-job-run/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } }, "DeployAssert": { @@ -4373,7 +4373,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.assets.json index b8389e3cf9677..7eba609e3bde1 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.assets.json @@ -1,20 +1,20 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": { + "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": { "source": { - "path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle", + "path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip", + "objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "aaa4cc846bc842df52f3f3b46815802ecf4b48a0c691686f6762d1f64e5b43e2": { + "822d59aebc35af020849090bf6df3523edeb1fb7a98a46e35f64a1e14bd7305a": { "source": { "path": "PutEventsDefaultTestDeployAssert1A6BA3F3.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "aaa4cc846bc842df52f3f3b46815802ecf4b48a0c691686f6762d1f64e5b43e2.json", + "objectKey": "822d59aebc35af020849090bf6df3523edeb1fb7a98a46e35f64a1e14bd7305a.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-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.template.json index 6e8960a5ae8e9..2ed578d7a2c35 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.template.json @@ -17,7 +17,7 @@ } }, "flattenResponse": "true", - "salt": "1668000041457" + "salt": "1676026055044" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -80,7 +80,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -113,7 +113,7 @@ } }, "flattenResponse": "false", - "salt": "1668000041457" + "salt": "1676026055045" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js new file mode 100644 index 0000000000000..58bcb1ef7f38e --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js @@ -0,0 +1,1205 @@ +"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( + // 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-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/aws-stepfunctions-tasks-eventbridge-put-events-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/aws-stepfunctions-tasks-eventbridge-put-events-integ.assets.json index 88b73bc021f64..33dcce1ff74ad 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/aws-stepfunctions-tasks-eventbridge-put-events-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/aws-stepfunctions-tasks-eventbridge-put-events-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "719684849f05595468ebad2915a5a588f7a4b642d84ea456eafecf522522a37f": { + "0d31c0454c086c30f0762434a3d8ef2d8fb36ffbd853701c6048fd837276a593": { "source": { "path": "aws-stepfunctions-tasks-eventbridge-put-events-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "719684849f05595468ebad2915a5a588f7a4b642d84ea456eafecf522522a37f.json", + "objectKey": "0d31c0454c086c30f0762434a3d8ef2d8fb36ffbd853701c6048fd837276a593.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-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/aws-stepfunctions-tasks-eventbridge-put-events-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/aws-stepfunctions-tasks-eventbridge-put-events-integ.template.json index 3617c396b1d10..2d0fc2d36d8a4 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/aws-stepfunctions-tasks-eventbridge-put-events-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/aws-stepfunctions-tasks-eventbridge-put-events-integ.template.json @@ -103,7 +103,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/integ.json index 8bc3eb27a6a40..240dc952ef7f7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "PutEvents/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/manifest.json index 2c5fcb84723f3..02703f1f1ce95 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-eventbridge-put-events-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}/719684849f05595468ebad2915a5a588f7a4b642d84ea456eafecf522522a37f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0d31c0454c086c30f0762434a3d8ef2d8fb36ffbd853701c6048fd837276a593.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -94,7 +94,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}/aaa4cc846bc842df52f3f3b46815802ecf4b48a0c691686f6762d1f64e5b43e2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/822d59aebc35af020849090bf6df3523edeb1fb7a98a46e35f64a1e14bd7305a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/tree.json index c4128e7d037e7..12cef03bac94b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.js.snapshot/tree.json @@ -48,6 +48,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-eventbridge-put-events-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-eventbridge-put-events-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-eventbridge-put-events-integ/StateMachine/Role/Resource", @@ -204,7 +212,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "BootstrapVersion": { @@ -242,7 +250,7 @@ "path": "PutEvents/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "DeployAssert": { @@ -262,7 +270,7 @@ "path": "PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, @@ -326,7 +334,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "AwsApiCallStepFunctionsdescribeExecution": { @@ -342,7 +350,7 @@ "path": "PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, @@ -422,7 +430,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/aws-stepfunctions-integ.assets.json index 36cfa4e95290b..25d6cfeabfc42 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "d030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0d": { "source": { @@ -14,7 +14,7 @@ } } }, - "b22741da3cf27cfe6112843bafc25565236d764492b8d42488a0ac237f3e4991": { + "9650ef36f9fd5a0257151d0985681eb753cc12ea6015ad075d6f25ebfabfedae": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b22741da3cf27cfe6112843bafc25565236d764492b8d42488a0ac237f3e4991.json", + "objectKey": "9650ef36f9fd5a0257151d0985681eb753cc12ea6015ad075d6f25ebfabfedae.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-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/aws-stepfunctions-integ.template.json index 6fcf5cadf4851..883741e07b733 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/aws-stepfunctions-integ.template.json @@ -204,7 +204,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDA5F7DA8", "StateMachineRole543B9670" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/integ.json index 8fbd711f6ef96..3205bce66466a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.glue-task": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/manifest.json index 82986916dd535..fbb8b75816513 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/b22741da3cf27cfe6112843bafc25565236d764492b8d42488a0ac237f3e4991.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9650ef36f9fd5a0257151d0985681eb753cc12ea6015ad075d6f25ebfabfedae.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/tree.json index a894b5d1ffb29..3958fffd83be6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.glue-task.js.snapshot/tree.json @@ -38,6 +38,14 @@ "id": "Glue Job Role", "path": "aws-stepfunctions-integ/Glue Job Role", "children": { + "ImportGlue Job Role": { + "id": "ImportGlue Job Role", + "path": "aws-stepfunctions-integ/Glue Job Role/ImportGlue Job Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/Glue Job Role/Resource", @@ -227,6 +235,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/State Machine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/State Machine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/State Machine/Role/Resource", @@ -393,7 +409,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/aws-stepfunctions-integ.assets.json index ed23c4064ecc8..6e5004744c3b6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "d030bb7913ca422df69f29b2ea678ab4e5085bb3cbb17029e4b101d2dc4e3e0d": { "source": { @@ -14,7 +14,7 @@ } } }, - "2018289b745c52cb0b73e831138d55424129608180dcdb4b194107661509fa78": { + "b39f344f999271013af941adeccaaa634f0c4f453eb96d492753b4471dbb3004": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2018289b745c52cb0b73e831138d55424129608180dcdb4b194107661509fa78.json", + "objectKey": "b39f344f999271013af941adeccaaa634f0c4f453eb96d492753b4471dbb3004.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-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/aws-stepfunctions-integ.template.json index 35d9290751136..e054ff5a5c807 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/aws-stepfunctions-integ.template.json @@ -204,7 +204,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDA5F7DA8", "StateMachineRole543B9670" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/integ.json index 9a48f41684d0b..030faf921724a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.start-job-run": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/manifest.json index f09773ef5840f..b85478969acd8 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/2018289b745c52cb0b73e831138d55424129608180dcdb4b194107661509fa78.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b39f344f999271013af941adeccaaa634f0c4f453eb96d492753b4471dbb3004.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/tree.json index 97ad536453cf5..6d93486f39af5 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/glue/integ.start-job-run.js.snapshot/tree.json @@ -38,6 +38,14 @@ "id": "Glue Job Role", "path": "aws-stepfunctions-integ/Glue Job Role", "children": { + "ImportGlue Job Role": { + "id": "ImportGlue Job Role", + "path": "aws-stepfunctions-integ/Glue Job Role/ImportGlue Job Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/Glue Job Role/Resource", @@ -227,6 +235,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/State Machine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/State Machine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/State Machine/Role/Resource", @@ -393,7 +409,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/aws-stepfunctions-integ.assets.json index 985b1e4780cb8..bc3de9e6d1b80 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "4a61519d8f4df8206cfaff4e519462aa81beab9213c3642a1353cd679c697638": { "source": { @@ -14,7 +14,7 @@ } } }, - "173a242a50c16e3f0e14e2ccf4cb9a5d5d219184529b02ab6a8c595265d34805": { + "1b823cdecb2e1d73ee259ce6b882ed1b43165a43538d16179b9a70b5488e04d8": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "173a242a50c16e3f0e14e2ccf4cb9a5d5d219184529b02ab6a8c595265d34805.json", + "objectKey": "1b823cdecb2e1d73ee259ce6b882ed1b43165a43538d16179b9a70b5488e04d8.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-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/aws-stepfunctions-integ.template.json index 4dbed35a7db70..32e8f597b3c06 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/aws-stepfunctions-integ.template.json @@ -154,7 +154,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/integ.json index 6756d8150459c..73e1ef91a261d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.evaluate-expression": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/manifest.json index 97068b21de3fa..1899a35b6efbe 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/173a242a50c16e3f0e14e2ccf4cb9a5d5d219184529b02ab6a8c595265d34805.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1b823cdecb2e1d73ee259ce6b882ed1b43165a43538d16179b9a70b5488e04d8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/tree.json index 62fd860db85eb..2d9ccc4a52806 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.evaluate-expression.js.snapshot/tree.json @@ -34,6 +34,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-integ/Evalda2d1181604e4a4586941a6abd7fe42d/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-integ/Evalda2d1181604e4a4586941a6abd7fe42d/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/Evalda2d1181604e4a4586941a6abd7fe42d/ServiceRole/Resource", @@ -190,6 +198,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/StateMachine/Role/Resource", @@ -370,7 +386,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/aws-stepfunctions-integ.assets.json index c805c91f9bee7..4d7cbb05a047e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "43d4e9dd7b66e1c723c86f26fdd2cf5a63df48825339b3581f79dc7a086dea22": { + "a9d4824b27e63b2f302670d36195c605eed60f82552ae6d971ec4e6315eeb21c": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "43d4e9dd7b66e1c723c86f26fdd2cf5a63df48825339b3581f79dc7a086dea22.json", + "objectKey": "a9d4824b27e63b2f302670d36195c605eed60f82552ae6d971ec4e6315eeb21c.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-stepfunctions-tasks/test/integ.job-poller.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/aws-stepfunctions-integ.template.json index 8648312529508..ec9746ae9418a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/aws-stepfunctions-integ.template.json @@ -61,7 +61,9 @@ }, "DependsOn": [ "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/integ.json index fa53c85308e99..3b6f20c23e6e9 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.job-poller": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/manifest.json index 23c3b47dcc152..b6b4182d85b1a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/43d4e9dd7b66e1c723c86f26fdd2cf5a63df48825339b3581f79dc7a086dea22.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a9d4824b27e63b2f302670d36195c605eed60f82552ae6d971ec4e6315eeb21c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/tree.json index 59f6364ad1a0f..1103480d5c061 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.job-poller.js.snapshot/tree.json @@ -112,6 +112,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/StateMachine/Role/Resource", @@ -215,7 +223,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ-sfn-start-execution.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ-sfn-start-execution.assets.json index fc84a801813ec..2b9e2128ad9b6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ-sfn-start-execution.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ-sfn-start-execution.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "b4f1ae62ce73b9521608269b8ff08207bd8f63845d471eaab7e71f60059c6e7b": { + "e6245b9d1e2552b4016f4d688a01828b57702a191de63070ad3431629ae8d525": { "source": { "path": "integ-sfn-start-execution.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b4f1ae62ce73b9521608269b8ff08207bd8f63845d471eaab7e71f60059c6e7b.json", + "objectKey": "e6245b9d1e2552b4016f4d688a01828b57702a191de63070ad3431629ae8d525.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-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ-sfn-start-execution.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ-sfn-start-execution.template.json index 6cc2e887ec2c2..fc57d3fd7f912 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ-sfn-start-execution.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ-sfn-start-execution.template.json @@ -30,7 +30,9 @@ }, "DependsOn": [ "ChildRole1E3E0EF5" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "ParentRole5F0C366C": { "Type": "AWS::IAM::Role", @@ -170,7 +172,9 @@ "DependsOn": [ "ParentRoleDefaultPolicy9BDC56DC", "ParentRole5F0C366C" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ.json index 34e86537acf6a..9d8245b6cc4d7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.start-execution": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/manifest.json index 5353d10957d10..86d13f90352e6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "integ-sfn-start-execution.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}/b4f1ae62ce73b9521608269b8ff08207bd8f63845d471eaab7e71f60059c6e7b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e6245b9d1e2552b4016f4d688a01828b57702a191de63070ad3431629ae8d525.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/tree.json index 5e3e1b43387ae..f90af650591e7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.start-execution.js.snapshot/tree.json @@ -24,6 +24,14 @@ "id": "Role", "path": "integ-sfn-start-execution/Child/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "integ-sfn-start-execution/Child/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-sfn-start-execution/Child/Role/Resource", @@ -97,6 +105,14 @@ "id": "Role", "path": "integ-sfn-start-execution/Parent/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "integ-sfn-start-execution/Parent/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-sfn-start-execution/Parent/Role/Resource", @@ -314,7 +330,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/aws-stepfunctions-integ.assets.json index 6a4d6acc5012a..854a602acbbf6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "9678c34eca93259d11f2d714177347afd66c50116e1e08996eff893d3ca81232": { "source": { @@ -14,7 +14,7 @@ } } }, - "7e8084b424100bedd7c1b879f04d323bcda551c87a5df99f47064209b4fff00e": { + "8234599bb62af34ea3a45f31c166bcb33ed3af94615d683cd306330b45c1c382": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7e8084b424100bedd7c1b879f04d323bcda551c87a5df99f47064209b4fff00e.json", + "objectKey": "8234599bb62af34ea3a45f31c166bcb33ed3af94615d683cd306330b45c1c382.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-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/aws-stepfunctions-integ.template.json index 1b4c04922fff8..a5c033940e9e7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/aws-stepfunctions-integ.template.json @@ -221,7 +221,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/integ.json index 0b5b6950381c3..2e0fd302658f9 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.invoke-function": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/manifest.json index 3756d40a16c86..07d9ccb4ac5a9 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/7e8084b424100bedd7c1b879f04d323bcda551c87a5df99f47064209b4fff00e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8234599bb62af34ea3a45f31c166bcb33ed3af94615d683cd306330b45c1c382.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/tree.json index db290239bd5d3..2b26107fec674 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke-function.js.snapshot/tree.json @@ -16,6 +16,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-integ/Handler/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-integ/Handler/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/Handler/ServiceRole/Resource", @@ -136,6 +144,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-integ/CallbackHandler/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-integ/CallbackHandler/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/CallbackHandler/ServiceRole/Resource", @@ -280,6 +296,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/StateMachine/Role/Resource", @@ -466,7 +490,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.assets.json index 9451d79909397..c8a205cc7ef7d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "3f30ccdb3fb9180062fc74ef7a5c7e67eee1545cb13a5caafd5cda0a67ad8731": { + "94533f93ec9c0d75b6ff4c9605ab3132915fad3dd0448d073dc6986e5b294823": { "source": { "path": "aws-stepfunctions-tasks-lambda-invoke-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3f30ccdb3fb9180062fc74ef7a5c7e67eee1545cb13a5caafd5cda0a67ad8731.json", + "objectKey": "94533f93ec9c0d75b6ff4c9605ab3132915fad3dd0448d073dc6986e5b294823.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-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.template.json index bb8ab04cefd86..ef331b66a4f14 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.template.json @@ -222,7 +222,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/integ.json index 181297431a85e..f76fe8054176b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.invoke": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/manifest.json index 1c039a63812eb..2f5043da8ea25 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-lambda-invoke-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}/3f30ccdb3fb9180062fc74ef7a5c7e67eee1545cb13a5caafd5cda0a67ad8731.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/94533f93ec9c0d75b6ff4c9605ab3132915fad3dd0448d073dc6986e5b294823.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/tree.json index 34cb1ecfddb2b..427b52114ef56 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.js.snapshot/tree.json @@ -16,6 +16,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/submitJobLambda/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-lambda-invoke-integ/submitJobLambda/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/submitJobLambda/ServiceRole/Resource", @@ -107,6 +115,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/checkJobStateLambda/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-lambda-invoke-integ/checkJobStateLambda/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/checkJobStateLambda/ServiceRole/Resource", @@ -222,6 +238,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-lambda-invoke-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/StateMachine/Role/Resource", @@ -423,7 +447,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.assets.json index e55d6f27aacdc..5d83021ce6a19 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "fcfc5567f848b2dac2a1c88ed8824066fbcb3eac6ef78ace50ab7cc45e662a17": { + "a0af0d2ad4b35b66121165e0b9a32feceb0c5b0893c587f878282ac5bc0ca1c2": { "source": { "path": "aws-stepfunctions-tasks-lambda-invoke-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fcfc5567f848b2dac2a1c88ed8824066fbcb3eac6ef78ace50ab7cc45e662a17.json", + "objectKey": "a0af0d2ad4b35b66121165e0b9a32feceb0c5b0893c587f878282ac5bc0ca1c2.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-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.template.json index c61259ce8f5b4..a7905387d2353 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/aws-stepfunctions-tasks-lambda-invoke-integ.template.json @@ -214,7 +214,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/integ.json index 7b887ccaec43b..df555d5a8948c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.invoke.payload.only": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/manifest.json index 56291f9e18f99..2e6d44f472852 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-lambda-invoke-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}/fcfc5567f848b2dac2a1c88ed8824066fbcb3eac6ef78ace50ab7cc45e662a17.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a0af0d2ad4b35b66121165e0b9a32feceb0c5b0893c587f878282ac5bc0ca1c2.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/tree.json index 1beac9a98b957..fe84a73a7ee4a 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.invoke.payload.only.js.snapshot/tree.json @@ -16,6 +16,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/submitJobLambda/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-lambda-invoke-integ/submitJobLambda/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/submitJobLambda/ServiceRole/Resource", @@ -107,6 +115,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/checkJobStateLambda/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-lambda-invoke-integ/checkJobStateLambda/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/checkJobStateLambda/ServiceRole/Resource", @@ -222,6 +238,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-lambda-invoke-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-lambda-invoke-integ/StateMachine/Role/Resource", @@ -415,7 +439,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/aws-stepfunctions-tasks-run-lambda-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/aws-stepfunctions-tasks-run-lambda-integ.assets.json index 471101914325a..e7ca06a983e14 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/aws-stepfunctions-tasks-run-lambda-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/aws-stepfunctions-tasks-run-lambda-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "1cc4cb24622e3fc2d2bc515ebe39d5aa68860b5ecd2e066b20a2a2add4b9590c": { + "f64891e6cb42d32d8a7ffe6a64a5e1ddfc5cbde0706f87dfe3d99321811fff2f": { "source": { "path": "aws-stepfunctions-tasks-run-lambda-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1cc4cb24622e3fc2d2bc515ebe39d5aa68860b5ecd2e066b20a2a2add4b9590c.json", + "objectKey": "f64891e6cb42d32d8a7ffe6a64a5e1ddfc5cbde0706f87dfe3d99321811fff2f.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-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/aws-stepfunctions-tasks-run-lambda-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/aws-stepfunctions-tasks-run-lambda-integ.template.json index 7db20600fb454..0c56b9c6b5836 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/aws-stepfunctions-tasks-run-lambda-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/aws-stepfunctions-tasks-run-lambda-integ.template.json @@ -216,7 +216,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/integ.json index 349c14e4a58f9..ef5715d59bc0c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.run-lambda": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/manifest.json index 642fc45fa914b..1936efe993a0d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-run-lambda-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}/1cc4cb24622e3fc2d2bc515ebe39d5aa68860b5ecd2e066b20a2a2add4b9590c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f64891e6cb42d32d8a7ffe6a64a5e1ddfc5cbde0706f87dfe3d99321811fff2f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/tree.json index be56c7a6b242e..3bc1d068f2d50 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/lambda/integ.run-lambda.js.snapshot/tree.json @@ -16,6 +16,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-run-lambda-integ/submitJobLambda/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-run-lambda-integ/submitJobLambda/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-run-lambda-integ/submitJobLambda/ServiceRole/Resource", @@ -107,6 +115,14 @@ "id": "ServiceRole", "path": "aws-stepfunctions-tasks-run-lambda-integ/checkJobStateLambda/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-stepfunctions-tasks-run-lambda-integ/checkJobStateLambda/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-run-lambda-integ/checkJobStateLambda/ServiceRole/Resource", @@ -222,6 +238,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-run-lambda-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-run-lambda-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-run-lambda-integ/StateMachine/Role/Resource", @@ -409,7 +433,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/aws-stepfunctions-integ-sagemaker.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/aws-stepfunctions-integ-sagemaker.assets.json index 9d38196d82a02..eaff93c13f467 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/aws-stepfunctions-integ-sagemaker.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/aws-stepfunctions-integ-sagemaker.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "b0b034bf6021bfed172682a7cb186a225e91628a73726ce90803f701183ff29d": { + "d47626d7509ebce452cd585faf4d46fd90729820d5e478bdf0b77aa30c90f6de": { "source": { "path": "aws-stepfunctions-integ-sagemaker.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b0b034bf6021bfed172682a7cb186a225e91628a73726ce90803f701183ff29d.json", + "objectKey": "d47626d7509ebce452cd585faf4d46fd90729820d5e478bdf0b77aa30c90f6de.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-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/aws-stepfunctions-integ-sagemaker.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/aws-stepfunctions-integ-sagemaker.template.json index f85c6421f1609..b1f00c6fb8c47 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/aws-stepfunctions-integ-sagemaker.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/aws-stepfunctions-integ-sagemaker.template.json @@ -523,7 +523,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/integ.json index dab09aa074f3a..d460bdf1b800e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.call-sagemaker": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/manifest.json index 80bbb60760524..0ec0ab420c954 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-integ-sagemaker.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}/b0b034bf6021bfed172682a7cb186a225e91628a73726ce90803f701183ff29d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d47626d7509ebce452cd585faf4d46fd90729820d5e478bdf0b77aa30c90f6de.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/tree.json index 9065efd926f48..79a5518498786 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.call-sagemaker.js.snapshot/tree.json @@ -105,6 +105,14 @@ "id": "SagemakerRole", "path": "aws-stepfunctions-integ-sagemaker/Train Task/SagemakerRole", "children": { + "ImportSagemakerRole": { + "id": "ImportSagemakerRole", + "path": "aws-stepfunctions-integ-sagemaker/Train Task/SagemakerRole/ImportSagemakerRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ-sagemaker/Train Task/SagemakerRole/Resource", @@ -286,6 +294,14 @@ "id": "SagemakerRole", "path": "aws-stepfunctions-integ-sagemaker/Create Model/SagemakerRole", "children": { + "ImportSagemakerRole": { + "id": "ImportSagemakerRole", + "path": "aws-stepfunctions-integ-sagemaker/Create Model/SagemakerRole/ImportSagemakerRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ-sagemaker/Create Model/SagemakerRole/Resource", @@ -430,6 +446,14 @@ "id": "Role", "path": "aws-stepfunctions-integ-sagemaker/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ-sagemaker/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ-sagemaker/StateMachine/Role/Resource", @@ -774,7 +798,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ-stepfunctions-sagemaker.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ-stepfunctions-sagemaker.assets.json index 5f79f69a5238d..4eece88e7c92c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ-stepfunctions-sagemaker.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ-stepfunctions-sagemaker.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "ee50483be095ecd9aa75161bf81ea745fa603a9d8ba9262b4ba34c3d2b38e647": { + "81a9a9ef07dfc045ad84514bf0771e76c20386202c7c26130f4f954b8411de26": { "source": { "path": "integ-stepfunctions-sagemaker.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ee50483be095ecd9aa75161bf81ea745fa603a9d8ba9262b4ba34c3d2b38e647.json", + "objectKey": "81a9a9ef07dfc045ad84514bf0771e76c20386202c7c26130f4f954b8411de26.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-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ-stepfunctions-sagemaker.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ-stepfunctions-sagemaker.template.json index 3f5a778b3249a..61c634750abc4 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ-stepfunctions-sagemaker.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ-stepfunctions-sagemaker.template.json @@ -329,7 +329,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ.json index 1058e02ccb1f3..81307a7853194 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.create-training-job": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/manifest.json index bceb8d90d1a52..4f8b732c01a3f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "integ-stepfunctions-sagemaker.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}/ee50483be095ecd9aa75161bf81ea745fa603a9d8ba9262b4ba34c3d2b38e647.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/81a9a9ef07dfc045ad84514bf0771e76c20386202c7c26130f4f954b8411de26.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/tree.json index 86f4dc302192d..99805c2c1e4b0 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/integ.create-training-job.js.snapshot/tree.json @@ -105,6 +105,14 @@ "id": "SagemakerRole", "path": "integ-stepfunctions-sagemaker/TrainTask/SagemakerRole", "children": { + "ImportSagemakerRole": { + "id": "ImportSagemakerRole", + "path": "integ-stepfunctions-sagemaker/TrainTask/SagemakerRole/ImportSagemakerRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-stepfunctions-sagemaker/TrainTask/SagemakerRole/Resource", @@ -286,6 +294,14 @@ "id": "Role", "path": "integ-stepfunctions-sagemaker/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "integ-stepfunctions-sagemaker/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-stepfunctions-sagemaker/StateMachine/Role/Resource", @@ -502,7 +518,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/aws-stepfunctions-tasks-sns-publish-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/aws-stepfunctions-tasks-sns-publish-integ.assets.json index 74734381af9d7..56302d33c2ca6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/aws-stepfunctions-tasks-sns-publish-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/aws-stepfunctions-tasks-sns-publish-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "e695642275eadadcd19f21540b32ba9ad6a6b1c32faf69ef3f5fcb5a5a6df17e": { + "fc62bfcd1fd4e167dcd5627971dff21335ad8ca3b09bd7e3c472830c6eef7372": { "source": { "path": "aws-stepfunctions-tasks-sns-publish-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e695642275eadadcd19f21540b32ba9ad6a6b1c32faf69ef3f5fcb5a5a6df17e.json", + "objectKey": "fc62bfcd1fd4e167dcd5627971dff21335ad8ca3b09bd7e3c472830c6eef7372.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-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/aws-stepfunctions-tasks-sns-publish-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/aws-stepfunctions-tasks-sns-publish-integ.template.json index 7e80c4853b2a0..6275490d5b23f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/aws-stepfunctions-tasks-sns-publish-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/aws-stepfunctions-tasks-sns-publish-integ.template.json @@ -130,7 +130,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/integ.json index 9296db79517e0..63f8753289cac 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.publish": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/manifest.json index 8b671344ca82a..ba3d70b7224f8 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-sns-publish-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}/e695642275eadadcd19f21540b32ba9ad6a6b1c32faf69ef3f5fcb5a5a6df17e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fc62bfcd1fd4e167dcd5627971dff21335ad8ca3b09bd7e3c472830c6eef7372.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/tree.json index 99406a6d15f44..f0a34d32d8205 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sns/integ.publish.js.snapshot/tree.json @@ -162,6 +162,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-sns-publish-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-sns-publish-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-sns-publish-integ/StateMachine/Role/Resource", @@ -318,7 +326,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.assets.json index e824eaadfc775..c354e93b9f290 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "9a3c649e33d3ea1c228a886b86c2ea83176d21293c6cc11f68317217f95383ce": { + "c3c8f830888fcede25549fe758fde29a12b4b14ade53cabde0847c9fe5c4ab2e": { "source": { "path": "aws-stepfunctions-tasks-sqs-send-message-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9a3c649e33d3ea1c228a886b86c2ea83176d21293c6cc11f68317217f95383ce.json", + "objectKey": "c3c8f830888fcede25549fe758fde29a12b4b14ade53cabde0847c9fe5c4ab2e.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-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.template.json index f0878922ab5a6..5befdcf464a14 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.template.json @@ -134,7 +134,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/integ.json index 80019405d44f5..be83980440252 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.send-message-encrypted": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/manifest.json index f924bc6e3fdf1..eac30841ebb3f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-sqs-send-message-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}/9a3c649e33d3ea1c228a886b86c2ea83176d21293c6cc11f68317217f95383ce.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c3c8f830888fcede25549fe758fde29a12b4b14ade53cabde0847c9fe5c4ab2e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/tree.json index 27935f077ba91..12605c1cb842d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message-encrypted.js.snapshot/tree.json @@ -113,6 +113,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-sqs-send-message-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-sqs-send-message-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-sqs-send-message-integ/StateMachine/Role/Resource", @@ -285,7 +293,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.assets.json index 5af1d541798f0..09c760dc3d72c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "6efba945f7ef10723188d9175dd7cc5b1037a4f44961627de67b64ff9a0e8795": { + "78d6b2aa27d843a87fd1608e5e4f3c754cc0adbacab6fe7f5db5f0346591c522": { "source": { "path": "aws-stepfunctions-tasks-sqs-send-message-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6efba945f7ef10723188d9175dd7cc5b1037a4f44961627de67b64ff9a0e8795.json", + "objectKey": "78d6b2aa27d843a87fd1608e5e4f3c754cc0adbacab6fe7f5db5f0346591c522.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-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.template.json index eab085bb45345..aab9edafb0b98 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/aws-stepfunctions-tasks-sqs-send-message-integ.template.json @@ -77,7 +77,9 @@ "DependsOn": [ "StateMachineRoleDefaultPolicyDF1E6607", "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/integ.json index e29e28be48e24..1e45d6ac2af81 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.send-message": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/manifest.json index 95c43c23c7306..ce93106d3034d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-tasks-sqs-send-message-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}/6efba945f7ef10723188d9175dd7cc5b1037a4f44961627de67b64ff9a0e8795.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/78d6b2aa27d843a87fd1608e5e4f3c754cc0adbacab6fe7f5db5f0346591c522.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/tree.json index 84e8847741cc3..ae2af8fe2cc98 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/sqs/integ.send-message.js.snapshot/tree.json @@ -54,6 +54,14 @@ "id": "Role", "path": "aws-stepfunctions-tasks-sqs-send-message-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-sqs-send-message-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-tasks-sqs-send-message-integ/StateMachine/Role/Resource", @@ -213,7 +221,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/aws-stepfunctions-integ.assets.json index 3a1babaca8e19..a47f35c8c6ffd 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "7e7cfb6e1200655b9f1c3dd17194e359383c185ce42eccdd903cc6c32cb3b550": { + "460b692bcf5bda3af56e7bb977a6239dda08eafda773a02b8ba5891b9c1be9f0": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7e7cfb6e1200655b9f1c3dd17194e359383c185ce42eccdd903cc6c32cb3b550.json", + "objectKey": "460b692bcf5bda3af56e7bb977a6239dda08eafda773a02b8ba5891b9c1be9f0.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-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/aws-stepfunctions-integ.template.json index 49545a91da538..1f593dedf6794 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/aws-stepfunctions-integ.template.json @@ -61,7 +61,9 @@ }, "DependsOn": [ "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/integ.json index 9dd0d736f7fd8..bd65af68446d8 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.invoke-activity": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/manifest.json index 671a60ac095bb..46ae04860fa19 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/7e7cfb6e1200655b9f1c3dd17194e359383c185ce42eccdd903cc6c32cb3b550.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/460b692bcf5bda3af56e7bb977a6239dda08eafda773a02b8ba5891b9c1be9f0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/tree.json index e7ed874799c71..df9a067c664f6 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.js.snapshot/tree.json @@ -112,6 +112,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/StateMachine/Role/Resource", @@ -223,7 +231,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ-sfn-start-execution.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ-sfn-start-execution.assets.json index 8a16619fbdd43..65e581ebcaa4d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ-sfn-start-execution.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ-sfn-start-execution.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "3da86cd711964c2d71cf1e1970209e4f06378b3802367b5b389ea60e0690e356": { + "15649c897d2d8d5d8aa1ba9f2ab3f8831209dd991591e6a18d5e4d3a93853812": { "source": { "path": "integ-sfn-start-execution.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3da86cd711964c2d71cf1e1970209e4f06378b3802367b5b389ea60e0690e356.json", + "objectKey": "15649c897d2d8d5d8aa1ba9f2ab3f8831209dd991591e6a18d5e4d3a93853812.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-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ-sfn-start-execution.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ-sfn-start-execution.template.json index 8f9513eba1070..ee059b66a05da 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ-sfn-start-execution.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ-sfn-start-execution.template.json @@ -30,7 +30,9 @@ }, "DependsOn": [ "ChildRole1E3E0EF5" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "ParentRole5F0C366C": { "Type": "AWS::IAM::Role", @@ -170,7 +172,9 @@ "DependsOn": [ "ParentRoleDefaultPolicy9BDC56DC", "ParentRole5F0C366C" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ.json index 34e86537acf6a..9d8245b6cc4d7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.start-execution": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/manifest.json index db0227bf181ef..1e3db123edefa 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "integ-sfn-start-execution.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}/3da86cd711964c2d71cf1e1970209e4f06378b3802367b5b389ea60e0690e356.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15649c897d2d8d5d8aa1ba9f2ab3f8831209dd991591e6a18d5e4d3a93853812.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/tree.json index 6a9729b9c867c..e20bbde070795 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution.js.snapshot/tree.json @@ -24,6 +24,14 @@ "id": "Role", "path": "integ-sfn-start-execution/Child/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "integ-sfn-start-execution/Child/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-sfn-start-execution/Child/Role/Resource", @@ -97,6 +105,14 @@ "id": "Role", "path": "integ-sfn-start-execution/Parent/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "integ-sfn-start-execution/Parent/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "integ-sfn-start-execution/Parent/Role/Resource", @@ -314,7 +330,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions/README.md b/packages/@aws-cdk/aws-stepfunctions/README.md index 088914e46f1f1..1c572499da795 100644 --- a/packages/@aws-cdk/aws-stepfunctions/README.md +++ b/packages/@aws-cdk/aws-stepfunctions/README.md @@ -102,6 +102,9 @@ properly (for example, permissions to invoke any Lambda functions you add to your workflow). A role will be created by default, but you can supply an existing one as well. +Set the `removalPolicy` prop to `RemovalPolicy.RETAIN` if you want to retain the execution +history when CloudFormation deletes your state machine. + ## State Machine Data An Execution represents each time the State Machine is run. Every Execution has [State Machine diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts index 5ed39a7336dbd..9ea8cef30cdd2 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts @@ -1,7 +1,7 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as iam from '@aws-cdk/aws-iam'; import * as logs from '@aws-cdk/aws-logs'; -import { Arn, ArnFormat, Duration, IResource, Resource, Stack, Token } from '@aws-cdk/core'; +import { Arn, ArnFormat, Duration, IResource, RemovalPolicy, Resource, Stack, Token } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { StateGraph } from './state-graph'; import { StatesMetrics } from './stepfunctions-canned-metrics.generated'; @@ -127,6 +127,13 @@ export interface StateMachineProps { * @default false */ readonly tracingEnabled?: boolean; + + /** + * The removal policy to apply to state machine + * + * @default RemovalPolicy.DESTROY + */ + readonly removalPolicy?: RemovalPolicy; } /** @@ -415,6 +422,7 @@ export class StateMachine extends StateMachineBase { loggingConfiguration: props.logs ? this.buildLoggingConfiguration(props.logs) : undefined, tracingConfiguration: props.tracingEnabled ? this.buildTracingConfiguration() : undefined, }); + resource.applyRemovalPolicy(props.removalPolicy, { default: RemovalPolicy.DESTROY }); resource.node.addDependency(this.role); diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.assets.json index 0dfca9b549cc6..852466be8943d 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "5b898966dcd911d589f5aa4c61dec03e86d1a3287714cc519a1ad5990bd07476": { + "88187762ebb3676ec68ded03ce92c045563205c6497ae5a104f13a32dbf4ef43": { "source": { "path": "aws-stepfunctions-custom-state-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5b898966dcd911d589f5aa4c61dec03e86d1a3287714cc519a1ad5990bd07476.json", + "objectKey": "88187762ebb3676ec68ded03ce92c045563205c6497ae5a104f13a32dbf4ef43.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-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.template.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.template.json index 9bfca0186ea09..fde50d40dc7b7 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.template.json @@ -30,7 +30,9 @@ }, "DependsOn": [ "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/integ.json index 4843f3ae04919..624779da650bd 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.custom-state": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/manifest.json index d14acb3db2ca9..1607ee7800b57 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-custom-state-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}/5b898966dcd911d589f5aa4c61dec03e86d1a3287714cc519a1ad5990bd07476.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/88187762ebb3676ec68ded03ce92c045563205c6497ae5a104f13a32dbf4ef43.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/tree.json index cc4d5502adf0b..6544935df1c46 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.custom-state.js.snapshot/tree.json @@ -32,6 +32,14 @@ "id": "Role", "path": "aws-stepfunctions-custom-state-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-custom-state-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-custom-state-integ/StateMachine/Role/Resource", @@ -124,7 +132,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/StateMachineIntrinsicsTestDefaultTestDeployAssert1C1E1D7E.assets.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/StateMachineIntrinsicsTestDefaultTestDeployAssert1C1E1D7E.assets.json index a7fc8855d9004..97a66050176aa 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/StateMachineIntrinsicsTestDefaultTestDeployAssert1C1E1D7E.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/StateMachineIntrinsicsTestDefaultTestDeployAssert1C1E1D7E.assets.json @@ -1,20 +1,20 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": { + "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": { "source": { - "path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle", + "path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip", + "objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "3a53c01c66de73d9450871abc6e1fddff45b3d99c0e6c442d9d7cece58a61a16": { + "f81416da6059e09abfc9d1c6eb1682be54395552f78beaccbbca52d03c19e9fb": { "source": { "path": "StateMachineIntrinsicsTestDefaultTestDeployAssert1C1E1D7E.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3a53c01c66de73d9450871abc6e1fddff45b3d99c0e6c442d9d7cece58a61a16.json", + "objectKey": "f81416da6059e09abfc9d1c6eb1682be54395552f78beaccbbca52d03c19e9fb.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-stepfunctions/test/integ.intrinsics.js.snapshot/StateMachineIntrinsicsTestDefaultTestDeployAssert1C1E1D7E.template.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/StateMachineIntrinsicsTestDefaultTestDeployAssert1C1E1D7E.template.json index ee640fa62bda3..3eccea808e0fe 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/StateMachineIntrinsicsTestDefaultTestDeployAssert1C1E1D7E.template.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/StateMachineIntrinsicsTestDefaultTestDeployAssert1C1E1D7E.template.json @@ -18,7 +18,7 @@ } }, "flattenResponse": "false", - "salt": "1668000058565" + "salt": "1676022935565" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -72,7 +72,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.handler", diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js new file mode 100644 index 0000000000000..58bcb1ef7f38e --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js @@ -0,0 +1,1205 @@ +"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( + // 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-stepfunctions/test/integ.intrinsics.js.snapshot/aws-stepfunctions-intrinsics-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/aws-stepfunctions-intrinsics-integ.assets.json index 1b23f67979698..aa1923a4320db 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/aws-stepfunctions-intrinsics-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/aws-stepfunctions-intrinsics-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "052db64a13863e79214cbfac80396b19bc8fccfdf422b33437fb1022cc96fdaf": { + "42975297f0892e305164a43522eb407ff7ceb350e368297a92ed38378afea8f8": { "source": { "path": "aws-stepfunctions-intrinsics-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "052db64a13863e79214cbfac80396b19bc8fccfdf422b33437fb1022cc96fdaf.json", + "objectKey": "42975297f0892e305164a43522eb407ff7ceb350e368297a92ed38378afea8f8.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-stepfunctions/test/integ.intrinsics.js.snapshot/aws-stepfunctions-intrinsics-integ.template.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/aws-stepfunctions-intrinsics-integ.template.json index 4fa48f800ab3c..2a3e1885601ab 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/aws-stepfunctions-intrinsics-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/aws-stepfunctions-intrinsics-integ.template.json @@ -30,7 +30,9 @@ }, "DependsOn": [ "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/integ.json index 96a6796634bf0..327e249369ca9 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "StateMachineIntrinsicsTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/manifest.json index adad9385c85f8..66c1b2d5b8d3d 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-intrinsics-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}/052db64a13863e79214cbfac80396b19bc8fccfdf422b33437fb1022cc96fdaf.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/42975297f0892e305164a43522eb407ff7ceb350e368297a92ed38378afea8f8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -82,7 +82,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}/3a53c01c66de73d9450871abc6e1fddff45b3d99c0e6c442d9d7cece58a61a16.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f81416da6059e09abfc9d1c6eb1682be54395552f78beaccbbca52d03c19e9fb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/tree.json index 7b0f71da4cd6a..cc652707b921a 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.intrinsics.js.snapshot/tree.json @@ -24,6 +24,14 @@ "id": "Role", "path": "aws-stepfunctions-intrinsics-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-intrinsics-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-intrinsics-integ/StateMachine/Role/Resource", @@ -96,7 +104,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "BootstrapVersion": { @@ -134,7 +142,7 @@ "path": "StateMachineIntrinsicsTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "DeployAssert": { @@ -154,7 +162,7 @@ "path": "StateMachineIntrinsicsTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeStateMachine/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, @@ -226,7 +234,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "BootstrapVersion": { @@ -268,7 +276,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/ListAtAfterParallelDefaultTestDeployAssert1589F6AD.assets.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/ListAtAfterParallelDefaultTestDeployAssert1589F6AD.assets.json index aaf63db40d5de..67bb05c37d117 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/ListAtAfterParallelDefaultTestDeployAssert1589F6AD.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/ListAtAfterParallelDefaultTestDeployAssert1589F6AD.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/integ.json index 07fc44ed5a9df..41a48b68fa2f3 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "ListAtAfterParallel/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/listAt-after-parallel.assets.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/listAt-after-parallel.assets.json index a5eef73780ac4..2a5fe6e7aa183 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/listAt-after-parallel.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/listAt-after-parallel.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "8630751d52e82238c03efbb47cdfbb239899d6694b61ab2b971fddf0030306d6": { + "e0ca1a6a3481c67b08d571332d4691da0fb49815889d530fd7bb339080cc74a3": { "source": { "path": "listAt-after-parallel.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8630751d52e82238c03efbb47cdfbb239899d6694b61ab2b971fddf0030306d6.json", + "objectKey": "e0ca1a6a3481c67b08d571332d4691da0fb49815889d530fd7bb339080cc74a3.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-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/listAt-after-parallel.template.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/listAt-after-parallel.template.json index dd62a6f4b0b73..29043a167a602 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/listAt-after-parallel.template.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/listAt-after-parallel.template.json @@ -30,7 +30,9 @@ }, "DependsOn": [ "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/manifest.json index b04fbb8febf87..f6c754d8eaa25 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "listAt-after-parallel.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}/8630751d52e82238c03efbb47cdfbb239899d6694b61ab2b971fddf0030306d6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0ca1a6a3481c67b08d571332d4691da0fb49815889d530fd7bb339080cc74a3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/tree.json index 1bd0cd563f42a..9b9583196331b 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.listAt-after-parallel.js.snapshot/tree.json @@ -48,6 +48,14 @@ "id": "Role", "path": "listAt-after-parallel/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "listAt-after-parallel/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "listAt-after-parallel/StateMachine/Role/Resource", @@ -140,7 +148,7 @@ "path": "ListAtAfterParallel/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } }, "DeployAssert": { @@ -186,7 +194,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/StateMachineCredentialsDefaultTestDeployAssert3F5E6D8D.assets.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/StateMachineCredentialsDefaultTestDeployAssert3F5E6D8D.assets.json index b2b7f9ec32cf9..dba14180ecd79 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/StateMachineCredentialsDefaultTestDeployAssert3F5E6D8D.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/StateMachineCredentialsDefaultTestDeployAssert3F5E6D8D.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/aws-stepfunctions-state-machine-credentials-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/aws-stepfunctions-state-machine-credentials-integ.assets.json index d49d5e0741c6a..1c77d55543ef4 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/aws-stepfunctions-state-machine-credentials-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/aws-stepfunctions-state-machine-credentials-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "d775f19c6469457d54fcd62837c1d84ec75c1b8aea7b635bb10dc74dcc0e474d": { + "a5a1631e8d04a1f6f1e456a613f298d29c8fb564271da7b38a6ca3bc8b007b44": { "source": { "path": "aws-stepfunctions-state-machine-credentials-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d775f19c6469457d54fcd62837c1d84ec75c1b8aea7b635bb10dc74dcc0e474d.json", + "objectKey": "a5a1631e8d04a1f6f1e456a613f298d29c8fb564271da7b38a6ca3bc8b007b44.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-stepfunctions/test/integ.state-machine-credentials.js.snapshot/aws-stepfunctions-state-machine-credentials-integ.template.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/aws-stepfunctions-state-machine-credentials-integ.template.json index b4004045bfbcd..f48f98bf62bfc 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/aws-stepfunctions-state-machine-credentials-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/aws-stepfunctions-state-machine-credentials-integ.template.json @@ -103,7 +103,9 @@ "DependsOn": [ "StateMachineWithLiteralCredentialsRoleDefaultPolicy331008EE", "StateMachineWithLiteralCredentialsRole1F1DEEC1" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "StateMachineWithCrossAccountLiteralCredentialsRole4AA04DBC": { "Type": "AWS::IAM::Role", @@ -157,7 +159,9 @@ "DependsOn": [ "StateMachineWithCrossAccountLiteralCredentialsRoleDefaultPolicy9B9943BD", "StateMachineWithCrossAccountLiteralCredentialsRole4AA04DBC" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" }, "StateMachineWithJsonPathCredentialsRole7BDE9FA6": { "Type": "AWS::IAM::Role", @@ -211,7 +215,9 @@ "DependsOn": [ "StateMachineWithJsonPathCredentialsRoleDefaultPolicy1DA1C50B", "StateMachineWithJsonPathCredentialsRole7BDE9FA6" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/integ.json index 2dee27641051b..25d4bec208ee3 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "StateMachineCredentials/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/manifest.json index fbf770c2e4d80..aa16ec507d6cd 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-state-machine-credentials-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}/d775f19c6469457d54fcd62837c1d84ec75c1b8aea7b635bb10dc74dcc0e474d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a5a1631e8d04a1f6f1e456a613f298d29c8fb564271da7b38a6ca3bc8b007b44.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/tree.json index c01706db5b425..a7beb896918a0 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine-credentials.js.snapshot/tree.json @@ -488,7 +488,7 @@ "path": "StateMachineCredentials/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } }, "DeployAssert": { @@ -534,7 +534,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.161" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/aws-stepfunctions-integ.assets.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/aws-stepfunctions-integ.assets.json index 541d4e73938ab..3653aec1d2403 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/aws-stepfunctions-integ.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/aws-stepfunctions-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.0.0", "files": { - "fe692bbb723bcadf344380c30c84f9462fc374ce2e75414b100a50e26ccf7c4b": { + "c7c4e7caf8e5f2d81a89f6af62c998e0ca5ce879824d7b7c64264944911a7178": { "source": { "path": "aws-stepfunctions-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fe692bbb723bcadf344380c30c84f9462fc374ce2e75414b100a50e26ccf7c4b.json", + "objectKey": "c7c4e7caf8e5f2d81a89f6af62c998e0ca5ce879824d7b7c64264944911a7178.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-stepfunctions/test/integ.state-machine.js.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/aws-stepfunctions-integ.template.json index 5de5629b08b81..13bcfc71166dc 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/aws-stepfunctions-integ.template.json @@ -125,7 +125,9 @@ }, "DependsOn": [ "StateMachineRoleB840431D" - ] + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/cdk.out index 8ecc185e9dbee..ae4b03c54e770 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/integ.json index 38f04fa5907a7..31b5103d4bf06 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "testCases": { "integ.state-machine": { "stacks": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/manifest.json index 7d6508ac70760..9b04ee8e7e4fe 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.0.0", "artifacts": { "aws-stepfunctions-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}/fe692bbb723bcadf344380c30c84f9462fc374ce2e75414b100a50e26ccf7c4b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c7c4e7caf8e5f2d81a89f6af62c998e0ca5ce879824d7b7c64264944911a7178.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/tree.json index f2180f80cc962..3212e80909bec 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions/test/integ.state-machine.js.snapshot/tree.json @@ -20,6 +20,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/Role/Resource", @@ -155,6 +163,14 @@ "id": "Role", "path": "aws-stepfunctions-integ/StateMachine/Role", "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-integ/StateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-stepfunctions-integ/StateMachine/Role/Resource", @@ -239,7 +255,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.237" } } }, diff --git a/packages/@aws-cdk/aws-stepfunctions/test/state-machine.test.ts b/packages/@aws-cdk/aws-stepfunctions/test/state-machine.test.ts index f99c9cd41e277..cd36d9c175edc 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/state-machine.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions/test/state-machine.test.ts @@ -503,4 +503,20 @@ describe('State Machine', () => { }); }); }); + + test('with removal policy', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new sfn.StateMachine(stack, 'MyStateMachine', { + definition: new sfn.Pass(stack, 'Pass'), + removalPolicy: cdk.RemovalPolicy.RETAIN, + }); + + // THEN + Template.fromStack(stack).hasResource('AWS::StepFunctions::StateMachine', { + DeletionPolicy: 'Retain', + }); + }); }); 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 af58fda5567da..0aecd60ddd224 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 @@ -317,7 +317,7 @@ }, "AWS::ACMPCA::Permission": { "attributes": {}, - "description": "Grants permissions to the AWS Certificate Manager ( ACM ) service principal ( `acm.amazonaws.com` ) to perform [IssueCertificate](https://docs.aws.amazon.com/latest/APIReference/API_IssueCertificate.html) , [GetCertificate](https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificate.html) , and [ListPermissions](https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListPermissions.html) actions on a CA. These actions are needed for the ACM principal to renew private PKI certificates requested through ACM and residing in the same AWS account as the CA.\n\n**About permissions** - If the private CA and the certificates it issues reside in the same account, you can use `AWS::ACMPCA::Permission` to grant permissions for ACM to carry out automatic certificate renewals.\n- For automatic certificate renewal to succeed, the ACM service principal needs permissions to create, retrieve, and list permissions.\n- If the private CA and the ACM certificates reside in different accounts, then permissions cannot be used to enable automatic renewals. Instead, the ACM certificate owner must set up a resource-based policy to enable cross-account issuance and renewals. For more information, see [Using a Resource Based Policy with AWS Private CA](https://docs.aws.amazon.com/privateca/latest/userguide/pca-rbp.html) .\n\n> To update an `AWS::ACMPCA::Permission` resource, you must first delete the existing permission resource from the CloudFormation stack and then create a new permission resource with updated properties.", + "description": "Grants permissions to the AWS Certificate Manager ( ACM ) service principal ( `acm.amazonaws.com` ) to perform [IssueCertificate](https://docs.aws.amazon.com/privateca/latest/APIReference/API_IssueCertificate.html) , [GetCertificate](https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificate.html) , and [ListPermissions](https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListPermissions.html) actions on a CA. These actions are needed for the ACM principal to renew private PKI certificates requested through ACM and residing in the same AWS account as the CA.\n\n**About permissions** - If the private CA and the certificates it issues reside in the same account, you can use `AWS::ACMPCA::Permission` to grant permissions for ACM to carry out automatic certificate renewals.\n- For automatic certificate renewal to succeed, the ACM service principal needs permissions to create, retrieve, and list permissions.\n- If the private CA and the ACM certificates reside in different accounts, then permissions cannot be used to enable automatic renewals. Instead, the ACM certificate owner must set up a resource-based policy to enable cross-account issuance and renewals. For more information, see [Using a Resource Based Policy with AWS Private CA](https://docs.aws.amazon.com/privateca/latest/userguide/pca-rbp.html) .\n\n> To update an `AWS::ACMPCA::Permission` resource, you must first delete the existing permission resource from the CloudFormation stack and then create a new permission resource with updated properties.", "properties": { "Actions": "The private CA actions that can be performed by the designated AWS service. Supported actions are `IssueCertificate` , `GetCertificate` , and `ListPermissions` .", "CertificateAuthorityArn": "The Amazon Resource Number (ARN) of the private CA from which the permission was issued.", @@ -1178,7 +1178,7 @@ "DataTraceEnabled": "Indicates whether data trace logging is enabled for methods in the stage. API Gateway pushes these logs to Amazon CloudWatch Logs.", "Description": "A description of the purpose of the stage.", "DocumentationVersion": "The version identifier of the API documentation snapshot.", - "LoggingLevel": "The logging level for this method. For valid values, see the `loggingLevel` property of the [Stage](https://docs.aws.amazon.com/apigateway/latest/api/API_Stage.html#loggingLevel) resource in the *Amazon API Gateway API Reference* .", + "LoggingLevel": "The logging level for this method. For valid values, see the `loggingLevel` property of the [MethodSetting](https://docs.aws.amazon.com/apigateway/latest/api/API_MethodSetting.html) resource in the *Amazon API Gateway API Reference* .", "MethodSettings": "Configures settings for all of the stage's methods.", "MetricsEnabled": "Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.", "Tags": "An array of arbitrary tags (key-value pairs) to associate with the stage.", @@ -1833,7 +1833,8 @@ }, "AWS::ApiGatewayV2::RouteResponse": { "attributes": { - "Ref": "`Ref` returns the Route Response resource ID, such as `abc123` ." + "Ref": "`Ref` returns the Route Response resource ID, such as `abc123` .", + "RouteResponseId": "" }, "description": "The `AWS::ApiGatewayV2::RouteResponse` resource creates a route response for a WebSocket API. For more information, see [Set up Route Responses for a WebSocket API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-route-response.html) in the *API Gateway Developer Guide* .", "properties": { @@ -1845,13 +1846,6 @@ "RouteResponseKey": "The route response key." } }, - "AWS::ApiGatewayV2::RouteResponse.ParameterConstraints": { - "attributes": {}, - "description": "Specifies whether the parameter is required.", - "properties": { - "Required": "Specifies whether the parameter is required." - } - }, "AWS::ApiGatewayV2::Stage": { "attributes": { "Ref": "`Ref` returns the stage name, such as `MyTestStage` ." @@ -1963,7 +1957,7 @@ "properties": { "ApplicationId": "The application ID.", "ConfigurationProfileId": "The configuration profile ID.", - "ConfigurationVersion": "The configuration version to deploy.", + "ConfigurationVersion": "The configuration version to deploy. If deploying an AWS AppConfig hosted configuration version, you can specify either the version number or version label.", "DeploymentStrategyId": "The deployment strategy ID.", "Description": "A description of the deployment.", "EnvironmentId": "The environment ID.", @@ -5521,7 +5515,7 @@ }, "AWS::Athena::WorkGroup.ResultConfiguration": { "attributes": {}, - "description": "The location in Amazon S3 where query results are stored and the encryption option, if any, used for query results. These are known as \"client-side settings\". If workgroup settings override client-side settings, then the query uses the workgroup settings.", + "description": "The location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query and calculation results. These are known as \"client-side settings\". If workgroup settings override client-side settings, then the query uses the workgroup settings.", "properties": { "EncryptionConfiguration": "If query results are encrypted in Amazon S3, indicates the encryption option used (for example, `SSE_KMS` or `CSE_KMS` ) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See `EnforceWorkGroupConfiguration` and [Workgroup Settings Override Client-Side Settings](https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html) .", "OutputLocation": "The location in Amazon S3 where your query results are stored, such as `s3://path/to/query/bucket/` . To run a query, you must specify the query results location using either a client-side setting for individual queries or a location specified by the workgroup. If workgroup settings override client-side settings, then the query uses the location specified for the workgroup. If no query location is set, Athena issues an error. For more information, see [Working with Query Results, Output Files, and Query History](https://docs.aws.amazon.com/athena/latest/ug/querying.html) and `EnforceWorkGroupConfiguration` ." @@ -5628,7 +5622,7 @@ "CapacityRebalance": "Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of interruption. After launching a new instance, it then terminates an old instance. For more information, see [Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-capacity-rebalancing.html) in the in the *Amazon EC2 Auto Scaling User Guide* .", "Context": "Reserved.", "Cooldown": "*Only needed if you use simple scaling policies.*\n\nThe amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see [Scaling cooldowns for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in the *Amazon EC2 Auto Scaling User Guide* .\n\nDefault: `300` seconds", - "DefaultInstanceWarmup": "The amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the `InService` state. For more information, see [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html) in the *Amazon EC2 Auto Scaling User Guide* .\n\n> To manage your warm-up settings at the group level, we recommend that you set the default instance warmup, *even if its value is set to 0 seconds* . This also optimizes the performance of scaling policies that scale continuously, such as target tracking and step scaling policies.\n> \n> If you need to remove a value that you previously set, include the property but specify `-1` for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a minimum value of `0` . \n\nDefault: None", + "DefaultInstanceWarmup": "The amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the `InService` state.\n\nDuring an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html) in the *Amazon EC2 Auto Scaling User Guide* .\n\n> To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, *even if it is set to 0 seconds* . To remove a value that you previously set, include the property but specify `-1` for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of `0` or other nominal value. \n\nDefault: None", "DesiredCapacity": "The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. It can scale beyond this capacity if you configure automatic scaling.\n\nThe number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity when creating the stack, the default is the minimum size of the group.\n\nCloudFormation marks the Auto Scaling group as successful (by setting its status to CREATE_COMPLETE) when the desired capacity is reached. However, if a maximum Spot price is set in the launch template or launch configuration that you specified, then desired capacity is not used as a criteria for success. Whether your request is fulfilled depends on Spot Instance capacity and your maximum price.", "DesiredCapacityType": "The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports `DesiredCapacityType` for attribute-based instance type selection only. For more information, see [Creating an Auto Scaling group using attribute-based instance type selection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-instance-type-requirements.html) in the *Amazon EC2 Auto Scaling User Guide* .\n\nBy default, Amazon EC2 Auto Scaling specifies `units` , which translates into number of instances.\n\nValid values: `units` | `vcpu` | `memory-mib`", "HealthCheckGracePeriod": "The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your instances do not immediately pass their health checks after they enter the `InService` state. For more information, see [Set the health check grace period for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/health-check-grace-period.html) in the *Amazon EC2 Auto Scaling User Guide* .\n\nDefault: `0` seconds", @@ -6147,11 +6141,11 @@ "attributes": {}, "description": "`CustomizedScalingMetricSpecification` is a subproperty of [TargetTrackingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-targettrackingconfiguration.html) that specifies a customized scaling metric for a target tracking configuration to use with AWS Auto Scaling ( Auto Scaling Plans ).\n\nTo create your customized scaling metric specification:\n\n- Add values for each required property from CloudWatch. You can use an existing metric, or a new metric that you create. To use your own metric, you must first publish the metric to CloudWatch. For more information, see [Publish Custom Metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html) in the *Amazon CloudWatch User Guide* .\n- Choose a metric that changes proportionally with capacity. The value of the metric should increase or decrease in inverse proportion to the number of capacity units. That is, the value of the metric should decrease when capacity increases.\n\nFor information about terminology, available metrics, or how to publish new metrics, see [Amazon CloudWatch Concepts](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html) in the *Amazon CloudWatch User Guide* .", "properties": { - "Dimensions": "The dimensions of the metric.\n\nConditional: If you published your metric with dimensions, you must specify the same dimensions in your customized scaling metric specification.", - "MetricName": "The name of the metric.", + "Dimensions": "The dimensions of the metric.\n\nConditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.", + "MetricName": "The name of the metric. To get the exact metric name, namespace, and dimensions, inspect the [Metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Metric.html) object that is returned by a call to [ListMetrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) .", "Namespace": "The namespace of the metric.", "Statistic": "The statistic of the metric.", - "Unit": "The unit of the metric." + "Unit": "The unit of the metric. For a complete list of the units that CloudWatch supports, see the [MetricDatum](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html) data type in the *Amazon CloudWatch API Reference* ." } }, "AWS::AutoScalingPlans::ScalingPlan.MetricDimension": { @@ -6453,7 +6447,7 @@ "EksConfiguration": "The details for the Amazon EKS cluster that supports the compute environment.", "ReplaceComputeEnvironment": "Specifies whether the compute environment is replaced if an update is made that requires replacing the instances in the compute environment. The default value is `true` . To enable more properties to be updated, set this property to `false` . When changing the value of this property to `false` , do not change any other properties at the same time. If other properties are changed at the same time, and the change needs to be rolled back but it can't, it's possible for the stack to go into the `UPDATE_ROLLBACK_FAILED` state. You can't update a stack that is in the `UPDATE_ROLLBACK_FAILED` state. However, if you can continue to roll it back, you can return the stack to its original settings and then try to update it again. For more information, see [Continue rolling back an update](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html) in the *AWS CloudFormation User Guide* .\n\nThe properties that can't be changed without replacing the compute environment are in the [`ComputeResources`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html) property type: [`AllocationStrategy`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-allocationstrategy) , [`BidPercentage`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-bidpercentage) , [`Ec2Configuration`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2configuration) , [`Ec2KeyPair`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2keypair) , [`Ec2KeyPair`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2keypair) , [`ImageId`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-imageid) , [`InstanceRole`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-instancerole) , [`InstanceTypes`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-instancetypes) , [`LaunchTemplate`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-launchtemplate) , [`MaxvCpus`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-maxvcpus) , [`MinvCpus`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-minvcpus) , [`PlacementGroup`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-placementgroup) , [`SecurityGroupIds`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-securitygroupids) , [`Subnets`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-subnets) , [Tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-tags) , [`Type`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-type) , and [`UpdateToLatestImageVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-updatetolatestimageversion) .", "ServiceRole": "The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf. For more information, see [AWS Batch service IAM role](https://docs.aws.amazon.com/batch/latest/userguide/service_IAM_role.html) in the *AWS Batch User Guide* .\n\n> If your account already created the AWS Batch service-linked role, that role is used by default for your compute environment unless you specify a different role here. If the AWS Batch service-linked role doesn't exist in your account, and no role is specified here, the service attempts to create the AWS Batch service-linked role in your account. \n\nIf your specified role has a path other than `/` , then you must specify either the full role ARN (recommended) or prefix the role name with the path. For example, if a role with the name `bar` has a path of `/foo/` , specify `/foo/bar` as the role name. For more information, see [Friendly names and paths](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names) in the *IAM User Guide* .\n\n> Depending on how you created your AWS Batch service role, its ARN might contain the `service-role` path prefix. When you only specify the name of the service role, AWS Batch assumes that your ARN doesn't use the `service-role` path prefix. Because of this, we recommend that you specify the full ARN of your service role when you create compute environments.", - "State": "The state of the compute environment. If the state is `ENABLED` , then the compute environment accepts jobs from a queue and can scale out automatically based on queues.\n\nIf the state is `ENABLED` , then the AWS Batch scheduler can attempt to place jobs from an associated job queue on the compute resources within the environment. If the compute environment is managed, then it can scale its instances out or in automatically, based on the job queue demand.\n\nIf the state is `DISABLED` , then the AWS Batch scheduler doesn't attempt to place jobs within the environment. Jobs in a `STARTING` or `RUNNING` state continue to progress normally. Managed compute environments in the `DISABLED` state don't scale out. However, they scale in to `minvCpus` value after instances become idle.", + "State": "The state of the compute environment. If the state is `ENABLED` , then the compute environment accepts jobs from a queue and can scale out automatically based on queues.\n\nIf the state is `ENABLED` , then the AWS Batch scheduler can attempt to place jobs from an associated job queue on the compute resources within the environment. If the compute environment is managed, then it can scale its instances out or in automatically, based on the job queue demand.\n\nIf the state is `DISABLED` , then the AWS Batch scheduler doesn't attempt to place jobs within the environment. Jobs in a `STARTING` or `RUNNING` state continue to progress normally. Managed compute environments in the `DISABLED` state don't scale out.\n\n> Compute environments in a `DISABLED` state may continue to incur billing charges. To prevent additional charges, turn off and then delete the compute environment. For more information, see [State](https://docs.aws.amazon.com/batch/latest/userguide/compute_environment_parameters.html#compute_environment_state) in the *AWS Batch User Guide* . \n\nWhen an instance is idle, the instance scales down to the `minvCpus` value. However, the instance size doesn't change. For example, consider a `c5.8xlarge` instance with a `minvCpus` value of `4` and a `desiredvCpus` value of `36` . This instance doesn't scale down to a `c5.large` instance.", "Tags": "The tags applied to the compute environment.", "Type": "The type of the compute environment: `MANAGED` or `UNMANAGED` . For more information, see [Compute Environments](https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the *AWS Batch User Guide* .", "UnmanagedvCpus": "The maximum number of vCPUs for an unmanaged compute environment. This parameter is only used for fair share scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for a fair share job queue, no vCPU capacity is reserved.\n\n> This parameter is only supported when the `type` parameter is set to `UNMANAGED` .", @@ -6466,7 +6460,7 @@ "properties": { "AllocationStrategy": "The allocation strategy to use for the compute resource if not enough instances of the best fitting instance type can be allocated. This might be because of availability of the instance type in the Region or [Amazon EC2 service limits](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html) . For more information, see [Allocation strategies](https://docs.aws.amazon.com/batch/latest/userguide/allocation-strategies.html) in the *AWS Batch User Guide* .\n\nWhen updating a compute environment, changing the allocation strategy requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* . `BEST_FIT` is not supported when updating a compute environment.\n\n> This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified. \n\n- **BEST_FIT (default)** - AWS Batch selects an instance type that best fits the needs of the jobs with a preference for the lowest-cost instance type. If additional instances of the selected instance type aren't available, AWS Batch waits for the additional instances to be available. If there aren't enough instances available, or if the user is reaching [Amazon EC2 service limits](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html) then additional jobs aren't run until the currently running jobs have completed. This allocation strategy keeps costs lower but can limit scaling. If you are using Spot Fleets with `BEST_FIT` then the Spot Fleet IAM role must be specified.\n- **BEST_FIT_PROGRESSIVE** - AWS Batch will select additional instance types that are large enough to meet the requirements of the jobs in the queue, with a preference for instance types with a lower cost per unit vCPU. If additional instances of the previously selected instance types aren't available, AWS Batch will select new instance types.\n- **SPOT_CAPACITY_OPTIMIZED** - AWS Batch will select one or more instance types that are large enough to meet the requirements of the jobs in the queue, with a preference for instance types that are less likely to be interrupted. This allocation strategy is only available for Spot Instance compute resources.\n\nWith both `BEST_FIT_PROGRESSIVE` and `SPOT_CAPACITY_OPTIMIZED` allocation strategies using On-Demand or Spot Instances, and the `BEST_FIT` strategy using Spot Instances, AWS Batch might need to go above `maxvCpus` to meet your capacity requirements. In this event, AWS Batch never exceeds `maxvCpus` by more than a single instance.", "BidPercentage": "The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched. For example, if your maximum percentage is 20%, the Spot price must be less than 20% of the current On-Demand price for that Amazon EC2 instance. You always pay the lowest (market) price and never more than your maximum percentage. For most use cases, we recommend leaving this field empty.\n\nWhen updating a compute environment, changing the bid percentage requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .\n\n> This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it.", - "DesiredvCpus": "The desired number of Amazon EC2 vCPUS in the compute environment. AWS Batch modifies this value between the minimum and maximum values based on job queue demand.\n\n> This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. > AWS Batch doesn't support changing the desired number of vCPUs of an existing compute environment. Don't specify this parameter for compute environments using Amazon EKS clusters.", + "DesiredvCpus": "The desired number of Amazon EC2 vCPUS in the compute environment. AWS Batch modifies this value between the minimum and maximum values based on job queue demand.\n\n> This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. > AWS Batch doesn't support changing the desired number of vCPUs of an existing compute environment. Don't specify this parameter for compute environments using Amazon EKS clusters. > When you update the `desiredvCpus` setting, the value must be between the `minvCpus` and `maxvCpus` values.\n> \n> Additionally, the updated `desiredvCpus` value must be greater than or equal to the current `desiredvCpus` value. For more information, see [test](https://docs.aws.amazon.com/batch/latest/userguide/error-desired-vcpus-update.html) in the *AWS Batch User Guide* .", "Ec2Configuration": "Provides information used to select Amazon Machine Images (AMIs) for EC2 instances in the compute environment. If `Ec2Configuration` isn't specified, the default is `ECS_AL2` .\n\nWhen updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* . To remove the EC2 configuration and any custom AMI ID specified in `imageIdOverride` , set this value to an empty string.\n\nOne or two values can be provided.\n\n> This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it.", "Ec2KeyPair": "The Amazon EC2 key pair that's used for instances launched in the compute environment. You can use this key pair to log in to your instances with SSH. To remove the Amazon EC2 key pair, set this value to an empty string.\n\nWhen updating a compute environment, changing the EC2 key pair requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .\n\n> This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it.", "ImageId": "The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. This parameter is overridden by the `imageIdOverride` member of the `Ec2Configuration` structure. To remove the custom AMI ID and use the default AMI ID, set this value to an empty string.\n\nWhen updating a compute environment, changing the AMI ID requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .\n\n> This parameter isn't applicable to jobs that are running on Fargate resources. Don't specify it. > The AMI that you choose for a compute environment must match the architecture of the instance types that you intend to use for that compute environment. For example, if your compute environment uses A1 instance types, the compute resource AMI that you choose must support ARM instances. Amazon ECS vends both x86 and ARM versions of the Amazon ECS-optimized Amazon Linux 2 AMI. For more information, see [Amazon ECS-optimized Amazon Linux 2 AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#ecs-optimized-ami-linux-variants.html) in the *Amazon Elastic Container Service Developer Guide* .", @@ -7220,15 +7214,15 @@ "Ref": "`Ref` returns `SubscriptionArn` . For example:\n\n`{ \"Ref\": \"myAnomalyMonitorLogicalName\" }`", "SubscriptionArn": "The `AnomalySubscription` Amazon Resource Name (ARN)." }, - "description": "The `AWS::CE::AnomalySubscription` resource is a Cost Explorer resource type that associates a monitor, threshold, and list of subscribers. It delivers notifications about anomalies detected by a monitor that exceeds a threshold. The content consists of the detailed metadata and the current status of the `AnomalySubscription` object.", + "description": "The `AWS::CE::AnomalySubscription` resource (also referred to as an alert subscription) is a Cost Explorer resource type that sends notifications about specific anomalies that meet an alerting criteria defined by you.\n\nYou can specify the frequency of the alerts and the subscribers to notify.\n\nAnomaly subscriptions can be associated with one or more [`AWS::CE::AnomalyMonitor`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-anomalymonitor.html) resources, and they only send notifications about anomalies detected by those associated monitors. You can also configure a threshold to further control which anomalies are included in the notifications.\n\nAnomalies that don\u2019t exceed the chosen threshold and therefore don\u2019t trigger notifications from an anomaly subscription will still be available on the console and from the [`GetAnomalies`](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetAnomalies.html) API.", "properties": { - "Frequency": "The frequency that anomaly reports are sent over email.", + "Frequency": "The frequency that anomaly notifications are sent. Notifications are sent either over email (for DAILY and WEEKLY frequencies) or SNS (for IMMEDIATE frequency). For more information, see [Creating an Amazon SNS topic for anomaly notifications](https://docs.aws.amazon.com/cost-management/latest/userguide/ad-SNS.html) .", "MonitorArnList": "A list of cost anomaly monitors.", "ResourceTags": "", "Subscribers": "A list of subscribers to notify.", "SubscriptionName": "The name for the subscription.", - "Threshold": "(deprecated)\n\nThe dollar value that triggers a notification if the threshold is exceeded.\n\nThis field has been deprecated. To specify a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.\n\nOne of Threshold or ThresholdExpression is required for this resource.", - "ThresholdExpression": "An [Expression](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are `ANOMALY_TOTAL_IMPACT_ABSOLUTE` and `ANOMALY_TOTAL_IMPACT_PERCENTAGE` . The supported nested expression types are `AND` and `OR` . The match option `GREATER_THAN_OR_EQUAL` is required. Values must be numbers between 0 and 10,000,000,000.\n\nOne of Threshold or ThresholdExpression is required for this resource.\n\nThe following are examples of valid ThresholdExpressions:\n\n- Absolute threshold: `{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }`\n- Percentage threshold: `{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }`\n- `AND` two thresholds together: `{ \"And\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } } ] }`\n- `OR` two thresholds together: `{ \"Or\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } } ] }`" + "Threshold": "(deprecated)\n\nAn absolute dollar value that must be exceeded by the anomaly's total impact (see [Impact](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Impact.html) for more details) for an anomaly notification to be generated.\n\nThis field has been deprecated. To specify a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.\n\nOne of Threshold or ThresholdExpression is required for `AWS::CE::AnomalySubscription` . You cannot specify both.", + "ThresholdExpression": "An [Expression](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) object in JSON string format used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are `ANOMALY_TOTAL_IMPACT_ABSOLUTE` and `ANOMALY_TOTAL_IMPACT_PERCENTAGE` , corresponding to an anomaly\u2019s TotalImpact and TotalImpactPercentage, respectively (see [Impact](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Impact.html) for more details). The supported nested expression types are `AND` and `OR` . The match option `GREATER_THAN_OR_EQUAL` is required. Values must be numbers between 0 and 10,000,000,000 in string format.\n\nOne of Threshold or ThresholdExpression is required for `AWS::CE::AnomalySubscription` . You cannot specify both.\n\nFor further information, see the [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-anomalysubscription.html#aws-resource-ce-anomalysubscription--examples) section of this page." } }, "AWS::CE::AnomalySubscription.ResourceTag": { @@ -8612,7 +8606,7 @@ }, "AWS::CloudTrail::EventDataStore.AdvancedEventSelector": { "attributes": {}, - "description": "Advanced event selectors let you create fine-grained selectors for the following AWS CloudTrail event record \ufb01elds. They help you control costs by logging only those events that are important to you. For more information about advanced event selectors, see [Logging data events for trails](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) in the *AWS CloudTrail User Guide* .\n\n- `readOnly`\n- `eventSource`\n- `eventName`\n- `eventCategory`\n- `resources.type`\n- `resources.ARN`\n\nYou cannot apply both event selectors and advanced event selectors to a trail.", + "description": "Advanced event selectors let you create fine-grained selectors for the following AWS CloudTrail event record \ufb01elds. They help you control costs by logging only those events that are important to you. For more information about advanced event selectors, see [Logging data events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) in the *AWS CloudTrail User Guide* .\n\n- `readOnly`\n- `eventSource`\n- `eventName`\n- `eventCategory`\n- `resources.type`\n- `resources.ARN`\n\nYou cannot apply both event selectors and advanced event selectors to a trail.", "properties": { "FieldSelectors": "Contains all selector statements in an advanced event selector.", "Name": "An optional, descriptive name for an advanced event selector, such as \"Log data events for only two S3 buckets\"." @@ -8624,7 +8618,7 @@ "properties": { "EndsWith": "An operator that includes events that match the last few characters of the event record field specified as the value of `Field` .", "Equals": "An operator that includes events that match the exact value of the event record field specified as the value of `Field` . This is the only valid operator that you can use with the `readOnly` , `eventCategory` , and `resources.type` fields.", - "Field": "A field in a CloudTrail event record on which to filter events to be logged. For event data stores for AWS Config configuration items, Audit Manager evidence, or non- AWS events, the field is used only for selecting events as filtering is not supported.\n\nFor CloudTrail event records, supported fields include `readOnly` , `eventCategory` , `eventSource` (for management events), `eventName` , `resources.type` , and `resources.ARN` .\n\nFor event data stores for AWS Config configuration items, Audit Manager evidence, or non- AWS events, the only supported field is `eventCategory` .\n\n- *`readOnly`* - Optional. Can be set to `Equals` a value of `true` or `false` . If you do not add this field, CloudTrail logs both `read` and `write` events. A value of `true` logs only `read` events. A value of `false` logs only `write` events.\n- *`eventSource`* - For filtering management events only. This can be set only to `NotEquals` `kms.amazonaws.com` .\n- *`eventName`* - Can use any operator. You can use it to \ufb01lter in or \ufb01lter out any data event logged to CloudTrail, such as `PutBucket` or `GetSnapshotBlock` . You can have multiple values for this \ufb01eld, separated by commas.\n- *`eventCategory`* - This is required and must be set to `Equals` .\n\n- For CloudTrail event records, the value must be `Management` or `Data` .\n- For AWS Config configuration items, the value must be `ConfigurationItem` .\n- For Audit Manager evidence, the value must be `Evidence` .\n- For non- AWS events, the value must be `ActivityAuditLog` .\n- *`resources.type`* - This \ufb01eld is required for CloudTrail data events. `resources.type` can only use the `Equals` operator, and the value can be one of the following:\n\n- `AWS::CloudTrail::Channel`\n- `AWS::S3::Object`\n- `AWS::Lambda::Function`\n- `AWS::DynamoDB::Table`\n- `AWS::S3Outposts::Object`\n- `AWS::ManagedBlockchain::Node`\n- `AWS::S3ObjectLambda::AccessPoint`\n- `AWS::EC2::Snapshot`\n- `AWS::S3::AccessPoint`\n- `AWS::DynamoDB::Stream`\n- `AWS::Glue::Table`\n- `AWS::FinSpace::Environment`\n- `AWS::SageMaker::ExperimentTrialComponent`\n- `AWS::SageMaker::FeatureGroup`\n\nYou can have only one `resources.type` \ufb01eld per selector. To log data events on more than one resource type, add another selector.\n- *`resources.ARN`* - You can use any operator with `resources.ARN` , but if you use `Equals` or `NotEquals` , the value must exactly match the ARN of a valid resource of the type you've speci\ufb01ed in the template as the value of resources.type. For example, if resources.type equals `AWS::S3::Object` , the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use the `StartsWith` operator, and include only the bucket ARN as the matching value.\n\nThe trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.\n\n- `arn::s3:::/`\n- `arn::s3::://`\n\nWhen `resources.type` equals `AWS::S3::AccessPoint` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don\u2019t include the object path, and use the `StartsWith` or `NotStartsWith` operators.\n\n- `arn::s3:::accesspoint/`\n- `arn::s3:::accesspoint//object/`\n\nWhen resources.type equals `AWS::Lambda::Function` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::lambda:::function:`\n\nWhen resources.type equals `AWS::DynamoDB::Table` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::dynamodb:::table/`\n\nWhen resources.type equals `AWS::CloudTrail::Channel` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::cloudtrail:::channel/`\n\nWhen `resources.type` equals `AWS::S3Outposts::Object` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::s3-outposts:::`\n\nWhen `resources.type` equals `AWS::ManagedBlockchain::Node` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::managedblockchain:::nodes/`\n\nWhen `resources.type` equals `AWS::S3ObjectLambda::AccessPoint` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::s3-object-lambda:::accesspoint/`\n\nWhen `resources.type` equals `AWS::EC2::Snapshot` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::ec2:::snapshot/`\n\nWhen `resources.type` equals `AWS::DynamoDB::Stream` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::dynamodb:::table//stream/`\n\nWhen `resources.type` equals `AWS::Glue::Table` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::glue:::table//`\n\nWhen `resources.type` equals `AWS::FinSpace::Environment` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::finspace:::environment/`\n\nWhen `resources.type` equals `AWS::SageMaker::ExperimentTrialComponent` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::sagemaker:::experiment-trial-component/`\n\nWhen `resources.type` equals `AWS::SageMaker::FeatureGroup` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::sagemaker:::feature-group/`", + "Field": "A field in a CloudTrail event record on which to filter events to be logged. For event data stores for AWS Config configuration items, Audit Manager evidence, or non- AWS events, the field is used only for selecting events as filtering is not supported.\n\nFor CloudTrail event records, supported fields include `readOnly` , `eventCategory` , `eventSource` (for management events), `eventName` , `resources.type` , and `resources.ARN` .\n\nFor event data stores for AWS Config configuration items, Audit Manager evidence, or non- AWS events, the only supported field is `eventCategory` .\n\n- *`readOnly`* - Optional. Can be set to `Equals` a value of `true` or `false` . If you do not add this field, CloudTrail logs both `read` and `write` events. A value of `true` logs only `read` events. A value of `false` logs only `write` events.\n- *`eventSource`* - For filtering management events only. This can be set only to `NotEquals` `kms.amazonaws.com` .\n- *`eventName`* - Can use any operator. You can use it to \ufb01lter in or \ufb01lter out any data event logged to CloudTrail, such as `PutBucket` or `GetSnapshotBlock` . You can have multiple values for this \ufb01eld, separated by commas.\n- *`eventCategory`* - This is required and must be set to `Equals` .\n\n- For CloudTrail event records, the value must be `Management` or `Data` .\n- For AWS Config configuration items, the value must be `ConfigurationItem` .\n- For Audit Manager evidence, the value must be `Evidence` .\n- For non- AWS events, the value must be `ActivityAuditLog` .\n- *`resources.type`* - This \ufb01eld is required for CloudTrail data events. `resources.type` can only use the `Equals` operator, and the value can be one of the following:\n\n- `AWS::DynamoDB::Table`\n- `AWS::Lambda::Function`\n- `AWS::S3::Object`\n- `AWS::CloudTrail::Channel`\n- `AWS::Cognito::IdentityPool`\n- `AWS::DynamoDB::Stream`\n- `AWS::EC2::Snapshot`\n- `AWS::FinSpace::Environment`\n- `AWS::Glue::Table`\n- `AWS::KendraRanking::ExecutionPlan`\n- `AWS::ManagedBlockchain::Node`\n- `AWS::SageMaker::ExperimentTrialComponent`\n- `AWS::SageMaker::FeatureGroup`\n- `AWS::S3::AccessPoint`\n- `AWS::S3ObjectLambda::AccessPoint`\n- `AWS::S3Outposts::Object`\n\nYou can have only one `resources.type` \ufb01eld per selector. To log data events on more than one resource type, add another selector.\n- *`resources.ARN`* - You can use any operator with `resources.ARN` , but if you use `Equals` or `NotEquals` , the value must exactly match the ARN of a valid resource of the type you've speci\ufb01ed in the template as the value of resources.type. For example, if resources.type equals `AWS::S3::Object` , the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use the `StartsWith` operator, and include only the bucket ARN as the matching value.\n\nThe trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.\n\n- `arn::s3:::/`\n- `arn::s3::://`\n\nWhen resources.type equals `AWS::DynamoDB::Table` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::dynamodb:::table/`\n\nWhen resources.type equals `AWS::Lambda::Function` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::lambda:::function:`\n\nWhen resources.type equals `AWS::CloudTrail::Channel` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::cloudtrail:::channel/`\n\nWhen resources.type equals `AWS::Cognito::IdentityPool` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::cognito-identity:::identitypool/`\n\nWhen `resources.type` equals `AWS::DynamoDB::Stream` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::dynamodb:::table//stream/`\n\nWhen `resources.type` equals `AWS::EC2::Snapshot` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::ec2:::snapshot/`\n\nWhen `resources.type` equals `AWS::FinSpace::Environment` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::finspace:::environment/`\n\nWhen `resources.type` equals `AWS::Glue::Table` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::glue:::table//`\n\nWhen `resources.type` equals `AWS::KendraRanking::ExecutionPlan` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::kendra-ranking:::table//`\n\nWhen `resources.type` equals `AWS::ManagedBlockchain::Node` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::managedblockchain:::nodes/`\n\nWhen `resources.type` equals `AWS::SageMaker::ExperimentTrialComponent` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::sagemaker:::experiment-trial-component/`\n\nWhen `resources.type` equals `AWS::SageMaker::FeatureGroup` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::sagemaker:::feature-group/`\n\nWhen `resources.type` equals `AWS::S3::AccessPoint` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don\u2019t include the object path, and use the `StartsWith` or `NotStartsWith` operators.\n\n- `arn::s3:::accesspoint/`\n- `arn::s3:::accesspoint//object/`\n\nWhen `resources.type` equals `AWS::S3ObjectLambda::AccessPoint` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::s3-object-lambda:::accesspoint/`\n\nWhen `resources.type` equals `AWS::S3Outposts::Object` , and the operator is set to `Equals` or `NotEquals` , the ARN must be in the following format:\n\n- `arn::s3-outposts:::`", "NotEndsWith": "An operator that excludes events that match the last few characters of the event record field specified as the value of `Field` .", "NotEquals": "An operator that excludes events that match the exact value of the event record field specified as the value of `Field` .", "NotStartsWith": "An operator that excludes events that match the first few characters of the event record field specified as the value of `Field` .", @@ -10601,26 +10595,26 @@ "properties": { "ExcludedAccounts": "A comma-separated list of accounts excluded from organization AWS Config rule.", "OrganizationConfigRuleName": "The name that you assign to organization AWS Config rule.", - "OrganizationCustomCodeRuleMetadata": "", + "OrganizationCustomPolicyRuleMetadata": "An object that specifies metadata for your organization's AWS Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of AWS resource, and organization trigger types that initiate AWS Config to evaluate AWS resources against a rule.", "OrganizationCustomRuleMetadata": "An `OrganizationCustomRuleMetadata` object.", "OrganizationManagedRuleMetadata": "An `OrganizationManagedRuleMetadata` object." } }, - "AWS::Config::OrganizationConfigRule.OrganizationCustomCodeRuleMetadata": { + "AWS::Config::OrganizationConfigRule.OrganizationCustomPolicyRuleMetadata": { "attributes": {}, - "description": "", + "description": "An object that specifies metadata for your organization's AWS Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of AWS resource, and organization trigger types that initiate AWS Config to evaluate AWS resources against a rule.", "properties": { - "CodeText": "", - "DebugLogDeliveryAccounts": "", - "Description": "", - "InputParameters": "", - "MaximumExecutionFrequency": "", - "OrganizationConfigRuleTriggerTypes": "", - "ResourceIdScope": "", - "ResourceTypesScope": "", + "DebugLogDeliveryAccounts": "A list of accounts that you can enable debug logging for your organization AWS Config Custom Policy rule. List is null when debug logging is enabled for all accounts.", + "Description": "The description that you provide for your organization AWS Config Custom Policy rule.", + "InputParameters": "A string, in JSON format, that is passed to your organization AWS Config Custom Policy rule.", + "MaximumExecutionFrequency": "The maximum frequency with which AWS Config runs evaluations for a rule. Your AWS Config Custom Policy rule is triggered when AWS Config delivers the configuration snapshot. For more information, see `ConfigSnapshotDeliveryProperties` .", + "OrganizationConfigRuleTriggerTypes": "The type of notification that initiates AWS Config to run an evaluation for a rule. For AWS Config Custom Policy rules, AWS Config supports change-initiated notification types:\n\n- `ConfigurationItemChangeNotification` - Initiates an evaluation when AWS Config delivers a configuration item as a result of a resource change.\n- `OversizedConfigurationItemChangeNotification` - Initiates an evaluation when AWS Config delivers an oversized configuration item. AWS Config may generate this notification type when a resource changes and the notification exceeds the maximum size allowed by Amazon SNS.", + "PolicyText": "The policy definition containing the logic for your organization AWS Config Custom Policy rule.", + "ResourceIdScope": "The ID of the AWS resource that was evaluated.", + "ResourceTypesScope": "The type of the AWS resource that was evaluated.", "Runtime": "", - "TagKeyScope": "", - "TagValueScope": "" + "TagKeyScope": "One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.", + "TagValueScope": "The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key)." } }, "AWS::Config::OrganizationConfigRule.OrganizationCustomRuleMetadata": { @@ -12954,7 +12948,7 @@ "attributes": {}, "description": "Specifies the version of the Server Message Block (SMB) protocol that AWS DataSync uses to access an SMB file server.", "properties": { - "Version": "By default, DataSync automatically chooses an SMB protocol version based on negotiation with your SMB file server. You also can configure DataSync to use a specific SMB version, but we recommend doing this only if DataSync has trouble negotiating with the SMB file server automatically.\n\nThese are the following options for configuring the SMB version:\n\n- `AUTOMATIC` (default): DataSync and the SMB file server negotiate a protocol version that they mutually support. (DataSync supports SMB versions 2.1.0 and later.)\n\nThis is the recommended option. If you instead choose a specific version that your file server doesn't support, you may get an `Operation Not Supported` error.\n- `SMB3` : Restricts the protocol negotiation to only SMB version 3.0.2.\n- `SMB2` : Restricts the protocol negotiation to only SMB version 2.1.0." + "Version": "By default, DataSync automatically chooses an SMB protocol version based on negotiation with your SMB file server. You also can configure DataSync to use a specific SMB version, but we recommend doing this only if DataSync has trouble negotiating with the SMB file server automatically.\n\nThese are the following options for configuring the SMB version:\n\n- `AUTOMATIC` (default): DataSync and the SMB file server negotiate a protocol version that they mutually support. (DataSync supports SMB versions 1.0 and later.)\n\nThis is the recommended option. If you instead choose a specific version that your file server doesn't support, you may get an `Operation Not Supported` error.\n- `SMB3` : Restricts the protocol negotiation to only SMB version 3.0.2.\n- `SMB2` : Restricts the protocol negotiation to only SMB version 2.1.\n- `SMB2_0` : Restricts the protocol negotiation to only SMB version 2.0.\n- `SMB1` : Restricts the protocol negotiation to only SMB version 1.0.\n\n> The `SMB1` option isn't available when [creating an Amazon FSx for NetApp ONTAP location](https://docs.aws.amazon.com/datasync/latest/userguide/API_CreateLocationFsxOntap.html) ." } }, "AWS::DataSync::LocationFSxOpenZFS": { @@ -13090,6 +13084,7 @@ "AgentArns": "Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can securely connect with your location.", "BucketName": "Specifies the name of the object storage bucket involved in the transfer.", "SecretKey": "Specifies the secret key (for example, a password) if credentials are required to authenticate with the object storage server.", + "ServerCertificate": "Specifies a certificate to authenticate with an object storage system that uses a private or self-signed certificate authority (CA). You must specify a Base64-encoded `.pem` file (for example, `file:///home/user/.ssh/storage_sys_certificate.pem` ). The certificate can be up to 32768 bytes (before Base64 encoding).\n\nTo use this parameter, configure `ServerProtocol` to `HTTPS` .", "ServerHostname": "Specifies the domain name or IP address of the object storage server. A DataSync agent uses this hostname to mount the object storage server in a network.", "ServerPort": "Specifies the port that your object storage server accepts inbound network traffic on (for example, port 443).", "ServerProtocol": "Specifies the protocol that your object storage server uses to communicate.", @@ -13141,7 +13136,7 @@ "attributes": {}, "description": "Specifies the version of the SMB protocol that DataSync uses to access your SMB file server.", "properties": { - "Version": "By default, DataSync automatically chooses an SMB protocol version based on negotiation with your SMB file server. You also can configure DataSync to use a specific SMB version, but we recommend doing this only if DataSync has trouble negotiating with the SMB file server automatically.\n\nThese are the following options for configuring the SMB version:\n\n- `AUTOMATIC` (default): DataSync and the SMB file server negotiate a protocol version that they mutually support. (DataSync supports SMB versions 2.1.0 and later.)\n\nThis is the recommended option. If you instead choose a specific version that your file server doesn't support, you may get an `Operation Not Supported` error.\n- `SMB3` : Restricts the protocol negotiation to only SMB version 3.0.2.\n- `SMB2` : Restricts the protocol negotiation to only SMB version 2.1.0." + "Version": "By default, DataSync automatically chooses an SMB protocol version based on negotiation with your SMB file server. You also can configure DataSync to use a specific SMB version, but we recommend doing this only if DataSync has trouble negotiating with the SMB file server automatically.\n\nThese are the following options for configuring the SMB version:\n\n- `AUTOMATIC` (default): DataSync and the SMB file server negotiate a protocol version that they mutually support. (DataSync supports SMB versions 1.0 and later.)\n\nThis is the recommended option. If you instead choose a specific version that your file server doesn't support, you may get an `Operation Not Supported` error.\n- `SMB3` : Restricts the protocol negotiation to only SMB version 3.0.2.\n- `SMB2` : Restricts the protocol negotiation to only SMB version 2.1.\n- `SMB2_0` : Restricts the protocol negotiation to only SMB version 2.0.\n- `SMB1` : Restricts the protocol negotiation to only SMB version 1.0.\n\n> The `SMB1` option isn't available when [creating an Amazon FSx for NetApp ONTAP location](https://docs.aws.amazon.com/datasync/latest/userguide/API_CreateLocationFsxOntap.html) ." } }, "AWS::DataSync::Task": { @@ -13613,6 +13608,13 @@ "KeyType": "The role that this key attribute will assume:\n\n- `HASH` - partition key\n- `RANGE` - sort key\n\n> The partition key of an item is also known as its *hash attribute* . The term \"hash attribute\" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.\n> \n> The sort key of an item is also known as its *range attribute* . The term \"range attribute\" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value." } }, + "AWS::DynamoDB::GlobalTable.KinesisStreamSpecification": { + "attributes": {}, + "description": "The Kinesis Data Streams configuration for the specified global table replica.", + "properties": { + "StreamArn": "The ARN for a specific Kinesis data stream." + } + }, "AWS::DynamoDB::GlobalTable.LocalSecondaryIndex": { "attributes": {}, "description": "Represents the properties of a local secondary index. A local secondary index can only be created when its parent table is created.", @@ -13667,6 +13669,7 @@ "properties": { "ContributorInsightsSpecification": "The settings used to enable or disable CloudWatch Contributor Insights for the specified replica. When not specified, defaults to contributor insights disabled for the replica.", "GlobalSecondaryIndexes": "Defines additional settings for the global secondary indexes of this replica.", + "KinesisStreamSpecification": "Defines the Kinesis Data Streams configuration for the specified replica.", "PointInTimeRecoverySpecification": "The settings used to enable point in time recovery. When not specified, defaults to point in time recovery disabled for the replica.", "ReadProvisionedThroughputSettings": "Defines read capacity settings for the replica table.", "Region": "The region in which this replica exists.", @@ -13679,7 +13682,7 @@ "attributes": {}, "description": "Represents the settings used to enable server-side encryption.", "properties": { - "SSEEnabled": "Indicates whether server-side encryption is performed using an AWS managed key or an AWS owned key. If enabled (true), server-side encryption type is set to KMS and an AWS managed key or customer managed key is used ( AWS KMS charges apply). If disabled (false) or not specified,server-side encryption is set to an AWS owned key. If you choose to use KMS encryption, you can also use customer managed KMS keys by specifying them in the `ReplicaSpecification.SSESpecification` object. You cannot mix AWS managed and customer managed KMS keys.", + "SSEEnabled": "Indicates whether server-side encryption is performed using an AWS managed key or an AWS owned key. If enabled (true), server-side encryption type is set to KMS and an AWS managed key is used ( AWS KMS charges apply). If disabled (false) or not specified,server-side encryption is set to an AWS owned key. If you choose to use KMS encryption, you can also use customer managed KMS keys by specifying them in the `ReplicaSpecification.SSESpecification` object. You cannot mix AWS managed and customer managed KMS keys.", "SSEType": "Server-side encryption type. The only supported value is:\n\n- `KMS` - Server-side encryption that uses AWS Key Management Service . The key is stored in your account and is managed by AWS KMS ( AWS KMS charges apply)." } }, @@ -13853,7 +13856,7 @@ "description": "Represents the settings used to enable server-side encryption.", "properties": { "KMSMasterKeyId": "The AWS KMS key that should be used for the AWS KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key `alias/aws/dynamodb` .", - "SSEEnabled": "Indicates whether server-side encryption is done using an AWS managed key or an AWS owned key. If enabled (true), server-side encryption type is set to `KMS` and an AWS managed key or customer managed key is used ( AWS KMS charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned key.", + "SSEEnabled": "Indicates whether server-side encryption is done using an AWS managed key or an AWS owned key. If enabled (true), server-side encryption type is set to `KMS` and an AWS managed key is used ( AWS KMS charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned key.", "SSEType": "Server-side encryption type. The only supported value is:\n\n- `KMS` - Server-side encryption that uses AWS Key Management Service . The key is stored in your account and is managed by AWS KMS ( AWS KMS charges apply)." } }, @@ -15234,6 +15237,22 @@ "NetworkInterfaceId": "The ID of the network interface." } }, + "AWS::EC2::LocalGatewayRouteTable": { + "attributes": { + "LocalGatewayRouteTableArn": "The Amazon Resource Name (ARN) of the local gateway route table.", + "LocalGatewayRouteTableId": "The ID of the local gateway route table.", + "OutpostArn": "The Amazon Resource Name (ARN) of the Outpost.", + "OwnerId": "The ID of the AWS account that owns the local gateway route table.", + "Ref": "`Ref` returns the ID of the local gateway route table. For example:\n\n`{ \"Ref\": \"lgw-rtb-059615ef7deEXAMPLE\" }`", + "State": "The state of the local gateway route table." + }, + "description": "Describes a local gateway route table.", + "properties": { + "LocalGatewayId": "The ID of the local gateway.", + "Mode": "The mode of the local gateway route table.", + "Tags": "The tags assigned to the local gateway route table." + } + }, "AWS::EC2::LocalGatewayRouteTableVPCAssociation": { "attributes": { "LocalGatewayId": "The ID of the local gateway.", @@ -15248,6 +15267,22 @@ "VpcId": "The ID of the VPC." } }, + "AWS::EC2::LocalGatewayRouteTableVirtualInterfaceGroupAssociation": { + "attributes": { + "LocalGatewayId": "The ID of the local gateway.", + "LocalGatewayRouteTableArn": "The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.", + "LocalGatewayRouteTableVirtualInterfaceGroupAssociationId": "The ID of the association.", + "OwnerId": "The ID of the AWS account that owns the local gateway virtual interface group association.", + "Ref": "`Ref` returns the ID of the local gateway route table virtual interface group association. For example:\n\n`{ \"Ref\": \"lgw-vif-grp-assoc-07145b276bEXAMPLE\" }`", + "State": "The state of the association." + }, + "description": "Describes an association between a local gateway route table and a virtual interface group.", + "properties": { + "LocalGatewayRouteTableId": "The ID of the local gateway route table.", + "LocalGatewayVirtualInterfaceGroupId": "The ID of the virtual interface group.", + "Tags": "The tags assigned to the association." + } + }, "AWS::EC2::NatGateway": { "attributes": { "NatGatewayId": "The ID of the NAT gateway.", @@ -15417,7 +15452,9 @@ "description": "Describes an additional detail for a path analysis.", "properties": { "AdditionalDetailType": "The information type.", - "Component": "The path component." + "Component": "The path component.", + "LoadBalancers": "", + "ServiceName": "" } }, "AWS::EC2::NetworkInsightsAnalysis.AlternatePathHint": { @@ -15578,6 +15615,7 @@ "RouteTableRoute": "The route table route.", "SecurityGroupRule": "The security group rule.", "SequenceNumber": "The sequence number.", + "ServiceName": "", "SourceVpc": "The source VPC.", "Subnet": "The subnet.", "TransitGateway": "The transit gateway.", @@ -16092,7 +16130,7 @@ "SpotPrice": "The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.\n\n> If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.", "SubnetId": "The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, \"subnet-1234abcdeexample1, subnet-0987cdef6example2\".", "TagSpecifications": "The tags to apply during creation.", - "UserData": "The Base64-encoded user data that instances use when starting up.", + "UserData": "The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.", "WeightedCapacity": "The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.\n\nIf the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1." } }, @@ -16896,7 +16934,7 @@ "attributes": { "Ref": "`Ref` returns the resource name.\n\nIn the following example, the `Ref` function returns the name of the capacity provider, such as `MyStack-MyCapacityProvider-JrwYBzxovGfr` .\n\n`{ \"Ref\": \"MyCapacityProvider\" }`" }, - "description": "The `AWS::ECS::CapacityProvider` resource creates an Amazon Elastic Container Service (Amazon ECS) capacity provider. Capacity providers are associated with an Amazon ECS cluster and are used in capacity provider strategies to facilitate cluster auto scaling.\n\nOnly capacity providers using an Auto Scaling group can be created. Amazon ECS tasks on AWS Fargate use the `FARGATE` and `FARGATE_SPOT` capacity providers which are already created and available to all accounts in Regions supported by AWS Fargate .", + "description": "Creates a new capacity provider. Capacity providers are associated with an Amazon ECS cluster and are used in capacity provider strategies to facilitate cluster auto scaling.\n\nOnly capacity providers that use an Auto Scaling group can be created. Amazon ECS tasks on AWS Fargate use the `FARGATE` and `FARGATE_SPOT` capacity providers. These providers are available to all accounts in the AWS Regions that AWS Fargate supports.", "properties": { "AutoScalingGroupProvider": "The Auto Scaling group settings for the capacity provider.", "Name": "The name of the capacity provider. If a name is specified, it cannot start with `aws` , `ecs` , or `fargate` . If no name is specified, a default name in the `CFNStackName-CFNResourceName-RandomString` format is used.", @@ -16905,16 +16943,16 @@ }, "AWS::ECS::CapacityProvider.AutoScalingGroupProvider": { "attributes": {}, - "description": "The `AutoScalingGroupProvider` property specifies the details of the Auto Scaling group for the capacity provider.", + "description": "The details of the Auto Scaling group for the capacity provider.", "properties": { - "AutoScalingGroupArn": "The Amazon Resource Name (ARN) or short name that identifies the Auto Scaling group.", + "AutoScalingGroupArn": "The Amazon Resource Name (ARN) that identifies the Auto Scaling group.", "ManagedScaling": "The managed scaling settings for the Auto Scaling group capacity provider.", "ManagedTerminationProtection": "The managed termination protection setting to use for the Auto Scaling group capacity provider. This determines whether the Auto Scaling group has managed termination protection. The default is off.\n\n> When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn't work. \n\nWhen managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions enabled as well. For more information, see [Instance Protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) in the *AWS Auto Scaling User Guide* .\n\nWhen managed termination protection is off, your Amazon EC2 instances aren't protected from termination when the Auto Scaling group scales in." } }, "AWS::ECS::CapacityProvider.ManagedScaling": { "attributes": {}, - "description": "The `ManagedScaling` property specifies the settings for the Auto Scaling group capacity provider.\n\nWhen managed scaling is enabled, Amazon ECS manages the scale-in and scale-out actions of the Auto Scaling group. Amazon ECS manages a target tracking scaling policy using an Amazon ECS-managed CloudWatch metric with the specified `targetCapacity` value as the target value for the metric. For more information, see [Using Managed Scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling) in the *Amazon Elastic Container Service Developer Guide* .\n\nIf managed scaling is disabled, the user must manage the scaling of the Auto Scaling group.", + "description": "The managed scaling settings for the Auto Scaling group capacity provider.\n\nWhen managed scaling is enabled, Amazon ECS manages the scale-in and scale-out actions of the Auto Scaling group. Amazon ECS manages a target tracking scaling policy using an Amazon ECS managed CloudWatch metric with the specified `targetCapacity` value as the target value for the metric. For more information, see [Using managed scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling) in the *Amazon Elastic Container Service Developer Guide* .\n\nIf managed scaling is off, the user must manage the scaling of the Auto Scaling group.", "properties": { "InstanceWarmupPeriod": "The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group. If this parameter is omitted, the default value of `300` seconds is used.", "MaximumScalingStepSize": "The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale in process is not affected by this parameter. If this parameter is omitted, the default value of `1` is used.", @@ -16930,9 +16968,9 @@ }, "description": "The `AWS::ECS::Cluster` resource creates an Amazon Elastic Container Service (Amazon ECS) cluster.", "properties": { - "CapacityProviders": "The short name of one or more capacity providers to associate with the cluster. A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy.\n\nIf specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created and not already associated with another cluster.\n\nTo use an AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.", + "CapacityProviders": "The short name of one or more capacity providers to associate with the cluster. A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy when calling the [CreateService](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html) or [RunTask](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html) actions.\n\nIf specifying a capacity provider that uses an Auto Scaling group, the capacity provider must be created but not associated with another cluster. New Auto Scaling group capacity providers can be created with the [CreateCapacityProvider](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateCapacityProvider.html) API operation.\n\nTo use a AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.\n\nThe [PutCapacityProvider](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutCapacityProvider.html) API operation is used to update the list of available capacity providers for a cluster after the cluster is created.", "ClusterName": "A user-generated string that you use to identify your cluster. If you don't specify a name, AWS CloudFormation generates a unique physical ID for the name.", - "ClusterSettings": "The setting to use when creating a cluster. This parameter is used to enable CloudWatch Container Insights for a cluster. If this value is specified, it will override the `containerInsights` value set with [PutAccountSetting](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html) or [PutAccountSettingDefault](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html) .", + "ClusterSettings": "The setting to use when creating a cluster. This parameter is used to use CloudWatch Container Insights for a cluster. If this value is specified, it will override the `containerInsights` value set with [PutAccountSetting](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html) or [PutAccountSettingDefault](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html) .", "Configuration": "The execute command configuration for the cluster.", "DefaultCapacityProviderStrategy": "The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.", "ServiceConnectDefaults": "Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the `enabled` parameter to `true` in the `ServiceConnectConfiguration` . You can set the namespace of each service individually in the `ServiceConnectConfiguration` to override this default parameter.\n\nTasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide* .", @@ -16960,7 +16998,7 @@ "description": "The settings to use when creating a cluster. This parameter is used to turn on CloudWatch Container Insights for a cluster.", "properties": { "Name": "The name of the cluster setting. The only supported value is `containerInsights` .", - "Value": "The value to set for the cluster setting. The supported values are `enabled` and `disabled` . If `enabled` is specified, CloudWatch Container Insights will be enabled for the cluster, otherwise it will be disabled unless the `containerInsights` account setting is enabled. If a cluster value is specified, it will override the `containerInsights` value set with [PutAccountSetting](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html) or [PutAccountSettingDefault](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html) ." + "Value": "The value to set for the cluster setting. The supported values are `enabled` and `disabled` . If `enabled` is specified, CloudWatch Container Insights will be enabled for the cluster, otherwise it will be off unless the `containerInsights` account setting is turned on. If a cluster value is specified, it will override the `containerInsights` value set with [PutAccountSetting](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html) or [PutAccountSettingDefault](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html) ." } }, "AWS::ECS::Cluster.ExecuteCommandConfiguration": { @@ -17082,7 +17120,7 @@ }, "AWS::ECS::Service.DeploymentCircuitBreaker": { "attributes": {}, - "description": "> The deployment circuit breaker can only be used for services using the rolling update ( `ECS` ) deployment type. \n\nThe `DeploymentCircuitBreaker` property determines whether a service deployment will fail if the service can't reach a steady state. If deployment circuit breaker is enabled, a service deployment will transition to a failed state and stop launching new tasks. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.", + "description": "> The deployment circuit breaker can only be used for services using the rolling update ( `ECS` ) deployment type. \n\nThe *deployment circuit breaker* determines whether a service deployment will fail if the service can't reach a steady state. If enabled, a service deployment will transition to a failed state and stop launching new tasks. You can also configure Amazon ECS to roll back your service to the last completed deployment after a failure. For more information, see [Rolling update](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html) in the *Amazon Elastic Container Service Developer Guide* .", "properties": { "Enable": "Determines whether to use the deployment circuit breaker logic for the service.", "Rollback": "Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is on, when a service deployment fails, the service is rolled back to the last deployment that completed successfully." @@ -17093,7 +17131,7 @@ "description": "The `DeploymentConfiguration` property specifies optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.", "properties": { "Alarms": "Information about the CloudWatch alarms.", - "DeploymentCircuitBreaker": "> The deployment circuit breaker can only be used for services using the rolling update ( `ECS` ) deployment type that are not behind a Classic Load Balancer. \n\nThe *deployment circuit breaker* determines whether a service deployment will fail if the service can't reach a steady state. If enabled, a service deployment will transition to a failed state and stop launching new tasks. You can also enable Amazon ECS to roll back your service to the last completed deployment after a failure. For more information, see [Rolling update](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html) in the *Amazon Elastic Container Service Developer Guide* .", + "DeploymentCircuitBreaker": "> The deployment circuit breaker can only be used for services using the rolling update ( `ECS` ) deployment type. \n\nThe *deployment circuit breaker* determines whether a service deployment will fail if the service can't reach a steady state. If you use the deployment circuit breaker, a service deployment will transition to a failed state and stop launching new tasks. If you use the rollback option, when a service deployment fails, the service is rolled back to the last deployment that completed successfully. For more information, see [Rolling update](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html) in the *Amazon Elastic Container Service Developer Guide*", "MaximumPercent": "If a service is using the rolling update ( `ECS` ) deployment type, the `maximumPercent` parameter represents an upper limit on the number of your service's tasks that are allowed in the `RUNNING` or `PENDING` state during a deployment, as a percentage of the `desiredCount` (rounded down to the nearest integer). This parameter enables you to define the deployment batch size. For example, if your service is using the `REPLICA` service scheduler and has a `desiredCount` of four tasks and a `maximumPercent` value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default `maximumPercent` value for a service using the `REPLICA` service scheduler is 200%.\n\nIf a service is using either the blue/green ( `CODE_DEPLOY` ) or `EXTERNAL` deployment types and tasks that use the EC2 launch type, the *maximum percent* value is set to the default value and is used to define the upper limit on the number of the tasks in the service that remain in the `RUNNING` state while the container instances are in the `DRAINING` state. If the tasks in the service use the Fargate launch type, the maximum percent value is not used, although it is returned when describing your service.", "MinimumHealthyPercent": "If a service is using the rolling update ( `ECS` ) deployment type, the `minimumHealthyPercent` represents a lower limit on the number of your service's tasks that must remain in the `RUNNING` state during a deployment, as a percentage of the `desiredCount` (rounded up to the nearest integer). This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a `desiredCount` of four tasks and a `minimumHealthyPercent` of 50%, the service scheduler may stop two existing tasks to free up cluster capacity before starting two new tasks.\n\nFor services that *do not* use a load balancer, the following should be noted:\n\n- A service is considered healthy if all essential containers within the tasks in the service pass their health checks.\n- If a task has no essential containers with a health check defined, the service scheduler will wait for 40 seconds after a task reaches a `RUNNING` state before the task is counted towards the minimum healthy percent total.\n- If a task has one or more essential containers with a health check defined, the service scheduler will wait for the task to reach a healthy status before counting it towards the minimum healthy percent total. A task is considered healthy when all essential containers within the task have passed their health checks. The amount of time the service scheduler can wait for is determined by the container health check settings.\n\nFor services are that *do* use a load balancer, the following should be noted:\n\n- If a task has no essential containers with a health check defined, the service scheduler will wait for the load balancer target group health check to return a healthy status before counting the task towards the minimum healthy percent total.\n- If a task has an essential container with a health check defined, the service scheduler will wait for both the task to reach a healthy status and the load balancer target group health check to return a healthy status before counting the task towards the minimum healthy percent total.\n\nIf a service is using either the blue/green ( `CODE_DEPLOY` ) or `EXTERNAL` deployment types and is running tasks that use the EC2 launch type, the *minimum healthy percent* value is set to the default value and is used to define the lower limit on the number of the tasks in the service that remain in the `RUNNING` state while the container instances are in the `DRAINING` state. If a service is using either the blue/green ( `CODE_DEPLOY` ) or `EXTERNAL` deployment types and is running tasks that use the Fargate launch type, the minimum healthy percent value is not used, although it is returned when describing your service." } @@ -17197,7 +17235,7 @@ "attributes": { "Ref": "`Ref` returns the Amazon Resource Name (ARN).\n\nIn the following example, the `Ref` function returns the ARN of the `MyTaskDefinition` task definition, such as `arn:aws:ecs:us-west-2:123456789012:task-definition/TaskDefinitionFamily:1` .\n\n`{ \"Ref\": \"MyTaskDefinition\" }`" }, - "description": "The `AWS::ECS::TaskDefinition` resource describes the container and volume definitions of an Amazon Elastic Container Service (Amazon ECS) task. You can specify which Docker images to use, the required resources, and other configurations related to launching the task definition through an Amazon ECS service or task.", + "description": "The `AWS::ECS::TaskDefinition` resource describes the container and volume definitions of a task. You can specify which Docker images to use, the required resources, and other configurations related to launching the task definition through an Amazon ECS service or task.", "properties": { "ContainerDefinitions": "A list of container definitions in JSON format that describe the different containers that make up your task. For more information about container definition parameters and defaults, see [Amazon ECS Task Definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) in the *Amazon Elastic Container Service Developer Guide* .", "Cpu": "The number of `cpu` units used by the task. If you use the EC2 launch type, this field is optional. Any value can be used. If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines your range of valid values for the `memory` parameter.\n\nThe CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.\n\n- 256 (.25 vCPU) - Available `memory` values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)\n- 512 (.5 vCPU) - Available `memory` values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)\n- 1024 (1 vCPU) - Available `memory` values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)\n- 2048 (2 vCPU) - Available `memory` values: 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)\n- 4096 (4 vCPU) - Available `memory` values: 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)\n- 8192 (8 vCPU) - Available `memory` values: 16 GB and 60 GB in 4 GB increments\n\nThis option requires Linux platform `1.4.0` or later.\n- 16384 (16vCPU) - Available `memory` values: 32GB and 120 GB in 8 GB increments\n\nThis option requires Linux platform `1.4.0` or later.", @@ -17207,10 +17245,10 @@ "InferenceAccelerators": "The Elastic Inference accelerators to use for the containers in the task.", "IpcMode": "The IPC resource namespace to use for the containers in the task. The valid values are `host` , `task` , or `none` . If `host` is specified, then all containers within the tasks that specified the `host` IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If `task` is specified, all containers within the specified task share the same IPC resources. If `none` is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see [IPC settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) in the *Docker run reference* .\n\nIf the `host` IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose. For more information, see [Docker security](https://docs.aws.amazon.com/https://docs.docker.com/engine/security/security/) .\n\nIf you are setting namespaced kernel parameters using `systemControls` for the containers in the task, the following will apply to your IPC resource namespace. For more information, see [System Controls](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) in the *Amazon Elastic Container Service Developer Guide* .\n\n- For tasks that use the `host` IPC mode, IPC namespace related `systemControls` are not supported.\n- For tasks that use the `task` IPC mode, IPC namespace related `systemControls` will apply to all containers within a task.\n\n> This parameter is not supported for Windows containers or tasks run on AWS Fargate .", "Memory": "The amount (in MiB) of memory used by the task.\n\nIf your tasks runs on Amazon EC2 instances, you must specify either a task-level memory value or a container-level memory value. This field is optional and any value can be used. If a task-level memory value is specified, the container-level memory value is optional. For more information regarding container-level memory and memory reservation, see [ContainerDefinition](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) .\n\nIf your tasks runs on AWS Fargate , this field is required. You must use one of the following values. The value you choose determines your range of valid values for the `cpu` parameter.\n\n- 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available `cpu` values: 256 (.25 vCPU)\n- 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available `cpu` values: 512 (.5 vCPU)\n- 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available `cpu` values: 1024 (1 vCPU)\n- Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available `cpu` values: 2048 (2 vCPU)\n- Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available `cpu` values: 4096 (4 vCPU)\n- Between 16 GB and 60 GB in 4 GB increments - Available `cpu` values: 8192 (8 vCPU)\n\nThis option requires Linux platform `1.4.0` or later.\n- Between 32GB and 120 GB in 8 GB increments - Available `cpu` values: 16384 (16 vCPU)\n\nThis option requires Linux platform `1.4.0` or later.", - "NetworkMode": "The Docker networking mode to use for the containers in the task. The valid values are `none` , `bridge` , `awsvpc` , and `host` . The default Docker network mode is `bridge` . If you are using the Fargate launch type, the `awsvpc` network mode is required. If you are using the EC2 launch type, any network mode can be used. If the network mode is set to `none` , you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The `host` and `awsvpc` network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the `bridge` mode.\n\nWith the `host` and `awsvpc` network modes, exposed container ports are mapped directly to the corresponding host port (for the `host` network mode) or the attached elastic network interface port (for the `awsvpc` network mode), so you cannot take advantage of dynamic host port mappings.\n\nIf the network mode is `awsvpc` , the task is allocated an elastic network interface, and you must specify a [NetworkConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html) value when you create a service or run a task with the task definition. For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide* .\n\n> Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with the `ecs-init` package, or AWS Fargate infrastructure support the `awsvpc` network mode. \n\nIf the network mode is `host` , you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.\n\nDocker for Windows uses different network modes than Docker for Linux. When you register a task definition with Windows containers, you must not specify a network mode. If you use the console to register a task definition with Windows containers, you must choose the `` network mode object.\n\nFor more information, see [Network settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#network-settings) in the *Docker run reference* .", + "NetworkMode": "The Docker networking mode to use for the containers in the task. The valid values are `none` , `bridge` , `awsvpc` , and `host` . If no network mode is specified, the default is `bridge` .\n\nFor Amazon ECS tasks on Fargate, the `awsvpc` network mode is required. For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, `` or `awsvpc` can be used. If the network mode is set to `none` , you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The `host` and `awsvpc` network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the `bridge` mode.\n\nWith the `host` and `awsvpc` network modes, exposed container ports are mapped directly to the corresponding host port (for the `host` network mode) or the attached elastic network interface port (for the `awsvpc` network mode), so you cannot take advantage of dynamic host port mappings.\n\n> When using the `host` network mode, you should not run containers using the root user (UID 0). It is considered best practice to use a non-root user. \n\nIf the network mode is `awsvpc` , the task is allocated an elastic network interface, and you must specify a `NetworkConfiguration` value when you create a service or run a task with the task definition. For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide* .\n\nIf the network mode is `host` , you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.\n\nFor more information, see [Network settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#network-settings) in the *Docker run reference* .", "PidMode": "The process namespace to use for the containers in the task. The valid values are `host` or `task` . If `host` is specified, then all containers within the tasks that specified the `host` PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance. If `task` is specified, all containers within the specified task share the same process namespace. If no value is specified, the default is a private namespace. For more information, see [PID settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#pid-settings---pid) in the *Docker run reference* .\n\nIf the `host` PID mode is used, be aware that there is a heightened risk of undesired process namespace expose. For more information, see [Docker security](https://docs.aws.amazon.com/https://docs.docker.com/engine/security/security/) .\n\n> This parameter is not supported for Windows containers or tasks run on AWS Fargate .", "PlacementConstraints": "An array of placement constraint objects to use for tasks.\n\n> This parameter isn't supported for tasks run on AWS Fargate .", - "ProxyConfiguration": "The `ProxyConfiguration` property specifies the configuration details for the App Mesh proxy.\n\nYour Amazon ECS container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the `ecs-init` package to enable a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version `20190301` or later, then they contain the required versions of the container agent and `ecs-init` . For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide* .", + "ProxyConfiguration": "The configuration details for the App Mesh proxy.\n\nYour Amazon ECS container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the `ecs-init` package to use a proxy configuration. If your container instances are launched from the Amazon ECS optimized AMI version `20190301` or later, they contain the required versions of the container agent and `ecs-init` . For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide* .", "RequiresCompatibilities": "The task launch types the task definition was validated against. To determine which task launch types the task definition is validated for, see the `TaskDefinition$compatibilities` parameter.\n\nThe valid values are:\n\n- `EC2` - The EC2 launch type\n- `FARGATE` - The Fargate launch type\n- `EXTERNAL` - The external instance (ECS Anywhere) launch type", "RuntimePlatform": "The operating system that your tasks definitions run on. A platform family is specified only for tasks using the Fargate launch type.\n\nWhen you specify a task definition in a service, this value must match the `runtimePlatform` value of the service.", "Tags": "The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.\n\nThe following basic restrictions apply to tags:\n\n- Maximum number of tags per resource - 50\n- For each resource, each tag key must be unique, and each tag key can have only one value.\n- Maximum key length - 128 Unicode characters in UTF-8\n- Maximum value length - 256 Unicode characters in UTF-8\n- If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.\n- Tag keys and values are case-sensitive.\n- Do not use `aws:` , `AWS:` , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.", @@ -17558,7 +17596,7 @@ }, "AWS::ECS::TaskSet.NetworkConfiguration": { "attributes": {}, - "description": "The network configuration for a task.", + "description": "The network configuration for a task or service.", "properties": { "AwsVpcConfiguration": "The VPC subnets and security groups that are associated with a task.\n\n> All specified subnets and security groups must be from the same VPC." } @@ -18084,7 +18122,7 @@ "description": "`InstanceFleetProvisioningSpecification` is a subproperty of `InstanceFleetConfig` . `InstanceFleetProvisioningSpecification` defines the launch specification for Spot instances in an instance fleet, which determines the defined duration and provisioning timeout behavior for Spot instances.\n\n> The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.", "properties": { "OnDemandSpecification": "The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.\n\n> The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.", - "SpotSpecification": "The launch specification for Spot Instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy." + "SpotSpecification": "The launch specification for Spot instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy." } }, "AWS::EMR::Cluster.InstanceGroupConfig": { @@ -18244,7 +18282,7 @@ "AllocationStrategy": "Specifies the strategy to use in launching Spot Instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.", "BlockDurationMinutes": "The defined duration for Spot Instances (also known as Spot blocks) in minutes. When specified, the Spot Instance does not terminate before the defined duration expires, and defined duration pricing for Spot Instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot Instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates.\n\n> Spot Instances with a defined duration (also known as Spot blocks) are no longer available to new customers from July 1, 2021. For customers who have previously used the feature, we will continue to support Spot Instances with a defined duration until December 31, 2022.", "TimeoutAction": "The action to take when `TargetSpotCapacity` has not been fulfilled when the `TimeoutDurationMinutes` has expired; that is, when all Spot Instances could not be provisioned within the Spot provisioning timeout. Valid values are `TERMINATE_CLUSTER` and `SWITCH_TO_ON_DEMAND` . SWITCH_TO_ON_DEMAND specifies that if no Spot Instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.", - "TimeoutDurationMinutes": "The spot provisioning timeout period in minutes. If Spot Instances are not provisioned within this time period, the `TimeOutAction` is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created." + "TimeoutDurationMinutes": "The Spot provisioning timeout period in minutes. If Spot Instances are not provisioned within this time period, the `TimeOutAction` is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created." } }, "AWS::EMR::Cluster.StepConfig": { @@ -18310,7 +18348,7 @@ "description": "> The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. \n\n`InstanceTypeConfig` is a sub-property of `InstanceFleetConfig` . `InstanceTypeConfig` determines the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.", "properties": { "OnDemandSpecification": "The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.\n\n> The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.", - "SpotSpecification": "The launch specification for Spot Instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy." + "SpotSpecification": "The launch specification for Spot instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy." } }, "AWS::EMR::InstanceFleetConfig.InstanceTypeConfig": { @@ -18340,7 +18378,7 @@ "AllocationStrategy": "Specifies the strategy to use in launching Spot Instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.", "BlockDurationMinutes": "The defined duration for Spot Instances (also known as Spot blocks) in minutes. When specified, the Spot Instance does not terminate before the defined duration expires, and defined duration pricing for Spot Instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot Instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates.\n\n> Spot Instances with a defined duration (also known as Spot blocks) are no longer available to new customers from July 1, 2021. For customers who have previously used the feature, we will continue to support Spot Instances with a defined duration until December 31, 2022.", "TimeoutAction": "The action to take when `TargetSpotCapacity` has not been fulfilled when the `TimeoutDurationMinutes` has expired; that is, when all Spot Instances could not be provisioned within the Spot provisioning timeout. Valid values are `TERMINATE_CLUSTER` and `SWITCH_TO_ON_DEMAND` . SWITCH_TO_ON_DEMAND specifies that if no Spot Instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.", - "TimeoutDurationMinutes": "The spot provisioning timeout period in minutes. If Spot Instances are not provisioned within this time period, the `TimeOutAction` is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created." + "TimeoutDurationMinutes": "The Spot provisioning timeout period in minutes. If Spot Instances are not provisioned within this time period, the `TimeOutAction` is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created." } }, "AWS::EMR::InstanceFleetConfig.VolumeSpecification": { @@ -18859,6 +18897,7 @@ "SnapshottingClusterId": "The cluster ID that is used as the daily snapshot source for the replication group. This parameter cannot be set for Redis (cluster mode enabled) replication groups.", "Tags": "A list of tags to be added to this resource. Tags are comma-separated key,value pairs (e.g. Key= `myKey` , Value= `myKeyValue` . You can include multiple tags as shown following: Key= `myKey` , Value= `myKeyValue` Key= `mySecondKey` , Value= `mySecondKeyValue` . Tags on replication groups will be replicated to all nodes.", "TransitEncryptionEnabled": "A flag that enables in-transit encryption when set to `true` .\n\nYou cannot modify the value of `TransitEncryptionEnabled` after the cluster is created. To enable in-transit encryption on a cluster you must set `TransitEncryptionEnabled` to `true` when you create a cluster.\n\nThis parameter is valid only if the `Engine` parameter is `redis` , the `EngineVersion` parameter is `3.2.6` or `4.x` onward, and the cluster is being created in an Amazon VPC.\n\nIf you enable in-transit encryption, you must also specify a value for `CacheSubnetGroup` .\n\n*Required:* Only available when creating a replication group in an Amazon VPC using redis version `3.2.6` or `4.x` onward.\n\nDefault: `false`\n\n> For HIPAA compliance, you must specify `TransitEncryptionEnabled` as `true` , an `AuthToken` , and a `CacheSubnetGroup` .", + "TransitEncryptionMode": "A setting that allows you to migrate your clients to use in-transit encryption, with no downtime.\n\nWhen setting `TransitEncryptionEnabled` to `true` , you can set your `TransitEncryptionMode` to `preferred` in the same request, to allow both encrypted and unencrypted connections at the same time. Once you migrate all your Redis clients to use encrypted connections you can modify the value to `required` to allow encrypted connections only.\n\nSetting `TransitEncryptionMode` to `required` is a two-step process that requires you to first set the `TransitEncryptionMode` to `preferred` , after that you can set `TransitEncryptionMode` to `required` .", "UserGroupIds": "The ID of user group to associate with the replication group." } }, @@ -19857,7 +19896,6 @@ }, "AWS::Events::Archive": { "attributes": { - "ArchiveName": "The archive name.", "Arn": "The ARN of the archive created.", "Ref": "`Ref` returns the archive name." }, @@ -19955,7 +19993,7 @@ "State": "The current state of the endpoint.", "StateReason": "The reason the endpoint is in its current state." }, - "description": "A global endpoint used to improve your application's availability by making it regional-fault tolerant. For more information about global endpoints, see [Making applications Regional-fault tolerant with global endpoints and event replication](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html) in the Amazon EventBridge User Guide.", + "description": "A global endpoint used to improve your application's availability by making it regional-fault tolerant. For more information about global endpoints, see [Making applications Regional-fault tolerant with global endpoints and event replication](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html) in the *Amazon EventBridge User Guide* .", "properties": { "Description": "A description for the endpoint.", "EventBuses": "The event buses being used by the endpoint.\n\n*Exactly* : `2`", @@ -20067,7 +20105,7 @@ "RoleArn": "The Amazon Resource Name (ARN) of the role that is used for target invocation.\n\nIf you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a `RoleArn` with proper permissions in the `Target` structure, instead of here in this parameter.", "ScheduleExpression": "The scheduling expression. For example, \"cron(0 20 * * ? *)\", \"rate(5 minutes)\". For more information, see [Creating an Amazon EventBridge rule that runs on a schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html) .", "State": "The state of the rule.", - "Targets": "Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.\n\nTargets are the resources that are invoked when a rule is triggered.\n\n> Each rule can have up to five (5) targets associated with it at one time. \n\nYou can configure the following as targets for Events:\n\n- [API destination](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html)\n- [API Gateway](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-gateway-target.html)\n- Batch job queue\n- CloudWatch group\n- CodeBuild project\n- CodePipeline\n- EC2 `CreateSnapshot` API call\n- EC2 Image Builder\n- EC2 `RebootInstances` API call\n- EC2 `StopInstances` API call\n- EC2 `TerminateInstances` API call\n- ECS task\n- [Event bus in a different account or Region](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cross-account.html)\n- [Event bus in the same account and Region](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-bus-to-bus.html)\n- Firehose delivery stream\n- Glue workflow\n- [Incident Manager response plan](https://docs.aws.amazon.com//incident-manager/latest/userguide/incident-creation.html#incident-tracking-auto-eventbridge)\n- Inspector assessment template\n- Kinesis stream\n- Lambda function\n- Redshift cluster\n- SageMaker Pipeline\n- SNS topic\n- SQS queue\n- Step Functions state machine\n- Systems Manager Automation\n- Systems Manager OpsItem\n- Systems Manager Run Command\n\nCreating rules with built-in targets is supported only in the AWS Management Console . The built-in targets are `EC2 CreateSnapshot API call` , `EC2 RebootInstances API call` , `EC2 StopInstances API call` , and `EC2 TerminateInstances API call` .\n\nFor some target types, `PutTargets` provides target-specific parameters. If the target is a Kinesis data stream, you can optionally specify which shard the event goes to by using the `KinesisParameters` argument. To invoke a command on multiple EC2 instances with one rule, you can use the `RunCommandParameters` field.\n\nTo be able to make API calls against the resources that you own, Amazon EventBridge needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, EventBridge relies on resource-based policies. For EC2 instances, Kinesis Data Streams, AWS Step Functions state machines and API Gateway APIs, EventBridge relies on IAM roles that you specify in the `RoleARN` argument in `PutTargets` . For more information, see [Authentication and Access Control](https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html) in the *Amazon EventBridge User Guide* .\n\nIf another AWS account is in the same region and has granted you permission (using `PutPermission` ), you can send events to that account. Set that account's event bus as a target of the rules in your account. To send the matched events to the other account, specify that account's event bus as the `Arn` value when you run `PutTargets` . If your account sends events to another account, your account is charged for each sent event. Each event sent to another account is charged as a custom event. The account receiving the event is not charged. For more information, see [Amazon EventBridge Pricing](https://docs.aws.amazon.com/eventbridge/pricing/) .\n\n> `Input` , `InputPath` , and `InputTransformer` are not available with `PutTarget` if the target is an event bus of a different AWS account. \n\nIf you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a `RoleArn` with proper permissions in the `Target` structure. For more information, see [Sending and Receiving Events Between AWS Accounts](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) in the *Amazon EventBridge User Guide* .\n\nFor more information about enabling cross-account events, see [PutPermission](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPermission.html) .\n\n*Input* , *InputPath* , and *InputTransformer* are mutually exclusive and optional parameters of a target. When a rule is triggered due to a matched event:\n\n- If none of the following arguments are specified for a target, then the entire event is passed to the target in JSON format (unless the target is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from the event is passed to the target).\n- If *Input* is specified in the form of valid JSON, then the matched event is overridden with this constant.\n- If *InputPath* is specified in the form of JSONPath (for example, `$.detail` ), then only the part of the event specified in the path is passed to the target (for example, only the detail part of the event is passed).\n- If *InputTransformer* is specified, then one or more specified JSONPaths are extracted from the event and used as values in a template that you specify as the input to the target.\n\nWhen you specify `InputPath` or `InputTransformer` , you must use JSON dot notation, not bracket notation.\n\nWhen you add targets to a rule and the associated rule triggers soon after, new or updated targets might not be immediately invoked. Allow a short period of time for changes to take effect.\n\nThis action can partially fail if too many requests are made at the same time. If that happens, `FailedEntryCount` is non-zero in the response and each entry in `FailedEntries` provides the ID of the failed target and the error code." + "Targets": "Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.\n\nTargets are the resources that are invoked when a rule is triggered.\n\nThe maximum number of entries per request is 10.\n\n> Each rule can have up to five (5) targets associated with it at one time. \n\nFor a list of services you can configure as targets for events, see [EventBridge targets](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html) in the *Amazon EventBridge User Guide* .\n\nCreating rules with built-in targets is supported only in the AWS Management Console . The built-in targets are:\n\n- `Amazon EBS CreateSnapshot API call`\n- `Amazon EC2 RebootInstances API call`\n- `Amazon EC2 StopInstances API call`\n- `Amazon EC2 TerminateInstances API call`\n\nFor some target types, `PutTargets` provides target-specific parameters. If the target is a Kinesis data stream, you can optionally specify which shard the event goes to by using the `KinesisParameters` argument. To invoke a command on multiple EC2 instances with one rule, you can use the `RunCommandParameters` field.\n\nTo be able to make API calls against the resources that you own, Amazon EventBridge needs the appropriate permissions:\n\n- For AWS Lambda and Amazon SNS resources, EventBridge relies on resource-based policies.\n- For EC2 instances, Kinesis Data Streams, AWS Step Functions state machines and API Gateway APIs, EventBridge relies on IAM roles that you specify in the `RoleARN` argument in `PutTargets` .\n\nFor more information, see [Authentication and Access Control](https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html) in the *Amazon EventBridge User Guide* .\n\nIf another AWS account is in the same region and has granted you permission (using `PutPermission` ), you can send events to that account. Set that account's event bus as a target of the rules in your account. To send the matched events to the other account, specify that account's event bus as the `Arn` value when you run `PutTargets` . If your account sends events to another account, your account is charged for each sent event. Each event sent to another account is charged as a custom event. The account receiving the event is not charged. For more information, see [Amazon EventBridge Pricing](https://docs.aws.amazon.com/eventbridge/pricing/) .\n\n> `Input` , `InputPath` , and `InputTransformer` are not available with `PutTarget` if the target is an event bus of a different AWS account. \n\nIf you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a `RoleArn` with proper permissions in the `Target` structure. For more information, see [Sending and Receiving Events Between AWS Accounts](https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) in the *Amazon EventBridge User Guide* .\n\nFor more information about enabling cross-account events, see [PutPermission](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPermission.html) .\n\n*Input* , *InputPath* , and *InputTransformer* are mutually exclusive and optional parameters of a target. When a rule is triggered due to a matched event:\n\n- If none of the following arguments are specified for a target, then the entire event is passed to the target in JSON format (unless the target is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from the event is passed to the target).\n- If *Input* is specified in the form of valid JSON, then the matched event is overridden with this constant.\n- If *InputPath* is specified in the form of JSONPath (for example, `$.detail` ), then only the part of the event specified in the path is passed to the target (for example, only the detail part of the event is passed).\n- If *InputTransformer* is specified, then one or more specified JSONPaths are extracted from the event and used as values in a template that you specify as the input to the target.\n\nWhen you specify `InputPath` or `InputTransformer` , you must use JSON dot notation, not bracket notation.\n\nWhen you add targets to a rule and the associated rule triggers soon after, new or updated targets might not be immediately invoked. Allow a short period of time for changes to take effect.\n\nThis action can partially fail if too many requests are made at the same time. If that happens, `FailedEntryCount` is non-zero in the response and each entry in `FailedEntries` provides the ID of the failed target and the error code." } }, "AWS::Events::Rule.AwsVpcConfiguration": { @@ -20598,7 +20636,7 @@ "Id": "The ID of the policy.", "Ref": "The `Ref` for this resource returns the `PolicyId` .\n\n`Ref` returns the resource physical ID, such as 1234a1a-a1b1-12a1-abcd-a123b123456." }, - "description": "An AWS Firewall Manager policy.\n\nFirewall Manager provides the following types of policies:\n\n- An AWS Shield Advanced policy, which applies Shield Advanced protection to specified accounts and resources.\n- An AWS WAF policy (type WAFV2), which defines rule groups to run first in the corresponding AWS WAF web ACL and rule groups to run last in the web ACL.\n- An AWS WAF Classic policy, which defines a rule group. AWS WAF Classic doesn't support rule groups in Amazon CloudFront , so, to create AWS WAF Classic policies through CloudFront , you first need to create your rule groups outside of CloudFront .\n- A security group policy, which manages VPC security groups across your AWS organization.\n- An AWS Network Firewall policy, which provides firewall rules to filter network traffic in specified Amazon VPCs.\n- A DNS Firewall policy, which provides Amazon Route\u00a053 Resolver DNS Firewall rules to filter DNS queries for specified Amazon VPCs.\n\nEach policy is specific to one of the types. If you want to enforce more than one policy type across accounts, create multiple policies. You can create multiple policies for each type.\n\nThese policies require some setup to use. For more information, see the sections on prerequisites and getting started under [AWS Firewall Manager](https://docs.aws.amazon.com/waf/latest/developerguide/fms-prereq.html) .", + "description": "An AWS Firewall Manager policy.\n\nFirewall Manager provides the following types of policies:\n\n- An AWS Shield Advanced policy, which applies Shield Advanced protection to specified accounts and resources.\n- An AWS WAF policy (type WAFV2), which defines rule groups to run first in the corresponding AWS WAF web ACL and rule groups to run last in the web ACL.\n- An AWS WAF Classic policy, which defines a rule group. AWS WAF Classic doesn't support rule groups in Amazon CloudFront , so, to create AWS WAF Classic policies through CloudFront , you first need to create your rule groups outside of CloudFront .\n- A security group policy, which manages VPC security groups across your AWS organization.\n- An AWS Network Firewall policy, which provides firewall rules to filter network traffic in specified Amazon VPCs.\n- A DNS Firewall policy, which provides Amazon Route\u00a053 Resolver DNS Firewall rules to filter DNS queries for specified Amazon VPCs.\n- A third-party firewall policy, which manages a third-party firewall service such as the Palo Alto Networks Cloud Next-Generation Firewall.\n\nEach policy is specific to one of the types. If you want to enforce more than one policy type across accounts, create multiple policies. You can create multiple policies for each type.\n\nThese policies require some setup to use. For more information, see the sections on prerequisites and getting started under [AWS Firewall Manager](https://docs.aws.amazon.com/waf/latest/developerguide/fms-prereq.html) .", "properties": { "DeleteAllPolicyResources": "Used when deleting a policy. If `true` , Firewall Manager performs cleanup according to the policy type.\n\nFor AWS WAF and Shield Advanced policies, Firewall Manager does the following:\n\n- Deletes rule groups created by Firewall Manager\n- Removes web ACLs from in-scope resources\n- Deletes web ACLs that contain no rules or rule groups\n\nFor security group policies, Firewall Manager does the following for each security group in the policy:\n\n- Disassociates the security group from in-scope resources\n- Deletes the security group if it was created through Firewall Manager and if it's no longer associated with any resources through another policy\n\nAfter the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that you associate with the policy. When creating the policy, if you specify that only resources in specific accounts or with specific tags are in scope of the policy, those accounts and resources are handled by the policy. All others are out of scope. If you don't specify tags or accounts, all resources are in scope.", "ExcludeMap": "Specifies the AWS account IDs and AWS Organizations organizational units (OUs) to exclude from the policy. Specifying an OU is the equivalent of specifying all accounts in the OU and in any of its child OUs, including any child OUs and accounts that are added at a later time.\n\nYou can specify inclusions or exclusions, but not both. If you specify an `IncludeMap` , AWS Firewall Manager applies the policy to all accounts specified by the `IncludeMap` , and does not evaluate any `ExcludeMap` specifications. If you do not specify an `IncludeMap` , then Firewall Manager applies the policy to all accounts except for those specified by the `ExcludeMap` .\n\nYou can specify account IDs, OUs, or a combination:\n\n- Specify account IDs by setting the key to `ACCOUNT` . For example, the following is a valid map: `{\u201cACCOUNT\u201d : [\u201caccountID1\u201d, \u201caccountID2\u201d]}` .\n- Specify OUs by setting the key to `ORGUNIT` . For example, the following is a valid map: `{\u201cORGUNIT\u201d : [\u201couid111\u201d, \u201couid112\u201d]}` .\n- Specify accounts and OUs together in a single map, separated with a comma. For example, the following is a valid map: `{\u201cACCOUNT\u201d : [\u201caccountID1\u201d, \u201caccountID2\u201d], \u201cORGUNIT\u201d : [\u201couid111\u201d, \u201couid112\u201d]}` .", @@ -20612,7 +20650,7 @@ "ResourceType": "The type of resource protected by or in scope of the policy. This is in the format shown in the [AWS Resource Types Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) . To apply this policy to multiple resource types, specify a resource type of `ResourceTypeList` and then specify the resource types in a `ResourceTypeList` .\n\nFor AWS WAF and Shield Advanced, example resource types include `AWS::ElasticLoadBalancingV2::LoadBalancer` and `AWS::CloudFront::Distribution` . For a security group common policy, valid values are `AWS::EC2::NetworkInterface` and `AWS::EC2::Instance` . For a security group content audit policy, valid values are `AWS::EC2::SecurityGroup` , `AWS::EC2::NetworkInterface` , and `AWS::EC2::Instance` . For a security group usage audit policy, the value is `AWS::EC2::SecurityGroup` . For an AWS Network Firewall policy or DNS Firewall policy, the value is `AWS::EC2::VPC` .", "ResourceTypeList": "An array of `ResourceType` objects. Use this only to specify multiple resource types. To specify a single resource type, use `ResourceType` .", "ResourcesCleanUp": "Indicates whether AWS Firewall Manager should automatically remove protections from resources that leave the policy scope and clean up resources that Firewall Manager is managing for accounts when those accounts leave policy scope. For example, Firewall Manager will disassociate a Firewall Manager managed web ACL from a protected customer resource when the customer resource leaves policy scope.\n\nBy default, Firewall Manager doesn't remove protections or delete Firewall Manager managed resources.\n\nThis option is not available for Shield Advanced or AWS WAF Classic policies.", - "SecurityServicePolicyData": "Details about the security service that is being used to protect the resources.\n\nThis contains the following settings:\n\n- Type - Indicates the service type that the policy uses to protect the resource. For security group policies, Firewall Manager supports one security group for each common policy and for each content audit policy. This is an adjustable limit that you can increase by contacting AWS Support .\n\nValid values: `DNS_FIREWALL` | `NETWORK_FIREWALL` | `SECURITY_GROUPS_COMMON` | `SECURITY_GROUPS_CONTENT_AUDIT` | `SECURITY_GROUPS_USAGE_AUDIT` | `SHIELD_ADVANCED` | `WAFV2` | `WAF`\n- ManagedServiceData - Details about the service that are specific to the service type, in JSON format.\n\n- Example: `DNS_FIREWALL`\n\n`\"ManagedServiceData\": \"{ \\\"type\\\": \\\"DNS_FIREWALL\\\", \\\"preProcessRuleGroups\\\": [{\\\"ruleGroupId\\\": \\\"rslvr-frg-123456\\\", \\\"priority\\\": 11}], \\\"postProcessRuleGroups\\\": [{\\\"ruleGroupId\\\": \\\"rslvr-frg-123456\\\", \\\"priority\\\": 9902}]}\"`\n- Example: `NETWORK_FIREWALL`\n\n`\"ManagedServiceData\":\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:000000000000:stateless-rulegroup\\/example\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:drop\\\",\\\"example\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:drop\\\",\\\"example\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"example\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"example\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:000000000000:stateful-rulegroup\\/example\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":[]}}\"`\n- Example: `SECURITY_GROUPS_COMMON`\n\n`\"SecurityServicePolicyData\":{\"Type\":\"SECURITY_GROUPS_COMMON\",\"ManagedServiceData\":\"{\\\"type\\\":\\\"SECURITY_GROUPS_COMMON\\\",\\\"revertManualSecurityGroupChanges\\\":false,\\\"exclusiveResourceSecurityGroupManagement\\\":false,\\\"securityGroups\\\":[{\\\"id\\\":\\\" sg-000e55995d61a06bd\\\"}]}\"},\"RemediationEnabled\":false,\"ResourceType\":\"AWS::EC2::NetworkInterface\"}`\n- Example: `SECURITY_GROUPS_CONTENT_AUDIT`\n\n`\"SecurityServicePolicyData\":{\"Type\":\"SECURITY_GROUPS_CONTENT_AUDIT\",\"ManagedServiceData\":\"{\\\"type\\\":\\\"SECURITY_GROUPS_CONTENT_AUDIT\\\",\\\"securityGroups\\\":[{\\\"id\\\":\\\" sg-000e55995d61a06bd \\\"}],\\\"securityGroupAction\\\":{\\\"type\\\":\\\"ALLOW\\\"}}\"},\"RemediationEnabled\":false,\"ResourceType\":\"AWS::EC2::NetworkInterface\"}`\n\nThe security group action for content audit can be `ALLOW` or `DENY` . For `ALLOW` , all in-scope security group rules must be within the allowed range of the policy's security group rules. For `DENY` , all in-scope security group rules must not contain a value or a range that matches a rule value or range in the policy security group.\n- Example: `SECURITY_GROUPS_USAGE_AUDIT`\n\n`\"SecurityServicePolicyData\":{\"Type\":\"SECURITY_GROUPS_USAGE_AUDIT\",\"ManagedServiceData\":\"{\\\"type\\\":\\\"SECURITY_GROUPS_USAGE_AUDIT\\\",\\\"deleteUnusedSecurityGroups\\\":true,\\\"coalesceRedundantSecurityGroups\\\":true}\"},\"RemediationEnabled\":false,\"Resou rceType\":\"AWS::EC2::SecurityGroup\"}`\n- Specification for `SHIELD_ADVANCED` for Amazon CloudFront distributions\n\n`\"ManagedServiceData\": \"{\\\"type\\\": \\\"SHIELD_ADVANCED\\\", \\\"automaticResponseConfiguration\\\": {\\\"automaticResponseStatus\\\":\\\"ENABLED|IGNORED|DISABLED\\\", \\\"automaticResponseAction\\\":\\\"BLOCK|COUNT\\\"}, \\\"overrideCustomerWebaclClassic\\\":true|false}\"`\n\nFor example: `\"ManagedServiceData\": \"{\\\"type\\\":\\\"SHIELD_ADVANCED\\\",\\\"automaticResponseConfiguration\\\": {\\\"automaticResponseStatus\\\":\\\"ENABLED\\\", \\\"automaticResponseAction\\\":\\\"COUNT\\\"}}\"`\n\nThe default value for `automaticResponseStatus` is `IGNORED` . The value for `automaticResponseAction` is only required when `automaticResponseStatus` is set to `ENABLED` . The default value for `overrideCustomerWebaclClassic` is `false` .\n\nFor other resource types that you can protect with a Shield Advanced policy, this `ManagedServiceData` configuration is an empty string.\n- Example: `WAFV2`\n\n`\"ManagedServiceData\": \"{\\\"type\\\":\\\"WAFV2\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupArn\\\":null,\\\"overrideAction\\\":{\\\"type\\\":\\\"NONE\\\"},\\\"managedRuleGroupIdentifier\\\":{\\\"version\\\":null,\\\"vendorName\\\":\\\"AWS\\\",\\\"managedRuleGroupName\\\":\\\"AWSManagedRulesAmazonIpReputationList\\\"},\\\"ruleGroupType\\\":\\\"ManagedRuleGroup\\\",\\\"excludeRules\\\":[]}],\\\"postProcessRuleGroups\\\":[],\\\"defaultAction\\\":{\\\"type\\\":\\\"ALLOW\\\"},\\\"overrideCustomerWebACLAssociation\\\":false,\\\"loggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[\\\"arn:aws:firehose:us-west-2:12345678912:deliverystream/aws-waf-logs-fms-admin-destination\\\"],\\\"redactedFields\\\":[{\\\"redactedFieldType\\\":\\\"SingleHeader\\\",\\\"redactedFieldValue\\\":\\\"Cookies\\\"},{\\\"redactedFieldType\\\":\\\"Method\\\"}]}}\"`\n\nIn the `loggingConfiguration` , you can specify one `logDestinationConfigs` , you can optionally provide up to 20 `redactedFields` , and the `RedactedFieldType` must be one of `URI` , `QUERY_STRING` , `HEADER` , or `METHOD` .\n- Example: `WAF Classic`\n\n`\"ManagedServiceData\": \"{\\\"type\\\": \\\"WAF\\\", \\\"ruleGroups\\\": [{\\\"id\\\":\\\"12345678-1bcd-9012-efga-0987654321ab\\\", \\\"overrideAction\\\" : {\\\"type\\\": \\\"COUNT\\\"}}],\\\"defaultAction\\\": {\\\"type\\\": \\\"BLOCK\\\"}}`\n\nAWS WAF Classic doesn't support rule groups in CloudFront . To create a WAF Classic policy through CloudFormation, create your rule groups outside of CloudFront , then provide the rule group IDs in the WAF managed service data specification.", + "SecurityServicePolicyData": "Details about the security service that is being used to protect the resources.\n\nThis contains the following settings:\n\n- Type - Indicates the service type that the policy uses to protect the resource. For security group policies, Firewall Manager supports one security group for each common policy and for each content audit policy. This is an adjustable limit that you can increase by contacting AWS Support .\n\nValid values: `DNS_FIREWALL` | `NETWORK_FIREWALL` | `SECURITY_GROUPS_COMMON` | `SECURITY_GROUPS_CONTENT_AUDIT` | `SECURITY_GROUPS_USAGE_AUDIT` | `SHIELD_ADVANCED` | `THIRD_PARTY_FIREWALL` | `WAFV2` | `WAF`\n- ManagedServiceData - Details about the service that are specific to the service type, in JSON format.\n\n- Example: `DNS_FIREWALL`\n\n`\"{\\\"type\\\":\\\"DNS_FIREWALL\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupId\\\":\\\"rslvr-frg-1\\\",\\\"priority\\\":10}],\\\"postProcessRuleGroups\\\":[{\\\"ruleGroupId\\\":\\\"rslvr-frg-2\\\",\\\"priority\\\":9911}]}\"`\n\n> Valid values for `preProcessRuleGroups` are between 1 and 99. Valid values for `postProcessRuleGroups` are between 9901 and 10000.\n- Example: `NETWORK_FIREWALL` - Centralized deployment model\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"awsNetworkFirewallConfig\\\":{\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":true}},\\\"firewallDeploymentModel\\\":{\\\"centralizedFirewallDeploymentModel\\\":{\\\"centralizedFirewallOrchestrationConfig\\\":{\\\"inspectionVpcIds\\\":[{\\\"resourceId\\\":\\\"vpc-1234\\\",\\\"accountId\\\":\\\"123456789011\\\"}],\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneId\\\":null,\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]}]}},\\\"allowedIPV4CidrList\\\":[]}}}}\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with automatic Availability Zone configuration\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\",\\\"192.168.0.0/28\\\"],\\\"routeManagementAction\\\":\\\"OFF\\\"},\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":true}}\"`\n\nWith automatic Availbility Zone configuration, Firewall Manager chooses which Availability Zones to create the endpoints in. To use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with automatic Availability Zone configuration and route management\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\",\\\"192.168.0.0/28\\\"],\\\"routeManagementAction\\\":\\\"MONITOR\\\",\\\"routeManagementTargetTypes\\\":[\\\"InternetGateway\\\"]},\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\": \\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":true}}\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with custom Availability Zone configuration\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"fragmentcustomactionname\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\", \\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}},{\\\"actionName\\\":\\\"fragmentcustomactionname\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"fragmentmetricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"firewallCreationConfig\\\":{ \\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]},{\\\"availabilityZoneName\\\":\\\"us-east-1b\\\",\\\"allowedIPV4CidrList\\\":[ \\\"10.0.0.0/28\\\"]}]} },\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":null,\\\"routeManagementAction\\\":\\\"OFF\\\",\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":boolean}}\"`\n\nWith custom Availability Zone configuration, you define which specific Availability Zones to create endpoints in by configuring `firewallCreationConfig` . To configure the Availability Zones in `firewallCreationConfig` , specify either the `availabilityZoneName` or `availabilityZoneId` parameter, not both parameters.\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with custom Availability Zone configuration and route management\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"fragmentcustomactionname\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}},{\\\"actionName\\\":\\\"fragmentcustomactionname\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"fragmentmetricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]},{\\\"availabilityZoneName\\\":\\\"us-east-1b\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]}]}},\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":null,\\\"routeManagementAction\\\":\\\"MONITOR\\\",\\\"routeManagementTargetTypes\\\":[\\\"InternetGateway\\\"],\\\"routeManagementConfig\\\":{\\\"allowCrossAZTrafficIfNoEndpoint\\\":true}},\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":boolean}}\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `THIRD_PARTY_FIREWALL` - Palo Alto Networks Cloud Next-Generation Firewall centralized deployment model\n\n`\"{ \\\"type\\\":\\\"THIRD_PARTY_FIREWALL\\\", \\\"thirdPartyFirewall\\\":\\\"PALO_ALTO_NETWORKS_CLOUD_NGFW\\\", \\\"thirdPartyFirewallConfig\\\":{ \\\"thirdPartyFirewallPolicyList\\\":[\\\"global-1\\\"] },\\\"firewallDeploymentModel\\\":{\\\"centralizedFirewallDeploymentModel\\\":{\\\"centralizedFirewallOrchestrationConfig\\\":{\\\"inspectionVpcIds\\\":[{\\\"resourceId\\\":\\\"vpc-1234\\\",\\\"accountId\\\":\\\"123456789011\\\"}],\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneId\\\":null,\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]}]}},\\\"allowedIPV4CidrList\\\":[]}}}}\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-thirdpartyfirewallpolicy.html) to `CENTRALIZED` .\n- Example: `THIRD_PARTY_FIREWALL` - Palo Alto Networks Cloud Next-Generation Firewall distributed deployment model\n\n`\"{\\\"type\\\":\\\"THIRD_PARTY_FIREWALL\\\",\\\"thirdPartyFirewall\\\":\\\"PALO_ALTO_NETWORKS_CLOUD_NGFW\\\",\\\"thirdPartyFirewallConfig\\\":{\\\"thirdPartyFirewallPolicyList\\\":[\\\"global-1\\\"] },\\\"firewallDeploymentModel\\\":{ \\\"distributedFirewallDeploymentModel\\\":{ \\\"distributedFirewallOrchestrationConfig\\\":{\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{ \\\"availabilityZoneConfigList\\\":[ {\\\"availabilityZoneName\\\":\\\"${AvailabilityZone}\\\" } ] } }, \\\"allowedIPV4CidrList\\\":[ ] } } } }\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-thirdpartyfirewallpolicy.html) to `DISTRIBUTED` .\n- Specification for `SHIELD_ADVANCED` for Amazon CloudFront distributions\n\n`\"{\\\"type\\\":\\\"SHIELD_ADVANCED\\\",\\\"automaticResponseConfiguration\\\": {\\\"automaticResponseStatus\\\":\\\"ENABLED|IGNORED|DISABLED\\\", \\\"automaticResponseAction\\\":\\\"BLOCK|COUNT\\\"}, \\\"overrideCustomerWebaclClassic\\\":true|false}\"`\n\nFor example: `\"{\\\"type\\\":\\\"SHIELD_ADVANCED\\\",\\\"automaticResponseConfiguration\\\": {\\\"automaticResponseStatus\\\":\\\"ENABLED\\\", \\\"automaticResponseAction\\\":\\\"COUNT\\\"}}\"`\n\nThe default value for `automaticResponseStatus` is `IGNORED` . The value for `automaticResponseAction` is only required when `automaticResponseStatus` is set to `ENABLED` . The default value for `overrideCustomerWebaclClassic` is `false` .\n\nFor other resource types that you can protect with a Shield Advanced policy, this `ManagedServiceData` configuration is an empty string.\n- Example: `WAFV2`\n\n`\"{\\\"type\\\":\\\"WAFV2\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupArn\\\":null,\\\"overrideAction\\\":{\\\"type\\\":\\\"NONE\\\"},\\\"managedRuleGroupIdentifier\\\":{\\\"version\\\":null,\\\"vendorName\\\":\\\"AWS\\\",\\\"managedRuleGroupName\\\":\\\"AWSManagedRulesAmazonIpReputationList\\\"},\\\"ruleGroupType\\\":\\\"ManagedRuleGroup\\\",\\\"excludeRules\\\":[{\\\"name\\\":\\\"NoUserAgent_HEADER\\\"}]}],\\\"postProcessRuleGroups\\\":[],\\\"defaultAction\\\":{\\\"type\\\":\\\"ALLOW\\\"},\\\"overrideCustomerWebACLAssociation\\\":false,\\\"loggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[\\\"arn:aws:firehose:us-west-2:12345678912:deliverystream/aws-waf-logs-fms-admin-destination\\\"],\\\"redactedFields\\\":[{\\\"redactedFieldType\\\":\\\"SingleHeader\\\",\\\"redactedFieldValue\\\":\\\"Cookies\\\"},{\\\"redactedFieldType\\\":\\\"Method\\\"}]}}\"`\n\nIn the `loggingConfiguration` , you can specify one `logDestinationConfigs` , you can optionally provide up to 20 `redactedFields` , and the `RedactedFieldType` must be one of `URI` , `QUERY_STRING` , `HEADER` , or `METHOD` .\n- Example: `AWS WAF Classic`\n\n`\"{\\\"type\\\": \\\"WAF\\\", \\\"ruleGroups\\\": [{\\\"id\\\":\\\"12345678-1bcd-9012-efga-0987654321ab\\\", \\\"overrideAction\\\" : {\\\"type\\\": \\\"COUNT\\\"}}], \\\"defaultAction\\\": {\\\"type\\\": \\\"BLOCK\\\"}}\"`\n- Example: `WAFV2` - AWS Firewall Manager support for AWS WAF managed rule group versioning\n\n`\"{\\\"type\\\":\\\"WAFV2\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupArn\\\":null,\\\"overrideAction\\\":{\\\"type\\\":\\\"NONE\\\"},\\\"managedRuleGroupIdentifier\\\":{\\\"versionEnabled\\\":true,\\\"version\\\":\\\"Version_2.0\\\",\\\"vendorName\\\":\\\"AWS\\\",\\\"managedRuleGroupName\\\":\\\"AWSManagedRulesCommonRuleSet\\\"},\\\"ruleGroupType\\\":\\\"ManagedRuleGroup\\\",\\\"excludeRules\\\":[{\\\"name\\\":\\\"NoUserAgent_HEADER\\\"}]}],\\\"postProcessRuleGroups\\\":[],\\\"defaultAction\\\":{\\\"type\\\":\\\"ALLOW\\\"},\\\"overrideCustomerWebACLAssociation\\\":false,\\\"loggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[\\\"arn:aws:firehose:us-west-2:12345678912:deliverystream/aws-waf-logs-fms-admin-destination\\\"],\\\"redactedFields\\\":[{\\\"redactedFieldType\\\":\\\"SingleHeader\\\",\\\"redactedFieldValue\\\":\\\"Cookies\\\"},{\\\"redactedFieldType\\\":\\\"Method\\\"}]}}\"`\n\nTo use a specific version of a AWS WAF managed rule group in your Firewall Manager policy, you must set `versionEnabled` to `true` , and set `version` to the version you'd like to use. If you don't set `versionEnabled` to `true` , or if you omit `versionEnabled` , then Firewall Manager uses the default version of the AWS WAF managed rule group.\n- Example: `SECURITY_GROUPS_COMMON`\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_COMMON\\\",\\\"revertManualSecurityGroupChanges\\\":false,\\\"exclusiveResourceSecurityGroupManagement\\\":false, \\\"applyToAllEC2InstanceENIs\\\":false,\\\"securityGroups\\\":[{\\\"id\\\":\\\" sg-000e55995d61a06bd\\\"}]}\"`\n- Example: Shared VPCs. Apply the preceding policy to resources in shared VPCs as well as to those in VPCs that the account owns\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_COMMON\\\",\\\"revertManualSecurityGroupChanges\\\":false,\\\"exclusiveResourceSecurityGroupManagement\\\":false, \\\"applyToAllEC2InstanceENIs\\\":false,\\\"includeSharedVPC\\\":true,\\\"securityGroups\\\":[{\\\"id\\\":\\\" sg-000e55995d61a06bd\\\"}]}\"`\n- Example: `SECURITY_GROUPS_CONTENT_AUDIT`\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_CONTENT_AUDIT\\\",\\\"securityGroups\\\":[{\\\"id\\\":\\\"sg-000e55995d61a06bd\\\"}],\\\"securityGroupAction\\\":{\\\"type\\\":\\\"ALLOW\\\"}}\"`\n\nThe security group action for content audit can be `ALLOW` or `DENY` . For `ALLOW` , all in-scope security group rules must be within the allowed range of the policy's security group rules. For `DENY` , all in-scope security group rules must not contain a value or a range that matches a rule value or range in the policy security group.\n- Example: `SECURITY_GROUPS_USAGE_AUDIT`\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_USAGE_AUDIT\\\",\\\"deleteUnusedSecurityGroups\\\":true,\\\"coalesceRedundantSecurityGroups\\\":true}\"`", "Tags": "A collection of key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as \"environment\") and the tag value represents a specific value within that category (such as \"test,\" \"development,\" or \"production\"). You can add up to 50 tags to each AWS resource." } }, @@ -20628,7 +20666,7 @@ "attributes": {}, "description": "Configures the firewall policy deployment model of AWS Network Firewall . For information about Network Firewall deployment models, see [AWS Network Firewall example architectures with routing](https://docs.aws.amazon.com/network-firewall/latest/developerguide/architectures.html) in the *Network Firewall Developer Guide* .", "properties": { - "FirewallDeploymentModel": "Defines the deployment model to use for the firewall policy. To use a distributed model, set [PolicyOption](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_PolicyOption.html) to `NULL` ." + "FirewallDeploymentModel": "Defines the deployment model to use for the firewall policy. To use a distributed model, set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-thirdpartyfirewallpolicy.html) to `DISTRIBUTED` ." } }, "AWS::FMS::Policy.PolicyOption": { @@ -20659,7 +20697,7 @@ "attributes": {}, "description": "Details about the security service that is being used to protect the resources.", "properties": { - "ManagedServiceData": "Details about the service that are specific to the service type, in JSON format.\n\n- Example: `DNS_FIREWALL`\n\n`\"{\\\"type\\\":\\\"DNS_FIREWALL\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupId\\\":\\\"rslvr-frg-1\\\",\\\"priority\\\":10}],\\\"postProcessRuleGroups\\\":[{\\\"ruleGroupId\\\":\\\"rslvr-frg-2\\\",\\\"priority\\\":9911}]}\"`\n\n> Valid values for `preProcessRuleGroups` are between 1 and 99. Valid values for `postProcessRuleGroups` are between 9901 and 10000.\n- Example: `NETWORK_FIREWALL` - Centralized deployment model\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"awsNetworkFirewallConfig\\\":{\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":true}},\\\"firewallDeploymentModel\\\":{\\\"centralizedFirewallDeploymentModel\\\":{\\\"centralizedFirewallOrchestrationConfig\\\":{\\\"inspectionVpcIds\\\":[{\\\"resourceId\\\":\\\"vpc-1234\\\",\\\"accountId\\\":\\\"123456789011\\\"}],\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneId\\\":null,\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]}]}},\\\"allowedIPV4CidrList\\\":[]}}}}\"`\n\nTo use the centralized deployment model, you must set [PolicyOption](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_PolicyOption.html) to `CENTRALIZED` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with automatic Availability Zone configuration\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\",\\\"192.168.0.0/28\\\"],\\\"routeManagementAction\\\":\\\"OFF\\\"},\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":true}}\"`\n\nWith automatic Availbility Zone configuration, Firewall Manager chooses which Availability Zones to create the endpoints in. To use the distributed deployment model, you must set [PolicyOption](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_PolicyOption.html) to `NULL` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with automatic Availability Zone configuration and route management\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\",\\\"192.168.0.0/28\\\"],\\\"routeManagementAction\\\":\\\"MONITOR\\\",\\\"routeManagementTargetTypes\\\":[\\\"InternetGateway\\\"]},\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\": \\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":true}}\"`\n\nTo use the distributed deployment model, you must set [PolicyOption](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_PolicyOption.html) to `NULL` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with custom Availability Zone configuration\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"fragmentcustomactionname\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\", \\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}},{\\\"actionName\\\":\\\"fragmentcustomactionname\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"fragmentmetricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"firewallCreationConfig\\\":{ \\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]},{\\\"availabilityZoneName\\\":\\\"us-east-1b\\\",\\\"allowedIPV4CidrList\\\":[ \\\"10.0.0.0/28\\\"]}]} },\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":null,\\\"routeManagementAction\\\":\\\"OFF\\\",\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":boolean}}\"`\n\nWith custom Availability Zone configuration, you define which specific Availability Zones to create endpoints in by configuring `firewallCreationConfig` . To configure the Availability Zones in `firewallCreationConfig` , specify either the `availabilityZoneName` or `availabilityZoneId` parameter, not both parameters.\n\nTo use the distributed deployment model, you must set [PolicyOption](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_PolicyOption.html) to `NULL` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with custom Availability Zone configuration and route management\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"fragmentcustomactionname\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}},{\\\"actionName\\\":\\\"fragmentcustomactionname\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"fragmentmetricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]},{\\\"availabilityZoneName\\\":\\\"us-east-1b\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]}]}},\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":null,\\\"routeManagementAction\\\":\\\"MONITOR\\\",\\\"routeManagementTargetTypes\\\":[\\\"InternetGateway\\\"],\\\"routeManagementConfig\\\":{\\\"allowCrossAZTrafficIfNoEndpoint\\\":true}},\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":boolean}}\"`\n\nTo use the distributed deployment model, you must set [PolicyOption](https://docs.aws.amazon.com/fms/2018-01-01/APIReference/API_PolicyOption.html) to `NULL` .\n- Example: `THIRD_PARTY_FIREWALL`\n\n`\"{ \"type\":\"THIRD_PARTY_FIREWALL\", \"thirdPartyFirewall\":\"PALO_ALTO_NETWORKS_CLOUD_NGFW\", \"thirdPartyFirewallConfig\":{ \"thirdPartyFirewallPolicyList\":[\"global-1\"] }, \"firewallDeploymentModel\":{ \"distributedFirewallDeploymentModel\":{ \"distributedFirewallOrchestrationConfig\":{ \"firewallCreationConfig\":{ \"endpointLocation\":{ \"availabilityZoneConfigList\":[ { \"availabilityZoneName\":\"${AvailabilityZone}\" } ] } }, \"allowedIPV4CidrList\":[ ] } } } }\"`\n- Example: `SECURITY_GROUPS_COMMON`\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_COMMON\\\",\\\"revertManualSecurityGroupChanges\\\":false,\\\"exclusiveResourceSecurityGroupManagement\\\":false, \\\"applyToAllEC2InstanceENIs\\\":false,\\\"securityGroups\\\":[{\\\"id\\\":\\\" sg-000e55995d61a06bd\\\"}]}\"`\n- Example: `SECURITY_GROUPS_COMMON` - Security group tag distribution\n\n`\"\"{\\\"type\\\":\\\"SECURITY_GROUPS_COMMON\\\",\\\"securityGroups\\\":[{\\\"id\\\":\\\"sg-000e55995d61a06bd\\\"}],\\\"revertManualSecurityGroupChanges\\\":true,\\\"exclusiveResourceSecurityGroupManagement\\\":false,\\\"applyToAllEC2InstanceENIs\\\":false,\\\"includeSharedVPC\\\":false,\\\"enableTagDistribution\\\":true}\"\"`\n\nFirewall Manager automatically distributes tags from the primary group to the security groups created by this policy. To use security group tag distribution, you must also set `revertManualSecurityGroupChanges` to `true` , otherwise Firewall Manager won't be able to create the policy. When you enable `revertManualSecurityGroupChanges` , Firewall Manager identifies and reports when the security groups created by this policy become non-compliant.\n\nFirewall Manager won't distrubute system tags added by AWS services into the replica security groups. System tags begin with the `aws:` prefix.\n- Example: Shared VPCs. Apply the preceding policy to resources in shared VPCs as well as to those in VPCs that the account owns\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_COMMON\\\",\\\"revertManualSecurityGroupChanges\\\":false,\\\"exclusiveResourceSecurityGroupManagement\\\":false, \\\"applyToAllEC2InstanceENIs\\\":false,\\\"includeSharedVPC\\\":true,\\\"securityGroups\\\":[{\\\"id\\\":\\\" sg-000e55995d61a06bd\\\"}]}\"`\n- Example: `SECURITY_GROUPS_CONTENT_AUDIT`\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_CONTENT_AUDIT\\\",\\\"securityGroups\\\":[{\\\"id\\\":\\\"sg-000e55995d61a06bd\\\"}],\\\"securityGroupAction\\\":{\\\"type\\\":\\\"ALLOW\\\"}}\"`\n\nThe security group action for content audit can be `ALLOW` or `DENY` . For `ALLOW` , all in-scope security group rules must be within the allowed range of the policy's security group rules. For `DENY` , all in-scope security group rules must not contain a value or a range that matches a rule value or range in the policy security group.\n- Example: `SECURITY_GROUPS_USAGE_AUDIT`\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_USAGE_AUDIT\\\",\\\"deleteUnusedSecurityGroups\\\":true,\\\"coalesceRedundantSecurityGroups\\\":true}\"`\n- Specification for `SHIELD_ADVANCED` for Amazon CloudFront distributions\n\n`\"{\\\"type\\\":\\\"SHIELD_ADVANCED\\\",\\\"automaticResponseConfiguration\\\": {\\\"automaticResponseStatus\\\":\\\"ENABLED|IGNORED|DISABLED\\\", \\\"automaticResponseAction\\\":\\\"BLOCK|COUNT\\\"}, \\\"overrideCustomerWebaclClassic\\\":true|false}\"`\n\nFor example: `\"{\\\"type\\\":\\\"SHIELD_ADVANCED\\\",\\\"automaticResponseConfiguration\\\": {\\\"automaticResponseStatus\\\":\\\"ENABLED\\\", \\\"automaticResponseAction\\\":\\\"COUNT\\\"}}\"`\n\nThe default value for `automaticResponseStatus` is `IGNORED` . The value for `automaticResponseAction` is only required when `automaticResponseStatus` is set to `ENABLED` . The default value for `overrideCustomerWebaclClassic` is `false` .\n\nFor other resource types that you can protect with a Shield Advanced policy, this `ManagedServiceData` configuration is an empty string.\n- Example: `WAFV2`\n\n`\"{\\\"type\\\":\\\"WAFV2\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupArn\\\":null,\\\"overrideAction\\\":{\\\"type\\\":\\\"NONE\\\"},\\\"managedRuleGroupIdentifier\\\":{\\\"version\\\":null,\\\"vendorName\\\":\\\"AWS\\\",\\\"managedRuleGroupName\\\":\\\"AWSManagedRulesAmazonIpReputationList\\\"},\\\"ruleGroupType\\\":\\\"ManagedRuleGroup\\\",\\\"excludeRules\\\":[{\\\"name\\\":\\\"NoUserAgent_HEADER\\\"}]}],\\\"postProcessRuleGroups\\\":[],\\\"defaultAction\\\":{\\\"type\\\":\\\"ALLOW\\\"},\\\"overrideCustomerWebACLAssociation\\\":false,\\\"loggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[\\\"arn:aws:firehose:us-west-2:12345678912:deliverystream/aws-waf-logs-fms-admin-destination\\\"],\\\"redactedFields\\\":[{\\\"redactedFieldType\\\":\\\"SingleHeader\\\",\\\"redactedFieldValue\\\":\\\"Cookies\\\"},{\\\"redactedFieldType\\\":\\\"Method\\\"}]}}\"`\n\nIn the `loggingConfiguration` , you can specify one `logDestinationConfigs` , you can optionally provide up to 20 `redactedFields` , and the `RedactedFieldType` must be one of `URI` , `QUERY_STRING` , `HEADER` , or `METHOD` .\n- Example: `WAFV2` - AWS Firewall Manager support for AWS WAF managed rule group versioning\n\n`\"{\\\"type\\\":\\\"WAFV2\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupArn\\\":null,\\\"overrideAction\\\":{\\\"type\\\":\\\"NONE\\\"},\\\"managedRuleGroupIdentifier\\\":{\\\"versionEnabled\\\":true,\\\"version\\\":\\\"Version_2.0\\\",\\\"vendorName\\\":\\\"AWS\\\",\\\"managedRuleGroupName\\\":\\\"AWSManagedRulesCommonRuleSet\\\"},\\\"ruleGroupType\\\":\\\"ManagedRuleGroup\\\",\\\"excludeRules\\\":[{\\\"name\\\":\\\"NoUserAgent_HEADER\\\"}]}],\\\"postProcessRuleGroups\\\":[],\\\"defaultAction\\\":{\\\"type\\\":\\\"ALLOW\\\"},\\\"overrideCustomerWebACLAssociation\\\":false,\\\"loggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[\\\"arn:aws:firehose:us-west-2:12345678912:deliverystream/aws-waf-logs-fms-admin-destination\\\"],\\\"redactedFields\\\":[{\\\"redactedFieldType\\\":\\\"SingleHeader\\\",\\\"redactedFieldValue\\\":\\\"Cookies\\\"},{\\\"redactedFieldType\\\":\\\"Method\\\"}]}}\"`\n\nTo use a specific version of a AWS WAF managed rule group in your Firewall Manager policy, you must set `versionEnabled` to `true` , and set `version` to the version you'd like to use. If you don't set `versionEnabled` to `true` , or if you omit `versionEnabled` , then Firewall Manager uses the default version of the AWS WAF managed rule group.\n- Example: `AWS WAF Classic`\n\n`\"{\\\"type\\\": \\\"WAF\\\", \\\"ruleGroups\\\": [{\\\"id\\\":\\\"12345678-1bcd-9012-efga-0987654321ab\\\", \\\"overrideAction\\\" : {\\\"type\\\": \\\"COUNT\\\"}}], \\\"defaultAction\\\": {\\\"type\\\": \\\"BLOCK\\\"}}\"`", + "ManagedServiceData": "Details about the service that are specific to the service type, in JSON format.\n\n- Example: `DNS_FIREWALL`\n\n`\"{\\\"type\\\":\\\"DNS_FIREWALL\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupId\\\":\\\"rslvr-frg-1\\\",\\\"priority\\\":10}],\\\"postProcessRuleGroups\\\":[{\\\"ruleGroupId\\\":\\\"rslvr-frg-2\\\",\\\"priority\\\":9911}]}\"`\n\n> Valid values for `preProcessRuleGroups` are between 1 and 99. Valid values for `postProcessRuleGroups` are between 9901 and 10000.\n- Example: `NETWORK_FIREWALL` - Centralized deployment model\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"awsNetworkFirewallConfig\\\":{\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":true}},\\\"firewallDeploymentModel\\\":{\\\"centralizedFirewallDeploymentModel\\\":{\\\"centralizedFirewallOrchestrationConfig\\\":{\\\"inspectionVpcIds\\\":[{\\\"resourceId\\\":\\\"vpc-1234\\\",\\\"accountId\\\":\\\"123456789011\\\"}],\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneId\\\":null,\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]}]}},\\\"allowedIPV4CidrList\\\":[]}}}}\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with automatic Availability Zone configuration\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\",\\\"192.168.0.0/28\\\"],\\\"routeManagementAction\\\":\\\"OFF\\\"},\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":true}}\"`\n\nWith automatic Availbility Zone configuration, Firewall Manager chooses which Availability Zones to create the endpoints in. To use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with automatic Availability Zone configuration and route management\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\",\\\"192.168.0.0/28\\\"],\\\"routeManagementAction\\\":\\\"MONITOR\\\",\\\"routeManagementTargetTypes\\\":[\\\"InternetGateway\\\"]},\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\": \\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":true}}\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with custom Availability Zone configuration\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"fragmentcustomactionname\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\", \\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}},{\\\"actionName\\\":\\\"fragmentcustomactionname\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"fragmentmetricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"firewallCreationConfig\\\":{ \\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]},{\\\"availabilityZoneName\\\":\\\"us-east-1b\\\",\\\"allowedIPV4CidrList\\\":[ \\\"10.0.0.0/28\\\"]}]} },\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":null,\\\"routeManagementAction\\\":\\\"OFF\\\",\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":boolean}}\"`\n\nWith custom Availability Zone configuration, you define which specific Availability Zones to create endpoints in by configuring `firewallCreationConfig` . To configure the Availability Zones in `firewallCreationConfig` , specify either the `availabilityZoneName` or `availabilityZoneId` parameter, not both parameters.\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `NETWORK_FIREWALL` - Distributed deployment model with custom Availability Zone configuration and route management\n\n`\"{\\\"type\\\":\\\"NETWORK_FIREWALL\\\",\\\"networkFirewallStatelessRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateless-rulegroup/test\\\",\\\"priority\\\":1}],\\\"networkFirewallStatelessDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"customActionName\\\"],\\\"networkFirewallStatelessFragmentDefaultActions\\\":[\\\"aws:forward_to_sfe\\\",\\\"fragmentcustomactionname\\\"],\\\"networkFirewallStatelessCustomActions\\\":[{\\\"actionName\\\":\\\"customActionName\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"metricdimensionvalue\\\"}]}}},{\\\"actionName\\\":\\\"fragmentcustomactionname\\\",\\\"actionDefinition\\\":{\\\"publishMetricAction\\\":{\\\"dimensions\\\":[{\\\"value\\\":\\\"fragmentmetricdimensionvalue\\\"}]}}}],\\\"networkFirewallStatefulRuleGroupReferences\\\":[{\\\"resourceARN\\\":\\\"arn:aws:network-firewall:us-east-1:123456789011:stateful-rulegroup/test\\\"}],\\\"networkFirewallOrchestrationConfig\\\":{\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]},{\\\"availabilityZoneName\\\":\\\"us-east-1b\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]}]}},\\\"singleFirewallEndpointPerVPC\\\":false,\\\"allowedIPV4CidrList\\\":null,\\\"routeManagementAction\\\":\\\"MONITOR\\\",\\\"routeManagementTargetTypes\\\":[\\\"InternetGateway\\\"],\\\"routeManagementConfig\\\":{\\\"allowCrossAZTrafficIfNoEndpoint\\\":true}},\\\"networkFirewallLoggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"ALERT\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}},{\\\"logDestinationType\\\":\\\"S3\\\",\\\"logType\\\":\\\"FLOW\\\",\\\"logDestination\\\":{\\\"bucketName\\\":\\\"s3-bucket-name\\\"}}],\\\"overrideExistingConfig\\\":boolean}}\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-networkfirewallpolicy.html) to `DISTRIBUTED` .\n- Example: `THIRD_PARTY_FIREWALL` - Palo Alto Networks Cloud Next-Generation Firewall centralized deployment model\n\n`\"{ \\\"type\\\":\\\"THIRD_PARTY_FIREWALL\\\", \\\"thirdPartyFirewall\\\":\\\"PALO_ALTO_NETWORKS_CLOUD_NGFW\\\", \\\"thirdPartyFirewallConfig\\\":{ \\\"thirdPartyFirewallPolicyList\\\":[\\\"global-1\\\"] },\\\"firewallDeploymentModel\\\":{\\\"centralizedFirewallDeploymentModel\\\":{\\\"centralizedFirewallOrchestrationConfig\\\":{\\\"inspectionVpcIds\\\":[{\\\"resourceId\\\":\\\"vpc-1234\\\",\\\"accountId\\\":\\\"123456789011\\\"}],\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{\\\"availabilityZoneConfigList\\\":[{\\\"availabilityZoneId\\\":null,\\\"availabilityZoneName\\\":\\\"us-east-1a\\\",\\\"allowedIPV4CidrList\\\":[\\\"10.0.0.0/28\\\"]}]}},\\\"allowedIPV4CidrList\\\":[]}}}}\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-thirdpartyfirewallpolicy.html) to `CENTRALIZED` .\n- Example: `THIRD_PARTY_FIREWALL` - Palo Alto Networks Cloud Next-Generation Firewall distributed deployment model\n\n`\"{\\\"type\\\":\\\"THIRD_PARTY_FIREWALL\\\",\\\"thirdPartyFirewall\\\":\\\"PALO_ALTO_NETWORKS_CLOUD_NGFW\\\",\\\"thirdPartyFirewallConfig\\\":{\\\"thirdPartyFirewallPolicyList\\\":[\\\"global-1\\\"] },\\\"firewallDeploymentModel\\\":{ \\\"distributedFirewallDeploymentModel\\\":{ \\\"distributedFirewallOrchestrationConfig\\\":{\\\"firewallCreationConfig\\\":{\\\"endpointLocation\\\":{ \\\"availabilityZoneConfigList\\\":[ {\\\"availabilityZoneName\\\":\\\"${AvailabilityZone}\\\" } ] } }, \\\"allowedIPV4CidrList\\\":[ ] } } } }\"`\n\nTo use the distributed deployment model, you must set [FirewallDeploymentModel](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-thirdpartyfirewallpolicy.html) to `DISTRIBUTED` .\n- Specification for `SHIELD_ADVANCED` for Amazon CloudFront distributions\n\n`\"{\\\"type\\\":\\\"SHIELD_ADVANCED\\\",\\\"automaticResponseConfiguration\\\": {\\\"automaticResponseStatus\\\":\\\"ENABLED|IGNORED|DISABLED\\\", \\\"automaticResponseAction\\\":\\\"BLOCK|COUNT\\\"}, \\\"overrideCustomerWebaclClassic\\\":true|false}\"`\n\nFor example: `\"{\\\"type\\\":\\\"SHIELD_ADVANCED\\\",\\\"automaticResponseConfiguration\\\": {\\\"automaticResponseStatus\\\":\\\"ENABLED\\\", \\\"automaticResponseAction\\\":\\\"COUNT\\\"}}\"`\n\nThe default value for `automaticResponseStatus` is `IGNORED` . The value for `automaticResponseAction` is only required when `automaticResponseStatus` is set to `ENABLED` . The default value for `overrideCustomerWebaclClassic` is `false` .\n\nFor other resource types that you can protect with a Shield Advanced policy, this `ManagedServiceData` configuration is an empty string.\n- Example: `WAFV2`\n\n`\"{\\\"type\\\":\\\"WAFV2\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupArn\\\":null,\\\"overrideAction\\\":{\\\"type\\\":\\\"NONE\\\"},\\\"managedRuleGroupIdentifier\\\":{\\\"version\\\":null,\\\"vendorName\\\":\\\"AWS\\\",\\\"managedRuleGroupName\\\":\\\"AWSManagedRulesAmazonIpReputationList\\\"},\\\"ruleGroupType\\\":\\\"ManagedRuleGroup\\\",\\\"excludeRules\\\":[{\\\"name\\\":\\\"NoUserAgent_HEADER\\\"}]}],\\\"postProcessRuleGroups\\\":[],\\\"defaultAction\\\":{\\\"type\\\":\\\"ALLOW\\\"},\\\"overrideCustomerWebACLAssociation\\\":false,\\\"loggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[\\\"arn:aws:firehose:us-west-2:12345678912:deliverystream/aws-waf-logs-fms-admin-destination\\\"],\\\"redactedFields\\\":[{\\\"redactedFieldType\\\":\\\"SingleHeader\\\",\\\"redactedFieldValue\\\":\\\"Cookies\\\"},{\\\"redactedFieldType\\\":\\\"Method\\\"}]}}\"`\n\nIn the `loggingConfiguration` , you can specify one `logDestinationConfigs` , you can optionally provide up to 20 `redactedFields` , and the `RedactedFieldType` must be one of `URI` , `QUERY_STRING` , `HEADER` , or `METHOD` .\n- Example: `AWS WAF Classic`\n\n`\"{\\\"type\\\": \\\"WAF\\\", \\\"ruleGroups\\\": [{\\\"id\\\":\\\"12345678-1bcd-9012-efga-0987654321ab\\\", \\\"overrideAction\\\" : {\\\"type\\\": \\\"COUNT\\\"}}], \\\"defaultAction\\\": {\\\"type\\\": \\\"BLOCK\\\"}}\"`\n- Example: `WAFV2` - AWS Firewall Manager support for AWS WAF managed rule group versioning\n\n`\"{\\\"type\\\":\\\"WAFV2\\\",\\\"preProcessRuleGroups\\\":[{\\\"ruleGroupArn\\\":null,\\\"overrideAction\\\":{\\\"type\\\":\\\"NONE\\\"},\\\"managedRuleGroupIdentifier\\\":{\\\"versionEnabled\\\":true,\\\"version\\\":\\\"Version_2.0\\\",\\\"vendorName\\\":\\\"AWS\\\",\\\"managedRuleGroupName\\\":\\\"AWSManagedRulesCommonRuleSet\\\"},\\\"ruleGroupType\\\":\\\"ManagedRuleGroup\\\",\\\"excludeRules\\\":[{\\\"name\\\":\\\"NoUserAgent_HEADER\\\"}]}],\\\"postProcessRuleGroups\\\":[],\\\"defaultAction\\\":{\\\"type\\\":\\\"ALLOW\\\"},\\\"overrideCustomerWebACLAssociation\\\":false,\\\"loggingConfiguration\\\":{\\\"logDestinationConfigs\\\":[\\\"arn:aws:firehose:us-west-2:12345678912:deliverystream/aws-waf-logs-fms-admin-destination\\\"],\\\"redactedFields\\\":[{\\\"redactedFieldType\\\":\\\"SingleHeader\\\",\\\"redactedFieldValue\\\":\\\"Cookies\\\"},{\\\"redactedFieldType\\\":\\\"Method\\\"}]}}\"`\n\nTo use a specific version of a AWS WAF managed rule group in your Firewall Manager policy, you must set `versionEnabled` to `true` , and set `version` to the version you'd like to use. If you don't set `versionEnabled` to `true` , or if you omit `versionEnabled` , then Firewall Manager uses the default version of the AWS WAF managed rule group.\n- Example: `SECURITY_GROUPS_COMMON`\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_COMMON\\\",\\\"revertManualSecurityGroupChanges\\\":false,\\\"exclusiveResourceSecurityGroupManagement\\\":false, \\\"applyToAllEC2InstanceENIs\\\":false,\\\"securityGroups\\\":[{\\\"id\\\":\\\" sg-000e55995d61a06bd\\\"}]}\"`\n- Example: Shared VPCs. Apply the preceding policy to resources in shared VPCs as well as to those in VPCs that the account owns\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_COMMON\\\",\\\"revertManualSecurityGroupChanges\\\":false,\\\"exclusiveResourceSecurityGroupManagement\\\":false, \\\"applyToAllEC2InstanceENIs\\\":false,\\\"includeSharedVPC\\\":true,\\\"securityGroups\\\":[{\\\"id\\\":\\\" sg-000e55995d61a06bd\\\"}]}\"`\n- Example: `SECURITY_GROUPS_CONTENT_AUDIT`\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_CONTENT_AUDIT\\\",\\\"securityGroups\\\":[{\\\"id\\\":\\\"sg-000e55995d61a06bd\\\"}],\\\"securityGroupAction\\\":{\\\"type\\\":\\\"ALLOW\\\"}}\"`\n\nThe security group action for content audit can be `ALLOW` or `DENY` . For `ALLOW` , all in-scope security group rules must be within the allowed range of the policy's security group rules. For `DENY` , all in-scope security group rules must not contain a value or a range that matches a rule value or range in the policy security group.\n- Example: `SECURITY_GROUPS_USAGE_AUDIT`\n\n`\"{\\\"type\\\":\\\"SECURITY_GROUPS_USAGE_AUDIT\\\",\\\"deleteUnusedSecurityGroups\\\":true,\\\"coalesceRedundantSecurityGroups\\\":true}\"`", "PolicyOption": "Contains the Network Firewall firewall policy options to configure a centralized deployment model.", "Type": "The service that the policy is using to protect the resources. This specifies the type of policy that is created, either an AWS WAF policy, a Shield Advanced policy, or a security group policy. For security group policies, Firewall Manager supports one security group for each common policy and for each content audit policy. This is an adjustable limit that you can increase by contacting AWS Support ." } @@ -20671,6 +20709,20 @@ "FirewallDeploymentModel": "Defines the deployment model to use for the third-party firewall policy." } }, + "AWS::FMS::ResourceSet": { + "attributes": { + "Id": "The ID of the resource set.", + "Ref": "The `Ref` for this resource returns the `ResourceSet.Id` .\n\n`Ref` returns the resource physical ID, such as 1234a1a-a1b1-12a1-abcd-a123b123456." + }, + "description": "A set of resources to include in a policy.", + "properties": { + "Description": "A description of the resource set.", + "Name": "The descriptive name of the resource set. You can't change the name of a resource set after you create it.", + "ResourceTypeList": "Determines the resources that can be associated to the resource set. Depending on your setting for max results and the number of resource sets, a single call might not return the full list.", + "Resources": "The resources included in the resource set.", + "Tags": "A collection of key:value pairs associated with a resource set. The key:value pair can be anything you define. Typically, the tag key represents a category (such as \"environment\") and the tag value represents a specific value within that category (such as \"test,\" \"development,\" or \"production\"). You can add up to 50 tags to each AWS resource." + } + }, "AWS::FSx::DataRepositoryAssociation": { "attributes": { "AssociationId": "Returns the data repository association's system generated Association ID.\n\nExample: `dra-abcdef0123456789d`", @@ -22580,13 +22632,13 @@ "AccountAccessType": "Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization. If this is `ORGANIZATION` , the `workspaceOrganizationalUnits` parameter specifies which organizational units the workspace can access.", "AuthenticationProviders": "Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center (successor to AWS Single Sign-On) , or both to authenticate users for using the Grafana console within a workspace. For more information, see [User authentication in Amazon Managed Grafana](https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html) .", "ClientToken": "A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", - "DataSources": "Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.", + "DataSources": "Specifies the AWS data sources that have been configured to have IAM roles and permissions created to allow Amazon Managed Grafana to read data from these sources.\n\nThis list is only used when the workspace was created through the AWS console, and the `permissionType` is `SERVICE_MANAGED` .", "Description": "The user-defined description of the workspace.", "Name": "The name of the workspace.", "NotificationDestinations": "The AWS notification channels that Amazon Managed Grafana can automatically create IAM roles and permissions for, to allow Amazon Managed Grafana to use these channels.", "OrganizationRoleName": "The name of the IAM role that is used to access resources through Organizations .", "OrganizationalUnits": "Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization.", - "PermissionType": "If this is `Service Managed` , Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels.\n\nIf this is `CUSTOMER_MANAGED` , you manage those roles and permissions yourself. If you are creating this workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other AWS accounts in the organization, you must choose `CUSTOMER_MANAGED` .\n\nFor more information, see [Amazon Managed Grafana permissions and policies for AWS data sources and notification channels](https://docs.aws.amazon.com/grafana/latest/userguide/AMG-manage-permissions.html)", + "PermissionType": "If this is `SERVICE_MANAGED` , and the workplace was created through the Amazon Managed Grafana console, then Amazon Managed Grafana automatically creates the IAM roles and provisions the permissions that the workspace needs to use AWS data sources and notification channels.\n\nIf this is `CUSTOMER_MANAGED` , you must manage those roles and permissions yourself.\n\nIf you are working with a workspace in a member account of an organization and that account is not a delegated administrator account, and you want the workspace to access data sources in other AWS accounts in the organization, this parameter must be set to `CUSTOMER_MANAGED` .\n\nFor more information about converting between customer and service managed, see [Managing permissions for data sources and notification channels](https://docs.aws.amazon.com/grafana/latest/userguide/AMG-datasource-and-notification.html) . For more information about the roles and permissions that must be managed for customer managed workspaces, see [Amazon Managed Grafana permissions and policies for AWS data sources and notification channels](https://docs.aws.amazon.com/grafana/latest/userguide/AMG-manage-permissions.html)", "RoleArn": "The IAM role that grants permissions to the AWS resources that the workspace will view data from. This role must already exist.", "SamlConfiguration": "If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the `Admin` and `Editor` roles in the workspace.", "StackSetName": "The name of the AWS CloudFormation stack set that is used to generate IAM roles to be used for this workspace.", @@ -24010,7 +24062,7 @@ "Arn": "Returns the Amazon Resource Name (ARN) for the specified `AWS::IAM::OIDCProvider` resource.", "Ref": "`Ref` returns the ARN." }, - "description": "Creates an IAM entity to describe an identity provider (IdP) that supports [OpenID Connect (OIDC)](https://docs.aws.amazon.com/http://openid.net/connect/) .\n\nThe OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a policy establishes a trust relationship between AWS and the OIDC provider.\n\nWhen you create the IAM OIDC provider, you specify the following:\n\n- The URL of the OIDC identity provider (IdP) to trust\n- A list of client IDs (also known as audiences) that identify the application or applications that are allowed to authenticate using the OIDC provider\n- A list of thumbprints of one or more server certificates that the IdP uses\n\nYou get all of this information from the OIDC IdP that you want to use to access AWS .\n\n> The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the [CreateOpenIDConnectProvider](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateOpenIDConnectProvider.html) operation to highly privileged users.", + "description": "Creates or updates an IAM entity to describe an identity provider (IdP) that supports [OpenID Connect (OIDC)](https://docs.aws.amazon.com/http://openid.net/connect/) .\n\nThe OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a policy establishes a trust relationship between AWS and the OIDC provider.\n\nWhen you create the IAM OIDC provider, you specify the following:\n\n- The URL of the OIDC identity provider (IdP) to trust\n- A list of client IDs (also known as audiences) that identify the application or applications that are allowed to authenticate using the OIDC provider\n- A list of tags that are attached to the specified IAM OIDC provider\n- A list of thumbprints of one or more server certificates that the IdP uses\n\nYou get all of this information from the OIDC IdP that you want to use to access AWS .\n\nWhen you update the IAM OIDC provider, you specify the following:\n\n- The URL of the OIDC identity provider (IdP) to trust\n- A list of client IDs (also known as audiences) that replaces the existing list of client IDs associated with the OIDC IdP\n- A list of tags that replaces the existing list of tags attached to the specified IAM OIDC provider\n- A list of thumbprints that replaces the existing list of server certificates thumbprints that the IdP uses\n\n> The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the [CreateOpenIDConnectProvider](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateOpenIDConnectProvider.html) operation to highly privileged users.", "properties": { "ClientIdList": "A list of client IDs (also known as audiences) that are associated with the specified IAM OIDC provider resource object. For more information, see [CreateOpenIDConnectProvider](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateOpenIDConnectProvider.html) .", "Tags": "A list of tags that are attached to the specified IAM OIDC provider. The returned list of tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the *IAM User Guide* .", @@ -25136,14 +25188,14 @@ "attributes": {}, "description": "The configuration that determines how many retries are allowed for each failure type for a job.", "properties": { - "RetryCriteriaList": "" + "RetryCriteriaList": "The list of criteria that determines how many retries are allowed for each failure type for a job." } }, "AWS::IoT::JobTemplate.JobExecutionsRolloutConfig": { "attributes": {}, "description": "Allows you to create a staged rollout of a job.", "properties": { - "ExponentialRolloutRate": "", + "ExponentialRolloutRate": "Allows you to create an exponential rate of rollout for a job.", "MaximumPerMinute": "The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout." } }, @@ -25542,7 +25594,7 @@ "attributes": {}, "description": "Describes an action that updates a CloudWatch log.", "properties": { - "BatchMode": "", + "BatchMode": "Indicates whether batches of log records will be extracted and uploaded into CloudWatch.", "LogGroupName": "The CloudWatch log name.", "RoleArn": "The IAM role that allows access to the CloudWatch log." } @@ -28687,7 +28739,7 @@ "ExcludeAttachmentFilePatterns": "A list of regular expression patterns to exclude certain documents in your Salesforce. Documents that match the patterns are excluded from the index. Documents that don't match the patterns are included in the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index.\n\nThe pattern is applied to the name of the attached file.", "IncludeAttachmentFilePatterns": "A list of regular expression patterns to include certain documents in your Salesforce. Documents that match the patterns are included in the index. Documents that don't match the patterns are excluded from the index. If a document matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the document isn't included in the index.\n\nThe pattern is applied to the name of the attached file.", "KnowledgeArticleConfiguration": "Configuration information for the knowledge article types that Amazon Kendra indexes. Amazon Kendra indexes standard knowledge articles and the standard fields of knowledge articles, or the custom fields of custom knowledge articles, but not both.", - "SecretArn": "The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that contains the key/value pairs required to connect to your Salesforce instance. The secret must contain a JSON structure with the following keys:\n\n- authenticationUrl - The OAUTH endpoint that Amazon Kendra connects to get an OAUTH token.\n- consumerKey - The application public key generated when you created your Salesforce application.\n- consumerSecret - The application private key generated when you created your Salesforce application.\n- password - The password associated with the user logging in to the Salesforce instance.\n- securityToken - The token associated with the user account logging in to the Salesforce instance.\n- username - The user name of the user logging in to the Salesforce instance.", + "SecretArn": "The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that contains the key/value pairs required to connect to your Salesforce instance. The secret must contain a JSON structure with the following keys:\n\n- authenticationUrl - The OAUTH endpoint that Amazon Kendra connects to get an OAUTH token.\n- consumerKey - The application public key generated when you created your Salesforce application.\n- consumerSecret - The application private key generated when you created your Salesforce application.\n- password - The password associated with the user logging in to the Salesforce instance.\n- securityToken - The token associated with the user logging in to the Salesforce instance.\n- username - The user name of the user logging in to the Salesforce instance.", "ServerUrl": "The instance URL for the Salesforce site that you want to index.", "StandardObjectAttachmentConfiguration": "Configuration information for processing attachments to Salesforce standard objects.", "StandardObjectConfigurations": "Configuration of the Salesforce standard objects that Amazon Kendra indexes." @@ -30820,9 +30872,9 @@ "attributes": {}, "description": "Configuration values that override the container image Dockerfile settings. For more information, see [Container image settings](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms) .", "properties": { - "Command": "Specifies parameters that you want to pass in with ENTRYPOINT.", - "EntryPoint": "Specifies the entry point to their application, which is typically the location of the runtime executable.", - "WorkingDirectory": "Specifies the working directory." + "Command": "Specifies parameters that you want to pass in with ENTRYPOINT. You can specify a maximum of 1,500 parameters in the list.", + "EntryPoint": "Specifies the entry point to their application, which is typically the location of the runtime executable. You can specify a maximum of 1,500 string entries in the list.", + "WorkingDirectory": "Specifies the working directory. The length of the directory string cannot exceed 1,000 characters." } }, "AWS::Lambda::Function.RuntimeManagementConfig": { @@ -32981,7 +33033,7 @@ "attributes": { "Ref": "The ARN of the cluster." }, - "description": "Represents a secret stored in the Amazon Secrets Manager that can be used to authenticate with a cluster using a user name and a password.", + "description": "Represents a secret stored in the Amazon Secrets Manager that can be used to authenticate with a cluster using your sign-in credentials.", "properties": { "ClusterArn": "The Amazon Resource Name (ARN) of the MSK cluster.", "SecretArnList": "A list of Amazon Secrets Manager secret ARNs." @@ -35942,52 +35994,52 @@ }, "description": "Adds a new playback configuration to AWS Elemental MediaTailor .", "properties": { - "AdDecisionServerUrl": "The URL for the ad decision server (ADS). This includes the specification of static parameters and placeholders for dynamic parameters. MediaTailor substitutes player-specific and session-specific parameters as needed when calling the ADS. Alternately, for testing you can provide a static VAST URL. The maximum length is 25,000 characters.", - "AvailSuppression": "The configuration for avail suppression, also known as ad suppression. For more information about ad suppression, see [Ad Suppression](https://docs.aws.amazon.com/mediatailor/latest/ug/ad-behavior.html) .", - "Bumper": "The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of an ad break. To learn more about bumpers, see [Bumpers](https://docs.aws.amazon.com/mediatailor/latest/ug/bumpers.html) .", - "CdnConfiguration": "The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment management.", + "AdDecisionServerUrl": "", + "AvailSuppression": "", + "Bumper": "", + "CdnConfiguration": "", "ConfigurationAliases": "The player parameters and aliases used as dynamic variables during session initialization. For more information, see [Domain Variables](https://docs.aws.amazon.com/mediatailor/latest/ug/variables-domain.html) .", - "DashConfiguration": "The configuration for DASH content.", - "HlsConfiguration": "", - "LivePreRollConfiguration": "The configuration for pre-roll ad insertion.", - "ManifestProcessingRules": "The configuration for manifest processing rules. Manifest processing rules enable customization of the personalized manifests created by MediaTailor.", - "Name": "The identifier for the playback configuration.", - "PersonalizationThresholdSeconds": "Defines the maximum duration of underfilled ad time (in seconds) allowed in an ad break. If the duration of underfilled ad time exceeds the personalization threshold, then the personalization of the ad break is abandoned and the underlying content is shown. This feature applies to *ad replacement* in live and VOD streams, rather than ad insertion, because it relies on an underlying content stream. For more information about ad break behavior, including ad replacement and insertion, see [Ad Behavior in MediaTailor](https://docs.aws.amazon.com/mediatailor/latest/ug/ad-behavior.html) .", - "SlateAdUrl": "The URL for a high-quality video asset to transcode and use to fill in time that's not used by ads. MediaTailor shows the slate to fill in gaps in media content. Configuring the slate is optional for non-VPAID configurations. For VPAID, the slate is required because MediaTailor provides it in the slots that are designated for dynamic ad content. The slate must be a high-quality asset that contains both audio and video.", - "Tags": "The tags to assign to the playback configuration.", - "TranscodeProfileName": "The name that is used to associate this playback configuration with a custom transcode profile. This overrides the dynamic transcoding defaults of MediaTailor. Use this only if you have already set up custom profiles with the help of AWS Support.", - "VideoContentSourceUrl": "The URL prefix for the parent manifest for the stream, minus the asset ID. The maximum length is 512 characters." + "DashConfiguration": "", + "HlsConfiguration": "The configuration for HLS content.", + "LivePreRollConfiguration": "", + "ManifestProcessingRules": "", + "Name": "", + "PersonalizationThresholdSeconds": "", + "SlateAdUrl": "", + "Tags": "", + "TranscodeProfileName": "", + "VideoContentSourceUrl": "" } }, "AWS::MediaTailor::PlaybackConfiguration.AdMarkerPassthrough": { "attributes": {}, - "description": "For HLS, when set to `true` , MediaTailor passes through `EXT-X-CUE-IN` , `EXT-X-CUE-OUT` , and `EXT-X-SPLICEPOINT-SCTE35` ad markers from the origin manifest to the MediaTailor personalized manifest.\n\nNo logic is applied to these ad markers. For example, if `EXT-X-CUE-OUT` has a value of `60` , but no ads are filled for that ad break, MediaTailor will not set the value to `0` .", + "description": "", "properties": { - "Enabled": "Enables ad marker passthrough for your configuration." + "Enabled": "" } }, "AWS::MediaTailor::PlaybackConfiguration.AvailSuppression": { "attributes": {}, - "description": "The configuration for avail suppression, also known as ad suppression. For more information about ad suppression, see [Ad Suppression](https://docs.aws.amazon.com/mediatailor/latest/ug/ad-behavior.html) .", + "description": "", "properties": { - "Mode": "Sets the ad suppression mode. By default, ad suppression is off and all ad breaks are filled with ads or slate. When Mode is set to BEHIND_LIVE_EDGE, ad suppression is active and MediaTailor won't fill ad breaks on or behind the ad suppression Value time in the manifest lookback window.", - "Value": "A live edge offset time in HH:MM:SS. MediaTailor won't fill ad breaks on or behind this time in the manifest lookback window. If Value is set to 00:00:00, it is in sync with the live edge, and MediaTailor won't fill any ad breaks on or behind the live edge. If you set a Value time, MediaTailor won't fill any ad breaks on or behind this time in the manifest lookback window. For example, if you set 00:45:00, then MediaTailor will fill ad breaks that occur within 45 minutes behind the live edge, but won't fill ad breaks on or behind 45 minutes behind the live edge." + "Mode": "", + "Value": "" } }, "AWS::MediaTailor::PlaybackConfiguration.Bumper": { "attributes": {}, - "description": "The configuration for bumpers. Bumpers are short audio or video clips that play at the start or before the end of an ad break. To learn more about bumpers, see [Bumpers](https://docs.aws.amazon.com/mediatailor/latest/ug/bumpers.html) .", + "description": "", "properties": { - "EndUrl": "The URL for the end bumper asset.", - "StartUrl": "The URL for the start bumper asset." + "EndUrl": "", + "StartUrl": "" } }, "AWS::MediaTailor::PlaybackConfiguration.CdnConfiguration": { "attributes": {}, - "description": "The configuration for using a content delivery network (CDN), like Amazon CloudFront, for content and ad segment management.", + "description": "", "properties": { - "AdSegmentUrlPrefix": "A non-default content delivery network (CDN) to serve ad segments. By default, MediaTailor uses Amazon CloudFront with default cache settings as its CDN for ad segments. To set up an alternate CDN, create a rule in your CDN for the origin ads.mediatailor.<region>.amazonaws.com. Then specify the rule's name in this AdSegmentUrlPrefix. When MediaTailor serves a manifest, it reports your CDN as the source for ad segments.", - "ContentSegmentUrlPrefix": "A content delivery network (CDN) to cache content segments, so that content requests don\u2019t always have to go to the origin server. First, create a rule in your CDN for the content segment origin server. Then specify the rule's name in this ContentSegmentUrlPrefix. When MediaTailor serves a manifest, it reports your CDN as the source for content segments." + "AdSegmentUrlPrefix": "", + "ContentSegmentUrlPrefix": "" } }, "AWS::MediaTailor::PlaybackConfiguration.DashConfiguration": { @@ -35995,8 +36047,8 @@ "description": "The configuration for DASH content.", "properties": { "ManifestEndpointPrefix": "The URL generated by MediaTailor to initiate a playback session. The session uses server-side reporting. This setting is ignored in PUT operations.", - "MpdLocation": "The setting that controls whether MediaTailor includes the Location tag in DASH manifests. MediaTailor populates the Location tag with the URL for manifest update requests, to be used by players that don't support sticky redirects. Disable this if you have CDN routing rules set up for accessing MediaTailor manifests, and you are either using client-side reporting or your players support sticky HTTP redirects. Valid values are DISABLED and EMT_DEFAULT. The EMT_DEFAULT setting enables the inclusion of the tag and is the default value.", - "OriginManifestType": "The setting that controls whether MediaTailor handles manifests from the origin server as multi-period manifests or single-period manifests. If your origin server produces single-period manifests, set this to SINGLE_PERIOD. The default setting is MULTI_PERIOD. For multi-period manifests, omit this setting or set it to MULTI_PERIOD." + "MpdLocation": "The setting that controls whether MediaTailor includes the Location tag in DASH manifests. MediaTailor populates the Location tag with the URL for manifest update requests, to be used by players that don't support sticky redirects. Disable this if you have CDN routing rules set up for accessing MediaTailor manifests, and you are either using client-side reporting or your players support sticky HTTP redirects. Valid values are `DISABLED` and `EMT_DEFAULT` . The `EMT_DEFAULT` setting enables the inclusion of the tag and is the default value.", + "OriginManifestType": "The setting that controls whether MediaTailor handles manifests from the origin server as multi-period manifests or single-period manifests. If your origin server produces single-period manifests, set this to `SINGLE_PERIOD` . The default setting is `MULTI_PERIOD` . For multi-period manifests, omit this setting or set it to `MULTI_PERIOD` ." } }, "AWS::MediaTailor::PlaybackConfiguration.HlsConfiguration": { @@ -36008,17 +36060,17 @@ }, "AWS::MediaTailor::PlaybackConfiguration.LivePreRollConfiguration": { "attributes": {}, - "description": "The configuration for pre-roll ad insertion.", + "description": "", "properties": { - "AdDecisionServerUrl": "The URL for the ad decision server (ADS) for pre-roll ads. This includes the specification of static parameters and placeholders for dynamic parameters. MediaTailor substitutes player-specific and session-specific parameters as needed when calling the ADS. Alternately, for testing, you can provide a static VAST URL. The maximum length is 25,000 characters.", - "MaxDurationSeconds": "The maximum allowed duration for the pre-roll ad avail. MediaTailor won't play pre-roll ads to exceed this duration, regardless of the total duration of ads that the ADS returns." + "AdDecisionServerUrl": "", + "MaxDurationSeconds": "" } }, "AWS::MediaTailor::PlaybackConfiguration.ManifestProcessingRules": { "attributes": {}, - "description": "The configuration for manifest processing rules. Manifest processing rules enable customization of the personalized manifests created by MediaTailor.", + "description": "", "properties": { - "AdMarkerPassthrough": "For HLS, when set to `true` , MediaTailor passes through `EXT-X-CUE-IN` , `EXT-X-CUE-OUT` , and `EXT-X-SPLICEPOINT-SCTE35` ad markers from the origin manifest to the MediaTailor personalized manifest.\n\nNo logic is applied to these ad markers. For example, if `EXT-X-CUE-OUT` has a value of `60` , but no ads are filled for that ad break, MediaTailor will not set the value to `0` ." + "AdMarkerPassthrough": "" } }, "AWS::MemoryDB::ACL": { @@ -36852,6 +36904,26 @@ "Tags": "The list of key-value tags that changed for the segment." } }, + "AWS::NetworkManager::TransitGatewayPeering": { + "attributes": { + "CoreNetworkArn": "The ARN of the core network.", + "CreatedAt": "The timestamp when the core network peering was created.", + "EdgeLocation": "The edge location for the peer.", + "OwnerAccountId": "The ID of the account owner.", + "PeeringId": "The ID of the peering.", + "PeeringType": "The peering type. This will be `TRANSIT_GATEWAY` .", + "Ref": "`Ref` returns the `peeringId` . For example: `peering-01234ab1234a12a12` .", + "ResourceArn": "The ARN of the resource peered to a core network.", + "State": "The current state of the peer. This can be `CREATING` | `FAILED` | `AVAILABLE` | `DELETING` .", + "TransitGatewayPeeringAttachmentId": "The ID of the peering attachment." + }, + "description": "Creates a transit gateway peering connection.", + "properties": { + "CoreNetworkId": "The ID of the core network.", + "Tags": "The list of key-value tags associated with the peering.", + "TransitGatewayArn": "The ARN of the transit gateway." + } + }, "AWS::NetworkManager::TransitGatewayRegistration": { "attributes": { "Ref": "`Ref` returns the ID of the global network and the ARN of the transit gateway. For example: `global-network-01231231231231231|arn:aws:ec2:us-west-2:123456789012:transit-gateway/tgw-123abc05e04123abc` ." @@ -37985,7 +38057,7 @@ }, "description": "Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account .\n\nFor more information about policies and their use, see [Managing Organization Policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html) .\n\nIf the request includes tags, then the requester must have the `organizations:TagResource` permission.\n\nThis operation can be called only from the organization's management account.\n\n> Before you can create a policy of a given type, you must first [enable that policy type](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html) in your organization.", "properties": { - "Content": "The policy text content.", + "Content": "The policy text content. The text that you supply must adhere to the rules of the policy type you specify in the `Type` parameter. The following AWS Organizations quotas are enforced for the maximum size of a policy document:\n\n- Service control policies: 5,120 bytes *(not characters)*\n- AI services opt-out policies: 2,500 characters\n- Backup policies: 10,000 characters\n- Tag policies: 10,000 characters\n\nFor more information about Organizations service quotas, see [Quotas for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html) in the *AWS Organizations User Guide* .", "Description": "Human readable description of the policy.", "Name": "Name of the policy.\n\nThe [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) that is used to validate this parameter is a string of any of the characters in the ASCII character range.", "Tags": "A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to `null` . For more information about tagging, see [Tagging AWS Organizations resources](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) in the AWS Organizations User Guide.\n\n> If any one of the tags is not valid or if you exceed the allowed number of tags for a policy, then the entire request fails and the policy is not created.", @@ -37993,6 +38065,18 @@ "Type": "The type of policy to create." } }, + "AWS::Organizations::ResourcePolicy": { + "attributes": { + "Arn": "Returns the Amazon Resource Name (ARN) of the policy. For example: `arn:aws:organizations::111111111111:resourcepolicy/o-exampleorgid/rp-examplepolicyid111` .", + "Id": "Returns the unique identifier (ID) of the resource policy. For example: `rp-examplepolicyid111` .", + "Ref": "`Ref` returns the `Id` . For example: `rp-examplepolicyid111` ." + }, + "description": "Creates or updates a resource-based delegation policy that can be used to delegate policy management for AWS Organizations to specified member accounts to perform policy actions that are by default available only to the management account.\n\nFor more information about delegated policy management, see [Delegated administrator for AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_delegate_policies.html) in the *AWS Organizations User Guide* .\n\nYou can only call this operation from the organization's management account.", + "properties": { + "Content": "The policy text of the organization resource policy. You can specify the resource policy content as a JSON object or a JSON string.\n\n> When you specify the resource policy content as a JSON string, you can't perform drift detection on the CloudFormation stack. For this reason, we recommend specifying the resource policy content as a JSON object instead.", + "Tags": "A list of tags that you want to attach to the newly created resource policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to `null` . For more information about tagging, see [Tagging AWS Organizations resources](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) in the *AWS Organizations User Guide* .\n\n> If any one of the tags is not valid or if you exceed the allowed number of tags for the resource policy, then the entire request fails and the resource policy is not created." + } + }, "AWS::Panorama::ApplicationInstance": { "attributes": { "ApplicationInstanceId": "The application instance's ID.", @@ -38862,7 +38946,7 @@ "properties": { "ApplicationId": "The unique identifier for the Amazon Pinpoint application that the segment is associated with.", "Dimensions": "The criteria that define the dimensions for the segment.", - "Name": "The name of the segment.", + "Name": "The name of the segment.\n\n> A segment must have a name otherwise it will not appear in the Amazon Pinpoint console.", "SegmentGroups": "The segment group to use and the dimensions to apply to the group's base segments in order to build the segment. A segment group can consist of zero or more base segments. Your request can include only one segment group.", "Tags": "An array of key-value pairs to apply to this resource.\n\nFor more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) ." } @@ -39181,7 +39265,7 @@ "SourceParameters": "The parameters required to set up a source for your pipe.", "Tags": "The list of key-value pairs to associate with the pipe.", "Target": "The ARN of the target resource.", - "TargetParameters": "The parameters required to set up a target for your pipe." + "TargetParameters": "The parameters required to set up a target for your pipe.\n\nFor more information about pipe target parameters, including how to use dynamic path parameters, see [Target parameters](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html) in the *Amazon EventBridge User Guide* ." } }, "AWS::Pipes::Pipe.AwsVpcConfiguration": { @@ -39553,7 +39637,7 @@ }, "AWS::Pipes::Pipe.PipeTargetParameters": { "attributes": {}, - "description": "The parameters required to set up a target for your pipe.", + "description": "The parameters required to set up a target for your pipe.\n\nFor more information about pipe target parameters, including how to use dynamic path parameters, see [Target parameters](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html) in the *Amazon EventBridge User Guide* .", "properties": { "BatchJobParameters": "The parameters for using an AWS Batch job as a target.", "CloudWatchLogsParameters": "The parameters for using an CloudWatch Logs log stream as a target.", @@ -41471,6 +41555,8 @@ "EndpointStatus": "The status of the endpoint.", "Port": "The port number on which the cluster accepts incoming connections.", "Ref": "`Ref` returns the resource name.", + "VpcEndpoint": "", + "VpcEndpoint.NetworkInterfaces": "", "VpcEndpoint.VpcEndpointId": "", "VpcEndpoint.VpcId": "" }, @@ -41480,9 +41566,7 @@ "EndpointName": "The name of the endpoint.", "ResourceOwner": "The AWS account ID of the owner of the cluster.", "SubnetGroupName": "The subnet group name where Amazon Redshift chooses to deploy the endpoint.", - "VpcEndpoint": "", - "VpcSecurityGroupIds": "The security group that defines the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint.", - "VpcSecurityGroups": "The security groups associated with the endpoint." + "VpcSecurityGroupIds": "The security group that defines the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint." } }, "AWS::Redshift::EndpointAccess.NetworkInterface": { @@ -41607,6 +41691,7 @@ }, "AWS::RedshiftServerless::Namespace": { "attributes": { + "Namespace": "Returns the `Namespace` value.", "Namespace.AdminUsername": "", "Namespace.CreationDate": "", "Namespace.DbName": "", @@ -41631,7 +41716,6 @@ "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` .", - "Namespace": "", "NamespaceName": "The name of the namespace.", "Tags": "The map of the key-value pairs used to tag the namespace." } @@ -41656,10 +41740,14 @@ "AWS::RedshiftServerless::Workgroup": { "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.ConfigParameters": "", "Workgroup.CreationDate": "", + "Workgroup.Endpoint": "", "Workgroup.Endpoint.Address": "", "Workgroup.Endpoint.Port": "", + "Workgroup.Endpoint.VpcEndpoints": "", "Workgroup.EnhancedVpcRouting": "", "Workgroup.NamespaceName": "", "Workgroup.PubliclyAccessible": "", @@ -41676,11 +41764,11 @@ "ConfigParameters": "A list of parameters to set for finer control over a database. Available options are `datestyle` , `enable_user_activity_logging` , `query_group` , `search_path` , and `max_query_execution_time` .", "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.", "NamespaceName": "The namespace the workgroup is associated with.", + "Port": "The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.", "PubliclyAccessible": "A value that specifies whether the workgroup can be accessible from a public network.", "SecurityGroupIds": "A list of security group IDs to associate with the workgroup.", "SubnetIds": "A list of subnet IDs the workgroup is associated with.", "Tags": "The map of the key-value pairs used to tag the workgroup.", - "Workgroup": "", "WorkgroupName": "The name of the workgroup." } }, @@ -42944,6 +43032,7 @@ "description": "In a [CreateResolverRule](https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverRule.html) request, an array of the IPs that you want to forward DNS queries to.", "properties": { "Ip": "One IP address that you want to forward DNS queries to. You can specify only IPv4 addresses.", + "Ipv6": "", "Port": "The port at `Ip` that you want to forward DNS queries to." } }, @@ -44341,8 +44430,8 @@ "properties": { "DeliveryPolicy": "The delivery policy JSON assigned to the subscription. Enables the subscriber to define the message delivery retry strategy in the case of an HTTP/S endpoint subscribed to the topic. For more information, see `[GetSubscriptionAttributes](https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html)` in the *Amazon SNS API Reference* and [Message delivery retries](https://docs.aws.amazon.com/sns/latest/dg/sns-message-delivery-retries.html) in the *Amazon SNS Developer Guide* .", "Endpoint": "The subscription's endpoint. The endpoint value depends on the protocol that you specify. For more information, see the `Endpoint` parameter of the `[Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html)` action in the *Amazon SNS API Reference* .", - "FilterPolicy": "The filter policy JSON assigned to the subscription. Enables the subscriber to filter out unwanted messages. For more information, see `[GetSubscriptionAttributes](https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html)` in the *Amazon SNS API Reference* and [Message filtering](https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html) in the *Amazon SNS Developer Guide* .\n\n- `FilterPolicyScope` - This attribute lets you choose the filtering scope by using one of the following string value types:\n\n- `MessageAttributes` (default) - The filter is applied on the message attributes.\n- `MessageBody` - The filter is applied on the message body.", - "FilterPolicyScope": "", + "FilterPolicy": "The filter policy JSON assigned to the subscription. Enables the subscriber to filter out unwanted messages. For more information, see `[GetSubscriptionAttributes](https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html)` in the *Amazon SNS API Reference* and [Message filtering](https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html) in the *Amazon SNS Developer Guide* .", + "FilterPolicyScope": "This attribute lets you choose the filtering scope by using one of the following string value types:\n\n- `MessageAttributes` (default) - The filter is applied on the message attributes.\n- `MessageBody` - The filter is applied on the message body.", "Protocol": "The subscription's protocol. For more information, see the `Protocol` parameter of the `[Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html)` action in the *Amazon SNS API Reference* .", "RawMessageDelivery": "When set to `true` , enables raw message delivery. Raw messages don't contain any JSON formatting and can be sent to Amazon SQS and HTTP/S endpoints. For more information, see `[GetSubscriptionAttributes](https://docs.aws.amazon.com/sns/latest/api/API_GetSubscriptionAttributes.html)` in the *Amazon SNS API Reference* .", "RedrivePolicy": "When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable) or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held in the dead-letter queue for further analysis or reprocessing.\n\nFor more information about the redrive policy and dead-letter queues, see [Amazon SQS dead-letter queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) in the *Amazon SQS Developer Guide* .", @@ -44364,11 +44453,11 @@ "DisplayName": "The display name to use for an Amazon SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.", "FifoTopic": "Set to true to create a FIFO topic.", "KmsMasterKeyId": "The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms) . For more examples, see `[KeyId](https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters)` in the *AWS Key Management Service API Reference* .\n\nThis property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html) .", - "SignatureVersion": "", + "SignatureVersion": "The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, `SignatureVersion` is set to `1` .", "Subscription": "The Amazon SNS subscriptions (endpoints) for this topic.", "Tags": "The list of tags to add to a new topic.\n\n> To be able to tag a topic on creation, you must have the `sns:CreateTopic` and `sns:TagResource` permissions.", "TopicName": "The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with `.fifo` .\n\nIf you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .\n\n> If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.", - "TracingConfig": "" + "TracingConfig": "Tracing mode of an Amazon SNS topic. By default `TracingConfig` is set to `PassThrough` , and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to Active, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true. Only supported on standard topics." } }, "AWS::SNS::Topic.Subscription": { @@ -44484,7 +44573,7 @@ "Name": "A name for the SSM document.\n\n> You can't use the following strings as document name prefixes. These are reserved by AWS for use as document name prefixes:\n> \n> - `aws`\n> - `amazon`\n> - `amzn`", "Requires": "A list of SSM documents required by a document. This parameter is used exclusively by AWS AppConfig . When a user creates an AWS AppConfig configuration in an SSM document, the user must also specify a required document for validation purposes. In this case, an `ApplicationConfiguration` document requires an `ApplicationConfigurationSchema` document for validation purposes. For more information, see [What is AWS AppConfig ?](https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html) in the *AWS AppConfig User Guide* .", "Tags": "AWS CloudFormation resource tags to apply to the document. Use tags to help you identify and categorize resources.", - "TargetType": "Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: `/AWS::EC2::Instance` . If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see [AWS resource and property types reference](https://docs.aws.amazon.com//AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) in the *AWS CloudFormation User Guide* .", + "TargetType": "Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: `/AWS::EC2::Instance` . If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see [AWS resource and property types reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) in the *AWS CloudFormation User Guide* .", "UpdateMethod": "If the document resource you specify in your template already exists, this parameter determines whether a new version of the existing document is created, or the existing document is replaced. `Replace` is the default method. If you specify `NewVersion` for the `UpdateMethod` parameter, and the `Name` of the document does not match an existing resource, a new document is created. When you specify `NewVersion` , the default version of the document is changed to the newly created version.", "VersionName": "An optional field specifying the version of the artifact you are creating with the document. For example, `Release12.1` . This value is unique across all versions of a document, and can't be changed." } @@ -47300,6 +47389,60 @@ "ProvisioningParameters": "A list of key value pairs that you specify when you provision a product." } }, + "AWS::SageMaker::Space": { + "attributes": { + "Ref": "", + "SpaceArn": "The space's Amazon Resource Name (ARN)." + }, + "description": "Creates a space used for real time collaboration in a Domain.", + "properties": { + "DomainId": "The ID of the associated Domain.", + "SpaceName": "The name of the space.", + "SpaceSettings": "A collection of space settings.", + "Tags": "An array of key-value pairs to apply to this resource.\n\nFor more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) ." + } + }, + "AWS::SageMaker::Space.CustomImage": { + "attributes": {}, + "description": "A custom SageMaker image. For more information, see [Bring your own SageMaker image](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-byoi.html) .", + "properties": { + "AppImageConfigName": "The name of the AppImageConfig.", + "ImageName": "The name of the CustomImage. Must be unique to your account.", + "ImageVersionNumber": "The version number of the CustomImage." + } + }, + "AWS::SageMaker::Space.JupyterServerAppSettings": { + "attributes": {}, + "description": "The JupyterServer app settings.", + "properties": { + "DefaultResourceSpec": "The default instance type and the Amazon Resource Name (ARN) of the default SageMaker image used by the JupyterServer app. If you use the `LifecycleConfigArns` parameter, then this parameter is also required." + } + }, + "AWS::SageMaker::Space.KernelGatewayAppSettings": { + "attributes": {}, + "description": "The KernelGateway app settings.", + "properties": { + "CustomImages": "A list of custom SageMaker images that are configured to run as a KernelGateway app.", + "DefaultResourceSpec": "The default instance type and the Amazon Resource Name (ARN) of the default SageMaker image used by the KernelGateway app.\n\n> The Amazon SageMaker Studio UI does not use the default instance type value set here. The default instance type set here is used when Apps are created using the AWS Command Line Interface or AWS CloudFormation and the instance type parameter value is not passed." + } + }, + "AWS::SageMaker::Space.ResourceSpec": { + "attributes": {}, + "description": "Specifies the ARN's of a SageMaker image and SageMaker image version, and the instance type that the version runs on.", + "properties": { + "InstanceType": "The instance type that the image version runs on.\n\n> *JupyterServer apps* only support the `system` value.\n> \n> For *KernelGateway apps* , the `system` value is translated to `ml.t3.medium` . KernelGateway apps also support all other values for available instance types.", + "SageMakerImageArn": "The ARN of the SageMaker image that the image version belongs to.", + "SageMakerImageVersionArn": "The ARN of the image version created on the instance." + } + }, + "AWS::SageMaker::Space.SpaceSettings": { + "attributes": {}, + "description": "A collection of space settings.", + "properties": { + "JupyterServerAppSettings": "The JupyterServer app settings.", + "KernelGatewayAppSettings": "The KernelGateway app settings." + } + }, "AWS::SageMaker::UserProfile": { "attributes": { "Ref": "`Ref` returns the Domain ID and the user profile name, such as `d-xxxxxxxxxxxx` and `my-user-profile` , respectively.", @@ -47671,7 +47814,7 @@ "IncludeSpace": "Specifies whether to include the space character. If you include this switch, the password can contain space characters.", "PasswordLength": "The length of the password. If you don't include this parameter, the default length is 32 characters.", "RequireEachIncludedType": "Specifies whether to include at least one upper and lowercase letter, one number, and one punctuation. If you don't include this switch, the password contains at least one of every character type.", - "SecretStringTemplate": "A template that the generated string must match." + "SecretStringTemplate": "A template that the generated string must match. When you make a change to this property, a new secret version is created." } }, "AWS::SecretsManager::Secret.ReplicaRegion": { @@ -50177,10 +50320,10 @@ "description": "Additional information that's used by a managed rule group. Many managed rule groups don't require this.\n\nUse the `AWSManagedRulesBotControlRuleSet` configuration object to configure the protection level that you want the Bot Control rule group to use.", "properties": { "AWSManagedRulesBotControlRuleSet": "Additional configuration for using the Bot Control managed rule group. Use this to specify the inspection level that you want to use. For information about using the Bot Control managed rule group, see [AWS WAF Bot Control rule group](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html) and [AWS WAF Bot Control](https://docs.aws.amazon.com/waf/latest/developerguide/waf-bot-control.html) in the *AWS WAF Developer Guide* .", - "LoginPath": "The path of the login endpoint for your application. For example, for the URL `https://example.com/web/login` , you would provide the path `/web/login` .", - "PasswordField": "Details about your login page password field.", - "PayloadType": "The payload type for your login endpoint, either JSON or form encoded.", - "UsernameField": "Details about your login page username field." + "LoginPath": "> Instead of this setting, provide your configuration under `AWSManagedRulesATPRuleSet` .", + "PasswordField": "> Instead of this setting, provide your configuration under `AWSManagedRulesATPRuleSet` `RequestInspection` .", + "PayloadType": "> Instead of this setting, provide your configuration under `AWSManagedRulesATPRuleSet` `RequestInspection` .", + "UsernameField": "> Instead of this setting, provide your configuration under `AWSManagedRulesATPRuleSet` `RequestInspection` ." } }, "AWS::WAFv2::WebACL.ManagedRuleGroupStatement": { @@ -50188,7 +50331,7 @@ "description": "A rule statement used to run the rules that are defined in a managed rule group. To use this, provide the vendor name and the name of the rule group in this statement.\n\nYou cannot nest a `ManagedRuleGroupStatement` , for example for use inside a `NotStatement` or `OrStatement` . It can only be referenced as a top-level statement within a rule.", "properties": { "ExcludedRules": "Rules in the referenced rule group whose actions are set to `Count` .\n\n> Instead of this option, use `RuleActionOverrides` . It accepts any valid action setting, including `Count` .", - "ManagedRuleGroupConfigs": "Additional information that's used by a managed rule group. Many managed rule groups don't require this.\n\nUse the `AWSManagedRulesBotControlRuleSet` configuration object to configure the protection level that you want the Bot Control rule group to use.", + "ManagedRuleGroupConfigs": "Additional information that's used by a managed rule group. Many managed rule groups don't require this.\n\nUse the `AWSManagedRulesATPRuleSet` configuration object for the account takeover prevention managed rule group, to provide information such as the sign-in page of your application and the type of content to accept or reject from the client.\n\nUse the `AWSManagedRulesBotControlRuleSet` configuration object to configure the protection level that you want the Bot Control rule group to use.", "Name": "The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.", "RuleActionOverrides": "Action settings to use in the place of the rule actions that are configured inside the rule group. You specify one override for each rule whose action you want to change.\n\nYou can use overrides for testing, for example you can override all of rule actions to `Count` and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.", "ScopeDownStatement": "An optional nested statement that narrows the scope of the web requests that are evaluated by the managed rule group. Requests are only evaluated by the rule group if they match the scope-down statement. You can use any nestable `Statement` in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.", diff --git a/packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES index bfc94d9a5cc19..b4580a1a1cdbe 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.74.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.74.0 | Apache-2.0 +** @jsii/check-node@1.75.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.75.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.1313.0 - https://www.npmjs.com/package/aws-sdk/v/2.1313.0 | Apache-2.0 +** aws-sdk@2.1316.0 - https://www.npmjs.com/package/aws-sdk/v/2.1316.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/core/lib/size.ts b/packages/@aws-cdk/core/lib/size.ts index fa938c5939271..bcc579b12d4c8 100644 --- a/packages/@aws-cdk/core/lib/size.ts +++ b/packages/@aws-cdk/core/lib/size.ts @@ -9,6 +9,17 @@ import { Token } from './token'; * When the amount is passed as a token, unit conversion is not possible. */ export class Size { + /** + * Create a Storage representing an amount bytes. + * + * @param amount the amount of bytes to be represented + * + * @returns a new `Size` instance + */ + public static bytes(amount: number): Size { + return new Size(amount, StorageUnit.Bytes); + } + /** * Create a Storage representing an amount kibibytes. * 1 KiB = 1024 bytes @@ -90,6 +101,17 @@ export class Size { this.unit = unit; } + /** + * Return this storage as a total number of bytes. + * + * @param opts the conversion options + * + * @returns the quantity expressed in bytes + */ + public toBytes(opts: SizeConversionOptions = {}): number { + return convert(this.amount, this.unit, StorageUnit.Bytes, opts); + } + /** * Return this storage as a total number of kibibytes. * @@ -177,13 +199,14 @@ export interface SizeConversionOptions { } class StorageUnit { - public static readonly Kibibytes = new StorageUnit('kibibytes', 1); - public static readonly Mebibytes = new StorageUnit('mebibytes', 1024); - public static readonly Gibibytes = new StorageUnit('gibibytes', 1024 * 1024); - public static readonly Tebibytes = new StorageUnit('tebibytes', 1024 * 1024 * 1024); - public static readonly Pebibytes = new StorageUnit('pebibytes', 1024 * 1024 * 1024 * 1024); - - private constructor(public readonly label: string, public readonly inKibiBytes: number) { + public static readonly Bytes = new StorageUnit('bytes', 1); + public static readonly Kibibytes = new StorageUnit('kibibytes', 1024); + public static readonly Mebibytes = new StorageUnit('mebibytes', 1024 * 1024); + public static readonly Gibibytes = new StorageUnit('gibibytes', 1024 * 1024 * 1024); + public static readonly Tebibytes = new StorageUnit('tebibytes', 1024 * 1024 * 1024 * 1024); + public static readonly Pebibytes = new StorageUnit('pebibytes', 1024 * 1024 * 1024 * 1024 * 1024); + + private constructor(public readonly label: string, public readonly inBytes: number) { // MAX_SAFE_INTEGER is 2^53, so by representing storage in kibibytes, // the highest storage we can represent is 8 exbibytes. } @@ -195,12 +218,12 @@ class StorageUnit { function convert(amount: number, fromUnit: StorageUnit, toUnit: StorageUnit, options: SizeConversionOptions = {}) { const rounding = options.rounding ?? SizeRoundingBehavior.FAIL; - if (fromUnit.inKibiBytes === toUnit.inKibiBytes) { return amount; } + if (fromUnit.inBytes === toUnit.inBytes) { return amount; } if (Token.isUnresolved(amount)) { throw new Error(`Size must be specified as 'Size.${toUnit}()' here since its value comes from a token and cannot be converted (got Size.${fromUnit})`); } - const multiplier = fromUnit.inKibiBytes / toUnit.inKibiBytes; + const multiplier = fromUnit.inBytes / toUnit.inBytes; const value = amount * multiplier; switch (rounding) { case SizeRoundingBehavior.NONE: diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 8bef6e07b58eb..0c2dcf5bfe6a4 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.928.0", + "aws-sdk": "^2.1317.0", "@types/sinon": "^9.0.11", "fast-check": "^2.25.0", "jest": "^27.5.1", diff --git a/packages/@aws-cdk/core/test/size.test.ts b/packages/@aws-cdk/core/test/size.test.ts index a7c9c93a1a5bb..d2824ef17d691 100644 --- a/packages/@aws-cdk/core/test/size.test.ts +++ b/packages/@aws-cdk/core/test/size.test.ts @@ -15,6 +15,20 @@ describe('size', () => { ); }); + test('Size in bytes', () => { + const size = Size.bytes(1_099_511_627_776); + + expect(size.toBytes()).toEqual(1_099_511_627_776); + expect(size.toKibibytes()).toEqual(1_073_741_824); + expect(size.toMebibytes()).toEqual(1_048_576); + expect(size.toGibibytes()).toEqual(1024); + expect(size.toTebibytes()).toEqual(1); + expect(() => size.toPebibytes()).toThrow(/'1099511627776 bytes' cannot be converted into a whole number/); + floatEqual(size.toPebibytes({ rounding: SizeRoundingBehavior.NONE }), 1_099_511_627_776 / (1024 * 1024 * 1024 * 1024 * 1024)); + + expect(Size.bytes(4 * 1024 * 1024 * 1024).toGibibytes()).toEqual(4); + }); + test('Size in kibibytes', () => { const size = Size.kibibytes(4_294_967_296); diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 76bfbfa91b5ba..1dfc4ac772b77 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.1211.0", + "aws-sdk": "^2.1317.0", "aws-sdk-mock": "5.6.0", "fs-extra": "^9.1.0", "nock": "^13.3.0", diff --git a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md index a355164da0f5e..53c67e1c0fe1f 100644 --- a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md +++ b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md @@ -43,6 +43,10 @@ Flags come in three types: | [@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy](#aws-cdkaws-s3serveraccesslogsusebucketpolicy) | Use S3 Bucket Policy instead of ACLs for Server Access Logging | 2.59.0 | (fix) | | [@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName](#aws-cdkaws-iamimportedrolestacksafedefaultpolicyname) | Enable this feature to by default create default policy names for imported roles that depend on the stack the role is in. | 2.60.0 | (fix) | | [@aws-cdk/customresources:installLatestAwsSdkDefault](#aws-cdkcustomresourcesinstalllatestawssdkdefault) | Whether to install the latest SDK by default in AwsCustomResource | 2.60.0 | (default) | +| [@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup](#aws-cdkaws-codedeployremovealarmsfromdeploymentgroup) | Remove CloudWatch alarms from deployment group | 2.65.0 | (fix) | +| [@aws-cdk/aws-rds:databaseProxyUniqueResourceName](#aws-cdkaws-rdsdatabaseproxyuniqueresourcename) | Use unique resource name for Database Proxy | 2.65.0 | (fix) | +| [@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId](#aws-cdkaws-apigatewayauthorizerchangedeploymentlogicalid) | Include authorizer configuration in the calculation of the API deployment logical ID. | V2NEXT | (fix) | +| [@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup](#aws-cdkaws-codedeployremovealarmsfromdeploymentgroup) | Remove CloudWatch alarms from deployment group | V2NEXT | (fix) | | [@aws-cdk/aws-rds:databaseProxyUniqueResourceName](#aws-cdkaws-rdsdatabaseproxyuniqueresourcename) | Use unique resource name for Database Proxy | V2NEXT | (fix) | @@ -78,7 +82,9 @@ The following json shows the current recommended set of flags, as `cdk init` wou "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, "@aws-cdk/aws-route53-patters:useCertificate": true, "@aws-cdk/customresources:installLatestAwsSdkDefault": false, - "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true } } ``` @@ -780,6 +786,37 @@ flag on a resource-by-resource basis to enable it if necessary. **Compatibility with old behavior:** Set installLatestAwsSdk: true on all resources that need it. +### @aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId + +*Include authorizer configuration in the calculation of the API deployment logical ID.* (fix) + +The logical ID of the AWS::ApiGateway::Deployment resource is calculated by hashing +the API configuration, including methods, and resources, etc. Enable this feature flag +to also include the configuration of any authorizer attached to the API in the +calculation, so any changes made to an authorizer will create a new deployment. + + +| Since | Default | Recommended | +| ----- | ----- | ----- | +| (not in v1) | | | +| V2NEXT | `false` | `true` | + + +### @aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup + +*Remove CloudWatch alarms from deployment group* (fix) + +Enable this flag to be able to remove all CloudWatch alarms from a deployment group by removing +the alarms from the construct. If this flag is not set, removing all alarms from the construct +will still leave the alarms configured for the deployment group. + + +| Since | Default | Recommended | +| ----- | ----- | ----- | +| (not in v1) | | | +| 2.65.0 | `false` | `true` | + + ### @aws-cdk/aws-rds:databaseProxyUniqueResourceName *Use unique resource name for Database Proxy* (fix) @@ -796,7 +833,7 @@ This is a feature flag as the old behavior was technically incorrect, but users | Since | Default | Recommended | | ----- | ----- | ----- | | (not in v1) | | | -| V2NEXT | `false` | `true` | +| 2.65.0 | `false` | `true` | diff --git a/packages/@aws-cdk/cx-api/lib/features.ts b/packages/@aws-cdk/cx-api/lib/features.ts index 49c9643c92e37..9b5d4c024a5b1 100644 --- a/packages/@aws-cdk/cx-api/lib/features.ts +++ b/packages/@aws-cdk/cx-api/lib/features.ts @@ -79,6 +79,8 @@ export const S3_SERVER_ACCESS_LOGS_USE_BUCKET_POLICY = '@aws-cdk/aws-s3:serverAc export const ROUTE53_PATTERNS_USE_CERTIFICATE = '@aws-cdk/aws-route53-patters:useCertificate'; export const AWS_CUSTOM_RESOURCE_LATEST_SDK_DEFAULT = '@aws-cdk/customresources:installLatestAwsSdkDefault'; export const DATABASE_PROXY_UNIQUE_RESOURCE_NAME = '@aws-cdk/aws-rds:databaseProxyUniqueResourceName'; +export const CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP = '@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup'; +export const APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID = '@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId'; export const FLAGS: Record = { ////////////////////////////////////////////////////////////////////// @@ -642,6 +644,32 @@ export const FLAGS: Record = { This is a feature flag as the old behavior was technically incorrect, but users may have come to depend on it. `, + introducedIn: { v2: '2.65.0' }, + recommendedValue: true, + }, + + ////////////////////////////////////////////////////////////////////// + [CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP]: { + type: FlagType.BugFix, + summary: 'Remove CloudWatch alarms from deployment group', + detailsMd: ` + Enable this flag to be able to remove all CloudWatch alarms from a deployment group by removing + the alarms from the construct. If this flag is not set, removing all alarms from the construct + will still leave the alarms configured for the deployment group. + `, + introducedIn: { v2: '2.65.0' }, + recommendedValue: true, + }, + + [APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID]: { + type: FlagType.BugFix, + summary: 'Include authorizer configuration in the calculation of the API deployment logical ID.', + detailsMd: ` + The logical ID of the AWS::ApiGateway::Deployment resource is calculated by hashing + the API configuration, including methods, and resources, etc. Enable this feature flag + to also include the configuration of any authorizer attached to the API in the + calculation, so any changes made to an authorizer will create a new deployment. + `, introducedIn: { v2: 'V2NEXT' }, recommendedValue: true, }, diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index f2d357319bb3d..29a7617886441 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -54,7 +54,9 @@ "build+test+extract": "yarn build+test && yarn rosetta:extract" }, "cdk-build": { - "post": ["node ./build-tools/flag-report.js"] + "post": [ + "node ./build-tools/flag-report.js" + ] }, "author": { "name": "Amazon Web Services", diff --git a/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES b/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES index e5099babc9d44..25381811df08b 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.1313.0 - https://www.npmjs.com/package/aws-sdk/v/2.1313.0 | Apache-2.0 +** aws-sdk@2.1317.0 - https://www.npmjs.com/package/aws-sdk/v/2.1317.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 4f8bc0b76fa2f..b474999d2f378 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.1211.0", + "aws-sdk": "^2.1317.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 148d50aa60837..70fbd525300cf 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.65", + "@aws-cdk/asset-awscli-v1": "^2.2.69", "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 e14fb0586d9d8..326a2d93e1673 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.54", + "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.58", "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 286070734f9e0..3c80bc8c72978 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.1211.0" + "aws-sdk": "^2.1317.0" }, "peerDependencies": { "@aws-cdk/aws-codebuild": "0.0.0", diff --git a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts index f6d864f3dc835..580648a5fca08 100644 --- a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts +++ b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts @@ -47,7 +47,7 @@ export const ROUTE_53_BUCKET_WEBSITE_ZONE_IDS: { [region: string]: string } = { 'ap-south-2': 'Z02976202B4EZMXIPMXF7', 'ap-southeast-1': 'Z3O0J2DXBE1FTB', 'ap-southeast-2': 'Z1WCIGYICN2BYD', - 'ap-southeast-3': 'Z01613992JD795ZI93075', + 'ap-southeast-3': 'Z01846753K324LI26A3VV', 'ca-central-1': 'Z1QDHH18159H29', 'cn-northwest-1': 'Z282HJ1KT0DH03', 'eu-central-1': 'Z21DNDUVLTQW6Q', diff --git a/packages/@aws-cdk/triggers/package.json b/packages/@aws-cdk/triggers/package.json index f755e28bc546c..05d426c268df8 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.1211.0", + "aws-sdk": "^2.1317.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 38681e12f616e..bfc20cc70e174 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.65", - "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.54", + "@aws-cdk/asset-awscli-v1": "^2.2.69", + "@aws-cdk/asset-node-proxy-agent-v5": "^2.0.58", "@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.7", + "esbuild": "^0.17.8", "fs-extra": "^9.1.0", "ts-node": "^9.1.1", "typescript": "~3.8.3" diff --git a/packages/aws-cdk/THIRD_PARTY_LICENSES b/packages/aws-cdk/THIRD_PARTY_LICENSES index 0f2f044e4b344..4497b540f5ff9 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.74.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.74.0 | Apache-2.0 +** @jsii/check-node@1.75.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.75.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.1313.0 - https://www.npmjs.com/package/aws-sdk/v/2.1313.0 | Apache-2.0 +** aws-sdk@2.1317.0 - https://www.npmjs.com/package/aws-sdk/v/2.1317.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/api/aws-auth/sdk.ts b/packages/aws-cdk/lib/api/aws-auth/sdk.ts index 4f01ae207ecbc..028475f95b658 100644 --- a/packages/aws-cdk/lib/api/aws-auth/sdk.ts +++ b/packages/aws-cdk/lib/api/aws-auth/sdk.ts @@ -14,6 +14,7 @@ import { Account } from './sdk-provider'; /* eslint-disable @typescript-eslint/no-require-imports */ const regionUtil = require('aws-sdk/lib/region_config'); +require('aws-sdk/lib/maintenance_mode_message').suppress = true; /* eslint-enable @typescript-eslint/no-require-imports */ if (!regionUtil.getEndpointSuffix) { diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index 807a58bd0e563..e5461d63d5fdd 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -199,6 +199,13 @@ Resources: - Ref: AWS::NoValue VersioningConfiguration: Status: Enabled + LifecycleConfiguration: + Rules: + # Exising objects will never be overwritten but Security Hub wants this rule to exist + - Id: CleanupOldVersions + Status: Enabled + NoncurrentVersionExpiration: + NoncurrentDays: 365 UpdateReplacePolicy: Retain DeletionPolicy: Retain StagingBucketPolicy: diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 35f7dd3466b46..bfb389e4204f9 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.74.0", + "@jsii/check-node": "1.75.0", "archiver": "^5.3.1", - "aws-sdk": "^2.1211.0", + "aws-sdk": "^2.1317.0", "camelcase": "^6.3.0", "cdk-assets": "0.0.0", "chokidar": "^3.5.3", diff --git a/packages/aws-cdk/test/integ/init/test-go-app.sh b/packages/aws-cdk/test/integ/init/test-go-app.sh new file mode 100644 index 0000000000000..250435d81de4f --- /dev/null +++ b/packages/aws-cdk/test/integ/init/test-go-app.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -eu +# This is a backwards compatibility script. All logic has moved to '@aws-cdk-testing/cli-integ' +# and should be called from there directly. + +exec ${INTEG_TOOLS}/bin/run-suite --use-cli-release=$VERSION init-go \ No newline at end of file diff --git a/packages/awslint/package.json b/packages/awslint/package.json index e0f866a224b61..eabb892dae50e 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -18,11 +18,11 @@ "awslint": "bin/awslint" }, "dependencies": { - "@jsii/spec": "1.74.0", + "@jsii/spec": "1.75.0", "camelcase": "^6.3.0", "chalk": "^4", "fs-extra": "^9.1.0", - "jsii-reflect": "1.74.0", + "jsii-reflect": "1.75.0", "yargs": "^16.2.0" }, "devDependencies": { diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 6d15a4c38380f..a192f79aa6139 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.1211.0", + "aws-sdk": "^2.1317.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 7c80ab1ed15aa..862919c7cabbd 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -30,7 +30,7 @@ }, "license": "Apache-2.0", "dependencies": { - "codemaker": "1.74.0", + "codemaker": "1.75.0", "yaml": "1.10.2" }, "devDependencies": { diff --git a/packages/individual-packages/lerna.json b/packages/individual-packages/lerna.json index 2d9206447d084..739e009202549 100644 --- a/packages/individual-packages/lerna.json +++ b/packages/individual-packages/lerna.json @@ -1,5 +1,5 @@ { - "lerna": "3.15.0", + "lerna": "^4.0.0", "npmClient": "yarn", "packages": [ "*" diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json index 8edd6fa608838..fdf0692ee8235 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.74.0", - "jsii-pacmak": "1.74.0", - "jsii-reflect": "1.74.0", + "jsii": "1.75.0", + "jsii-pacmak": "1.75.0", + "jsii-reflect": "1.75.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 baafb1385485c..3f8ee3623f90b 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.74.0", + "codemaker": "1.75.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 a1faae722bf2a..7667755c323df 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -40,19 +40,19 @@ "jest-junit": "^13", "json-schema": "^0.4.0", "npm-check-updates": "^12", - "projen": "^0.67.50", + "projen": "^0.67.57", "standard-version": "^9", "ts-jest": "^27", "typescript": "^4.5.5" }, "dependencies": { - "cdk-generate-synthetic-examples": "^0.1.151", - "esbuild": "^0.17.7", + "cdk-generate-synthetic-examples": "^0.1.155", + "esbuild": "^0.17.8", "fs-extra": "^10.1.0", "license-checker": "^25.0.1", "madge": "^5.0.2", "shlex": "^2.1.2", - "yargs": "^17.6.2" + "yargs": "^17.7.0" }, "main": "lib/index.js", "license": "Apache-2.0", diff --git a/tools/@aws-cdk/node-bundle/test/cli.test.ts b/tools/@aws-cdk/node-bundle/test/cli.test.ts index 19f1ed22500dc..a41922d59d02e 100644 --- a/tools/@aws-cdk/node-bundle/test/cli.test.ts +++ b/tools/@aws-cdk/node-bundle/test/cli.test.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as fs from 'fs-extra'; -import { shell } from '../src/api/_shell'; import { Package } from './_package'; +import { shell } from '../src/api/_shell'; test('validate', () => { diff --git a/version.v2.json b/version.v2.json index b3cacf4bada01..1ba4ea58b8d21 100644 --- a/version.v2.json +++ b/version.v2.json @@ -1,4 +1,4 @@ { - "version": "2.64.0", - "alphaVersion": "2.64.0-alpha.0" + "version": "2.65.0", + "alphaVersion": "2.65.0-alpha.0" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 49ea68bdcde71..7945ea24468b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35,25 +35,25 @@ "@jridgewell/gen-mapping" "^0.1.0" "@jridgewell/trace-mapping" "^0.3.9" -"@aws-cdk/asset-awscli-v1@^2.2.65": - version "2.2.66" - resolved "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.66.tgz#063ae1aa38e54d9b26d77ed6b15de768d5fa1ac3" - integrity sha512-MdC2UpjDVi0ePQkXZg938/FZvK5pu0o2im9legoojmNZNKGssqpscz5gPISeZhrW124WI8IF+6hYPkHVYnod2w== +"@aws-cdk/asset-awscli-v1@^2.2.69": + version "2.2.69" + resolved "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.69.tgz#8b896adbad686fc8924018dc4a2d81dcea1868d4" + integrity sha512-sKhINBDXKc9cad+4ghBsn6nB63ci7KcO7Vb2FswBI36Z7lkaIkz51pPwmVWn8AsYNOvCpcaCxUx0zngCbQOluQ== "@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.54": - version "2.0.55" - resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.55.tgz#7ce3254e3efdf228bc4f28a6e99932ebbdc70baf" - integrity sha512-wqw3I/Bdy3SURLiGKtU47Fkz6OnSPsNs9O0FlkJyBFWVh4e5kMe1BfEmc3kZ/QukvKxI+Fnqk9Yz8tui0goqiQ== +"@aws-cdk/asset-node-proxy-agent-v5@^2.0.58": + version "2.0.58" + resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.58.tgz#1a8de9fd628306d9a7e93de1b06a0ed424e89502" + integrity sha512-7BTzPo1tBw1tTYEmWNO0nS+bTJ/Ikg2qpFQZBb0GedEJ1v713IyRoySlKADAXAaMPJU9Gg05LCuJy+cs7RUDMQ== -"@aws-cdk/lambda-layer-kubectl-v24@^2.0.96": - version "2.0.97" - resolved "https://registry.npmjs.org/@aws-cdk/lambda-layer-kubectl-v24/-/lambda-layer-kubectl-v24-2.0.97.tgz#b4f7b949c4f4cc6e2c929d4dfcd51fd2829fe34e" - integrity sha512-g/8xSVwG8d2zxcqREN0EX9aQRY4zRbqgryxcrvnaFOE0f2JZbVChq8FyUODfvK+J1n+1R3tS1lABl7gCeM9+Bg== +"@aws-cdk/lambda-layer-kubectl-v24@^2.0.100": + version "2.0.100" + resolved "https://registry.npmjs.org/@aws-cdk/lambda-layer-kubectl-v24/-/lambda-layer-kubectl-v24-2.0.100.tgz#c4450e7985f16e048c1041525fa1146866d93eee" + integrity sha512-14svXKODfjR9K8uuVXS8raqtfCLXI6dEUWvBQafiq72GJ33vTycoa3rHalYgj0CLS+pXMERSyUT2NiBDNBG8iA== "@babel/code-frame@7.12.11": version "7.12.11" @@ -360,115 +360,115 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@esbuild/android-arm64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.7.tgz#7d22b442815624423de5541545401e12a8d474d8" - integrity sha512-fOUBZvcbtbQJIj2K/LMKcjULGfXLV9R4qjXFsi3UuqFhIRJHz0Fp6kFjsMFI6vLuPrfC5G9Dmh+3RZOrSKY2Lg== - -"@esbuild/android-arm@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.7.tgz#fa30de0cfae8e8416c693dc449c415765542483b" - integrity sha512-Np6Lg8VUiuzHP5XvHU7zfSVPN4ILdiOhxA1GQ1uvCK2T2l3nI8igQV0c9FJx4hTkq8WGqhGEvn5UuRH8jMkExg== - -"@esbuild/android-x64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.7.tgz#34a1af914510ec821246859f8ae7d8fe843dd37b" - integrity sha512-6YILpPvop1rPAvaO/n2iWQL45RyTVTR/1SK7P6Xi2fyu+hpEeX22fE2U2oJd1sfpovUJOWTRdugjddX6QCup3A== - -"@esbuild/darwin-arm64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.7.tgz#06712059a30a6130eef701fb634883a4aaea02f7" - integrity sha512-7i0gfFsDt1BBiurZz5oZIpzfxqy5QkJmhXdtrf2Hma/gI9vL2AqxHhRBoI1NeWc9IhN1qOzWZrslhiXZweMSFg== - -"@esbuild/darwin-x64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.7.tgz#58cd69d00d5b9847ad2015858a7ec3f10bf309ad" - integrity sha512-hRvIu3vuVIcv4SJXEKOHVsNssM5tLE2xWdb9ZyJqsgYp+onRa5El3VJ4+WjTbkf/A2FD5wuMIbO2FCTV39LE0w== - -"@esbuild/freebsd-arm64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.7.tgz#1dd3de24a9683c8321a4e3c42b11b32a48e791d4" - integrity sha512-2NJjeQ9kiabJkVXLM3sHkySqkL1KY8BeyLams3ITyiLW10IwDL0msU5Lq1cULCn9zNxt1Seh1I6QrqyHUvOtQw== - -"@esbuild/freebsd-x64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.7.tgz#b0e409e1c7cc05412c8dd149c2c39e0a1dee9567" - integrity sha512-8kSxlbjuLYMoIgvRxPybirHJeW45dflyIgHVs+jzMYJf87QOay1ZUTzKjNL3vqHQjmkSn8p6KDfHVrztn7Rprw== - -"@esbuild/linux-arm64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.7.tgz#35cfae28e460b96ccc027eccc28b13c0712d6df3" - integrity sha512-43Bbhq3Ia/mGFTCRA4NlY8VRH3dLQltJ4cqzhSfq+cdvdm9nKJXVh4NUkJvdZgEZIkf/ufeMmJ0/22v9btXTcw== - -"@esbuild/linux-arm@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.7.tgz#a378301c253ef64d19a112c9ec922680c2fb5a71" - integrity sha512-07RsAAzznWqdfJC+h3L2UVWwnUHepsFw5GmzySnUspHHb7glJ1+47rvlcH0SeUtoVOs8hF4/THgZbtJRyALaJA== - -"@esbuild/linux-ia32@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.7.tgz#7d36087db95b1faaee8df203c511775a4d322a2b" - integrity sha512-ViYkfcfnbwOoTS7xE4DvYFv7QOlW8kPBuccc4erJ0jx2mXDPR7e0lYOH9JelotS9qe8uJ0s2i3UjUvjunEp53A== - -"@esbuild/linux-loong64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.7.tgz#b989253520308d81ee0e4846de9f63f2f11c7f10" - integrity sha512-H1g+AwwcqYQ/Hl/sMcopRcNLY/fysIb/ksDfCa3/kOaHQNhBrLeDYw+88VAFV5U6oJL9GqnmUj72m9Nv3th3hA== - -"@esbuild/linux-mips64el@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.7.tgz#ae751365cdf967dfa89dd59cdb0dcc8723a66f9a" - integrity sha512-MDLGrVbTGYtmldlbcxfeDPdhxttUmWoX3ovk9u6jc8iM+ueBAFlaXKuUMCoyP/zfOJb+KElB61eSdBPSvNcCEg== - -"@esbuild/linux-ppc64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.7.tgz#ad1c9299c463f0409e57166e76e91afb6193ea9f" - integrity sha512-UWtLhRPKzI+v2bKk4j9rBpGyXbLAXLCOeqt1tLVAt1mfagHpFjUzzIHCpPiUfY3x1xY5e45/+BWzGpqqvSglNw== - -"@esbuild/linux-riscv64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.7.tgz#84acb7451bef7458e6067d9c358026ffa1831910" - integrity sha512-3C/RTKqZauUwBYtIQAv7ELTJd+H2dNKPyzwE2ZTbz2RNrNhNHRoeKnG5C++eM6nSZWUCLyyaWfq1v1YRwBS/+A== - -"@esbuild/linux-s390x@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.7.tgz#0bf23c78c52ea60ae4ea95239b728683a86a7ab8" - integrity sha512-x7cuRSCm998KFZqGEtSo8rI5hXLxWji4znZkBhg2FPF8A8lxLLCsSXe2P5utf0RBQflb3K97dkEH/BJwTqrbDw== - -"@esbuild/linux-x64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.7.tgz#932d8c6e1b0d6a57a4e94a8390dfebeebba21dcc" - integrity sha512-1Z2BtWgM0Wc92WWiZR5kZ5eC+IetI++X+nf9NMbUvVymt74fnQqwgM5btlTW7P5uCHfq03u5MWHjIZa4o+TnXQ== - -"@esbuild/netbsd-x64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.7.tgz#6aa81873c6e08aa419378e07c8d3eed5aa77bf25" - integrity sha512-//VShPN4hgbmkDjYNCZermIhj8ORqoPNmAnwSPqPtBB0xOpHrXMlJhsqLNsgoBm0zi/5tmy//WyL6g81Uq2c6Q== - -"@esbuild/openbsd-x64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.7.tgz#0698f260250a7022e2cae7385cbd09a86eb0967c" - integrity sha512-IQ8BliXHiOsbQEOHzc7mVLIw2UYPpbOXJQ9cK1nClNYQjZthvfiA6rWZMz4BZpVzHZJ+/H2H23cZwRJ1NPYOGg== - -"@esbuild/sunos-x64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.7.tgz#ef97445672deec50e3b3549af2ee6d42fbc04250" - integrity sha512-phO5HvU3SyURmcW6dfQXX4UEkFREUwaoiTgi1xH+CAFKPGsrcG6oDp1U70yQf5lxRKujoSCEIoBr0uFykJzN2g== - -"@esbuild/win32-arm64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.7.tgz#70865d2332d7883e2e49077770adfe51c51343e3" - integrity sha512-G/cRKlYrwp1B0uvzEdnFPJ3A6zSWjnsRrWivsEW0IEHZk+czv0Bmiwa51RncruHLjQ4fGsvlYPmCmwzmutPzHA== - -"@esbuild/win32-ia32@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.7.tgz#39831b787013c7da7e61c8eb6a9df0fed9bd0fcb" - integrity sha512-/yMNVlMew07NrOflJdRAZcMdUoYTOCPbCHx0eHtg55l87wXeuhvYOPBQy5HLX31Ku+W2XsBD5HnjUjEUsTXJug== - -"@esbuild/win32-x64@0.17.7": - version "0.17.7" - resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.7.tgz#03b231fcfa0702562978979468dfc8b09b55ac59" - integrity sha512-K9/YybM6WZO71x73Iyab6mwieHtHjm9hrPR/a9FBPZmFO3w+fJaM2uu2rt3JYf/rZR24MFwTliI8VSoKKOtYtg== +"@esbuild/android-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.8.tgz#b3d5b65a3b2e073a6c7ee36b1f3c30c8f000315b" + integrity sha512-oa/N5j6v1svZQs7EIRPqR8f+Bf8g6HBDjD/xHC02radE/NjKHK7oQmtmLxPs1iVwYyvE+Kolo6lbpfEQ9xnhxQ== + +"@esbuild/android-arm@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.8.tgz#c41e496af541e175369d48164d0cf01a5f656cf6" + integrity sha512-0/rb91GYKhrtbeglJXOhAv9RuYimgI8h623TplY2X+vA4EXnk3Zj1fXZreJ0J3OJJu1bwmb0W7g+2cT/d8/l/w== + +"@esbuild/android-x64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.8.tgz#080fa67c29be77f5a3ca5ee4cc78d5bf927e3a3b" + integrity sha512-bTliMLqD7pTOoPg4zZkXqCDuzIUguEWLpeqkNfC41ODBHwoUgZ2w5JBeYimv4oP6TDVocoYmEhZrCLQTrH89bg== + +"@esbuild/darwin-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.8.tgz#053622bf9a82f43d5c075b7818e02618f7b4a397" + integrity sha512-ghAbV3ia2zybEefXRRm7+lx8J/rnupZT0gp9CaGy/3iolEXkJ6LYRq4IpQVI9zR97ID80KJVoUlo3LSeA/sMAg== + +"@esbuild/darwin-x64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.8.tgz#8a1aadb358d537d8efad817bb1a5bff91b84734b" + integrity sha512-n5WOpyvZ9TIdv2V1K3/iIkkJeKmUpKaCTdun9buhGRWfH//osmUjlv4Z5mmWdPWind/VGcVxTHtLfLCOohsOXw== + +"@esbuild/freebsd-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.8.tgz#e6738d0081ba0721a5c6c674e84c6e7fcea61989" + integrity sha512-a/SATTaOhPIPFWvHZDoZYgxaZRVHn0/LX1fHLGfZ6C13JqFUZ3K6SMD6/HCtwOQ8HnsNaEeokdiDSFLuizqv5A== + +"@esbuild/freebsd-x64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.8.tgz#1855e562f2b730f4483f6e94086e9e2597feb4c3" + integrity sha512-xpFJb08dfXr5+rZc4E+ooZmayBW6R3q59daCpKZ/cDU96/kvDM+vkYzNeTJCGd8rtO6fHWMq5Rcv/1cY6p6/0Q== + +"@esbuild/linux-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.8.tgz#481da38952721a3fdb77c17a36ceaacc4270b5c5" + integrity sha512-v3iwDQuDljLTxpsqQDl3fl/yihjPAyOguxuloON9kFHYwopeJEf1BkDXODzYyXEI19gisEsQlG1bM65YqKSIww== + +"@esbuild/linux-arm@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.8.tgz#18127072b270bb6321c6d11be20bfd30e0d6ad17" + integrity sha512-6Ij8gfuGszcEwZpi5jQIJCVIACLS8Tz2chnEBfYjlmMzVsfqBP1iGmHQPp7JSnZg5xxK9tjCc+pJ2WtAmPRFVA== + +"@esbuild/linux-ia32@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.8.tgz#ee400af7b3bc69e8ca2e593ca35156ffb9abd54f" + integrity sha512-8svILYKhE5XetuFk/B6raFYIyIqydQi+GngEXJgdPdI7OMKUbSd7uzR02wSY4kb53xBrClLkhH4Xs8P61Q2BaA== + +"@esbuild/linux-loong64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.8.tgz#8c509d8a454693d39824b83b3f66c400872fce82" + integrity sha512-B6FyMeRJeV0NpyEOYlm5qtQfxbdlgmiGdD+QsipzKfFky0K5HW5Td6dyK3L3ypu1eY4kOmo7wW0o94SBqlqBSA== + +"@esbuild/linux-mips64el@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.8.tgz#f2b0d36e63fb26bc3f95b203b6a80638292101ca" + integrity sha512-CCb67RKahNobjm/eeEqeD/oJfJlrWyw29fgiyB6vcgyq97YAf3gCOuP6qMShYSPXgnlZe/i4a8WFHBw6N8bYAA== + +"@esbuild/linux-ppc64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.8.tgz#1e628be003e036e90423716028cc884fe5ba25bd" + integrity sha512-bytLJOi55y55+mGSdgwZ5qBm0K9WOCh0rx+vavVPx+gqLLhxtSFU0XbeYy/dsAAD6xECGEv4IQeFILaSS2auXw== + +"@esbuild/linux-riscv64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.8.tgz#419a815cb4c3fb9f1b78ef5295f5b48b8bf6427a" + integrity sha512-2YpRyQJmKVBEHSBLa8kBAtbhucaclb6ex4wchfY0Tj3Kg39kpjeJ9vhRU7x4mUpq8ISLXRXH1L0dBYjAeqzZAw== + +"@esbuild/linux-s390x@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.8.tgz#291c49ae5c3d11d226352755c0835911fe1a9e5c" + integrity sha512-QgbNY/V3IFXvNf11SS6exkpVcX0LJcob+0RWCgV9OiDAmVElnxciHIisoSix9uzYzScPmS6dJFbZULdSAEkQVw== + +"@esbuild/linux-x64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.8.tgz#03199d91c76faf80bd54104f5cbf0a489bc39f6a" + integrity sha512-mM/9S0SbAFDBc4OPoyP6SEOo5324LpUxdpeIUUSrSTOfhHU9hEfqRngmKgqILqwx/0DVJBzeNW7HmLEWp9vcOA== + +"@esbuild/netbsd-x64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.8.tgz#b436d767e1b21852f9ed212e2bb57f77203b0ae2" + integrity sha512-eKUYcWaWTaYr9zbj8GertdVtlt1DTS1gNBWov+iQfWuWyuu59YN6gSEJvFzC5ESJ4kMcKR0uqWThKUn5o8We6Q== + +"@esbuild/openbsd-x64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.8.tgz#d1481d8539e21d4729cd04a0450a26c2c8789e89" + integrity sha512-Vc9J4dXOboDyMXKD0eCeW0SIeEzr8K9oTHJU+Ci1mZc5njPfhKAqkRt3B/fUNU7dP+mRyralPu8QUkiaQn7iIg== + +"@esbuild/sunos-x64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.8.tgz#2cfb8126e079b2c00fd1bf095541e9f5c47877e4" + integrity sha512-0xvOTNuPXI7ft1LYUgiaXtpCEjp90RuBBYovdd2lqAFxje4sEucurg30M1WIm03+3jxByd3mfo+VUmPtRSVuOw== + +"@esbuild/win32-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.8.tgz#7c6ecfd097ca23b82119753bf7072bbaefe51e3a" + integrity sha512-G0JQwUI5WdEFEnYNKzklxtBheCPkuDdu1YrtRrjuQv30WsYbkkoixKxLLv8qhJmNI+ATEWquZe/N0d0rpr55Mg== + +"@esbuild/win32-ia32@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.8.tgz#cffec63c3cb0ef8563a04df4e09fa71056171d00" + integrity sha512-Fqy63515xl20OHGFykjJsMnoIWS+38fqfg88ClvPXyDbLtgXal2DTlhb1TfTX34qWi3u4I7Cq563QcHpqgLx8w== + +"@esbuild/win32-x64@0.17.8": + version "0.17.8" + resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.8.tgz#200a0965cf654ac28b971358ecdca9cc5b44c335" + integrity sha512-1iuezdyDNngPnz8rLRDO2C/ZZ/emJLb72OsZeqQ6gL6Avko/XCXZw+NuxBSNhBAP13Hie418V7VMt9et1FMvpg== "@eslint/eslintrc@^0.4.3": version "0.4.3" @@ -781,18 +781,18 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@jsii/check-node@1.74.0": - version "1.74.0" - resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.74.0.tgz#997438e869c5f1fdf7a137c3e29a7236376f3999" - integrity sha512-1vNR0eGy8A15A+wlgYFpnjjUtiKLvizZse8THH7UR9Apa9lF68fd3A6ZHiHIu1Rz7PrdH2AoIR4YC8mwqu9e8g== +"@jsii/check-node@1.75.0": + version "1.75.0" + resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.75.0.tgz#1cfc2ab5b461c1e80d9a4c18a6e351a9a13287ce" + integrity sha512-ODorfPJwN0920DJrZ/R/G3x0UHgtuhz9y10s6Xox1BDobVXOQpfUl3XEQjrTrSE7kiCt2FxZvazT4xu1MU0y6Q== dependencies: chalk "^4.1.2" semver "^7.3.8" -"@jsii/spec@1.74.0", "@jsii/spec@^1.74.0": - version "1.74.0" - resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.74.0.tgz#3bd974e7113c13ef85057d4de65ee44d4fcb8f37" - integrity sha512-+Kfh7Xdvt6rmZ/W3OhOQq4iWcoZvvYwbfOm0NB7uF70q20LYaKMvLKaYWPTlxSZTrkScZwHrIFTryLlJ/e/v+w== +"@jsii/spec@1.75.0", "@jsii/spec@^1.75.0": + version "1.75.0" + resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.75.0.tgz#d15a8fe7764e3d39e727e944452168de35fc2ec3" + integrity sha512-aUF5364qgJRCco1C5HBjkDDBGuHZv0uqD5/IXZ2+3A7P/RXdxJdVup0iMGAWKSAx3yPImgyqgD+JxpAnw06YYg== dependencies: ajv "^8.12.0" @@ -2315,13 +2315,13 @@ tsutils "^3.21.0" "@typescript-eslint/eslint-plugin@^5": - version "5.51.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.51.0.tgz#da3f2819633061ced84bb82c53bba45a6fe9963a" - integrity sha512-wcAwhEWm1RgNd7dxD/o+nnLW8oH+6RK1OGnmbmkj/GGoDPV1WWMVP0FXYQBivKHdwM1pwii3bt//RC62EriIUQ== + version "5.52.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz#5fb0d43574c2411f16ea80f5fc335b8eaa7b28a8" + integrity sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg== dependencies: - "@typescript-eslint/scope-manager" "5.51.0" - "@typescript-eslint/type-utils" "5.51.0" - "@typescript-eslint/utils" "5.51.0" + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/type-utils" "5.52.0" + "@typescript-eslint/utils" "5.52.0" debug "^4.3.4" grapheme-splitter "^1.0.4" ignore "^5.2.0" @@ -2353,13 +2353,13 @@ debug "^4.3.1" "@typescript-eslint/parser@^5": - version "5.51.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.51.0.tgz#2d74626652096d966ef107f44b9479f02f51f271" - integrity sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA== + version "5.52.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.52.0.tgz#73c136df6c0133f1d7870de7131ccf356f5be5a4" + integrity sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA== dependencies: - "@typescript-eslint/scope-manager" "5.51.0" - "@typescript-eslint/types" "5.51.0" - "@typescript-eslint/typescript-estree" "5.51.0" + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/typescript-estree" "5.52.0" debug "^4.3.4" "@typescript-eslint/scope-manager@4.33.0": @@ -2370,21 +2370,21 @@ "@typescript-eslint/types" "4.33.0" "@typescript-eslint/visitor-keys" "4.33.0" -"@typescript-eslint/scope-manager@5.51.0": - version "5.51.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.51.0.tgz#ad3e3c2ecf762d9a4196c0fbfe19b142ac498990" - integrity sha512-gNpxRdlx5qw3yaHA0SFuTjW4rxeYhpHxt491PEcKF8Z6zpq0kMhe0Tolxt0qjlojS+/wArSDlj/LtE69xUJphQ== +"@typescript-eslint/scope-manager@5.52.0": + version "5.52.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz#a993d89a0556ea16811db48eabd7c5b72dcb83d1" + integrity sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw== dependencies: - "@typescript-eslint/types" "5.51.0" - "@typescript-eslint/visitor-keys" "5.51.0" + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/visitor-keys" "5.52.0" -"@typescript-eslint/type-utils@5.51.0": - version "5.51.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.51.0.tgz#7af48005531700b62a20963501d47dfb27095988" - integrity sha512-QHC5KKyfV8sNSyHqfNa0UbTbJ6caB8uhcx2hYcWVvJAZYJRBo5HyyZfzMdRx8nvS+GyMg56fugMzzWnojREuQQ== +"@typescript-eslint/type-utils@5.52.0": + version "5.52.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.52.0.tgz#9fd28cd02e6f21f5109e35496df41893f33167aa" + integrity sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw== dependencies: - "@typescript-eslint/typescript-estree" "5.51.0" - "@typescript-eslint/utils" "5.51.0" + "@typescript-eslint/typescript-estree" "5.52.0" + "@typescript-eslint/utils" "5.52.0" debug "^4.3.4" tsutils "^3.21.0" @@ -2393,10 +2393,10 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== -"@typescript-eslint/types@5.51.0": - version "5.51.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.51.0.tgz#e7c1622f46c7eea7e12bbf1edfb496d4dec37c90" - integrity sha512-SqOn0ANn/v6hFn0kjvLwiDi4AzR++CBZz0NV5AnusT2/3y32jdc0G4woXPWHCumWtUXZKPAS27/9vziSsC9jnw== +"@typescript-eslint/types@5.52.0": + version "5.52.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.52.0.tgz#19e9abc6afb5bd37a1a9bea877a1a836c0b3241b" + integrity sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ== "@typescript-eslint/typescript-estree@4.33.0", "@typescript-eslint/typescript-estree@^4.33.0": version "4.33.0" @@ -2411,29 +2411,29 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.51.0": - version "5.51.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.51.0.tgz#0ec8170d7247a892c2b21845b06c11eb0718f8de" - integrity sha512-TSkNupHvNRkoH9FMA3w7TazVFcBPveAAmb7Sz+kArY6sLT86PA5Vx80cKlYmd8m3Ha2SwofM1KwraF24lM9FvA== +"@typescript-eslint/typescript-estree@5.52.0": + version "5.52.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz#6408cb3c2ccc01c03c278cb201cf07e73347dfca" + integrity sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ== dependencies: - "@typescript-eslint/types" "5.51.0" - "@typescript-eslint/visitor-keys" "5.51.0" + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/visitor-keys" "5.52.0" 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.51.0": - version "5.51.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.51.0.tgz#074f4fabd5b12afe9c8aa6fdee881c050f8b4d47" - integrity sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw== +"@typescript-eslint/utils@5.52.0": + version "5.52.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.52.0.tgz#b260bb5a8f6b00a0ed51db66bdba4ed5e4845a72" + integrity sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA== dependencies: "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.51.0" - "@typescript-eslint/types" "5.51.0" - "@typescript-eslint/typescript-estree" "5.51.0" + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/typescript-estree" "5.52.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" semver "^7.3.7" @@ -2446,12 +2446,12 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@5.51.0": - version "5.51.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.51.0.tgz#c0147dd9a36c0de758aaebd5b48cae1ec59eba87" - integrity sha512-Oh2+eTdjHjOFjKA27sxESlA87YPSOJafGCR0md5oeMdh1ZcCfAGCIOL216uTBAkAIptvLIfKQhl7lHxMJet4GQ== +"@typescript-eslint/visitor-keys@5.52.0": + version "5.52.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz#e38c971259f44f80cfe49d97dbffa38e3e75030f" + integrity sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA== dependencies: - "@typescript-eslint/types" "5.51.0" + "@typescript-eslint/types" "5.52.0" eslint-visitor-keys "^3.3.0" "@xmldom/xmldom@^0.8.6": @@ -2874,10 +2874,10 @@ aws-sdk-mock@5.6.0: sinon "^11.1.1" traverse "^0.6.6" -aws-sdk@^2.1211.0, aws-sdk@^2.1313.0, aws-sdk@^2.596.0, aws-sdk@^2.928.0: - version "2.1313.0" - resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1313.0.tgz#e6dad914670fb3f4d5cd95c58413fca5ea5c6c86" - integrity sha512-8GMdtV2Uch3HL2c6+P3lNZFTcg/fqq9L3EWYRLb6ljCZvWKTssjdkjSJFDyTReNgeiKV224YRPYQbKpOEz4flQ== +aws-sdk@^2.1317.0, aws-sdk@^2.928.0: + version "2.1317.0" + resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1317.0.tgz#b1534696b840654a55660eed467ed7ddbbb2e1d1" + integrity sha512-9gQ3ApcG4OhM19LEcmd/1jclwHvI3jjVaFYNQkY88g2eFJDW5T8qP+u2epdv+o3bPWxzg0TcyPhOSlN4xAnIJQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -3245,9 +3245,9 @@ camelcase@^6.2.0, camelcase@^6.3.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001449: - version "1.0.30001451" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz#2e197c698fc1373d63e1406d6607ea4617c613f1" - integrity sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w== + version "1.0.30001453" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001453.tgz#6d3a1501622bf424a3cee5ad9550e640b0de3de8" + integrity sha512-R9o/uySW38VViaTrOtwfbFEiBFUh7ST3uIG4OEymIG3/uKdHDO4xk/FaqfUw0d+irSUyFPy3dZszf9VvSTPnsA== case@1.6.3, case@^1.6.3: version "1.6.3" @@ -3259,29 +3259,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.151: - version "0.1.152" - resolved "https://registry.npmjs.org/cdk-generate-synthetic-examples/-/cdk-generate-synthetic-examples-0.1.152.tgz#568313c085b37798e415a5b3d3b7ce4ce396955e" - integrity sha512-97MqlXdco79KSHb8C/UVN0MvxegPQ4OiV44EqBYyYo5mznDmOVFKkWiLK43W/zEeh5AZmc1DdKswzxKr8eMjYA== +cdk-generate-synthetic-examples@^0.1.155: + version "0.1.155" + resolved "https://registry.npmjs.org/cdk-generate-synthetic-examples/-/cdk-generate-synthetic-examples-0.1.155.tgz#a2f72783d8255eff983a2501c5249e6bf068c5e0" + integrity sha512-Ml9Pga/f8IYbRcKXeeqyMP4uc9yYcbQ/jBzpwYb4a074TXMsrjKvpqiU7r4O0x74yxAZntPpjteDFxy6GoSncg== dependencies: - "@jsii/spec" "^1.74.0" + "@jsii/spec" "^1.75.0" fs-extra "^10.1.0" - jsii "^1.74.0" - jsii-reflect "^1.74.0" - jsii-rosetta "^1.74.0" + jsii "^1.75.0" + jsii-reflect "^1.75.0" + jsii-rosetta "^1.75.0" yargs "^17.6.2" -cdk8s-plus-24@2.4.19: - version "2.4.19" - resolved "https://registry.npmjs.org/cdk8s-plus-24/-/cdk8s-plus-24-2.4.19.tgz#adedd2c04dbfe9f63c6de528077189e2acef1def" - integrity sha512-KkGEHnJWzeNhyKzcFV3J+RkrI1o1xYSokpkfCH059qaYKZbnTe5TEzkEYfO7Ls/rOM8SeZBqu0/yiLAFKhwbVw== +cdk8s-plus-24@2.4.23: + version "2.4.23" + resolved "https://registry.npmjs.org/cdk8s-plus-24/-/cdk8s-plus-24-2.4.23.tgz#dd3f49a6d4c2dac637a820b567b80e17e829799c" + integrity sha512-hPNSo6UQUa/wSo44IRqcoMVVzhEgweuRFSvE5TNMaYlDjwsXG+4u8XYV+5qIocZPli+epYqejgev2zleafTh9g== dependencies: minimatch "^3.1.2" -cdk8s@^2.6.47: - version "2.6.48" - resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-2.6.48.tgz#cee1cab7bd4b2f9b96b934b0e2e69b26d7f503a9" - integrity sha512-Oqowwdc7GJU01zFgh7Tf7H9XZX4Q2ckZXSadpHOLkNiBNbsbv/gV1tZuBndoRnBzMtUXnLhWx/JKfqoy1ub3Uw== +cdk8s@^2.7.2: + version "2.7.2" + resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-2.7.2.tgz#64ead388fcba5ff08ff920fa52d65e8dfac3ad95" + integrity sha512-ID5oKvKGSh5OjSCC6tzoZDgyepcPgzVshqdgEO+1gwaO+ep/UNBaDYmFbCTU8EPwjdEdOwq2VFTkmoJTu9/r7g== dependencies: fast-json-patch "^3.1.1" follow-redirects "^1.15.2" @@ -3513,10 +3513,10 @@ co@^4.6.0: resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== -codemaker@1.74.0, codemaker@^1.74.0: - version "1.74.0" - resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.74.0.tgz#113d679c5f2d6bc6bb04621448930e48cf8cec40" - integrity sha512-i6fAyWpXAYN/dd8hvzFPJ7+Yb/a23+BmeCu/lPn0KDpDs/KpNKoz/I3Iq9JD4AL9bMc1b7kBeBV+UF6kS6EMEg== +codemaker@1.75.0, codemaker@^1.75.0: + version "1.75.0" + resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.75.0.tgz#a54953cf590cb43629c364f62aaf53a7693fc031" + integrity sha512-HGZQMJb+IXlGD5MJj6Ae2IXzkd4aoIufj/OfM0HxpJnldWx5rlzBjzgpI+YcK1RdaLm3HWMNDtTLti0qMsHtSA== dependencies: camelcase "^6.3.0" decamelize "^5.0.1" @@ -3686,9 +3686,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.249" - resolved "https://registry.npmjs.org/constructs/-/constructs-10.1.249.tgz#2eef9dc0b22a37e88b8e939fe4da1cde7edd7324" - integrity sha512-xttf/MWHfvMyOjg88CYymlC7RZCP7kF6knA1xtJgDfhvel11uYUhomEGxuQiqy6BOvKyKxJUBaGl8jfp8s1MLA== + version "10.1.252" + resolved "https://registry.npmjs.org/constructs/-/constructs-10.1.252.tgz#a241329ffc50451b6de4fb9147ef32b0e181a515" + integrity sha512-8j3bcoSTlIjbCu1tflWHvipVDWmllUNu3dEWb5GXvsXCiYuH0NtXCCN5q6GmFInDcspZp8WOYu66uqQ8Bk7jzQ== conventional-changelog-angular@^5.0.12: version "5.0.13" @@ -4392,9 +4392,9 @@ ecc-jsbn@~0.1.1: safer-buffer "^2.1.0" electron-to-chromium@^1.4.284: - version "1.4.295" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.295.tgz#911d5df67542bf7554336142eb302c5ec90bba66" - integrity sha512-lEO94zqf1bDA3aepxwnWoHUjA8sZ+2owgcSZjYQy0+uOSEclJX0VieZC+r+wLpSxUHRd6gG32znTWmr+5iGzFw== + version "1.4.300" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.300.tgz#37097e9bcdef687fb98abb5184434bdb958dfcd9" + integrity sha512-tHLIBkKaxvG6NnDWuLgeYrz+LTwAnApHm2R3KBNcRrFn0qLmTrqQeB4X4atfN6YJbkOOOSdRBeQ89OfFUelnEQ== emittery@^0.8.1: version "0.8.1" @@ -4577,33 +4577,33 @@ es6-weak-map@^2.0.3: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -esbuild@^0.17.7: - version "0.17.7" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.17.7.tgz#a7ace55f2bf82fdb1c9013a924620ce2596984fa" - integrity sha512-+5hHlrK108fT6C6/40juy0w4DYKtyZ5NjfBlTccBdsFutR7WBxpIY633JzZJewdsCy8xWA/u2z0MSniIJwufYg== +esbuild@^0.17.8: + version "0.17.8" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.17.8.tgz#f7f799abc7cdce3f0f2e3e0c01f120d4d55193b4" + integrity sha512-g24ybC3fWhZddZK6R3uD2iF/RIPnRpwJAqLov6ouX3hMbY4+tKolP0VMF3zuIYCaXun+yHwS5IPQ91N2BT191g== optionalDependencies: - "@esbuild/android-arm" "0.17.7" - "@esbuild/android-arm64" "0.17.7" - "@esbuild/android-x64" "0.17.7" - "@esbuild/darwin-arm64" "0.17.7" - "@esbuild/darwin-x64" "0.17.7" - "@esbuild/freebsd-arm64" "0.17.7" - "@esbuild/freebsd-x64" "0.17.7" - "@esbuild/linux-arm" "0.17.7" - "@esbuild/linux-arm64" "0.17.7" - "@esbuild/linux-ia32" "0.17.7" - "@esbuild/linux-loong64" "0.17.7" - "@esbuild/linux-mips64el" "0.17.7" - "@esbuild/linux-ppc64" "0.17.7" - "@esbuild/linux-riscv64" "0.17.7" - "@esbuild/linux-s390x" "0.17.7" - "@esbuild/linux-x64" "0.17.7" - "@esbuild/netbsd-x64" "0.17.7" - "@esbuild/openbsd-x64" "0.17.7" - "@esbuild/sunos-x64" "0.17.7" - "@esbuild/win32-arm64" "0.17.7" - "@esbuild/win32-ia32" "0.17.7" - "@esbuild/win32-x64" "0.17.7" + "@esbuild/android-arm" "0.17.8" + "@esbuild/android-arm64" "0.17.8" + "@esbuild/android-x64" "0.17.8" + "@esbuild/darwin-arm64" "0.17.8" + "@esbuild/darwin-x64" "0.17.8" + "@esbuild/freebsd-arm64" "0.17.8" + "@esbuild/freebsd-x64" "0.17.8" + "@esbuild/linux-arm" "0.17.8" + "@esbuild/linux-arm64" "0.17.8" + "@esbuild/linux-ia32" "0.17.8" + "@esbuild/linux-loong64" "0.17.8" + "@esbuild/linux-mips64el" "0.17.8" + "@esbuild/linux-ppc64" "0.17.8" + "@esbuild/linux-riscv64" "0.17.8" + "@esbuild/linux-s390x" "0.17.8" + "@esbuild/linux-x64" "0.17.8" + "@esbuild/netbsd-x64" "0.17.8" + "@esbuild/openbsd-x64" "0.17.8" + "@esbuild/sunos-x64" "0.17.8" + "@esbuild/win32-arm64" "0.17.8" + "@esbuild/win32-ia32" "0.17.8" + "@esbuild/win32-x64" "0.17.8" escalade@^3.1.1: version "3.1.1" @@ -4904,9 +4904,9 @@ esprima@^4.0.0, esprima@^4.0.1: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + version "1.4.2" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz#c6d3fee05dd665808e2ad870631f221f5617b1d1" + integrity sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng== dependencies: estraverse "^5.1.0" @@ -6993,73 +6993,73 @@ jsesc@^2.5.1: resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -jsii-diff@1.74.0: - version "1.74.0" - resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.74.0.tgz#d7e6f94d4c34a74604a74ba204bc6effba7a13a0" - integrity sha512-lMKRnfaJLQywsudp4PIgBDLFsBFSWVxTrvVa2xlNuIOsU2CP87ljX7SonzPNvnwJccBN4nJ1cpJCGTtGNo6xKQ== +jsii-diff@1.75.0: + version "1.75.0" + resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.75.0.tgz#d4b02e8ed16aa07e0ac618fa90792ff99d5e73f0" + integrity sha512-4MRc2ikiTHs3kKMFjcvwSeLjDMTRVQ5+ImgU8+NvfdmMANkP7DG6tbKotZy6Jz2/Afnu2PtSKXlnLBKHNMFmfg== dependencies: - "@jsii/check-node" "1.74.0" - "@jsii/spec" "^1.74.0" + "@jsii/check-node" "1.75.0" + "@jsii/spec" "^1.75.0" fs-extra "^10.1.0" - jsii-reflect "^1.74.0" + jsii-reflect "^1.75.0" log4js "^6.7.1" yargs "^16.2.0" -jsii-pacmak@1.74.0: - version "1.74.0" - resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.74.0.tgz#78301ea406ea3c74b6a867ead897f1519a2ccced" - integrity sha512-se/HUWjCsaXFGI1K/EGDOHtWbETn4iwm14SuK6LFj5CQu7ZX/aHTBCGFWA3qUwttXaDaBNatmuNQUYSydvKeaA== +jsii-pacmak@1.75.0: + version "1.75.0" + resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.75.0.tgz#2ecba3c95d587003c763ee8fc7516d30997cbabf" + integrity sha512-ENH5nNwMjN4CIK9D5mJ8OHDjiwInzQItQQmGwCdPJFLlUN9+9EkhYy2gEPVYPwh7e294c2nJ55DmiOj2CWR17g== dependencies: - "@jsii/check-node" "1.74.0" - "@jsii/spec" "^1.74.0" + "@jsii/check-node" "1.75.0" + "@jsii/spec" "^1.75.0" clone "^2.1.2" - codemaker "^1.74.0" + codemaker "^1.75.0" commonmark "^0.30.0" escape-string-regexp "^4.0.0" fs-extra "^10.1.0" - jsii-reflect "^1.74.0" - jsii-rosetta "^1.74.0" + jsii-reflect "^1.75.0" + jsii-rosetta "^1.75.0" semver "^7.3.8" spdx-license-list "^6.6.0" xmlbuilder "^15.1.1" yargs "^16.2.0" -jsii-reflect@1.74.0, jsii-reflect@^1.74.0: - version "1.74.0" - resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.74.0.tgz#ddc1e9780dd120337d901a4a4b72ca5a1492a2c3" - integrity sha512-/yt04q5pfnwZZtiHkXxg3svJYI3U77uhbCE/sdcVDoCsRLJhpsI2k+7Py0wls+YXhs6V50jIesw8/YAatfGveg== +jsii-reflect@1.75.0, jsii-reflect@^1.75.0: + version "1.75.0" + resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.75.0.tgz#136564eb8ec9a94a9fe218e3d275e80196cd6285" + integrity sha512-oB8X2MpLZbpl8T7XfD+jSADLjzhEMnCZH8BSY3hxSH8TGdhMUZriFHFgmz1NshkZXDh0zRz+xF2a8+uqEIKRYw== dependencies: - "@jsii/check-node" "1.74.0" - "@jsii/spec" "^1.74.0" + "@jsii/check-node" "1.75.0" + "@jsii/spec" "^1.75.0" chalk "^4" fs-extra "^10.1.0" - oo-ascii-tree "^1.74.0" + oo-ascii-tree "^1.75.0" yargs "^16.2.0" -jsii-rosetta@1.74.0, jsii-rosetta@^1.74.0: - version "1.74.0" - resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.74.0.tgz#700c025c798bb668a88911630a2df87a1169cd32" - integrity sha512-dP3c0oJ8XYNKq/OC1v7algTPLXcd9VmhiGQOwVs4R6U9xfo82A3JQ675u3vXXFqBt3OwRXCDL4L9Kk5IwrteyQ== +jsii-rosetta@1.75.0, jsii-rosetta@^1.75.0: + version "1.75.0" + resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.75.0.tgz#85a96669fc60f69d29409608a694ed063abcadd9" + integrity sha512-zsV8F0BoXTvS46N1/QCwapMXamQhJKFaAIapFBWk0a4l84v+FSYOWnKbgZz+FVZEuu3VBJpxg6uKE9R9A8Hvag== dependencies: - "@jsii/check-node" "1.74.0" - "@jsii/spec" "1.74.0" + "@jsii/check-node" "1.75.0" + "@jsii/spec" "1.75.0" "@xmldom/xmldom" "^0.8.6" commonmark "^0.30.0" fast-glob "^3.2.12" - jsii "1.74.0" + jsii "1.75.0" semver "^7.3.8" semver-intersect "^1.4.0" typescript "~3.9.10" workerpool "^6.3.1" yargs "^16.2.0" -jsii@1.74.0, jsii@^1.74.0: - version "1.74.0" - resolved "https://registry.npmjs.org/jsii/-/jsii-1.74.0.tgz#681c289ae95a91633b61527bdf1bcda29b79e3bd" - integrity sha512-Y2Y3U2kYOn7yRYD4UrMyq3pJNGIKebEWsjbFjsYiCm+LNqdq9beAh+Ayv7NA4mACSJbWNqTcT/VH7qZMIVBsww== +jsii@1.75.0, jsii@^1.75.0: + version "1.75.0" + resolved "https://registry.npmjs.org/jsii/-/jsii-1.75.0.tgz#e18fc8cb3ad985da93fb1513fc1e4d8ca191ff98" + integrity sha512-9CWt2IQcM6v5k4XZnaSnsK9epfIJfHWMyB69uOjITZpwYjF0CDzLrh/a8l1RyC3COSpp1K1yTjaebHEivyVr4Q== dependencies: - "@jsii/check-node" "1.74.0" - "@jsii/spec" "^1.74.0" + "@jsii/check-node" "1.75.0" + "@jsii/spec" "^1.75.0" case "^1.6.3" chalk "^4" fast-deep-equal "^3.1.3" @@ -7674,9 +7674,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.14.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz#8da8d2f5f59827edb388e63e459ac23d6d408fea" - integrity sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA== + version "7.15.0" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.15.0.tgz#4437550407da5ec8c4fe0946a137fe2f7f07a171" + integrity sha512-LKpNuyKR1lRsqN5DatvMOkW2nmUAwI22HoQK604nhs+WiRWSIC0MFUKq2XYUKv1fCVPK9Cro4d4Il3DxM80/fQ== lru-queue@^0.1.0: version "0.1.0" @@ -7957,9 +7957,9 @@ min-indent@^1.0.0: integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== minimatch@>=3.1: - version "6.1.8" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-6.1.8.tgz#5a0ea694ca41342e14561bbec62802b59509f7e4" - integrity sha512-sTvS8Q4mIZiSnMo9192lZMxfeaGCslH5CC7B62hd9DlbifUVrc02ABTeRJINPosxKnvZlrmAaNSo8f4PZqDDdw== + version "6.2.0" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-6.2.0.tgz#2b70fd13294178c69c04dfc05aebdb97a4e79e42" + integrity sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg== dependencies: brace-expansion "^2.0.1" @@ -8601,10 +8601,10 @@ npm-user-validate@^1.0.1: resolved "https://registry.npmjs.org/npm-user-validate/-/npm-user-validate-1.0.1.tgz#31428fc5475fe8416023f178c0ab47935ad8c561" integrity sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw== -npm@^8.19.3: - version "8.19.3" - resolved "https://registry.npmjs.org/npm/-/npm-8.19.3.tgz#adb51bf8886d519dd4df162726d0ad157ecfa272" - integrity sha512-0QjmyPtDxSyMWWD8I91QGbrgx9KzbV6C9FK1liEb/K0zppiZkr5KxXc990G+LzPwBHDfRjUBlO9T1qZ08vl9mA== +npm@^8.19.4: + version "8.19.4" + resolved "https://registry.npmjs.org/npm/-/npm-8.19.4.tgz#65ad6a2dfdd157a4ef4467fb86e8dcd35a43493f" + integrity sha512-3HANl8i9DKnUA89P4KEgVNN28EjSeDCmvEqbzOAuxCFDzdBZzjUl99zgnGpOUumvW5lvJo2HKcjrsc+tfyv1Hw== dependencies: "@isaacs/string-locale-compare" "^1.1.0" "@npmcli/arborist" "^5.6.3" @@ -8801,10 +8801,10 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -oo-ascii-tree@^1.74.0: - version "1.74.0" - resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.74.0.tgz#3581e4f95ff9de13660943e504eaddaa58bf08c0" - integrity sha512-tV5BBZhFvALFKY/DMVILN5jDznPRZte0Yoj1hPmbAVGL4VSpsEXx0ZrP8fnFZKbAOyCwWq+PV26n7S5+cP86Xw== +oo-ascii-tree@^1.75.0: + version "1.75.0" + resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.75.0.tgz#966b2b373b6583fb5246e19b9ead534ca9afc72f" + integrity sha512-rM9YrFT0Zzes3nLF37sGJIlHIjLQpnEI17LcbioXw83oMHqdc8QW5pE9/IHkYlYRbN2Z+sRouSCkrXFZRai2Mg== open@^7.4.2: version "7.4.2" @@ -9399,10 +9399,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.50: - version "0.67.50" - resolved "https://registry.npmjs.org/projen/-/projen-0.67.50.tgz#6516d18e1ead4d05bbe59327868bef121e346a42" - integrity sha512-Ok791Wg5rxqkq2UMEx4jNKu1ic6H51MvfHuF5cZxlT4HyCsz38tTCTBx6kclmSWjibFMI/ttboSe1eHsS0PJIw== +projen@^0.67.57: + version "0.67.57" + resolved "https://registry.npmjs.org/projen/-/projen-0.67.57.tgz#9c5c546d18c961339fb00a49a556b22822686e39" + integrity sha512-0FGTllWD6tf9ZDgcjBnnbBJmUjtwMOOiZAu6oI4GwIqoySt7uyCTv6uG71OjyQPhsM6iXiLeBJVz57PSJu4g/g== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3" @@ -10520,9 +10520,9 @@ statuses@2.0.1: integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== streamroller@^3.1.3: - version "3.1.4" - resolved "https://registry.npmjs.org/streamroller/-/streamroller-3.1.4.tgz#844a18e795d39c1089a8216e66a1cf1151271df0" - integrity sha512-Ha1Ccw2/N5C/IF8Do6zgNe8F3jQo8MPBnMBGvX0QjNv/I97BcNRzK6/mzOpZHHK7DjMLTI3c7Xw7Y1KvdChkvw== + version "3.1.5" + resolved "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" + integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== dependencies: date-format "^4.0.14" debug "^4.3.4" @@ -11815,10 +11815,10 @@ yargs@^16.0.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.1.1, yargs@^17.6.2: - version "17.6.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541" - integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== +yargs@^17.1.1, yargs@^17.6.2, yargs@^17.7.0: + version "17.7.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.0.tgz#b21e9af1e0a619a2a9c67b1133219b2975a07985" + integrity sha512-dwqOPg5trmrre9+v8SUo2q/hAwyKoVfu8OC1xPHKJGNdxAvPl4sKxL4vBnh3bQz/ZvvGAFeA5H3ou2kcOY8sQQ== dependencies: cliui "^8.0.1" escalade "^3.1.1"