diff --git a/.github/workflows/github-merit-badger.yml b/.github/workflows/github-merit-badger.yml index 3e8e0bc33dbb5..55bf1061c8091 100644 --- a/.github/workflows/github-merit-badger.yml +++ b/.github/workflows/github-merit-badger.yml @@ -17,4 +17,4 @@ jobs: badges: '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]' thresholds: '[0,3,6,13,25,50]' badge-type: 'achievement' - ignore-usernames: '[RomainMuller,rix0rrr,Jerry-AWS,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,corymhall,peterwoodworth,ryparker,TheRealAmazonKendra,vinayak-kukreja,Naumel,mrgrain,pahud,cgarvis,kellertk,HBobertz,aws-cdk-automation,dependabot[bot],mergify[bot]]' + ignore-usernames: '[RomainMuller,rix0rrr,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,corymhall,peterwoodworth,ryparker,TheRealAmazonKendra,vinayak-kukreja,Naumel,mrgrain,pahud,cgarvis,kellertk,HBobertz,sumupitchayan,pattasai,SankyRed,udaypant,aws-cdk-automation,dependabot[bot],mergify[bot]]' diff --git a/.mergify.yml b/.mergify.yml index 507e533327f6b..ffd1505e05fcf 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -10,7 +10,7 @@ pull_request_rules: label: add: [ contribution/core ] conditions: - - author~=^(RomainMuller|rix0rrr|Jerry-AWS|MrArnoldPalmer|iliapolo|uttarasridhar|otaviomacedo|madeline-k|kaizencc|comcalvi|corymhall|peterwoodworth|ryparker|TheRealAmazonKendra|yuth|vinayak-kukreja|Naumel|mrgrain|pahud|cgarvis|kellertk|HBobertz)$ + - author~=^(RomainMuller|rix0rrr|MrArnoldPalmer|iliapolo|uttarasridhar|otaviomacedo|madeline-k|kaizencc|comcalvi|corymhall|peterwoodworth|ryparker|TheRealAmazonKendra|vinayak-kukreja|Naumel|mrgrain|pahud|cgarvis|kellertk|HBobertz|sumupitchayan|pattasai|SankyRed|udaypant)$ - -label~="contribution/core" - name: automatic merge actions: diff --git a/CHANGELOG.v2.alpha.md b/CHANGELOG.v2.alpha.md index 4533d669c0a11..8039b3ddda803 100644 --- a/CHANGELOG.v2.alpha.md +++ b/CHANGELOG.v2.alpha.md @@ -2,6 +2,19 @@ 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.61.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.60.0-alpha.0...v2.61.0-alpha.0) (2023-01-18) + + +### Features + +* **cli-lib:** [JS/TS only] experimental support for programmatic CLI api ([#22836](https://github.com/aws/aws-cdk/issues/22836)) ([0b6b716](https://github.com/aws/aws-cdk/commit/0b6b7166c3f0348cc33fd3a0d19637351ea3b05b)) + + +### Bug Fixes + +* **glue:** --conf parameter is no longer a reserved keyword for glue jobs ([#23673](https://github.com/aws/aws-cdk/issues/23673)) ([3d0f4ba](https://github.com/aws/aws-cdk/commit/3d0f4ba6dd92ad7b91b00fad6cbab873964683fc)) +* **servicecatalogappregistry:** outputs are not deployable ([#23652](https://github.com/aws/aws-cdk/issues/23652)) ([fa9eef0](https://github.com/aws/aws-cdk/commit/fa9eef081ead451a4d38bf083eda02af09fff482)), closes [#23641](https://github.com/aws/aws-cdk/issues/23641) + ## [2.60.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.59.0-alpha.0...v2.60.0-alpha.0) (2023-01-11) diff --git a/CHANGELOG.v2.md b/CHANGELOG.v2.md index 512c95816dc45..a6a4cd8db6042 100644 --- a/CHANGELOG.v2.md +++ b/CHANGELOG.v2.md @@ -2,6 +2,30 @@ 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.61.0](https://github.com/aws/aws-cdk/compare/v2.60.0...v2.61.0) (2023-01-18) + + +### Features + +* **cfnspec:** cloudformation spec v107.0.0 ([#23698](https://github.com/aws/aws-cdk/issues/23698)) ([aca8a25](https://github.com/aws/aws-cdk/commit/aca8a256dcaf89b53f7af4f308b2f23e2e766902)) +* **core:** stack synthesizers can be shared between stacks ([#23571](https://github.com/aws/aws-cdk/issues/23571)) ([0ce19f0](https://github.com/aws/aws-cdk/commit/0ce19f0e1217a4a41a3a9c27049ab73c7fbc320d)) +* **logs:** add unit to metric filter ([#23608](https://github.com/aws/aws-cdk/issues/23608)) ([7cbe8ac](https://github.com/aws/aws-cdk/commit/7cbe8ac9286e5f7c3efb7f75aa859bf6b3bffecf)) +* **opensearch:** add support for latest amazon opensearch service 2.3 ([#22943](https://github.com/aws/aws-cdk/issues/22943)) ([0303d6f](https://github.com/aws/aws-cdk/commit/0303d6f7a71d2c70443df4433f0ff7554bcc4e56)) +* **pipeline:** enable key rotation ([#23620](https://github.com/aws/aws-cdk/issues/23620)) ([29d7336](https://github.com/aws/aws-cdk/commit/29d733677c4962199a848933a7415b47abb23a2f)) +* **route53-patterns:** use `Certificate` as the default certificate (under feature flag) ([#23575](https://github.com/aws/aws-cdk/issues/23575)) ([77709c8](https://github.com/aws/aws-cdk/commit/77709c8328fe664c1fca50223c8e64325cb70461)) + + +### Bug Fixes + +* **aws-s3:** log delivery may be incorrectly configured when target bucket is imported ([#23552](https://github.com/aws/aws-cdk/issues/23552)) ([41327d8](https://github.com/aws/aws-cdk/commit/41327d8e815b80c9148bd33751fdf1b70c3bc9cd)), closes [#23547](https://github.com/aws/aws-cdk/issues/23547) [#23588](https://github.com/aws/aws-cdk/issues/23588) +* **cdk-assets:** concurrent asset builds can leave a corrupted archive ([#23677](https://github.com/aws/aws-cdk/issues/23677)) ([18e0481](https://github.com/aws/aws-cdk/commit/18e0481a3bbcb92bd22ce4e83d4f02e03e484307)), closes [#23290](https://github.com/aws/aws-cdk/issues/23290) +* **cli:** can not assume role from 2-level SSO ([#23702](https://github.com/aws/aws-cdk/issues/23702)) ([c3a345b](https://github.com/aws/aws-cdk/commit/c3a345be0eeb26e1b410d68643740f0aea8af4d7)), closes [#23520](https://github.com/aws/aws-cdk/issues/23520) +* **cloudtrail:** Trail fails during resource creation due to invalid template properties when management events are 'None' ([#23569](https://github.com/aws/aws-cdk/issues/23569)) ([15ced88](https://github.com/aws/aws-cdk/commit/15ced888718531ddc59402f0c886c9b4f1fea67b)), closes [#16387](https://github.com/aws/aws-cdk/issues/16387) [#15488](https://github.com/aws/aws-cdk/issues/15488) +* **lambda:** ever-changing Version hash with LayerVersion from tokens ([#23629](https://github.com/aws/aws-cdk/issues/23629)) ([88fc62d](https://github.com/aws/aws-cdk/commit/88fc62d215d8c4aa3a4c423a06571ec45b51cec6)) +* **pipelines:** cross-stack step dependencies have wrong name ([#23594](https://github.com/aws/aws-cdk/issues/23594)) ([0d8142b](https://github.com/aws/aws-cdk/commit/0d8142bf6860cbebab9c1704f6ebf59b17a5704f)), closes [#21843](https://github.com/aws/aws-cdk/issues/21843) +* **servicecatalog:** incorrect objectkey produced from asset relative… ([#23580](https://github.com/aws/aws-cdk/issues/23580)) ([b4a6120](https://github.com/aws/aws-cdk/commit/b4a6120af01b46bc688eebb8f8bb6fbde7f481fe)), closes [#23560](https://github.com/aws/aws-cdk/issues/23560) +* **stepfunctions-tasks:** fix IAM policy statements for step functions API calls ([#22959](https://github.com/aws/aws-cdk/issues/22959)) ([dce662c](https://github.com/aws/aws-cdk/commit/dce662cae6eb493770d3c6f700c92a0b6c235195)) + ## [2.60.0](https://github.com/aws/aws-cdk/compare/v2.59.0...v2.60.0) (2023-01-11) diff --git a/lerna.json b/lerna.json index 0867af78081e7..fca71760dbe9a 100644 --- a/lerna.json +++ b/lerna.json @@ -6,6 +6,7 @@ "packages/*", "packages/@aws-cdk/*", "packages/@aws-cdk-containers/*", + "packages/@aws-cdk-testing/*", "packages/@aws-cdk/*/lambda-packages/*", "tools/*", "tools/@aws-cdk/*", diff --git a/package.json b/package.json index 7e4c19662c7b4..712c4819e653c 100644 --- a/package.json +++ b/package.json @@ -18,15 +18,15 @@ "devDependencies": { "@types/prettier": "2.6.0", "@yarnpkg/lockfile": "^1.1.0", - "cdk-generate-synthetic-examples": "^0.1.112", + "cdk-generate-synthetic-examples": "^0.1.119", "conventional-changelog-cli": "^2.2.2", "fs-extra": "^9.1.0", "graceful-fs": "^4.2.10", "jest-junit": "^13.2.0", - "jsii-diff": "1.72.0", - "jsii-pacmak": "1.72.0", - "jsii-reflect": "1.72.0", - "jsii-rosetta": "1.72.0", + "jsii-diff": "1.73.0", + "jsii-pacmak": "1.73.0", + "jsii-reflect": "1.73.0", + "jsii-rosetta": "1.73.0", "lerna": "^4.0.0", "patch-package": "^6.5.1", "semver": "^6.3.0", @@ -68,6 +68,7 @@ "packages/*", "packages/@aws-cdk/*", "packages/@aws-cdk-containers/*", + "packages/@aws-cdk-testing/*", "packages/@aws-cdk/*/lambda-packages/*", "tools/*", "tools/@aws-cdk/*", diff --git a/packages/@aws-cdk-testing/cli-integ/.eslintrc.js b/packages/@aws-cdk-testing/cli-integ/.eslintrc.js new file mode 100644 index 0000000000000..77f8007f9fc90 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/.eslintrc.js @@ -0,0 +1,4 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.ignorePatterns.push('resources/**/*'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk-testing/cli-integ/.gitignore b/packages/@aws-cdk-testing/cli-integ/.gitignore new file mode 100644 index 0000000000000..eb8b474f4ca2a --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/.gitignore @@ -0,0 +1,20 @@ +*.js +*.js.map +*.d.ts +!resources/**/* +node_modules +dist + +.LAST_BUILD +.nyc_output +coverage +nyc.config.js +.LAST_PACKAGE +*.snk + +!.eslintrc.js +!jest.config.js + +.DS_Store + +junit.xml diff --git a/packages/@aws-cdk-testing/cli-integ/.npmignore b/packages/@aws-cdk-testing/cli-integ/.npmignore new file mode 100644 index 0000000000000..b2a3ba40d9011 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/.npmignore @@ -0,0 +1,32 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +*.snk + +!test/integ/run-wrappers/dist + +*.tsbuildinfo + +jest.config.js +tsconfig.json +.eslintrc.js + +!test/integ/cli/jest.config.js +!test/integ/uberpackage/jest.config.js +!resources/ +!resources/**/* + +.DS_Store + +junit.xml + +# exclude cdk artifacts +**/cdk.out +test/ diff --git a/packages/@aws-cdk-testing/cli-integ/LICENSE b/packages/@aws-cdk-testing/cli-integ/LICENSE new file mode 100644 index 0000000000000..9b722c65c5481 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk-testing/cli-integ/NOTICE b/packages/@aws-cdk-testing/cli-integ/NOTICE new file mode 100644 index 0000000000000..0dd703eaedb4a --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/NOTICE @@ -0,0 +1,16 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Third party attributions of this package can be found in the THIRD_PARTY_LICENSES file diff --git a/packages/@aws-cdk-testing/cli-integ/README.md b/packages/@aws-cdk-testing/cli-integ/README.md new file mode 100644 index 0000000000000..deafd6a5a8841 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/README.md @@ -0,0 +1,151 @@ +# CDK CLI integration test + + +--- + +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. + +--- + + + +This package contains CDK CLI integration test suites, as well as helper tools necessary to run those suites against various different distributions of the CDK (in the source repository, against a build directory, or against published releases). + +> The tools and tests themselves should arguably be in different packages, but I want to prevent package proliferation. For now we'll keep them together. + +## Tests + +The tests themselves are in the `tests/` directory: + +```text +tests/ +├── cli-integ-tests +├── init-csharp +├── init-fsharp +├── init-java +├── init-javascript +├── init-python +├── init-typescript-app +├── init-typescript-lib +└── uberpackage +``` + +Each subdirectory contains one test **suite**, and in the development pipeline each suite is run individually in a CodeBuild job, all in parallel. This requires manual configuration in the pipeline: to add a new suite, first add a suite here, then add the suite to the pipeline as well. The safest strategy is to add a trivially succeeding suite first (for example, a single test with `expect(true).toBeTruthy()`), add it to the pipeline, and then write the actual tests. + +Test suites are written as a collection of Jest tests, and they are run using Jest, using the code in the `lib/` directory as helpers. + +### Running a test suite + +You run a suite using the `bin/run-suite` tool. You must select either a version of the CLI and framework which can be `npm install`ed, or point to the root of the source tree: + +```shell +# Use the given source tree +$ bin/run-suite --use-source=/path/to/repo-root + +# Automatically determine the source tree root +$ bin/run-suite -a + +# Run against a released version +$ bin/run-suite --use-cli-release=2.34.5 +``` + +To run a specific test, add `-t` and a substring of the test name. For example: + +```shell +bin/run-suite -a cli-integ-tests -t 'load old assemblies' +``` + +## Tools + +There are a number of tools in the `bin/` directory. They are: + +```text +bin/ +├── apply-patches +├── query-github +├── run-suite +├── stage-distribution +└── test-root +``` + +* `apply-patches`: used for regression testing. Applies patches to historical versions of the tests to fix false positive test failures. +* `query-github`: used for regression testing. Queries GitHub for previously released versions. +* `run-suite`: run one of the test suites in the `tests/` directory. +* `stage-distribution`: used for testing in the pipeline. Uploads candidate release binaries to CodeArtifact so that they can be installed using `npm install`, `pip install`, etc. +* `test-root`: return the directory containing all tests (used for applying patches). + +## Regression testing + +The regression testing mechanism is somewhat involved and therefore deserves its own section. The principle is not too hard to explain though: + +*We run the previous version of the CLI integ tests against the new candidate release of the CLI, to make sure we didn't accidentally introduce any breaking behavior*. + +This is slightly complicated by two facts: + +* (1) Both the CLI and the framework may have changed, and an incompatibility may have arisen between the framework and CLI. Newer CLIs must always support older framework versions. We therefore run two flavors of the integration tests: + * Old tests, new CLI, new framework + * Old tests, new CLI, old framework + +The testing matrix looks like this: + +```text + OLD TESTS NEW TESTS + + CLI CLI + Old New Old New + ┌────────┬────────┐ ┌────────┬────────┐ + F'WORK │ prev │ │ F'WORK │ │ │ + Old │ rls │ regr │ Old │ (N/A) │ ? │ + │ integ │ │ │ │ │ + ├────────┼────────┤ ├────────┼────────┤ + │ │ │ │ │ cur │ + New │ (N/A) │ regr │ New │ (N/A) │ rls │ + │ │ │ │ │ integ │ + └────────┴────────┘ └────────┴────────┘ +``` + +We are covering everything except "new tests, new CLI, old framework", which is not clear that it even makes sense to test because some new features may rely on framework support which will not be in the old version yet. + +* (2) Sometimes, old tests will fail on newer releases when we introduce breaking changes to the framework or CLI for something serious (such as security reasons), or maybe because we had a bug in an old version that happened to pass, but now the test needs to be updated in order to pass a bugfix. + +For this case we have a patching mechanism, so that in a NEW release of the tools, we include files that are copied over an OLD release of the test, that allows them to pass. For the simplest case there is a mechanism to suppress the run of a single test, so that we can skip the running of one test for one release. For more complicated cases we copy in patched `.js` source files which will replace old source files. (Patches are considered part of the *tools*, not part of the *tests*). + +### Mechanism + +To run the tests in a regressory fashion, do the following: + +* Download the current `@aws-cdk-testing/cli-integ` artifact at `V1`. +* Determine the previous version `V0` (use `query-github` for this). +* Download the previous `@aws-cdk-testing/cli-integ` artifact at `V0`. +* From the `V1` artifact, apply the `V0` patch set. +* Run the `V0` tests with the `--framework-version` option: + +```shell +# Old tests, new CLI, new framework +V0/bin/run-suite --use-cli-release=V1 --framework-version=V1 [...] + +# Old tests, new CLI, old framework +V0/bin/run-suite --use-cli-release=V1 --framework-version=V0 [...] +``` + +### Patching + +To patch a previous set of tests to make them pass with a new release, add a directory to `resources/cli-regression-patches`. The simplest method is to add a `skip-tests.txt` file: + +```shell +# The version of the tests that are currently failing (V0 in the paragraph above) +export VERSION=X.Y.Z + +mkdir -p resources/cli-regression-patches/v${VERSION} +cp skip-tests.txt resources/cli-regression-patches/v${VERSION}/ +``` + +Now edit `resources/cli-regression-patches/vX.Y.Z/skip-tests.txt` and put the name of the test you want to skip on a line by itself. + +If you need to replace source files, it's probably best to stick compiled `.js` files in here. `.ts` source files wouldn't compile because they'd be missing `imports`. diff --git a/packages/@aws-cdk-testing/cli-integ/bin/apply-patches b/packages/@aws-cdk-testing/cli-integ/bin/apply-patches new file mode 100755 index 0000000000000..b27d0c93dc9e7 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/apply-patches @@ -0,0 +1,19 @@ +#!/bin/bash +# Written in bash just because that's easier with all the file manipulation +set -eu +scriptdir=$(cd $(dirname $0) && pwd) +version="$1" +target_dir="$2" + + +if [[ ! -f "$2/skip-tests.txt" ]]; then + echo "$2: does not look like a test root directory." >&2 + exit 1 +fi + + +candidate_dir="${scriptdir}/../resources/cli-regression-patches/v${version}" + +if [[ -f "$candidate_dir" ]]; then + cp -R "${candidate_dir}/"* "$2" +fi \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/bin/download-and-run-old-tests b/packages/@aws-cdk-testing/cli-integ/bin/download-and-run-old-tests new file mode 100755 index 0000000000000..ad72ce50c0991 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/download-and-run-old-tests @@ -0,0 +1,52 @@ +#!/bin/bash +set -eu +# Download old tests and run them. Written in bash, just because. Needs to do contortions, see below. +# +# Usage: +# +# download-and-run-old-tests [...args to run-suite...] +set -x + +scriptdir=$(cd $(dirname $0) && pwd) + +version="$1" +target_directory="old_tests" +shift + +rm -rf $target_directory && mkdir $target_directory + +# The old tests package MUST be 'npm install 'ed as a dependency, but MUST NOT +# end up in a `node_modules` directory. +# +# - MUST be 'npm install'ed: we need transitive dependencies as well. +# - as a dependency: if we check out the source and do an `npm install --production` in the +# package.json directory, NPM will still try to resolve devDependencies (even though it doesn't +# need to install them), and the devDeps do not exist on npmjs. +# - MUST NOT end up in `node_modules`: Jest 27 will ignore all tests that have `node_modules` in +# the path, and this behavior is not configurable before Jest 28. Unfortunately, because of TypeScript +# typing issues, we cannot move past Jest 27. +# +# To achieve this, do an `npm install ` then follow up with an `mv` to move the files out. +if ! npm install --prefix $target_directory --no-save @aws-cdk-testing/cli-integ@$version > npm.log 2>&1; then + cat npm.log >&2 + # Catch a "package does not exist" error, have to do it this way because for some reason, + # 'npm view ' doesn't exit with an error... :s + if grep -q 'code ETARGET' npm.log; then + echo "During migration, @aws-cdk-testing/cli-integ@$version does not exist yet." >&2 + + + # Do create an empty junit.xml file -- if we don't, then the "upload report" phase will fail + # if there are 0 files to upload. + echo '' > junit.xml + exit 0 + fi + exit 1 +fi + +mv $($target_directory/node_modules/.bin/test-root)/* $target_directory + +# Apply new patches to old tests +${scriptdir}/apply-patches $version $target_directory + +# Run the suite from the old tests +exec $target_directory/bin/run-suite "$@" \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/bin/query-github b/packages/@aws-cdk-testing/cli-integ/bin/query-github new file mode 100755 index 0000000000000..fbb9b1fa5f199 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/query-github @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./query-github.js'); diff --git a/packages/@aws-cdk-testing/cli-integ/bin/query-github.ts b/packages/@aws-cdk-testing/cli-integ/bin/query-github.ts new file mode 100644 index 0000000000000..33da60c57f618 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/query-github.ts @@ -0,0 +1,58 @@ +// eslint-disable-next-line jest/no-jest-import +import * as yargs from 'yargs'; +import { fetchPreviousVersion } from '../lib/github'; + +async function main() { + const args = await yargs + .option('token', { + descripton: 'GitHub token (default: from environment GITHUB_TOKEN)', + alias: 't', + type: 'string', + requiresArg: true, + }) + .command('last-release', 'Query the last release', cmd => cmd + .option('prior-to', { + description: 'Return the most recent release before the given version', + alias: 'p', + type: 'string', + requiresArg: true, + }) + .option('major', { + description: 'Return the most recent release that matches', + alias: 'm', + type: 'string', + requiresArg: true, + })) + .demandCommand() + .help() + .strictOptions() + .showHelpOnFail(false) + .argv; + + const command = args._[0]; + + const token = args.token ?? process.env.GITHUB_TOKEN; + if (!token) { + throw new Error('Either pass --token or set GITHUB_TOKEN.'); + } + + switch (command) { + case 'last-release': + if (args['prior-to'] && args.major) { + throw new Error('Cannot pass both `--prior-to and --major at the same time'); + } + + // eslint-disable-next-line no-console + console.log(await fetchPreviousVersion(token, { + priorTo: args['prior-to'], + majorVersion: args.major, + })); + break; + } +} + +main().catch(e => { + // eslint-disable-next-line no-console + console.error(e); + process.exitCode = 1; +}); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/bin/run-suite b/packages/@aws-cdk-testing/cli-integ/bin/run-suite new file mode 100755 index 0000000000000..d4a0aacaa4a54 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/run-suite @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./run-suite.js'); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/bin/run-suite.ts b/packages/@aws-cdk-testing/cli-integ/bin/run-suite.ts new file mode 100644 index 0000000000000..46a19e44bf47b --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/run-suite.ts @@ -0,0 +1,136 @@ +/* eslint-disable no-console */ +import * as path from 'path'; +// eslint-disable-next-line jest/no-jest-import +import * as jest from 'jest'; +import * as yargs from 'yargs'; +import { ReleasePackageSourceSetup } from '../lib/package-sources/release-source'; +import { RepoPackageSourceSetup, autoFindRoot } from '../lib/package-sources/repo-source'; +import { IPackageSourceSetup } from '../lib/package-sources/source'; +import { serializeForSubprocess } from '../lib/package-sources/subprocess'; + +async function main() { + const args = await yargs + .usage('$0 ') + .positional('SUITENAME', { + descripton: 'Name of the test suite to run', + type: 'string', + demandOption: true, + }) + .option('test', { + descripton: 'Test pattern to selectively run tests', + alias: 't', + type: 'string', + requiresArg: true, + }) + .option('use-source', { + descripton: 'Use TypeScript packages from the given source repository (or "auto")', + alias: 's', + type: 'string', + requiresArg: true, + }) + .option('use-cli-release', { + descripton: 'Run the current tests against the CLI at the given version', + alias: 'u', + type: 'string', + requiresArg: true, + }) + .option('auto-source', { + alias: 'a', + description: 'Automatically find the source tree from the current working directory', + type: 'boolean', + requiresArg: false, + }) + .option('runInBand', { + descripton: 'Run all tests in one Node process', + alias: 'i', + type: 'boolean', + }) + .options('framework-version', { + description: 'Framework version to use, if different than the CLI version (not all suites respect this)', + alias: 'f', + type: 'string', + }) + .options('verbose', { + alias: 'v', + description: 'Run in verbose mode', + type: 'boolean', + requiresArg: false, + }) + .options('passWithNoTests', { + description: 'Allow passing if the test suite is not found (default true when IS_CANARY mode, false otherwise)', + type: 'boolean', + requiresArg: false, + }) + .help() + .strictOptions() + .showHelpOnFail(false) + .argv; + + const suiteName = args._[0] as string; + if (!suiteName) { + throw new Error('Usage: run-suite '); + } + + let packageSource: undefined | IPackageSourceSetup; + function usePackageSource(s: IPackageSourceSetup) { + if (packageSource) { + throw new Error('Cannot specify two package sources'); + } + packageSource = s; + } + + if (args['use-source'] || args['auto-source']) { + if (args['framework-version']) { + throw new Error('Cannot use --framework-version with --use-source'); + } + + const root = args['use-source'] && args['use-source'] !== 'auto' + ? args['use-source'] + : await autoFindRoot(); + + usePackageSource(new RepoPackageSourceSetup(root)); + } else if (args['use-cli-release']) { + usePackageSource(new ReleasePackageSourceSetup(args['use-cli-release'], args['framework-version'])); + } + if (!packageSource) { + throw new Error('Specify either --use-source or --use-cli-release'); + } + + console.log(`Package source: ${packageSource.description}`); + console.log(`Test suite: ${suiteName}`); + + await packageSource.prepare(); + serializeForSubprocess(packageSource); + + if (args.verbose) { + process.env.VERBOSE = '1'; + } + + // Motivation behind this behavior: when adding a new test suite to the pipeline, because of the way our + // Pipeline package works, the suite would be added to the pipeline AND as a canary immediately. The canary + // would fail until the package was actually released, so for canaries we make an exception so that the initial + // canary would succeed even if the suite wasn't yet available. The fact that the suite is not optional in + // the pipeline protects us from typos. + const passWithNoTests = args.passWithNoTests ?? !!process.env.IS_CANARY; + + // Communicate with the config file (integ.jest.config.js) + process.env.TEST_SUITE_NAME = suiteName; + + try { + await jest.run([ + ...args.runInBand ? ['-i'] : [], + ...args.test ? ['-t', args.test] : [], + ...args.verbose ? ['--verbose'] : [], + ...passWithNoTests ? ['--passWithNoTests'] : [], + ], path.resolve(__dirname, '..', 'resources', 'integ.jest.config.js')); + + } finally { + await packageSource.cleanup(); + } +} + +main().catch(e => { + // eslint-disable-next-line no-console + console.error(e); + process.exitCode = 1; +}); diff --git a/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution b/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution new file mode 100755 index 0000000000000..99b7ad3606f7b --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./stage-distribution.js'); diff --git a/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts b/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts new file mode 100644 index 0000000000000..5bc53c28caead --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts @@ -0,0 +1,259 @@ +/* eslint-disable no-console */ +import * as path from 'path'; +import * as fs from 'fs-extra'; +import * as glob from 'glob'; +import * as yargs from 'yargs'; +import { shell } from '../lib'; +import { TestRepository } from '../lib/staging/codeartifact'; +import { uploadJavaPackages, mavenLogin } from '../lib/staging/maven'; +import { uploadNpmPackages, npmLogin } from '../lib/staging/npm'; +import { uploadDotnetPackages, nugetLogin } from '../lib/staging/nuget'; +import { uploadPythonPackages, pypiLogin } from '../lib/staging/pypi'; +import { UsageDir } from '../lib/staging/usage-dir'; + +async function main() { + await yargs + .usage('$0 ') + .option('npm', { + description: 'Upload NPM packages only', + type: 'boolean', + requiresArg: false, + }) + .option('python', { + description: 'Upload Python packages only', + type: 'boolean', + requiresArg: false, + }) + .option('java', { + description: 'Upload Java packages only', + type: 'boolean', + requiresArg: false, + }) + .option('dotnet', { + description: 'Upload Dotnet packages only', + type: 'boolean', + requiresArg: false, + }) + .command('publish ', 'Publish a given directory', cmd => cmd + .positional('DIRECTORY', { + descripton: 'Directory distribution', + type: 'string', + demandOption: true, + }) + .option('name', { + alias: 'n', + description: 'Name of the repository to create (default: generate unique name)', + type: 'string', + requiresArg: true, + }), async (args) => { + + await validateDirectory(args); + const repo = await (args.name ? TestRepository.newWithName(args.name) : TestRepository.newRandom()); + const usageDir = UsageDir.default(); + + await doLogin(repo, usageDir, args); + await publish(repo, usageDir, args); + + header('Done'); + usageDir.advertise(); + }) + .command('login', 'Login to a given repository', cmd => cmd + .option('name', { + alias: 'n', + description: 'Name of the repository to log in to', + type: 'string', + requiresArg: true, + demandOption: true, + }), async (args) => { + + const repo = TestRepository.existing(args.name); + const usageDir = UsageDir.default(); + + await doLogin(repo, usageDir, args); + + usageDir.advertise(); + }) + .command('run ', 'Publish and run a command', cmd => cmd + .positional('DIRECTORY', { + descripton: 'Directory distribution', + type: 'string', + demandOption: true, + }) + .positional('COMMAND', { + alias: 'c', + description: 'Run the given command with the packages staged', + type: 'string', + array: true, + demandOption: true, + }) + .option('cleanup', { + alias: 'C', + description: 'Cleanup the repository afterwards', + type: 'boolean', + default: true, + requiresArg: false, + }), async (args) => { + + await validateDirectory(args); + const repo = await TestRepository.newRandom(); + const usageDir = UsageDir.default(); + + await doLogin(repo, usageDir, args); + await publish(repo, usageDir, args); + + try { + await usageDir.activateInCurrentProcess(); + + await shell(args.COMMAND ?? [], { + shell: true, + show: 'always', + }); + + } finally { + if (args.cleanup) { + await repo.delete(); + } + } + }) + .command('cleanup', 'Clean up testing repository', cmd => cmd + .option('name', { + alias: 'n', + description: 'Name of the repository to cleanup (default: most recent)', + type: 'string', + requiresArg: true, + }), async (args) => { + + const usageDir = UsageDir.default(); + + let repositoryName = args.name; + if (!repositoryName) { + repositoryName = (await usageDir.currentEnv()).CODEARTIFACT_REPO; + } + + if (!repositoryName) { + console.log(`No --name given and no $CODEARTIFACT_REPO found in ${usageDir.directory}, nothing cleaned up`); + return; + } + + const repo = TestRepository.existing(repositoryName); + await repo.delete(); + }) + .command('gc', 'Clean up day-old testing repositories', cmd => cmd, async () => { + await TestRepository.gc(); + }) + .demandCommand(1, 'You must supply a command') + .help() + .strictOptions() + .showHelpOnFail(false) + .parse(); +} + +async function validateDirectory(args: { + DIRECTORY: string, +}) { + if (!await fs.pathExists(path.join(args.DIRECTORY, 'build.json'))) { + throw new Error(`${args.DIRECTORY} does not look like a CDK dist directory (build.json missing)`); + } +} + +async function doLogin(repo: TestRepository, usageDir: UsageDir, args: { + npm?: boolean; + python?: boolean; + java?: boolean; + dotnet?: boolean; +}) { + const login = await repo.loginInformation(); + + const oldEnv = await usageDir.currentEnv(); + + await usageDir.clean(); + await usageDir.addToEnv({ + CODEARTIFACT_REPO: login.repositoryName, + }); + + if (oldEnv.BUILD_VERSION) { + await usageDir.addToEnv({ + BUILD_VERSION: oldEnv.BUILD_VERSION, + }); + } + + const doRepo = whichRepos(args); + + await doRepo.npm(() => npmLogin(login, usageDir)); + await doRepo.python(() => pypiLogin(login, usageDir)); + await doRepo.java(() => mavenLogin(login, usageDir)); + await doRepo.dotnet(() => nugetLogin(login, usageDir)); +} + +async function publish(repo: TestRepository, usageDir: UsageDir, args: { + DIRECTORY: string, + npm?: boolean; + python?: boolean; + java?: boolean; + dotnet?: boolean; +}) { + const directory = `${args.DIRECTORY}`; + const login = await repo.loginInformation(); + + const doRepo = whichRepos(args); + + const buildJson = await fs.readJson(path.join(directory, 'build.json')); + await usageDir.addToEnv({ + BUILD_VERSION: buildJson.version, + }); + + await doRepo.npm(async () => { + header('NPM'); + await uploadNpmPackages(glob.sync(path.join(directory, 'js', '*.tgz')), login, usageDir); + }); + + await doRepo.python(async () => { + header('Python'); + await uploadPythonPackages(glob.sync(path.join(directory, 'python', '*')), login); + }); + + await doRepo.java(async () => { + header('Java'); + await uploadJavaPackages(glob.sync(path.join(directory, 'java', '**', '*.pom')), login, usageDir); + }); + + await doRepo.dotnet(async () => { + header('.NET'); + await uploadDotnetPackages(glob.sync(path.join(directory, 'dotnet', '**', '*.nupkg')), usageDir); + }); + + console.log('🛍 Configuring packages for upstream versions'); + await repo.markAllUpstreamAllow(); +} + +function whichRepos(args: { + npm?: boolean; + python?: boolean; + java?: boolean; + dotnet?: boolean; +}) { + const all = args.npm === undefined && args.python === undefined && args.java === undefined && args.dotnet === undefined; + + const invoke = (block: () => Promise) => block(); + const skip = () => { }; + + return { + npm: args.npm || all ? invoke : skip, + python: args.python || all ? invoke : skip, + java: args.java || all ? invoke : skip, + dotnet: args.dotnet || all ? invoke : skip, + }; +} + +function header(caption: string) { + console.log(''); + console.log('/'.repeat(70)); + console.log(`// ${caption}`); + console.log(''); +} + +main().catch(e => { + // eslint-disable-next-line no-console + console.error(e); + process.exitCode = 1; +}); diff --git a/packages/@aws-cdk-testing/cli-integ/bin/test-root b/packages/@aws-cdk-testing/cli-integ/bin/test-root new file mode 100755 index 0000000000000..d14248e4d4019 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/test-root @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./test-root.js'); diff --git a/packages/@aws-cdk-testing/cli-integ/bin/test-root.ts b/packages/@aws-cdk-testing/cli-integ/bin/test-root.ts new file mode 100644 index 0000000000000..244194a7eb31c --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/bin/test-root.ts @@ -0,0 +1,3 @@ +import * as path from 'path'; +// eslint-disable-next-line no-console +console.log(path.resolve(__dirname, '..')); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/entrypoints/test-cli-regression-against-current-code.sh b/packages/@aws-cdk-testing/cli-integ/entrypoints/test-cli-regression-against-current-code.sh new file mode 100755 index 0000000000000..ff50aa5f69a2b --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/entrypoints/test-cli-regression-against-current-code.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Run our integration tests in regression mode against the +# candidate version of the framework, which is the one we just packed. +# +set -euo pipefail +integdir=$(cd $(dirname $0) && pwd) + +source ${integdir}/test-cli-regression.bash + +run_regression_against_framework_version CANDIDATE_VERSION diff --git a/packages/@aws-cdk-testing/cli-integ/entrypoints/test-cli-regression-against-latest-release.sh b/packages/@aws-cdk-testing/cli-integ/entrypoints/test-cli-regression-against-latest-release.sh new file mode 100755 index 0000000000000..8b670eb7b793d --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/entrypoints/test-cli-regression-against-latest-release.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Run our integration tests in regression mode against the +# previous version of the framework, relative to the version being packed now. +# +set -euo pipefail +integdir=$(cd $(dirname $0) && pwd) + +source ${integdir}/test-cli-regression.bash + +run_regression_against_framework_version PREVIOUS_VERSION diff --git a/packages/aws-cdk/test/integ/test-cli-regression.bash b/packages/@aws-cdk-testing/cli-integ/entrypoints/test-cli-regression.bash similarity index 100% rename from packages/aws-cdk/test/integ/test-cli-regression.bash rename to packages/@aws-cdk-testing/cli-integ/entrypoints/test-cli-regression.bash diff --git a/packages/@aws-cdk-testing/cli-integ/entrypoints/test.sh b/packages/@aws-cdk-testing/cli-integ/entrypoints/test.sh new file mode 100755 index 0000000000000..bf0ec0a7c5c68 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/entrypoints/test.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -euo pipefail +scriptdir=$(cd $(dirname $0) && pwd) + +echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' +echo 'CLI Integration Tests' +echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' + +cd $scriptdir + +source ../common/jest-test.bash +invokeJest "$@" diff --git a/packages/@aws-cdk-testing/cli-integ/jest.config.js b/packages/@aws-cdk-testing/cli-integ/jest.config.js new file mode 100644 index 0000000000000..30ba8fce114e2 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/jest.config.js @@ -0,0 +1,10 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = { + ...baseConfig, + coverageThreshold: { + global: { + statements: 20, + branches: 2, + }, + }, +}; diff --git a/packages/aws-cdk/test/integ/helpers/aws.ts b/packages/@aws-cdk-testing/cli-integ/lib/aws.ts similarity index 99% rename from packages/aws-cdk/test/integ/helpers/aws.ts rename to packages/@aws-cdk-testing/cli-integ/lib/aws.ts index beea3fca64768..289b87bf955a1 100644 --- a/packages/aws-cdk/test/integ/helpers/aws.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/aws.ts @@ -232,14 +232,14 @@ retry.abort = (e: Error): Error => { return e; }; -export async function sleep(ms: number) { - return new Promise(ok => setTimeout(ok, ms)); -} - export function outputFromStack(key: string, stack: AWS.CloudFormation.Stack): string | undefined { return (stack.Outputs ?? []).find(o => o.OutputKey === key)?.OutputValue; } +export async function sleep(ms: number) { + return new Promise(ok => setTimeout(ok, ms)); +} + function chainableCredentials(region: string): AWS.Credentials | undefined { const profileName = process.env.AWS_PROFILE; @@ -287,5 +287,4 @@ function chainableCredentials(region: string): AWS.Credentials | undefined { } return undefined; - -} +} \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/helpers/corking.ts b/packages/@aws-cdk-testing/cli-integ/lib/corking.ts similarity index 90% rename from packages/aws-cdk/test/integ/helpers/corking.ts rename to packages/@aws-cdk-testing/cli-integ/lib/corking.ts index c3970586ead03..f083270a028f5 100644 --- a/packages/aws-cdk/test/integ/helpers/corking.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/corking.ts @@ -25,4 +25,8 @@ export class MemoryStream extends stream.Writable { return new Promise(ok => strm.once('drain', ok)); } } + + public toString() { + return this.buffer().toString(); + } } diff --git a/packages/@aws-cdk-testing/cli-integ/lib/files.ts b/packages/@aws-cdk-testing/cli-integ/lib/files.ts new file mode 100644 index 0000000000000..186b1b0ff15f5 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/files.ts @@ -0,0 +1,81 @@ +import * as os from 'os'; +import * as path from 'path'; +import * as fs from 'fs-extra'; + +export async function rmFile(filename: string) { + if (await fs.pathExists(filename)) { + await fs.unlink(filename); + } +} + +export async function addToFile(filename: string, line: string) { + let contents = await fs.pathExists(filename) ? await fs.readFile(filename, { encoding: 'utf-8' }) : ''; + if (!contents.endsWith('\n')) { + contents += '\n'; + } + contents += line + '\n'; + + await writeFile(filename, contents); +} + +export async function writeFile(filename: string, contents: string) { + await fs.mkdirp(path.dirname(filename)); + await fs.writeFile(filename, contents, { encoding: 'utf-8' }); +} + +export async function copyDirectoryContents(dir: string, target: string) { + for (const file of await fs.readdir(path.join(dir), { encoding: 'utf-8' })) { + await fs.copyFile(path.join(dir, file), path.join(target, file)); + } +} + +export function findUp(name: string, directory: string = process.cwd()): string | undefined { + const absoluteDirectory = path.resolve(directory); + + const file = path.join(directory, name); + if (fs.existsSync(file)) { + return file; + } + + const { root } = path.parse(absoluteDirectory); + if (absoluteDirectory == root) { + return undefined; + } + + return findUp(name, path.dirname(absoluteDirectory)); +} + + +/** + * Docker-safe home directory + */ +export function homeDir() { + return os.userInfo().homedir ?? os.homedir(); +} + +export async function loadLines(filename: string): Promise { + return await fs.pathExists(filename) ? (await fs.readFile(filename, { encoding: 'utf-8' })).trim().split('\n') : []; +} + +export async function writeLines(filename: string, lines: string[]) { + // Must end in a newline or our bash script won't read it properly + await fs.writeFile(filename, lines.join('\n') + '\n', { encoding: 'utf-8' }); +} + +/** + * Update a spaceless ini file in place + */ +export function updateIniKey(lines: string[], key: string, value: string) { + const prefix = `${key}=`; + let found = false; + for (let i = 0; i < lines.length; i++) { + if (lines[i].startsWith(prefix)) { + lines[i] = prefix + value; + found = true; + break; + } + } + if (!found) { + lines.push(prefix + value); + } +} diff --git a/packages/@aws-cdk-testing/cli-integ/lib/github.ts b/packages/@aws-cdk-testing/cli-integ/lib/github.ts new file mode 100644 index 0000000000000..b483e5fb2fce8 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/github.ts @@ -0,0 +1,43 @@ +import { Octokit } from '@octokit/rest'; +import * as semver from 'semver'; + +export async function fetchPreviousVersion(token: string, options?: { + priorTo?: string, + majorVersion?: string, +}) { + const github = new Octokit({ auth: token }); + const releases = await github.repos.listReleases({ + owner: 'aws', + repo: 'aws-cdk', + }); + + // this returns a list in descending order, newest releases first + // opts for same major version where possible, falling back otherwise + // to previous major versions. + let previousMVRelease = undefined; + for (const release of releases.data) { + const version = release.name?.replace('v', ''); + if (!version) { continue; } + + // Any old version is fine + if (!options?.majorVersion && !options?.priorTo) { + return version; + } + + if (options?.majorVersion && `${semver.major(version)}` === options.majorVersion) { + return version; + } + + if (options?.priorTo && semver.lt(version, options?.priorTo) && semver.major(version) === semver.major(options.priorTo)) { + return version; + } + + // Otherwise return the most recent version that didn't match any + if (!previousMVRelease) { + previousMVRelease = version; + } + } + if (previousMVRelease) { return previousMVRelease; } + + throw new Error(`Unable to find previous version given ${JSON.stringify(options)}`); +}; \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/index.ts b/packages/@aws-cdk-testing/cli-integ/lib/index.ts new file mode 100644 index 0000000000000..32ab6ebcb83b4 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/index.ts @@ -0,0 +1,12 @@ +export * from './aws'; +export * from './corking'; +export * from './integ-test'; +export * from './memoize'; +export * from './resource-pool'; +export * from './with-sam'; +export * from './shell'; +export * from './with-aws'; +export * from './with-cdk-app'; +export * from './with-packages'; +export * from './with-temporary-directory'; +export * from './resources'; \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/helpers/test-helpers.ts b/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts similarity index 61% rename from packages/aws-cdk/test/integ/helpers/test-helpers.ts rename to packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts index 5dc65f6ed492e..e529591c50d1e 100644 --- a/packages/aws-cdk/test/integ/helpers/test-helpers.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/integ-test.ts @@ -2,9 +2,13 @@ import * as fs from 'fs'; import * as path from 'path'; import { MemoryStream } from './corking'; -const SKIP_TESTS = fs.readFileSync(path.join(__dirname, 'skip-tests.txt'), { encoding: 'utf-8' }).split('\n'); +const SKIP_TESTS = fs.readFileSync(path.join(__dirname, '..', 'skip-tests.txt'), { encoding: 'utf-8' }).split('\n'); -export type TestContext = { readonly output: NodeJS.WritableStream; }; +export interface TestContext { + readonly randomString: string; + readonly output: NodeJS.WritableStream; + log(s: string): void; +}; /** * A wrapper for jest's 'test' which takes regression-disabled tests into account and prints a banner @@ -31,19 +35,22 @@ export function integTest( output.write(`${name}\n`); output.write('================================================================\n'); - let success = true; try { - return await callback({ output }); + return await callback({ + output, + randomString: randomString(), + log(s: string) { + output.write(`${s}\n`); + }, + }); } catch (e) { - await output.flushTo(process.stderr); - process.stderr.write(`❌ ${e.toString()}\n`); - success = false; + output.write(e.message); + output.write(e.stack); + // Print output only if the test fails. Use 'console.log' so the output is buffered by + // jest and prints without a stack trace (if verbose: false). + // eslint-disable-next-line no-console + console.log(output.buffer().toString()); throw e; - } finally { - if (success) { - // Show people there's progress - process.stderr.write('✅'); - } } }, timeoutMillis); } @@ -51,3 +58,8 @@ export function integTest( function shouldSkip(testName: string) { return SKIP_TESTS.includes(testName); } + +export function randomString() { + // Crazy + return Math.random().toString(36).replace(/[^a-z0-9]+/g, ''); +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/lists.ts b/packages/@aws-cdk-testing/cli-integ/lib/lists.ts new file mode 100644 index 0000000000000..69f504a15474f --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/lists.ts @@ -0,0 +1,9 @@ +export function chunk(n: number, xs: A[]): A[][] { + const ret = new Array(); + + for (let i = 0; i < xs.length; i += n) { + ret.push(xs.slice(i, i + n)); + } + + return ret; +} \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/helpers/memoize.ts b/packages/@aws-cdk-testing/cli-integ/lib/memoize.ts similarity index 100% rename from packages/aws-cdk/test/integ/helpers/memoize.ts rename to packages/@aws-cdk-testing/cli-integ/lib/memoize.ts diff --git a/packages/@aws-cdk-testing/cli-integ/lib/npm.ts b/packages/@aws-cdk-testing/cli-integ/lib/npm.ts new file mode 100644 index 0000000000000..991599f010ba8 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/npm.ts @@ -0,0 +1,13 @@ +import { spawnSync } from 'child_process'; + +const MINIMUM_VERSION = '3.9'; + +/** + * Use NPM preinstalled on the machine to look up a list of TypeScript versions + */ +export function typescriptVersionsSync(): string[] { + const { stdout } = spawnSync('npm', ['--silent', 'view', `typescript@>=${MINIMUM_VERSION}`, 'version', '--json']); + + const versions: string[] = JSON.parse(stdout); + return Array.from(new Set(versions.map(v => v.split('.').slice(0, 2).join('.')))); +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/package-sources/release-source.ts b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/release-source.ts new file mode 100644 index 0000000000000..7d097630e26de --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/release-source.ts @@ -0,0 +1,77 @@ +import * as os from 'os'; +import * as path from 'path'; +import * as fs from 'fs-extra'; +import { copyDirectoryContents } from '../files'; +import { shell, rimraf, addToShellPath } from '../shell'; +import { IPackageSourceSetup, IPackageSource } from './source'; + +export class ReleasePackageSourceSetup implements IPackageSourceSetup { + readonly name = 'release'; + readonly description = `release @ ${this.version}`; + + private tempDir?: string; + + constructor(private readonly version: string, private readonly frameworkVersion?: string) { + } + + public async prepare(): Promise { + this.tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'tmpcdk')); + fs.mkdirSync(this.tempDir, { recursive: true }); + + await shell(['node', require.resolve('npm'), 'install', `aws-cdk@${this.version}`], { + cwd: this.tempDir, + }); + + process.env.CDK_CLI_PATH = this.tempDir; + process.env.VERSION = this.version; + process.env.FRAMEWORK_VERSION = this.frameworkVersion ?? this.version; + } + + public async cleanup(): Promise { + if (this.tempDir) { + rimraf(this.tempDir); + } + } +} + +export class ReleasePackageSource implements IPackageSource { + private readonly cliPath: string; + private readonly version: string; + + constructor() { + this.cliPath = process.env.CDK_CLI_PATH!; + this.version = process.env.VERSION!; + } + + public async makeCliAvailable() { + addToShellPath(path.join(this.cliPath, 'node_modules', '.bin')); + } + + public assertJsiiPackagesAvailable() { + } + + public async initializeDotnetPackages(currentDir: string) { + if (process.env.CWD_FILES_DIR) { + await copyDirectoryContents(process.env.CWD_FILES_DIR, currentDir); + } + } + + public majorVersion() { + return this.version.split('.')[0] as string; + } + + public requestedFrameworkVersion() { + return process.env.FRAMEWORK_VERSION!; + } + + public requestedAlphaVersion(): string { + const frameworkVersion = this.requestedFrameworkVersion(); + if (frameworkVersion.includes('-rc.')) { + // For a pipeline release + return frameworkVersion.replace(/-rc\.\d+$/, '-alpha.999'); + } else { + // For a stable release + return `${frameworkVersion}-alpha.0`; + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-source.ts b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-source.ts new file mode 100644 index 0000000000000..d1d445d7bf931 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-source.ts @@ -0,0 +1,106 @@ +import * as os from 'os'; +import * as path from 'path'; +import * as fs from 'fs-extra'; +import { findUp } from '../files'; +import { shell, addToShellPath } from '../shell'; +import { IPackageSourceSetup, IPackageSource } from './source'; + +export class RepoPackageSourceSetup implements IPackageSourceSetup { + readonly name = 'repo'; + readonly description = `repo(${this.repoRoot})`; + + constructor(private readonly repoRoot: string) { + } + + public async prepare(): Promise { + if (!await fs.pathExists(path.join(this.repoRoot, 'package.json')) || !await fs.pathExists(path.join(this.repoRoot, 'yarn.lock'))) { + throw new Error(`${this.repoRoot}: does not look like the repository root`); + } + + process.env.REPO_ROOT = this.repoRoot; + process.env.REPO_PACKAGE_MAP = await writePackageMap(this.repoRoot); + addToShellPath(path.resolve(__dirname, 'repo-tools')); + } + + public async cleanup(): Promise { + } +} + +export class RepoPackageSource implements IPackageSource { + private readonly repoRoot: string; + + constructor() { + this.repoRoot = process.env.REPO_ROOT as string; + } + + public async makeCliAvailable() { + addToShellPath(path.join(this.repoRoot, 'packages', 'aws-cdk', 'bin')); + } + + public assertJsiiPackagesAvailable() { + throw new Error('jsii client packages are not available when using REPO source'); + } + + public async initializeDotnetPackages() { + } + + public majorVersion() { + const releaseJson = fs.readJsonSync(path.resolve(this.repoRoot, 'release.json')); + return releaseJson.majorVersion; + } + + public requestedFrameworkVersion(): string { + return '*'; + } + + public requestedAlphaVersion(): string { + return '*'; + } +} + +async function writePackageMap(repoRoot: string): Promise { + const packages = await findYarnPackages(repoRoot); + const fileName = path.join(os.tmpdir(), 'package-map.json'); + await fs.writeJson(fileName, packages); + return fileName; +} + +/** + * Cache monorepo discovery results, we only want to do this once per run + */ +const YARN_MONOREPO_CACHE: Record = {}; + +/** + * Return a { name -> directory } packages found in a Yarn monorepo + * + * Cached in YARN_MONOREPO_CACHE. + */ +async function findYarnPackages(root: string): Promise> { + if (!(root in YARN_MONOREPO_CACHE)) { + const output: YarnWorkspacesOutput = JSON.parse(await shell(['yarn', 'workspaces', '--silent', 'info'], { + captureStderr: false, + cwd: root, + show: 'error', + })); + + const ret: Record = {}; + for (const [k, v] of Object.entries(output)) { + ret[k] = path.join(root, v.location); + } + YARN_MONOREPO_CACHE[root] = ret; + } + return YARN_MONOREPO_CACHE[root]; +} + +/** + * Find the root directory of the repo from the current directory + */ +export async function autoFindRoot() { + const found = await findUp('release.json'); + if (!found) { + throw new Error(`Could not determine repository root: 'release.json' not found from ${process.cwd()}`); + } + return path.dirname(found); +} + +type YarnWorkspacesOutput = Record; diff --git a/packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-tools/npm b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-tools/npm new file mode 100644 index 0000000000000..ab3229febddc1 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-tools/npm @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('./npm.js'); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-tools/npm.ts b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-tools/npm.ts new file mode 100644 index 0000000000000..5efcc3e4a865f --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/repo-tools/npm.ts @@ -0,0 +1,48 @@ +import * as child_process from 'child_process'; +import * as fs from 'fs-extra'; + +let argv = process.argv.slice(2); + +// eslint-disable-next-line no-console +console.log('fake npm'); + +if (argv[0] === 'install') { + if (!process.env.REPO_PACKAGE_MAP) { + throw new Error('REPO_PACKAGE_MAP not set'); + } + const repoPackageMap = fs.readJsonSync(process.env.REPO_PACKAGE_MAP, { encoding: 'utf-8' }); + + // Replace paths in the 'package.json' in the current directory + if (fs.pathExistsSync('package.json')) { + const packageJson = fs.readJsonSync('package.json', { encoding: 'utf-8' }); + for (const deps of [packageJson.dependencies ?? {}, packageJson.devDependencies ?? {}]) { + for (const [name, version] of Object.entries(deps)) { + deps[name] = repoPackageMap[name] ?? version; + } + } + fs.writeJsonSync('package.json', packageJson, { encoding: 'utf-8' }); + } + + // Replace package names on the command line + argv = argv.map(x => repoPackageMap[x] ?? x); +} + +//////////////////////////////////////////////////////////////////////// +// Shell out to original npm + +const child = child_process.spawn('node', [require.resolve('npm'), ...argv], { + shell: false, + stdio: ['ignore', 'inherit', 'inherit'], +}); + +child.once('error', e => { + // eslint-disable-next-line no-console + console.error(e); + process.exitCode = 1; +}); + +child.once('close', code => { + if (code) { + process.exitCode = code; + } +}); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/package-sources/source.ts b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/source.ts new file mode 100644 index 0000000000000..21e970701db94 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/source.ts @@ -0,0 +1,30 @@ +export interface IPackageSourceSetup { + readonly name: string; + readonly description: string; + + prepare(): Promise; + cleanup(): Promise; +} + +export interface IPackageSource { + makeCliAvailable(): Promise; + + assertJsiiPackagesAvailable(): void; + majorVersion(): string; + + initializeDotnetPackages(targetDir: string): Promise; + + /** + * Framework version if it's different than the CLI version + * + * Not all tests will respect this. + */ + requestedFrameworkVersion(): string; + + /** + * Versions of alpha packages if different than the CLI version + * + * Not all tests will respect this. + */ + requestedAlphaVersion(): string; +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/package-sources/subprocess.ts b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/subprocess.ts new file mode 100644 index 0000000000000..09f8fdd231a0b --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/package-sources/subprocess.ts @@ -0,0 +1,15 @@ +import { ReleasePackageSource } from './release-source'; +import { RepoPackageSource } from './repo-source'; +import { IPackageSourceSetup, IPackageSource } from './source'; + +export function serializeForSubprocess(s: IPackageSourceSetup) { + process.env.PACKAGE_SOURCE = s.name; +} + +export function packageSourceInSubprocess(): IPackageSource { + switch (process.env.PACKAGE_SOURCE) { + case 'repo': return new RepoPackageSource(); + case 'release': return new ReleasePackageSource(); + default: throw new Error(`Unrecognized package source: ${process.env.PACKAGE_SOURCE}`); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/resource-pool.ts b/packages/@aws-cdk-testing/cli-integ/lib/resource-pool.ts new file mode 100644 index 0000000000000..1c10f54be562d --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/resource-pool.ts @@ -0,0 +1,144 @@ +import { ILock, XpMutex, XpMutexPool } from './xpmutex'; + +/** + * A class that holds a pool of resources and gives them out and returns them on-demand + * + * The resources will be given out front to back, when they are returned + * the most recently returned version will be given out again (for best + * cache coherency). + * + * If there are multiple consumers waiting for a resource, consumers are serviced + * in FIFO order for most fairness. + */ +export class ResourcePool { + public static withResources(name: string, resources: A[]) { + const pool = XpMutexPool.fromName(name); + return new ResourcePool(pool, resources); + } + + private readonly resources: ReadonlyArray; + private readonly mutexes: Record = {}; + private readonly locks: Record = {}; + + private constructor(private readonly pool: XpMutexPool, resources: A[]) { + if (resources.length === 0) { + throw new Error('Must have at least one resource in the pool'); + } + + // Shuffle to reduce contention + resources = [...resources]; + fisherYatesShuffle(resources); + this.resources = resources; + + for (const res of resources) { + this.mutexes[res] = this.pool.mutex(res); + } + } + + /** + * Take one value from the resource pool + * + * If no such value is currently available, wait until it is. + */ + public async take(): Promise> { + while (true) { + // Start a wait on the unlock now -- if the unlock signal comes after + // we try to acquire but before we start the wait, we might miss it. + const wait = this.pool.awaitUnlock(5000); + + for (const res of this.unlockedResources()) { + const lease = await this.tryObtainLease(res); + if (lease) { + // Ignore the wait (count as handled) + wait.then(() => {}, () => {}); + return lease; + } + } + + // None available, wait until one gets unlocked then try again + await wait; + } + } + + /** + * Execute a block using a single resource from the pool + */ + public async using(block: (x: A) => B | Promise): Promise { + const lease = await this.take(); + try { + return await block(lease.value); + } finally { + await lease.dispose(); + } + } + + private async tryObtainLease(value: A) { + const lock = await this.mutexes[value].tryAcquire(); + if (!lock) { + return undefined; + } + + this.locks[value] = lock; + return this.makeLease(value); + } + + private makeLease(value: A): ILease { + let disposed = false; + return { + value, + dispose: () => { + if (disposed) { + throw new Error('Calling dispose() on an already-disposed lease.'); + } + disposed = true; + return this.returnValue(value); + }, + }; + } + + /** + * When a value is returned: + * + * - If someone's waiting for it, give it to them + * - Otherwise put it back into the pool + */ + private async returnValue(value: string) { + const lock = this.locks[value]; + delete this.locks[value]; + await lock?.release(); + } + + /** + * Return all resources that we definitely don't own the locks for + */ + private unlockedResources(): A[] { + return this.resources.filter(res => !this.locks[res]); + } +} + +/** + * A single value taken from the pool + */ +export interface ILease { + /** + * The value obtained by the lease + */ + readonly value: A; + + /** + * Return the leased value to the pool + */ + dispose(): Promise; +} + +/** + * Shuffle an array in-place + */ +function fisherYatesShuffle(xs: A[]) { + for (let i = xs.length - 1; i >= 1; i--) { + const j = Math.floor(Math.random() * i); + const h = xs[j]; + xs[j] = xs[i]; + xs[i] = h; + } +} diff --git a/packages/@aws-cdk-testing/cli-integ/lib/resources.ts b/packages/@aws-cdk-testing/cli-integ/lib/resources.ts new file mode 100644 index 0000000000000..39ab24ab48f58 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/resources.ts @@ -0,0 +1,4 @@ +import * as path from 'path'; + +export const RESOURCES_DIR = path.resolve(__dirname, '..', 'resources'); + diff --git a/packages/@aws-cdk-testing/cli-integ/lib/shell.ts b/packages/@aws-cdk-testing/cli-integ/lib/shell.ts new file mode 100644 index 0000000000000..a969f9d99fc11 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/shell.ts @@ -0,0 +1,168 @@ +import * as child_process from 'child_process'; +import * as fs from 'fs'; +import * as path from 'path'; +import { TestContext } from './integ-test'; +import { TemporaryDirectoryContext } from './with-temporary-directory'; + +/** + * A shell command that does what you want + * + * Is platform-aware, handles errors nicely. + */ +export async function shell(command: string[], options: ShellOptions = {}): Promise { + if (options.modEnv && options.env) { + throw new Error('Use either env or modEnv but not both'); + } + + // Always output the command + (options.output ?? process.stdout).write(`💻 ${command.join(' ')}\n`); + + let output: NodeJS.WritableStream | undefined = options.output ?? process.stdout; + switch (options.show ?? 'always') { + case 'always': + break; + case 'never': + case 'error': + output = undefined; + break; + } + + if (process.env.VERBOSE) { + output = process.stdout; + } + + const env = options.env ?? (options.modEnv ? { ...process.env, ...options.modEnv } : process.env); + + const child = child_process.spawn(command[0], command.slice(1), { + ...options, + env, + // Need this for Windows where we want .cmd and .bat to be found as well. + shell: true, + stdio: ['ignore', 'pipe', 'pipe'], + }); + + return new Promise((resolve, reject) => { + const stdout = new Array(); + const stderr = new Array(); + + child.stdout!.on('data', chunk => { + output?.write(chunk); + stdout.push(chunk); + }); + + child.stderr!.on('data', chunk => { + output?.write(chunk); + if (options.captureStderr ?? true) { + stderr.push(chunk); + } + }); + + child.once('error', reject); + + child.once('close', code => { + const stderrOutput = Buffer.concat(stderr).toString('utf-8'); + const stdoutOutput = Buffer.concat(stdout).toString('utf-8'); + const out = (options.onlyStderr ? stderrOutput : stdoutOutput + stderrOutput).trim(); + if (code === 0 || options.allowErrExit) { + resolve(out); + } else { + if (options.show === 'error') { + (options.output ?? process.stdout).write(out + '\n'); + } + reject(new Error(`'${command.join(' ')}' exited with error code ${code}.`)); + } + }); + }); +} + +export interface ShellOptions extends child_process.SpawnOptions { + /** + * Properties to add to 'env' + */ + readonly modEnv?: Record; + + /** + * Don't fail when exiting with an error + * + * @default false + */ + readonly allowErrExit?: boolean; + + /** + * Whether to capture stderr + * + * @default true + */ + readonly captureStderr?: boolean; + + /** + * Pass output here + * + * @default stdout unless quiet=true + */ + readonly output?: NodeJS.WritableStream; + + /** + * Only return stderr. For example, this is used to validate + * that when CI=true, all logs are sent to stdout. + * + * @default false + */ + readonly onlyStderr?: boolean; + + /** + * Don't log to stdout + * + * @default always + */ + readonly show?: 'always' | 'never' | 'error'; +} + +export class ShellHelper { + public static fromContext(context: TestContext & TemporaryDirectoryContext) { + return new ShellHelper(context.integTestDir, context.output); + } + + constructor( + private readonly _cwd: string, + private readonly _output: NodeJS.WritableStream) { } + + public async shell(command: string[], options: Omit = {}): Promise { + return shell(command, { + output: this._output, + cwd: this._cwd, + ...options, + }); + } +} + +/** + * rm -rf reimplementation, don't want to depend on an NPM package for this + */ +export function rimraf(fsPath: string) { + try { + const isDir = fs.lstatSync(fsPath).isDirectory(); + + if (isDir) { + for (const file of fs.readdirSync(fsPath)) { + rimraf(path.join(fsPath, file)); + } + fs.rmdirSync(fsPath); + } else { + fs.unlinkSync(fsPath); + } + } catch (e) { + // We will survive ENOENT + if (e.code !== 'ENOENT') { throw e; } + } +} + +export function addToShellPath(x: string) { + const parts = process.env.PATH?.split(':') ?? []; + + if (!parts.includes(x)) { + parts.unshift(x); + } + + process.env.PATH = parts.join(':'); +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/staging/codeartifact.ts b/packages/@aws-cdk-testing/cli-integ/lib/staging/codeartifact.ts new file mode 100644 index 0000000000000..75c00a97ad9f0 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/staging/codeartifact.ts @@ -0,0 +1,282 @@ +import * as AWS from 'aws-sdk'; +import { sleep } from '../aws'; + +const COLLECT_BY_TAG = 'collect-by'; +const REPO_LIFETIME_MS = 24 * 3600 * 1000; // One day + +export class TestRepository { + public static readonly DEFAULT_DOMAIN = 'test-cdk'; + + public static async newRandom() { + const qualifier = Math.random().toString(36).replace(/[^a-z0-9]+/g, ''); + + const repo = new TestRepository(`test-${qualifier}`); + await repo.prepare(); + return repo; + } + + public static async newWithName(name: string) { + const repo = new TestRepository(name); + await repo.prepare(); + return repo; + } + + public static existing(repositoryName: string) { + return new TestRepository(repositoryName); + } + + /** + * Garbage collect repositories + */ + public static async gc() { + if (!await TestRepository.existing('*dummy*').domainExists()) { + return; + } + + const codeArtifact = new AWS.CodeArtifact(); + + let nextToken: string | undefined; + do { + const page = await codeArtifact.listRepositories({ nextToken }).promise(); + + for (const repo of page.repositories ?? []) { + const tags = await codeArtifact.listTagsForResource({ resourceArn: repo.arn! }).promise(); + const collectable = tags?.tags?.find(t => t.key === COLLECT_BY_TAG && Number(t.value) < Date.now()); + if (collectable) { + // eslint-disable-next-line no-console + console.log('Deleting', repo.name); + await codeArtifact.deleteRepository({ + domain: repo.domainName!, + repository: repo.name!, + }).promise(); + } + } + + nextToken = page.nextToken; + } while (nextToken); + } + + public readonly npmUpstream = 'npm-upstream'; + public readonly pypiUpstream = 'pypi-upstream'; + public readonly nugetUpstream = 'nuget-upstream'; + public readonly mavenUpstream = 'maven-upstream'; + public readonly domain = TestRepository.DEFAULT_DOMAIN; + + private readonly codeArtifact = new AWS.CodeArtifact(); + + private _loginInformation: LoginInformation | undefined; + + private constructor(public readonly repositoryName: string) { + } + + public async prepare() { + await this.ensureDomain(); + await this.ensureUpstreams(); + + await this.ensureRepository(this.repositoryName, { + description: 'Testing repository', + upstreams: [ + this.npmUpstream, + this.pypiUpstream, + this.nugetUpstream, + this.mavenUpstream, + ], + tags: { + [COLLECT_BY_TAG]: `${Date.now() + REPO_LIFETIME_MS}`, + }, + }); + } + + public async loginInformation(): Promise { + if (this._loginInformation) { + return this._loginInformation; + } + + this._loginInformation = { + authToken: (await this.codeArtifact.getAuthorizationToken({ domain: this.domain, durationSeconds: 12 * 3600 }).promise()).authorizationToken!, + repositoryName: this.repositoryName, + npmEndpoint: (await this.codeArtifact.getRepositoryEndpoint({ domain: this.domain, repository: this.repositoryName, format: 'npm' }).promise()).repositoryEndpoint!, + mavenEndpoint: (await this.codeArtifact.getRepositoryEndpoint({ domain: this.domain, repository: this.repositoryName, format: 'maven' }).promise()).repositoryEndpoint!, + nugetEndpoint: (await this.codeArtifact.getRepositoryEndpoint({ domain: this.domain, repository: this.repositoryName, format: 'nuget' }).promise()).repositoryEndpoint!, + pypiEndpoint: (await this.codeArtifact.getRepositoryEndpoint({ domain: this.domain, repository: this.repositoryName, format: 'pypi' }).promise()).repositoryEndpoint!, + }; + return this._loginInformation; + } + + public async delete() { + try { + await this.codeArtifact.deleteRepository({ + domain: this.domain, + repository: this.repositoryName, + }).promise(); + + // eslint-disable-next-line no-console + console.log('Deleted', this.repositoryName); + } catch (e) { + if (e.code !== 'ResourceNotFoundException') { throw e; } + // Okay + } + } + + /** + * List all packages and mark them as "allow upstream versions". + * + * If we don't do this and we publish `foo@2.3.4-rc.0`, then we can't + * download `foo@2.3.0` anymore because by default CodeArtifact will + * block different versions from the same package. + */ + public async markAllUpstreamAllow() { + for await (const pkg of this.listPackages({ upstream: 'BLOCK' })) { + await retryThrottled(() => this.codeArtifact.putPackageOriginConfiguration({ + domain: this.domain, + repository: this.repositoryName, + + format: pkg.format!, + package: pkg.package!, + namespace: pkg.namespace!, + restrictions: { + publish: 'ALLOW', + upstream: 'ALLOW', + }, + }).promise()); + } + } + + private async ensureDomain() { + if (await this.domainExists()) { return; } + await this.codeArtifact.createDomain({ + domain: this.domain, + tags: [{ key: 'testing', value: 'true' }], + }).promise(); + } + + private async ensureUpstreams() { + await this.ensureRepository(this.npmUpstream, { + description: 'The upstream repository for NPM', + external: 'public:npmjs', + }); + await this.ensureRepository(this.mavenUpstream, { + description: 'The upstream repository for Maven', + external: 'public:maven-central', + }); + await this.ensureRepository(this.nugetUpstream, { + description: 'The upstream repository for NuGet', + external: 'public:nuget-org', + }); + await this.ensureRepository(this.pypiUpstream, { + description: 'The upstream repository for PyPI', + external: 'public:pypi', + }); + } + + private async ensureRepository(name: string, options?: { + readonly description?: string, + readonly external?: string, + readonly upstreams?: string[], + readonly tags?: Record, + }) { + if (await this.repositoryExists(name)) { return; } + + await this.codeArtifact.createRepository({ + domain: this.domain, + repository: name, + description: options?.description, + upstreams: options?.upstreams?.map(repositoryName => ({ repositoryName })), + tags: options?.tags ? Object.entries(options.tags).map(([key, value]) => ({ key, value })) : undefined, + }).promise(); + + if (options?.external) { + const externalConnection = options.external; + await retry(() => this.codeArtifact.associateExternalConnection({ + domain: this.domain, + repository: name, + externalConnection, + }).promise()); + } + } + + private async domainExists() { + try { + await this.codeArtifact.describeDomain({ domain: this.domain }).promise(); + return true; + } catch (e) { + if (e.code !== 'ResourceNotFoundException') { throw e; } + return false; + } + } + + private async repositoryExists(name: string) { + try { + await this.codeArtifact.describeRepository({ domain: this.domain, repository: name }).promise(); + return true; + } catch (e) { + if (e.code !== 'ResourceNotFoundException') { throw e; } + return false; + } + } + + private async* listPackages(filter: Pick = {}) { + let response = await retryThrottled(() => this.codeArtifact.listPackages({ + domain: this.domain, + repository: this.repositoryName, + ...filter, + }).promise()); + + while (true) { + for (const p of response.packages ?? []) { + yield p; + } + + if (!response.nextToken) { + break; + } + + response = await retryThrottled(() => this.codeArtifact.listPackages({ + domain: this.domain, + repository: this.repositoryName, + ...filter, + nextToken: response.nextToken, + }).promise()); + } + } +} + +async function retry(block: () => Promise) { + let attempts = 3; + while (true) { + try { + return await block(); + } catch (e) { + if (attempts-- === 0) { throw e; } + // eslint-disable-next-line no-console + console.debug(e.message); + await sleep(500); + } + } +} + +async function retryThrottled(block: () => Promise) { + let time = 100; + let attempts = 15; + while (true) { + try { + return await block(); + } catch (e) { + // eslint-disable-next-line no-console + console.debug(e.message); + if (e.code !== 'ThrottlingException') { throw e; } + if (attempts-- === 0) { throw e; } + await sleep(Math.floor(Math.random() * time)); + time *= 2; + } + } +} + +export interface LoginInformation { + readonly authToken: string; + readonly repositoryName: string; + readonly npmEndpoint: string; + readonly mavenEndpoint: string; + readonly nugetEndpoint: string; + readonly pypiEndpoint: string; +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/staging/maven.ts b/packages/@aws-cdk-testing/cli-integ/lib/staging/maven.ts new file mode 100644 index 0000000000000..18bb6a83f1255 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/staging/maven.ts @@ -0,0 +1,87 @@ +/* eslint-disable no-console */ +import * as path from 'path'; +import { writeFile } from '../files'; +import { shell } from '../shell'; +import { LoginInformation } from './codeartifact'; +import { parallelShell } from './parallel-shell'; +import { UsageDir } from './usage-dir'; + +// Do not try to JIT the Maven binary +const NO_JIT = '-XX:+TieredCompilation -XX:TieredStopAtLevel=1'; + +export async function mavenLogin(login: LoginInformation, usageDir: UsageDir) { + await writeMavenSettingsFile(settingsFile(usageDir), login); + + // Write env var + // Twiddle JVM settings a bit to make Maven survive running on a CodeBuild box. + await usageDir.addToEnv({ + MAVEN_OPTS: `-Duser.home=${usageDir.directory} ${NO_JIT} ${process.env.MAVEN_OPTS ?? ''}`.trim(), + }); +} + +function settingsFile(usageDir: UsageDir) { + // If we configure usageDir as a fake home directory Maven will find this file. + // (No other way to configure the settings file as part of the environment). + return path.join(usageDir.directory, '.m2', 'settings.xml'); +} + +export async function uploadJavaPackages(packages: string[], login: LoginInformation, usageDir: UsageDir) { + await parallelShell(packages, async (pkg, output) => { + console.log(`⏳ ${pkg}`); + + await shell(['mvn', + `--settings=${settingsFile(usageDir)}`, + 'org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file', + `-Durl=${login.mavenEndpoint}`, + '-DrepositoryId=codeartifact', + `-DpomFile=${pkg}`, + `-Dfile=${pkg.replace(/.pom$/, '.jar')}`, + `-Dsources=${pkg.replace(/.pom$/, '-sources.jar')}`, + `-Djavadoc=${pkg.replace(/.pom$/, '-javadoc.jar')}`], { + output, + modEnv: { + // Do not try to JIT the Maven binary + MAVEN_OPTS: `${NO_JIT} ${process.env.MAVEN_OPTS ?? ''}`.trim(), + }, + }); + + console.log(`✅ ${pkg}`); + }, + (pkg, output) => { + if (output.toString().includes('409 Conflict')) { + console.log(`❌ ${pkg}: already exists. Skipped.`); + return 'skip'; + } + return 'fail'; + }); +} + +export async function writeMavenSettingsFile(filename: string, login: LoginInformation) { + await writeFile(filename, ` + + + + codeartifact + aws + ${login.authToken} + + + + + default + + + codeartifact + ${login.mavenEndpoint} + + + + + + default + + `); +} diff --git a/packages/@aws-cdk-testing/cli-integ/lib/staging/npm.ts b/packages/@aws-cdk-testing/cli-integ/lib/staging/npm.ts new file mode 100644 index 0000000000000..74db6eddc76a5 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/staging/npm.ts @@ -0,0 +1,62 @@ +/* eslint-disable no-console */ +import * as path from 'path'; +import { updateIniKey, loadLines, writeLines } from '../files'; +import { shell } from '../shell'; +import { LoginInformation } from './codeartifact'; +import { parallelShell } from './parallel-shell'; +import { UsageDir } from './usage-dir'; + +export async function npmLogin(login: LoginInformation, usageDir: UsageDir) { + // Creating an ~/.npmrc that references an envvar is what you're supposed to do. (https://docs.npmjs.com/private-modules/ci-server-config) + await writeNpmLoginToken(usageDir, login.npmEndpoint, '${NPM_TOKEN}'); + + // Add variables to env file + await usageDir.addToEnv(npmEnv(usageDir, login)); +} + +function npmEnv(usageDir: UsageDir, login: LoginInformation) { + return { + npm_config_userconfig: path.join(usageDir.directory, '.npmrc'), + npm_config_registry: login.npmEndpoint, + npm_config_always_auth: 'true', // Necessary for NPM 6, otherwise it will sometimes not pass the token + NPM_TOKEN: login.authToken, + }; +} + +export async function uploadNpmPackages(packages: string[], login: LoginInformation, usageDir: UsageDir) { + await parallelShell(packages, async (pkg, output) => { + console.log(`⏳ ${pkg}`); + + // path.resolve() is required -- if the filename ends up looking like `js/bla.tgz` then NPM thinks it's a short form GitHub name. + await shell(['node', require.resolve('npm'), 'publish', path.resolve(pkg)], { + modEnv: npmEnv(usageDir, login), + show: 'error', + output, + }); + + console.log(`✅ ${pkg}`); + }, (pkg, output) => { + if (output.toString().includes('code EPUBLISHCONFLICT')) { + console.log(`❌ ${pkg}: already exists. Skipped.`); + return 'skip'; + } + if (output.toString().includes('code EPRIVATE')) { + console.log(`❌ ${pkg}: is private. Skipped.`); + return 'skip'; + } + return 'fail'; + }); +} + +async function writeNpmLoginToken(usageDir: UsageDir, endpoint: string, token: string) { + const rcFile = path.join(usageDir.directory, '.npmrc'); + const lines = await loadLines(rcFile); + + const key = `${endpoint.replace(/^https:/, '')}:_authToken`; + updateIniKey(lines, key, token); + + await writeLines(rcFile, lines); + return rcFile; +} + +// Environment variable, .npmrc in same directory as package.json or in home dir \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/staging/nuget.ts b/packages/@aws-cdk-testing/cli-integ/lib/staging/nuget.ts new file mode 100644 index 0000000000000..91b4cde286f64 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/staging/nuget.ts @@ -0,0 +1,75 @@ +/* eslint-disable no-console */ +import { writeFile } from '../files'; +import { shell } from '../shell'; +import { LoginInformation } from './codeartifact'; +import { parallelShell } from './parallel-shell'; +import { UsageDir } from './usage-dir'; + +export async function nugetLogin(login: LoginInformation, usageDir: UsageDir) { + // NuGet.Config MUST live in the current directory or in the home directory, and there is no environment + // variable to configure its location. + await writeNuGetConfigFile(usageDir.cwdFile('NuGet.Config'), login); +} + +export async function uploadDotnetPackages(packages: string[], usageDir: UsageDir) { + await usageDir.copyCwdFileHere('NuGet.Config'); + + await parallelShell(packages, async (pkg, output) => { + console.log(`⏳ ${pkg}`); + + await shell(['dotnet', 'nuget', 'push', + pkg, + '--source', 'CodeArtifact', + '--no-symbols', + '--force-english-output', + '--disable-buffering', + '--timeout', '600', + '--skip-duplicate'], { + output, + }); + + console.log(`✅ ${pkg}`); + }, + (pkg, output) => { + if (output.toString().includes('Conflict')) { + console.log(`❌ ${pkg}: already exists. Skipped.`); + return 'skip'; + } + if (output.includes('System.Threading.AbandonedMutexException')) { + console.log(`♻️ ${pkg}: AbandonedMutexException. Probably a sign of throttling, retrying.`); + return 'retry'; + } + if (output.includes('Too Many Requests')) { + console.log(`♻️ ${pkg}: Too many requests. Retrying.`); + return 'retry'; + } + if (output.includes('System.IO.IOException: The system cannot open the device or file specified.')) { + console.log(`♻️ ${pkg}: Some error that we've seen before as a result of throttling. Retrying.`); + return 'retry'; + } + return 'fail'; + }); +} + +async function writeNuGetConfigFile(filename: string, login: LoginInformation) { + // `dotnet nuget push` has an `--api-key` parameter, but CodeArtifact + // does not support that. We must authenticate with Basic auth. + await writeFile(filename, ` + + + + + + + + + + + + + + +`); +} + +// NuGet.Config in current directory \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/staging/parallel-shell.ts b/packages/@aws-cdk-testing/cli-integ/lib/staging/parallel-shell.ts new file mode 100644 index 0000000000000..53242e73a1239 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/staging/parallel-shell.ts @@ -0,0 +1,52 @@ +import PQueue from 'p-queue'; +import { sleep } from '../aws'; +import { MemoryStream } from '../corking'; + + +export type ErrorResponse = 'fail' | 'skip' | 'retry'; + +/** + * Run a function in parallel with cached output + */ +export async function parallelShell( + inputs: A[], + block: (x: A, output: NodeJS.WritableStream) => Promise, + swallowError?: (x: A, output: string) => ErrorResponse, +) { + // Limit to 10 for now, too many instances of Maven exhaust the CodeBuild instance memory + const q = new PQueue({ concurrency: Number(process.env.CONCURRENCY) || 10 }); + await q.addAll(inputs.map(input => async () => { + let attempts = 10; + let sleepMs = 500; + while (true) { + const output = new MemoryStream(); + try { + await block(input, output); + return; + } catch (e) { + switch (swallowError?.(input, output.toString())) { + case 'skip': + return; + + case 'retry': + if (--attempts > 0) { + await sleep(Math.floor(Math.random() * sleepMs)); + sleepMs *= 2; + continue; + } + break; + + case 'fail': + case undefined: + break; + } + + // eslint-disable-next-line no-console + console.error(output.toString()); + throw e; + } + } + })); + + await q.onEmpty(); +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/staging/pypi.ts b/packages/@aws-cdk-testing/cli-integ/lib/staging/pypi.ts new file mode 100644 index 0000000000000..6308a95ce3b5b --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/staging/pypi.ts @@ -0,0 +1,50 @@ +/* eslint-disable no-console */ +import * as path from 'path'; +import { writeFile } from '../files'; +import { shell } from '../shell'; +import { LoginInformation } from './codeartifact'; +import { parallelShell } from './parallel-shell'; +import { UsageDir } from './usage-dir'; + +export async function pypiLogin(login: LoginInformation, usageDir: UsageDir) { + // Write pip config file and set environment var + await writeFile(path.join(usageDir.directory, 'pip.conf'), [ + '[global]', + `index-url = https://aws:${login.authToken}@${login.pypiEndpoint.replace(/^https:\/\//, '')}simple/`, + ].join('\n')); + await usageDir.addToEnv({ + PIP_CONFIG_FILE: `${usageDir.directory}/pip.conf`, + }); +} + +export async function uploadPythonPackages(packages: string[], login: LoginInformation) { + await shell(['pip', 'install', 'twine'], { show: 'error' }); + + // Even though twine supports uploading all packages in one go, we have to upload them + // individually since CodeArtifact does not support Twine's `--skip-existing`. Fun beans. + await parallelShell(packages, async (pkg, output) => { + console.log(`⏳ ${pkg}`); + + await shell(['twine', 'upload', '--verbose', pkg], { + modEnv: { + TWINE_USERNAME: 'aws', + TWINE_PASSWORD: login.authToken, + TWINE_REPOSITORY_URL: login.pypiEndpoint, + }, + show: 'error', + output, + }); + + console.log(`✅ ${pkg}`); + }, (pkg, output) => { + if (output.toString().includes('This package is configured to block new versions') || output.toString().includes('409 Conflict')) { + console.log(`❌ ${pkg}: already exists. Skipped.`); + return 'skip'; + } + if (output.includes('429 Too Many Requests ')) { + console.log(`♻️ ${pkg}: 429 Too Many Requests. Retrying.`); + return 'retry'; + } + return 'fail'; + }); +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/staging/usage-dir.ts b/packages/@aws-cdk-testing/cli-integ/lib/staging/usage-dir.ts new file mode 100644 index 0000000000000..055d85f875cb8 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/staging/usage-dir.ts @@ -0,0 +1,99 @@ +import * as path from 'path'; +import * as fs from 'fs-extra'; +import { copyDirectoryContents, homeDir, loadLines, updateIniKey, writeLines } from '../files'; + +export const DEFAULT_USAGE_DIR = path.join(homeDir(), '.codeartifact/usage'); + +/** + * The usage directory is where we write per-session config files to access the CodeArtifact repository. + * + * Some config files may be written in a system-global location, but they will not be active unless the + * contents of this directory have been sourced/copied into the current terminal. + * + * CONTRACT + * + * There are two special entries: + * + * - `env`, a file with `key=value` entries for environment variables to set. + * - `cwd/`, a directory with files that need to be copied into the current directory before each command. + * + * Other than these, code may write tempfiles to this directory if it wants, but there is no meaning + * implied for other files. + */ +export class UsageDir { + public static default() { + return new UsageDir(DEFAULT_USAGE_DIR); + } + + public readonly envFile: string; + public readonly cwdDir: string; + + private constructor(public readonly directory: string) { + this.envFile = path.join(this.directory, 'env'); + this.cwdDir = path.join(this.directory, 'cwd'); + } + + public async clean() { + await fs.rm(this.directory, { recursive: true, force: true }); + await fs.mkdirp(path.join(this.directory, 'cwd')); + await fs.writeFile(path.join(this.directory, 'env'), '', { encoding: 'utf-8' }); + + await this.addToEnv({ + CWD_FILES_DIR: path.join(this.directory, 'cwd'), + }); + + // Write a bash helper to load these settings + await fs.writeFile(path.join(this.directory, 'activate.bash'), [ + `while read -u10 line; do [[ -z $line ]] || export "$line"; done 10<${this.directory}/env`, + 'cp -R $CWD_FILES_DIR/ .', // Copy files from directory even if it is empty + ].join('\n'), { encoding: 'utf-8' }); + } + + public async addToEnv(settings: Record) { + const lines = await loadLines(this.envFile); + for (const [k, v] of Object.entries(settings)) { + updateIniKey(lines, k, v); + } + await writeLines(this.envFile, lines); + } + + public async currentEnv(): Promise> { + const lines = await loadLines(this.envFile); + + const splitter = /^([a-zA-Z0-9_-]+)\s*=\s*(.*)$/; + + const ret: Record = {}; + for (const line of lines) { + const m = line.match(splitter); + if (m) { + ret[m[1]] = m[2]; + } + } + return ret; + } + + public cwdFile(filename: string) { + return path.join(this.cwdDir, filename); + } + + public async activateInCurrentProcess() { + for (const [k, v] of Object.entries(await this.currentEnv())) { + process.env[k] = v; + } + + await copyDirectoryContents(this.cwdDir, '.'); + } + + public async copyCwdFileHere(...filenames: string[]) { + for (const file of filenames) { + await fs.copyFile(path.join(this.cwdDir, file), file); + } + } + + public advertise() { + // eslint-disable-next-line no-console + console.log('To activate these settings in the current terminal:'); + // eslint-disable-next-line no-console + console.log(` source ${this.directory}/activate.bash`); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/lib/with-aws.ts b/packages/@aws-cdk-testing/cli-integ/lib/with-aws.ts new file mode 100644 index 0000000000000..a18b6d6db4af4 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/with-aws.ts @@ -0,0 +1,63 @@ +import { AwsClients } from './aws'; +import { TestContext } from './integ-test'; +import { ResourcePool } from './resource-pool'; + +export type AwsContext = { readonly aws: AwsClients }; + +/** + * Higher order function to execute a block with an AWS client setup + * + * Allocate the next region from the REGION pool and dispose it afterwards. + */ +export function withAws(block: (context: A & AwsContext) => Promise) { + return (context: A) => regionPool().using(async (region) => { + const aws = await AwsClients.forRegion(region, context.output); + await sanityCheck(aws); + + return block({ ...context, aws }); + }); +} + +let _regionPool: undefined | ResourcePool; +export function regionPool(): ResourcePool { + if (_regionPool !== undefined) { + return _regionPool; + } + + const REGIONS = process.env.AWS_REGIONS + ? process.env.AWS_REGIONS.split(',') + : [process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION ?? 'us-east-1']; + + // eslint-disable-next-line no-console + console.log(`Using regions: ${REGIONS}\n`); + + _regionPool = ResourcePool.withResources('aws_regions', REGIONS); + return _regionPool; +} + +/** + * Perform a one-time quick sanity check that the AWS clients have properly configured credentials + * + * If we don't do this, calls are going to fail and they'll be retried and everything will take + * forever before the user notices a simple misconfiguration. + * + * We can't check for the presence of environment variables since credentials could come from + * anywhere, so do simple account retrieval. + * + * Only do it once per process. + */ +async function sanityCheck(aws: AwsClients) { + if (sanityChecked === undefined) { + try { + await aws.account(); + sanityChecked = true; + } catch (e) { + sanityChecked = false; + throw new Error(`AWS credentials probably not configured, got error: ${e.message}`); + } + } + if (!sanityChecked) { + throw new Error('AWS credentials probably not configured, see previous error'); + } +} +let sanityChecked: boolean | undefined; \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/helpers/cdk.ts b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts similarity index 65% rename from packages/aws-cdk/test/integ/helpers/cdk.ts rename to packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts index 6b95f2d5d44f1..efc14dbaf17c0 100644 --- a/packages/aws-cdk/test/integ/helpers/cdk.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts @@ -1,80 +1,14 @@ -import * as child_process from 'child_process'; +/* eslint-disable no-console */ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; import { outputFromStack, AwsClients } from './aws'; -import { memoize0 } from './memoize'; -import { ResourcePool } from './resource-pool'; -import { TestContext } from './test-helpers'; - -const REGIONS = process.env.AWS_REGIONS - ? process.env.AWS_REGIONS.split(',') - : [process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION ?? 'us-east-1']; - -export const FRAMEWORK_VERSION = process.env.FRAMEWORK_VERSION ?? '*'; - -export let MAJOR_VERSION = FRAMEWORK_VERSION.split('.')[0]; -if (MAJOR_VERSION === '*') { - if (process.env.REPO_ROOT) { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const releaseJson = require(path.resolve(process.env.REPO_ROOT, 'release.json')); - MAJOR_VERSION = `${releaseJson.majorVersion}`; - } else { - // eslint-disable-next-line no-console - console.error('[WARNING] Have to guess at major version. Guessing version 1 to not break anything, but this should not happen'); - MAJOR_VERSION = '1'; - } -} - -process.stdout.write(`Using regions: ${REGIONS}\n`); -process.stdout.write(`Using framework version: ${FRAMEWORK_VERSION} (major version ${MAJOR_VERSION})\n`); - -const REGION_POOL = new ResourcePool(REGIONS); - - -/** - * Cache monorepo discovery results, we only want to do this once per run - */ -const YARN_MONOREPO_CACHE: Record = {}; - -/** - * Return a { name -> directory } packages found in a Yarn monorepo - * - * Cached in YARN_MONOREPO_CACHE. - */ -export async function findYarnPackages(root: string): Promise> { - if (!(root in YARN_MONOREPO_CACHE)) { - const output: YarnWorkspacesOutput = JSON.parse(await shell(['yarn', 'workspaces', '--silent', 'info'], { - captureStderr: false, - cwd: root, - })); - - const ret: Record = {}; - for (const [k, v] of Object.entries(output)) { - ret[k] = path.join(root, v.location); - } - YARN_MONOREPO_CACHE[root] = ret; - } - return YARN_MONOREPO_CACHE[root]; -} - -type YarnWorkspacesOutput = Record; - -export type AwsContext = { readonly aws: AwsClients }; - -/** - * Higher order function to execute a block with an AWS client setup - * - * Allocate the next region from the REGION pool and dispose it afterwards. - */ -export function withAws(block: (context: A & AwsContext) => Promise) { - return (context: A) => REGION_POOL.using(async (region) => { - const aws = await AwsClients.forRegion(region, context.output); - await sanityCheck(aws); - - return block({ ...context, aws }); - }); -} +import { TestContext } from './integ-test'; +import { IPackageSource } from './package-sources/source'; +import { packageSourceInSubprocess } from './package-sources/subprocess'; +import { RESOURCES_DIR } from './resources'; +import { shell, ShellOptions, ShellHelper, rimraf } from './shell'; +import { AwsContext, withAws } from './with-aws'; /** * Higher order function to execute a block with a CDK app fixture @@ -86,7 +20,7 @@ export function withAws(block: (context: A & AwsContext) */ export function withCdkApp(block: (context: TestFixture) => Promise) { return async (context: A) => { - const randy = randomString(); + const randy = context.randomString; const stackNamePrefix = `cdktest-${randy}`; const integTestDir = path.join(os.tmpdir(), `cdk-integ-${randy}`); @@ -94,18 +28,19 @@ export function withCdkApp(block: (context: context.output.write(` Test directory: ${integTestDir}\n`); context.output.write(` Region: ${context.aws.region}\n`); - await cloneDirectory(path.join(__dirname, '..', 'cli', 'app'), integTestDir, context.output); + await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', 'app'), integTestDir, context.output); const fixture = new TestFixture( integTestDir, stackNamePrefix, context.output, - context.aws); + context.aws, + context.randomString); let success = true; try { - const installationVersion = FRAMEWORK_VERSION; + const installationVersion = fixture.packages.requestedFrameworkVersion(); - if (MAJOR_VERSION === '1') { + if (fixture.packages.majorVersion() === '1') { await installNpmPackages(fixture, { '@aws-cdk/core': installationVersion, '@aws-cdk/aws-sns': installationVersion, @@ -134,7 +69,7 @@ export function withCdkApp(block: (context: throw e; } finally { if (process.env.INTEG_NO_CLEAN) { - process.stderr.write(`Left test directory in '${integTestDir}' ($INTEG_NO_CLEAN)\n`); + context.log(`Left test directory in '${integTestDir}' ($INTEG_NO_CLEAN)\n`); } else { await fixture.dispose(success); } @@ -149,7 +84,7 @@ export function withMonolithicCfnIncludeCdkApp(block: (co throw new Error('The UBERPACKAGE environment variable is required for running this test!'); } - const randy = randomString(); + const randy = context.randomString; const stackNamePrefix = `cdk-uber-cfn-include-${randy}`; const integTestDir = path.join(os.tmpdir(), `cdk-uber-cfn-include-${randy}`); @@ -157,18 +92,19 @@ export function withMonolithicCfnIncludeCdkApp(block: (co context.output.write(` Test directory: ${integTestDir}\n`); const awsClients = await AwsClients.default(context.output); - await cloneDirectory(path.join(__dirname, '..', 'uberpackage', 'cfn-include-app'), integTestDir, context.output); + await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', 'cfn-include-app'), integTestDir, context.output); const fixture = new TestFixture( integTestDir, stackNamePrefix, context.output, awsClients, + context.randomString, ); let success = true; try { await installNpmPackages(fixture, { - [uberPackage]: FRAMEWORK_VERSION ?? '*', + [uberPackage]: fixture.packages.requestedFrameworkVersion(), }); await block(fixture); @@ -177,7 +113,7 @@ export function withMonolithicCfnIncludeCdkApp(block: (co throw e; } finally { if (process.env.INTEG_NO_CLEAN) { - process.stderr.write(`Left test directory in '${integTestDir}' ($INTEG_NO_CLEAN)\n`); + context.log(`Left test directory in '${integTestDir}' ($INTEG_NO_CLEAN)`); } else { await fixture.dispose(success); } @@ -199,40 +135,6 @@ export function withDefaultFixture(block: (context: TestFixture) => Promise; - - /** - * Don't fail when exiting with an error - * - * @default false - */ - allowErrExit?: boolean; - - /** - * Whether to capture stderr - * - * @default true - */ - captureStderr?: boolean; - - /** - * Pass output here - */ - output?: NodeJS.WritableStream; - - /** - * Only return stderr. For example, this is used to validate - * that when CI=true, all logs are sent to stdout. - * - * @default false - */ - onlyStderr?: boolean; -} - export interface CdkCliOptions extends ShellOptions { options?: string[]; neverRequireApproval?: boolean; @@ -315,29 +217,27 @@ export interface CdkModernBootstrapCommandOptions extends CommonCdkBootstrapComm readonly customPermissionsBoundary?: string; } -export class TestFixture { - public readonly qualifier = randomString().slice(0, 10); +export class TestFixture extends ShellHelper { + public readonly qualifier = this.randomString.slice(0, 10); private readonly bucketsToDelete = new Array(); + public readonly packages: IPackageSource; constructor( public readonly integTestDir: string, public readonly stackNamePrefix: string, public readonly output: NodeJS.WritableStream, - public readonly aws: AwsClients) { + public readonly aws: AwsClients, + public readonly randomString: string) { + + super(integTestDir, output); + + this.packages = packageSourceInSubprocess(); } public log(s: string) { this.output.write(`${s}\n`); } - public async shell(command: string[], options: Omit = {}): Promise { - return shell(command, { - output: this.output, - cwd: this.integTestDir, - ...options, - }); - } - public async cdkDeploy(stackNames: string | string[], options: CdkCliOptions = {}) { stackNames = typeof stackNames === 'string' ? [stackNames] : stackNames; @@ -445,13 +345,15 @@ export class TestFixture { public async cdk(args: string[], options: CdkCliOptions = {}) { const verbose = options.verbose ?? true; + await this.packages.makeCliAvailable(); + return this.shell(['cdk', ...(verbose ? ['-v'] : []), ...args], { ...options, modEnv: { AWS_REGION: this.aws.region, AWS_DEFAULT_REGION: this.aws.region, STACK_NAME_PREFIX: this.stackNamePrefix, - PACKAGE_LAYOUT_VERSION: MAJOR_VERSION, + PACKAGE_LAYOUT_VERSION: this.packages.majorVersion(), ...options.modEnv, }, }); @@ -559,33 +461,6 @@ export class TestFixture { } } -/** - * Perform a one-time quick sanity check that the AWS clients has properly configured credentials - * - * If we don't do this, calls are going to fail and they'll be retried and everything will take - * forever before the user notices a simple misconfiguration. - * - * We can't check for the presence of environment variables since credentials could come from - * anywhere, so do simple account retrieval. - * - * Only do it once per process. - */ -async function sanityCheck(aws: AwsClients) { - if (sanityChecked === undefined) { - try { - await aws.account(); - sanityChecked = true; - } catch (e) { - sanityChecked = false; - throw new Error(`AWS credentials probably not configured, got error: ${e.message}`); - } - } - if (!sanityChecked) { - throw new Error('AWS credentials probably not configured, see previous error'); - } -} -let sanityChecked: boolean | undefined; - /** * Make sure that the given environment is bootstrapped * @@ -611,89 +486,10 @@ async function ensureBootstrapped(fixture: TestFixture) { ALREADY_BOOTSTRAPPED_IN_THIS_RUN.add(envSpecifier); } -/** - * A shell command that does what you want - * - * Is platform-aware, handles errors nicely. - */ -export async function shell(command: string[], options: ShellOptions = {}): Promise { - if (options.modEnv && options.env) { - throw new Error('Use either env or modEnv but not both'); - } - - options.output?.write(`💻 ${command.join(' ')}\n`); - - const env = options.env ?? (options.modEnv ? { ...process.env, ...options.modEnv } : undefined); - - const child = child_process.spawn(command[0], command.slice(1), { - ...options, - env, - // Need this for Windows where we want .cmd and .bat to be found as well. - shell: true, - stdio: ['ignore', 'pipe', 'pipe'], - }); - - return new Promise((resolve, reject) => { - const stdout = new Array(); - const stderr = new Array(); - - child.stdout!.on('data', chunk => { - options.output?.write(chunk); - stdout.push(chunk); - }); - - child.stderr!.on('data', chunk => { - options.output?.write(chunk); - if (options.captureStderr ?? true) { - stderr.push(chunk); - } - }); - - child.once('error', reject); - - child.once('close', code => { - const stderrOutput = Buffer.concat(stderr).toString('utf-8'); - const stdoutOutput = Buffer.concat(stdout).toString('utf-8'); - const output = (options.onlyStderr ? stderrOutput : stdoutOutput + stderrOutput).trim(); - if (code === 0 || options.allowErrExit) { - resolve(output); - } else { - reject(new Error(`'${command.join(' ')}' exited with error code ${code}. Output: \n${output}`)); - } - }); - }); -} - function defined(x: A): x is NonNullable { return x !== undefined; } -/** - * rm -rf reimplementation, don't want to depend on an NPM package for this - */ -export function rimraf(fsPath: string) { - try { - const isDir = fs.lstatSync(fsPath).isDirectory(); - - if (isDir) { - for (const file of fs.readdirSync(fsPath)) { - rimraf(path.join(fsPath, file)); - } - fs.rmdirSync(fsPath); - } else { - fs.unlinkSync(fsPath); - } - } catch (e) { - // We will survive ENOENT - if (e.code !== 'ENOENT') { throw e; } - } -} - -export function randomString() { - // Crazy - return Math.random().toString(36).replace(/[^a-z0-9]+/g, ''); -} - /** * Install the given NPM packages, identified by their names and versions * @@ -713,17 +509,6 @@ export function randomString() { * for Node's dependency lookup mechanism). */ export async function installNpmPackages(fixture: TestFixture, packages: Record) { - if (process.env.REPO_ROOT) { - const monoRepo = await findYarnPackages(process.env.REPO_ROOT); - - // Replace the install target with the physical location of this package - for (const key of Object.keys(packages)) { - if (key in monoRepo) { - packages[key] = monoRepo[key]; - } - } - } - fs.writeFileSync(path.join(fixture.integTestDir, 'package.json'), JSON.stringify({ name: 'cdk-integ-tests', private: true, @@ -732,25 +517,7 @@ export async function installNpmPackages(fixture: TestFixture, packages: Record< }, undefined, 2), { encoding: 'utf-8' }); // Now install that `package.json` using NPM7 - const npm7 = await installNpm7(); - await fixture.shell([npm7, 'install']); + await fixture.shell(['node', require.resolve('npm'), 'install']); } -/** - * Install NPM7 somewhere on the machine and return the path to its binary. - * - * - We install NPM7 explicitly so we don't have to depend on the environment. - * - The install is cached so we don't have to install it over and over again - * for every test. - */ -const installNpm7 = memoize0(async (): Promise => { - const installDir = path.join(os.tmpdir(), 'cdk-integ-npm7'); - await shell(['rm', '-rf', installDir]); - await shell(['mkdir', '-p', installDir]); - - await shell(['npm', 'install', 'npm@7'], { cwd: installDir }); - - return path.join(installDir, 'node_modules', '.bin', 'npm'); -}); - const ALREADY_BOOTSTRAPPED_IN_THIS_RUN = new Set(); diff --git a/packages/@aws-cdk-testing/cli-integ/lib/with-packages.ts b/packages/@aws-cdk-testing/cli-integ/lib/with-packages.ts new file mode 100644 index 0000000000000..f835fee3b333a --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/with-packages.ts @@ -0,0 +1,15 @@ +import { IPackageSource } from './package-sources/source'; +import { packageSourceInSubprocess } from './package-sources/subprocess'; + +export interface PackageContext { + readonly packages: IPackageSource; +} + +export function withPackages(block: (context: A & PackageContext) => Promise) { + return async (context: A) => { + return block({ + ...context, + packages: packageSourceInSubprocess(), + }); + }; +} \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/helpers/sam.ts b/packages/@aws-cdk-testing/cli-integ/lib/with-sam.ts similarity index 88% rename from packages/aws-cdk/test/integ/helpers/sam.ts rename to packages/@aws-cdk-testing/cli-integ/lib/with-sam.ts index 13683f88caf2e..1016e4b113923 100644 --- a/packages/aws-cdk/test/integ/helpers/sam.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/with-sam.ts @@ -3,15 +3,11 @@ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; import axios from 'axios'; -import { AwsClients } from './aws'; -import { - AwsContext, - cloneDirectory, FRAMEWORK_VERSION, installNpmPackages, - MAJOR_VERSION, - randomString, rimraf, ShellOptions, - TestFixture, withAws, -} from './cdk'; -import { TestContext } from './test-helpers'; +import { TestContext } from './integ-test'; +import { RESOURCES_DIR } from './resources'; +import { ShellOptions, rimraf } from './shell'; +import { AwsContext, withAws } from './with-aws'; +import { cloneDirectory, installNpmPackages, TestFixture } from './with-cdk-app'; export interface ActionOutput { @@ -20,32 +16,32 @@ export interface ActionOutput { shellOutput?: string; } - /** * Higher order function to execute a block with a SAM Integration CDK app fixture */ export function withSamIntegrationCdkApp(block: (context: SamIntegrationTestFixture) => Promise) { return async (context: A) => { - const randy = randomString(); + const randy = context.randomString; const stackNamePrefix = `cdktest-${randy}`; const integTestDir = path.join(os.tmpdir(), `cdk-integ-${randy}`); - context.output.write(` Stack prefix: ${stackNamePrefix}\n`); - context.output.write(` Test directory: ${integTestDir}\n`); - context.output.write(` Region: ${context.aws.region}\n`); + context.log(` Stack prefix: ${stackNamePrefix}\n`); + context.log(` Test directory: ${integTestDir}\n`); + context.log(` Region: ${context.aws.region}\n`); - await cloneDirectory(path.join(__dirname, '..', 'cli', 'sam_cdk_integ_app'), integTestDir, context.output); + await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', 'sam_cdk_integ_app'), integTestDir, context.output); const fixture = new SamIntegrationTestFixture( integTestDir, stackNamePrefix, context.output, - context.aws); + context.aws, + context.randomString); let success = true; try { - const installationVersion = FRAMEWORK_VERSION; + const installationVersion = fixture.packages.requestedFrameworkVersion(); - if (MAJOR_VERSION === '1') { + if (fixture.packages.majorVersion() === '1') { await installNpmPackages(fixture, { '@aws-cdk/aws-iam': installationVersion, '@aws-cdk/aws-apigateway': installationVersion, @@ -58,7 +54,7 @@ export function withSamIntegrationCdkApp(blo 'constructs': '^3', }); } else { - const alphaInstallationVersion = installationVersion.includes('rc') ? installationVersion.replace('rc', 'alpha') : `${installationVersion}-alpha.0`; + const alphaInstallationVersion = fixture.packages.requestedAlphaVersion(); await installNpmPackages(fixture, { 'aws-cdk-lib': installationVersion, '@aws-cdk/aws-lambda-go-alpha': alphaInstallationVersion, @@ -76,7 +72,7 @@ export function withSamIntegrationCdkApp(blo throw e; } finally { if (process.env.INTEG_NO_CLEAN) { - process.stderr.write(`Left test directory in '${integTestDir}' ($INTEG_NO_CLEAN)\n`); + context.log(`Left test directory in '${integTestDir}' ($INTEG_NO_CLEAN)\n`); } else { await fixture.dispose(success); } @@ -121,14 +117,6 @@ export function withSamIntegrationFixture(block: (context: SamIntegrationTestFix } export class SamIntegrationTestFixture extends TestFixture { - constructor( - public readonly integTestDir: string, - public readonly stackNamePrefix: string, - public readonly output: NodeJS.WritableStream, - public readonly aws: AwsClients) { - super(integTestDir, stackNamePrefix, output, aws); - } - public async samShell(command: string[], filter?: string, action?: () => any, options: Omit = {}): Promise { return shellWithAction(command, filter, action, { output: this.output, diff --git a/packages/@aws-cdk-testing/cli-integ/lib/with-temporary-directory.ts b/packages/@aws-cdk-testing/cli-integ/lib/with-temporary-directory.ts new file mode 100644 index 0000000000000..0ff0336940114 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/with-temporary-directory.ts @@ -0,0 +1,35 @@ +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; +import { TestContext } from './integ-test'; +import { rimraf } from './shell'; + +export interface TemporaryDirectoryContext { + readonly integTestDir: string; +} + +export function withTemporaryDirectory(block: (context: A & TemporaryDirectoryContext) => Promise) { + return async (context: A) => { + const integTestDir = path.join(os.tmpdir(), `cdk-integ-${context.randomString}`); + + fs.mkdirSync(integTestDir, { recursive: true }); + + try { + await block({ + ...context, + integTestDir, + }); + + // Clean up in case of success + if (process.env.SKIP_CLEANUP) { + context.log(`Left test directory in '${integTestDir}' ($SKIP_CLEANUP)\n`); + } else { + rimraf(integTestDir); + } + } catch (e) { + context.log(`Left test directory in '${integTestDir}'\n`); + throw e; + } + }; +} + diff --git a/packages/@aws-cdk-testing/cli-integ/lib/xpmutex.ts b/packages/@aws-cdk-testing/cli-integ/lib/xpmutex.ts new file mode 100644 index 0000000000000..4687164a1b5ee --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/lib/xpmutex.ts @@ -0,0 +1,218 @@ +import { watch, promises as fs, mkdirSync } from 'fs'; +import * as os from 'os'; +import * as path from 'path'; + +export class XpMutexPool { + public static fromDirectory(directory: string) { + mkdirSync(directory, { recursive: true }); + return new XpMutexPool(directory); + } + + public static fromName(name: string) { + return XpMutexPool.fromDirectory(path.join(os.tmpdir(), name)); + } + + private readonly waitingResolvers = new Set<() => void>(); + private watcher: ReturnType | undefined; + + private constructor(public readonly directory: string) { + this.startWatch(); + } + + public mutex(name: string) { + return new XpMutex(this, name); + } + + /** + * Await an unlock event + * + * (An unlock event is when a file in the directory gets deleted, with a tiny + * random sleep attached to it). + */ + public awaitUnlock(maxWaitMs?: number): Promise { + const wait = new Promise(ok => { + this.waitingResolvers.add(async () => { + await randomSleep(10); + ok(); + }); + }); + + if (maxWaitMs) { + return Promise.race([wait, sleep(maxWaitMs)]); + } else { + return wait; + } + } + + private startWatch() { + this.watcher = watch(this.directory); + (this.watcher as any).unref(); // @types doesn't know about this but it exists + this.watcher.on('change', async (eventType, fname) => { + // Only trigger on 'deletes'. + // After receiving the event, we check if the file exists. + // - If no: the file was deleted! Huzzah, this counts as a wakeup. + // - If yes: either the file was just created (in which case we don't need to wakeup) + // or the event was due to a delete but someone raced us to it and claimed the + // file already (in which case we also don't need to wake up). + if (eventType === 'rename' && !await fileExists(path.join(this.directory, fname.toString()))) { + this.notifyWaiters(); + } + }); + this.watcher.on('error', async (e) => { + // eslint-disable-next-line no-console + console.error(e); + await randomSleep(100); + this.startWatch(); + }); + } + + private notifyWaiters() { + for (const promise of this.waitingResolvers) { + promise(); + } + this.waitingResolvers.clear(); + } +} + +/** + * Cross-process mutex + * + * Uses the presence of a file on disk and `fs.watch` to represent the mutex + * and discover unlocks. + */ +export class XpMutex { + private readonly fileName: string; + + constructor(private readonly pool: XpMutexPool, public readonly mutexName: string) { + this.fileName = path.join(pool.directory, `${mutexName}.mutex`); + } + + /** + * Try to acquire the lock (may fail) + */ + public async tryAcquire(): Promise { + while (true) { + // Acquire lock by being the one to create the file + try { + return await this.writePidFile('wx'); // Fails if the file already exists + } catch (e) { + if (e.code !== 'EEXIST') { throw e; } + } + + // File already exists. Read the contents, see if it's an existent PID (if so, the lock is taken) + const ownerPid = await this.readPidFile(); + if (ownerPid === undefined) { + // File got deleted just now, maybe we can acquire it again + continue; + } + if (processExists(ownerPid)) { + return undefined; + } + + // If not, the lock is stale and will never be released anymore. We may + // delete it and acquire it anyway, but we may be racing someone else trying + // to do the same. Solve this as follows: + // - Try to acquire a lock that gives us permissions to declare the existing lock stale. + // - Sleep a small random period to reduce contention on this operation + await randomSleep(10); + const innerMux = new XpMutex(this.pool, `${this.mutexName}.${ownerPid}`); + const innerLock = await innerMux.tryAcquire(); + if (!innerLock) { + return undefined; + } + + // We may not release the 'inner lock' we used to acquire the rights to declare the other + // lock stale until we release the actual lock itself. If we did, other contenders might + // see it released while they're still in this fallback block and accidentally steal + // from a new legitimate owner. + return this.writePidFile('w', innerLock); // Force write lock file, attach inner lock as well + } + } + + /** + * Acquire the lock, waiting until we can + */ + public async acquire(): Promise { + while (true) { + // Start the wait here, so we don't miss the signal if it comes after + // we try but before we sleep. + // + // We also periodically retry anyway since we may have missed the delete + // signal due to unfortunate timing. + const wait = this.pool.awaitUnlock(5000); + + const lock = await this.acquire(); + if (lock) { + // Ignore the wait (count as handled) + wait.then(() => {}, () => {}); + return lock; + } + + await wait; + await randomSleep(100); + } + } + + private async readPidFile(): Promise { + const deadLine = Date.now() + 1000; + while (Date.now() < deadLine) { + let contents; + try { + contents = await fs.readFile(this.fileName, { encoding: 'utf-8' }); + } catch (e) { + if (e.code === 'ENOENT') { return undefined; } + throw e; + } + + // Retry until we've seen the full contents + if (contents.endsWith('.')) { return parseInt(contents.substring(0, contents.length - 1), 10); } + await sleep(10); + } + + throw new Error(`${this.fileName} was never completely written`); + } + + private async writePidFile(mode: string, additionalLock?: ILock): Promise { + const fd = await fs.open(this.fileName, mode); // May fail if the file already exists + await fd.write(`${process.pid}.`); // Period guards against partial reads + await fd.close(); + + return { + release: async () => { + await fs.unlink(this.fileName); + await additionalLock?.release(); + }, + }; + } +} + +export interface ILock { + release(): Promise; +} + +async function fileExists(fileName: string) { + try { + await fs.stat(fileName); + return true; + } catch (e) { + if (e.code === 'ENOENT') { return false; } + throw e; + } +} + +function processExists(pid: number) { + try { + process.kill(pid, 0); + return true; + } catch (e) { + return false; + } +} + +function sleep(ms: number): Promise { + return new Promise(ok => (setTimeout(ok, ms) as any).unref()); +} + +function randomSleep(ms: number) { + return sleep(Math.floor(Math.random() * ms)); +} diff --git a/packages/@aws-cdk-testing/cli-integ/package.json b/packages/@aws-cdk-testing/cli-integ/package.json new file mode 100644 index 0000000000000..87664899ef841 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/package.json @@ -0,0 +1,73 @@ +{ + "name": "@aws-cdk-testing/cli-integ", + "description": "Integration tests for the AWS CDK CLI", + "version": "0.0.0", + "bin": { + "run-suite": "bin/run-suite", + "download-and-run-old-tests": "bin/download-and-run-old-tests", + "query-github": "bin/query-github", + "apply-patches": "bin/apply-patches", + "test-root": "bin/test-root", + "stage-distribution": "bin/stage-distribution" + }, + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "pkglint": "pkglint -f", + "test": "cdk-test", + "package": "cdk-package", + "build+test": "yarn build && yarn test", + "build+extract": "yarn build", + "build+test+package": "yarn build+test && yarn package", + "build+test+extract": "yarn build+test" + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@types/node": "^14.18.31", + "@aws-cdk/cdk-build-tools": "0.0.0", + "@types/semver": "^7.3.12", + "@types/yargs": "^17.0.13", + "@types/fs-extra": "^9.0.0", + "@types/glob": "^7.2.0", + "@types/npm": "^7.19.0", + "@aws-cdk/pkglint": "0.0.0" + }, + "dependencies": { + "@octokit/rest": "^18.12.0", + "jest": "^27.5.1", + "aws-sdk": "^2.1211.0", + "axios": "^0.27.2", + "jest-junit": "^14.0.0", + "semver": "^7.3.8", + "ts-mock-imports": "^1.3.8", + "yargs": "^17.5.0", + "glob": "^7.2.3", + "p-queue": "^6.6.2", + "fs-extra": "^9.1.0", + "npm": "^8.11.0" + }, + "repository": { + "url": "https://github.com/aws/aws-cdk.git", + "type": "git", + "directory": "packages/@aws-cdk-testing/cli-integ" + }, + "keywords": [ + "aws", + "cdk" + ], + "homepage": "https://github.com/aws/aws-cdk", + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "experimental", + "publishConfig": { + "tag": "latest" + } +} diff --git a/packages/aws-cdk/test/integ/cli/app/app.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js similarity index 100% rename from packages/aws-cdk/test/integ/cli/app/app.js rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js diff --git a/packages/aws-cdk/test/integ/cli/app/cdk.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/cdk.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/app/cdk.json rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/cdk.json diff --git a/packages/aws-cdk/test/integ/cli/app/docker/Dockerfile b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/docker/Dockerfile similarity index 100% rename from packages/aws-cdk/test/integ/cli/app/docker/Dockerfile rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/docker/Dockerfile diff --git a/packages/aws-cdk/test/integ/cli/app/docker/Dockerfile.Custom b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/docker/Dockerfile.Custom similarity index 100% rename from packages/aws-cdk/test/integ/cli/app/docker/Dockerfile.Custom rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/docker/Dockerfile.Custom diff --git a/packages/aws-cdk/test/integ/cli/app/lambda/index.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/lambda/index.js similarity index 100% rename from packages/aws-cdk/test/integ/cli/app/lambda/index.js rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/lambda/index.js diff --git a/packages/aws-cdk/test/integ/cli/app/lambda/response.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/lambda/response.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/app/lambda/response.json rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/lambda/response.json diff --git a/packages/aws-cdk/test/integ/cli/app/nested-stack.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/nested-stack.js similarity index 100% rename from packages/aws-cdk/test/integ/cli/app/nested-stack.js rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/nested-stack.js diff --git a/packages/aws-cdk/test/integ/uberpackage/cfn-include-app/.gitignore b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/cfn-include-app/.gitignore similarity index 100% rename from packages/aws-cdk/test/integ/uberpackage/cfn-include-app/.gitignore rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/cfn-include-app/.gitignore diff --git a/packages/aws-cdk/test/integ/uberpackage/cfn-include-app/cdk.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/cfn-include-app/cdk.json similarity index 100% rename from packages/aws-cdk/test/integ/uberpackage/cfn-include-app/cdk.json rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/cfn-include-app/cdk.json diff --git a/packages/aws-cdk/test/integ/uberpackage/cfn-include-app/cfn-include-app.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/cfn-include-app/cfn-include-app.js similarity index 100% rename from packages/aws-cdk/test/integ/uberpackage/cfn-include-app/cfn-include-app.js rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/cfn-include-app/cfn-include-app.js diff --git a/packages/aws-cdk/test/integ/uberpackage/cfn-include-app/example-template.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/cfn-include-app/example-template.json similarity index 100% rename from packages/aws-cdk/test/integ/uberpackage/cfn-include-app/example-template.json rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/cfn-include-app/example-template.json diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/bin/test-app.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/bin/test-app.js similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/bin/test-app.js rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/bin/test-app.js diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/cdk.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/cdk.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/cdk.json rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/cdk.json diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/lib/nested-stack.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/nested-stack.js similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/lib/nested-stack.js rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/nested-stack.js diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/lib/test-stack.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/test-stack.js similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/lib/test-stack.js rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/test-stack.js diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/.no-packagejson-validator b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/.no-packagejson-validator similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/.no-packagejson-validator rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/.no-packagejson-validator diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/Dockerfile b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/Dockerfile similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/Dockerfile rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/Dockerfile diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/app.js b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/app.js similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/app.js rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/app.js diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/package.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/package.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/package.json rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/docker/DockerImageFunctionConstruct/package.json diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/go/GoFunctionConstruct/go.mod b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/go/GoFunctionConstruct/go.mod similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/go/GoFunctionConstruct/go.mod rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/go/GoFunctionConstruct/go.mod diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/go/GoFunctionConstruct/go.sum b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/go/GoFunctionConstruct/go.sum similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/go/GoFunctionConstruct/go.sum rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/go/GoFunctionConstruct/go.sum diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/go/GoFunctionConstruct/main.go b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/go/GoFunctionConstruct/main.go similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/go/GoFunctionConstruct/main.go rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/go/GoFunctionConstruct/main.go diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/.no-packagejson-validator b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/.no-packagejson-validator similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/.no-packagejson-validator rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/.no-packagejson-validator diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/app.ts b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/app.ts similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/app.ts rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/app.ts diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/package-lock.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/package-lock.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/package-lock.json rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/package-lock.json diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/package.json b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/package.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/package.json rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/nodejs/NodeJsFunctionConstruct/package.json diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/python/Function/app.py b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/python/Function/app.py similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/python/Function/app.py rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/python/Function/app.py diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/python/Function/requirements.txt b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/python/Function/requirements.txt similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/python/Function/requirements.txt rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/python/Function/requirements.txt diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/python/Layer/layer_version_dependency.py b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/python/Layer/layer_version_dependency.py similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/python/Layer/layer_version_dependency.py rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/python/Layer/layer_version_dependency.py diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/python/Layer/requirements.txt b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/python/Layer/requirements.txt similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/python/Layer/requirements.txt rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/python/Layer/requirements.txt diff --git a/packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/rest-api-definition.yaml b/packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/rest-api-definition.yaml similarity index 100% rename from packages/aws-cdk/test/integ/cli/sam_cdk_integ_app/src/rest-api-definition.yaml rename to packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/src/rest-api-definition.yaml diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.119.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.119.0/NOTES.md similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.119.0/NOTES.md rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.119.0/NOTES.md diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.119.0/cli.integtest.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.119.0/cli.integtest.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.119.0/cli.integtest.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.119.0/cli.integtest.js diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.130.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.130.0/NOTES.md similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.130.0/NOTES.md rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.130.0/NOTES.md diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.130.0/app/app.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.130.0/app/app.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.130.0/app/app.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.130.0/app/app.js diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.130.0/bootstrapping.integtest.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.130.0/bootstrapping.integtest.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.130.0/bootstrapping.integtest.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.130.0/bootstrapping.integtest.js diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.44.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.44.0/NOTES.md similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.44.0/NOTES.md rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.44.0/NOTES.md diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.44.0/bootstrapping.integtest.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.44.0/bootstrapping.integtest.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.44.0/bootstrapping.integtest.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.44.0/bootstrapping.integtest.js diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.44.0/test.sh b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.44.0/test.sh similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.44.0/test.sh rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.44.0/test.sh diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.61.1/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.61.1/NOTES.md similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.61.1/NOTES.md rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.61.1/NOTES.md diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.61.1/skip-tests.txt b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.61.1/skip-tests.txt similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.61.1/skip-tests.txt rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.61.1/skip-tests.txt diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.62.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.62.0/NOTES.md similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.62.0/NOTES.md rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.62.0/NOTES.md diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.62.0/aws-helpers.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.62.0/aws-helpers.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.62.0/aws-helpers.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.62.0/aws-helpers.js diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.63.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.63.0/NOTES.md similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.63.0/NOTES.md rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.63.0/NOTES.md diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.63.0/skip-tests.txt b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.63.0/skip-tests.txt similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.63.0/skip-tests.txt rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.63.0/skip-tests.txt diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.64.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.0/NOTES.md similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.64.0/NOTES.md rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.0/NOTES.md diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.64.0/cdk-helpers.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.0/cdk-helpers.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.64.0/cdk-helpers.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.0/cdk-helpers.js diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.64.0/cli.integtest.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.0/cli.integtest.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.64.0/cli.integtest.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.0/cli.integtest.js diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.64.1/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.1/NOTES.md similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.64.1/NOTES.md rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.1/NOTES.md diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.64.1/cdk-helpers.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.1/cdk-helpers.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.64.1/cdk-helpers.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.1/cdk-helpers.js diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.64.1/cli.integtest.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.1/cli.integtest.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.64.1/cli.integtest.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.64.1/cli.integtest.js diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.67.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.67.0/NOTES.md similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.67.0/NOTES.md rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.67.0/NOTES.md diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/v1.67.0/cdk-helpers.js b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.67.0/cdk-helpers.js similarity index 100% rename from packages/aws-cdk/test/integ/cli-regression-patches/v1.67.0/cdk-helpers.js rename to packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v1.67.0/cdk-helpers.js diff --git a/packages/aws-cdk/test/integ/cli/cloud-assemblies/0.36.0/InitStack.template.json b/packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/0.36.0/InitStack.template.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/cloud-assemblies/0.36.0/InitStack.template.json rename to packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/0.36.0/InitStack.template.json diff --git a/packages/aws-cdk/test/integ/cli/cloud-assemblies/0.36.0/cdk.out b/packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/0.36.0/cdk.out similarity index 100% rename from packages/aws-cdk/test/integ/cli/cloud-assemblies/0.36.0/cdk.out rename to packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/0.36.0/cdk.out diff --git a/packages/aws-cdk/test/integ/cli/cloud-assemblies/0.36.0/manifest.json b/packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/0.36.0/manifest.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/cloud-assemblies/0.36.0/manifest.json rename to packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/0.36.0/manifest.json diff --git a/packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-lookup-default-vpc/InitStack.template.json b/packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-lookup-default-vpc/InitStack.template.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-lookup-default-vpc/InitStack.template.json rename to packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-lookup-default-vpc/InitStack.template.json diff --git a/packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-lookup-default-vpc/cdk.out b/packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-lookup-default-vpc/cdk.out similarity index 100% rename from packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-lookup-default-vpc/cdk.out rename to packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-lookup-default-vpc/cdk.out diff --git a/packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-lookup-default-vpc/manifest.json.js b/packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-lookup-default-vpc/manifest.json.js similarity index 100% rename from packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-lookup-default-vpc/manifest.json.js rename to packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-lookup-default-vpc/manifest.json.js diff --git a/packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-request-azs/InitStack.template.json b/packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-request-azs/InitStack.template.json similarity index 100% rename from packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-request-azs/InitStack.template.json rename to packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-request-azs/InitStack.template.json diff --git a/packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-request-azs/cdk.out b/packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-request-azs/cdk.out similarity index 100% rename from packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-request-azs/cdk.out rename to packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-request-azs/cdk.out diff --git a/packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-request-azs/manifest.json.js b/packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-request-azs/manifest.json.js similarity index 100% rename from packages/aws-cdk/test/integ/cli/cloud-assemblies/1.10.0-request-azs/manifest.json.js rename to packages/@aws-cdk-testing/cli-integ/resources/cloud-assemblies/1.10.0-request-azs/manifest.json.js diff --git a/packages/@aws-cdk-testing/cli-integ/resources/integ.jest.config.js b/packages/@aws-cdk-testing/cli-integ/resources/integ.jest.config.js new file mode 100644 index 0000000000000..e72d95ff70da6 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/resources/integ.jest.config.js @@ -0,0 +1,25 @@ +const path = require('path'); + +const rootDir = path.resolve(__dirname, '..', 'tests', process.env.TEST_SUITE_NAME); + +if (rootDir.includes('node_modules')) { + // Jest < 28 under no circumstances supports loading test if there's node_modules anywhere in the path, + // and Jest >= 28 requires a newer TypeScript version than the one we support. + throw new Error(`This package must not be 'npm install'ed (found node_modules in dir: ${rootDir})`); +} + +module.exports = { + rootDir, + testMatch: [`**/*.integtest.js`], + moduleFileExtensions: ["js"], + + testEnvironment: "node", + testTimeout: 300000, + + // Affects test.concurrent(), these are self-limiting anyway + maxConcurrency: 10, + reporters: [ + "default", + [ "jest-junit", { suiteName: "jest tests", outputDirectory: "coverage" } ] + ] +}; diff --git a/packages/aws-cdk/test/integ/helpers/skip-tests.txt b/packages/@aws-cdk-testing/cli-integ/skip-tests.txt similarity index 100% rename from packages/aws-cdk/test/integ/helpers/skip-tests.txt rename to packages/@aws-cdk-testing/cli-integ/skip-tests.txt diff --git a/packages/@aws-cdk-testing/cli-integ/test/resource-pool.test.ts b/packages/@aws-cdk-testing/cli-integ/test/resource-pool.test.ts new file mode 100644 index 0000000000000..18f153778bb5f --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/test/resource-pool.test.ts @@ -0,0 +1,84 @@ +import { sleep } from '../lib'; +import { ResourcePool } from '../lib/resource-pool'; + +const POOL_NAME = 'resource-pool.test'; + +test('take and dispose', async () => { + const pool = ResourcePool.withResources(POOL_NAME, ['a']); + const take1 = pool.take(); + const take2 = pool.take(); + + let released = false; + + const lease1 = await take1; + // awaiting 'take2' would now block but we add an async + // handler to it to flip a boolean to see when it gets activated. + void(take2.then(() => released = true)); + + expect(lease1.value).toEqual('a'); + await waitTick(); + expect(released).toEqual(false); + + await lease1.dispose(); + await waitTick(); // This works because setImmediate is scheduled in LIFO order + + const lease2 = await take2; + await lease2.dispose(); + expect(released).toEqual(true); +}); + +test('double dispose throws', async () => { + const pool = ResourcePool.withResources(POOL_NAME, ['a']); + const lease = await pool.take(); + + await lease.dispose(); + expect(() => lease.dispose()).toThrow(); +}); + +test('somewhat balance', async () => { + const counters = { + a: 0, + b: 0, + c: 0, + d: 0, + e: 0, + }; + const N = 100; + let maxConcurrency = 0; + let concurrency = 0; + + const keys = Object.keys(counters) as Array ; + const pool = ResourcePool.withResources(POOL_NAME, keys); + await Promise.all(Array.from(range(N)).map(() => + pool.using(async (x) => { + counters[x] += 1; + concurrency += 1; + maxConcurrency = Math.max(maxConcurrency, concurrency); + try { + await sleep(10); + } finally { + concurrency -= 1; + } + }), + )); + + // Regardless of which resource(s) we used, the total count should add up to N + const sum = Object.values(counters).reduce((a, b) => a + b, 0); + expect(sum).toEqual(N); + // There was concurrency + expect(maxConcurrency).toBeGreaterThan(2); + // All counters are used + for (const count of Object.values(counters)) { + expect(count).toBeGreaterThan(0); + } +}); + +function waitTick() { + return new Promise(setImmediate); +} + +function* range(n: number) { + for (let i = 0; i < n; i++) { + yield i; + } +} \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/cli/README.md b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/README.md similarity index 99% rename from packages/aws-cdk/test/integ/cli/README.md rename to packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/README.md index 0a174245e8504..a26666bff695e 100644 --- a/packages/aws-cdk/test/integ/cli/README.md +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/README.md @@ -17,7 +17,6 @@ Running against a failing dist build: .../CMkBR4V$ package/test/integ/run-against-dist package/test/integ/cli/test.sh ``` - ## Adding tests Even though tests are now written in TypeScript, this does not diff --git a/packages/aws-cdk/test/integ/cli/bootstrapping.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/bootstrapping.integtest.ts similarity index 98% rename from packages/aws-cdk/test/integ/cli/bootstrapping.integtest.ts rename to packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/bootstrapping.integtest.ts index 037b241f3bc92..4f0c2503b94f8 100644 --- a/packages/aws-cdk/test/integ/cli/bootstrapping.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/bootstrapping.integtest.ts @@ -1,12 +1,11 @@ import * as fs from 'fs'; import * as path from 'path'; -import { randomString, withDefaultFixture } from '../helpers/cdk'; -import { integTest } from '../helpers/test-helpers'; +import { integTest, randomString, withDefaultFixture } from '../../lib'; const timeout = process.env.CODEBUILD_BUILD_ID ? // if the process is running in CodeBuild 3_600_000 : // 1 hour 600_000; // 10 minutes -jest.setTimeout(timeout); +jest.setTimeout(timeout); // Includes the time to acquire locks process.stdout.write(`bootstrapping.integtest.ts: Setting jest time out to ${timeout} ms`); integTest('can bootstrap without execution', withDefaultFixture(async (fixture) => { diff --git a/packages/aws-cdk/test/integ/cli/cli.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts similarity index 93% rename from packages/aws-cdk/test/integ/cli/cli.integtest.ts rename to packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts index bac932e23ea4b..6d868b8f1db33 100644 --- a/packages/aws-cdk/test/integ/cli/cli.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts @@ -1,12 +1,9 @@ import { promises as fs, existsSync } from 'fs'; import * as os from 'os'; import * as path from 'path'; -import { retry, sleep } from '../helpers/aws'; -import { cloneDirectory, MAJOR_VERSION, shell, withDefaultFixture } from '../helpers/cdk'; -import { randomInteger, withSamIntegrationFixture } from '../helpers/sam'; -import { integTest } from '../helpers/test-helpers'; +import { integTest, cloneDirectory, shell, withDefaultFixture, retry, sleep, randomInteger, withSamIntegrationFixture, RESOURCES_DIR } from '../../lib'; -jest.setTimeout(600_000); +jest.setTimeout(60 * 60_000); // Includes the time to acquire locks describe('ci', () => { integTest('output to stderr', withDefaultFixture(async (fixture) => { @@ -486,86 +483,88 @@ integTest('deploy with notification ARN', withDefaultFixture(async (fixture) => } })); -if (MAJOR_VERSION === '1') { - // NOTE: this doesn't currently work with modern-style synthesis, as the bootstrap - // role by default will not have permission to iam:PassRole the created role. - integTest('deploy with role', withDefaultFixture(async (fixture) => { - const roleName = `${fixture.stackNamePrefix}-test-role`; - - await deleteRole(); +// NOTE: this doesn't currently work with modern-style synthesis, as the bootstrap +// role by default will not have permission to iam:PassRole the created role. +integTest('deploy with role', withDefaultFixture(async (fixture) => { + if (fixture.packages.majorVersion() !== '1') { + return; // Nothing to do + } - const createResponse = await fixture.aws.iam('createRole', { + const roleName = `${fixture.stackNamePrefix}-test-role`; + + await deleteRole(); + + const createResponse = await fixture.aws.iam('createRole', { + RoleName: roleName, + AssumeRolePolicyDocument: JSON.stringify({ + Version: '2012-10-17', + Statement: [{ + Action: 'sts:AssumeRole', + Principal: { Service: 'cloudformation.amazonaws.com' }, + Effect: 'Allow', + }, { + Action: 'sts:AssumeRole', + Principal: { AWS: (await fixture.aws.sts('getCallerIdentity', {})).Arn }, + Effect: 'Allow', + }], + }), + }); + const roleArn = createResponse.Role.Arn; + try { + await fixture.aws.iam('putRolePolicy', { RoleName: roleName, - AssumeRolePolicyDocument: JSON.stringify({ + PolicyName: 'DefaultPolicy', + PolicyDocument: JSON.stringify({ Version: '2012-10-17', Statement: [{ - Action: 'sts:AssumeRole', - Principal: { Service: 'cloudformation.amazonaws.com' }, - Effect: 'Allow', - }, { - Action: 'sts:AssumeRole', - Principal: { AWS: (await fixture.aws.sts('getCallerIdentity', {})).Arn }, + Action: '*', + Resource: '*', Effect: 'Allow', }], }), }); - const roleArn = createResponse.Role.Arn; - try { - await fixture.aws.iam('putRolePolicy', { - RoleName: roleName, - PolicyName: 'DefaultPolicy', - PolicyDocument: JSON.stringify({ - Version: '2012-10-17', - Statement: [{ - Action: '*', - Resource: '*', - Effect: 'Allow', - }], - }), - }); - await retry(fixture.output, 'Trying to assume fresh role', retry.forSeconds(300), async () => { - await fixture.aws.sts('assumeRole', { - RoleArn: roleArn, - RoleSessionName: 'testing', - }); + await retry(fixture.output, 'Trying to assume fresh role', retry.forSeconds(300), async () => { + await fixture.aws.sts('assumeRole', { + RoleArn: roleArn, + RoleSessionName: 'testing', }); + }); - // In principle, the role has replicated from 'us-east-1' to wherever we're testing. - // Give it a little more sleep to make sure CloudFormation is not hitting a box - // that doesn't have it yet. - await sleep(5000); + // In principle, the role has replicated from 'us-east-1' to wherever we're testing. + // Give it a little more sleep to make sure CloudFormation is not hitting a box + // that doesn't have it yet. + await sleep(5000); - await fixture.cdkDeploy('test-2', { - options: ['--role-arn', roleArn], - }); + await fixture.cdkDeploy('test-2', { + options: ['--role-arn', roleArn], + }); - // Immediately delete the stack again before we delete the role. - // - // Since roles are sticky, if we delete the role before the stack, subsequent DeleteStack - // operations will fail when CloudFormation tries to assume the role that's already gone. - await fixture.cdkDestroy('test-2'); + // Immediately delete the stack again before we delete the role. + // + // Since roles are sticky, if we delete the role before the stack, subsequent DeleteStack + // operations will fail when CloudFormation tries to assume the role that's already gone. + await fixture.cdkDestroy('test-2'); - } finally { - await deleteRole(); - } + } finally { + await deleteRole(); + } - async function deleteRole() { - try { - for (const policyName of (await fixture.aws.iam('listRolePolicies', { RoleName: roleName })).PolicyNames) { - await fixture.aws.iam('deleteRolePolicy', { - RoleName: roleName, - PolicyName: policyName, - }); - } - await fixture.aws.iam('deleteRole', { RoleName: roleName }); - } catch (e) { - if (e.message.indexOf('cannot be found') > -1) { return; } - throw e; + async function deleteRole() { + try { + for (const policyName of (await fixture.aws.iam('listRolePolicies', { RoleName: roleName })).PolicyNames) { + await fixture.aws.iam('deleteRolePolicy', { + RoleName: roleName, + PolicyName: policyName, + }); } + await fixture.aws.iam('deleteRole', { RoleName: roleName }); + } catch (e) { + if (e.message.indexOf('cannot be found') > -1) { return; } + throw e; } - })); -} + } +})); integTest('cdk diff', withDefaultFixture(async (fixture) => { const diff1 = await fixture.cdk(['diff', fixture.fullStackName('test-1')]); @@ -791,7 +790,7 @@ integTest('failed deploy does not hang', withDefaultFixture(async (fixture) => { integTest('can still load old assemblies', withDefaultFixture(async (fixture) => { const cxAsmDir = path.join(os.tmpdir(), 'cdk-integ-cx'); - const testAssembliesDirectory = path.join(__dirname, 'cloud-assemblies'); + const testAssembliesDirectory = path.join(RESOURCES_DIR, 'cloud-assemblies'); for (const asmdir of await listChildDirs(testAssembliesDirectory)) { fixture.log(`ASSEMBLY ${asmdir}`); await cloneDirectory(asmdir, cxAsmDir); diff --git a/packages/@aws-cdk-testing/cli-integ/tests/init-csharp/init-csharp.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/init-csharp/init-csharp.integtest.ts new file mode 100644 index 0000000000000..a36b1d628347e --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/tests/init-csharp/init-csharp.integtest.ts @@ -0,0 +1,16 @@ +import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib'; + +['app', 'sample-app'].forEach(template => { + integTest(`init C♯ ${template}`, withTemporaryDirectory(withPackages(async (context) => { + context.packages.assertJsiiPackagesAvailable(); + + const shell = ShellHelper.fromContext(context); + await context.packages.makeCliAvailable(); + + await shell.shell(['cdk', 'init', '-l', 'csharp', template]); + await context.packages.initializeDotnetPackages(context.integTestDir); + await shell.shell(['cdk', 'synth']); + }))); +}); + + diff --git a/packages/@aws-cdk-testing/cli-integ/tests/init-fsharp/init-fsharp.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/init-fsharp/init-fsharp.integtest.ts new file mode 100644 index 0000000000000..fdc1fca2d4cd1 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/tests/init-fsharp/init-fsharp.integtest.ts @@ -0,0 +1,15 @@ +import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib'; + +['app', 'sample-app'].forEach(template => { + integTest(`init F♯ ${template}`, withTemporaryDirectory(withPackages(async (context) => { + context.packages.assertJsiiPackagesAvailable(); + + const shell = ShellHelper.fromContext(context); + await context.packages.makeCliAvailable(); + + await shell.shell(['cdk', 'init', '-l', 'fsharp', template]); + await context.packages.initializeDotnetPackages(context.integTestDir); + await shell.shell(['cdk', 'synth']); + }))); +}); + diff --git a/packages/@aws-cdk-testing/cli-integ/tests/init-java/init-java.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/init-java/init-java.integtest.ts new file mode 100644 index 0000000000000..48d5b38b1e2db --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/tests/init-java/init-java.integtest.ts @@ -0,0 +1,14 @@ +import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib'; + +['app', 'sample-app'].forEach(template => { + integTest(`init java ${template}`, withTemporaryDirectory(withPackages(async (context) => { + context.packages.assertJsiiPackagesAvailable(); + + const shell = ShellHelper.fromContext(context); + await context.packages.makeCliAvailable(); + + await shell.shell(['cdk', 'init', '-l', 'java', template]); + await shell.shell(['mvn', 'package']); + await shell.shell(['cdk', 'synth']); + }))); +}); diff --git a/packages/@aws-cdk-testing/cli-integ/tests/init-javascript/init-javascript.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/init-javascript/init-javascript.integtest.ts new file mode 100644 index 0000000000000..8fc4be4bf64fb --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/tests/init-javascript/init-javascript.integtest.ts @@ -0,0 +1,15 @@ +import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib'; + +['app', 'sample-app'].forEach(template => { + integTest(`init javascript ${template}`, withTemporaryDirectory(withPackages(async (context) => { + const shell = ShellHelper.fromContext(context); + await context.packages.makeCliAvailable(); + + await shell.shell(['cdk', 'init', '-l', 'javascript', template]); + await shell.shell(['npm', 'prune']); + await shell.shell(['npm', 'ls']); // this will fail if we have unmet peer dependencies + await shell.shell(['npm', 'run', 'test']); + + await shell.shell(['cdk', 'synth']); + }))); +}); diff --git a/packages/@aws-cdk-testing/cli-integ/tests/init-python/init-python.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/init-python/init-python.integtest.ts new file mode 100644 index 0000000000000..f7839fd9a0e15 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/tests/init-python/init-python.integtest.ts @@ -0,0 +1,20 @@ +import * as path from 'path'; +import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib'; + +['app', 'sample-app'].forEach(template => { + integTest(`init python ${template}`, withTemporaryDirectory(withPackages(async (context) => { + context.packages.assertJsiiPackagesAvailable(); + + const shell = ShellHelper.fromContext(context); + await context.packages.makeCliAvailable(); + + await shell.shell(['cdk', 'init', '-l', 'python', template]); + const venvPath = path.resolve(context.integTestDir, '.venv'); + const venv = { PATH: `${venvPath}/bin:${process.env.PATH}`, VIRTUAL_ENV: venvPath }; + + await shell.shell([`${venvPath}/bin/pip`, 'install', '-r', 'requirements.txt'], { modEnv: venv }); + await shell.shell([`${venvPath}/bin/pip`, 'install', '-r', 'requirements-dev.txt'], { modEnv: venv }); + await shell.shell([`${venvPath}/bin/pytest`], { modEnv: venv }); + await shell.shell(['cdk', 'synth'], { modEnv: venv }); + }))); +}); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/tests/init-typescript-app/init-typescript-app.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/init-typescript-app/init-typescript-app.integtest.ts new file mode 100644 index 0000000000000..158764ef3c973 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/tests/init-typescript-app/init-typescript-app.integtest.ts @@ -0,0 +1,58 @@ +import { promises as fs } from 'fs'; +import * as path from 'path'; +import { integTest, withTemporaryDirectory, ShellHelper, withPackages, TemporaryDirectoryContext } from '../../lib'; +import { typescriptVersionsSync } from '../../lib/npm'; + +['app', 'sample-app'].forEach(template => { + integTest(`typescript init ${template}`, withTemporaryDirectory(withPackages(async (context) => { + const shell = ShellHelper.fromContext(context); + await context.packages.makeCliAvailable(); + + await shell.shell(['cdk', 'init', '-l', 'typescript', template]); + + await shell.shell(['npm', 'prune']); + await shell.shell(['npm', 'ls']); // this will fail if we have unmet peer dependencies + await shell.shell(['npm', 'run', 'build']); + await shell.shell(['npm', 'run', 'test']); + + await shell.shell(['cdk', 'synth']); + }))); +}); + +/** + * Test our generated code with various versions of TypeScript + */ +typescriptVersionsSync().forEach(tsVersion => { + integTest(`typescript ${tsVersion} init app`, withTemporaryDirectory(withPackages(async (context) => { + const shell = ShellHelper.fromContext(context); + await context.packages.makeCliAvailable(); + + await shell.shell(['node', '--version']); + await shell.shell(['npm', '--version']); + + await shell.shell(['cdk', 'init', '-l', 'typescript', 'app', '--generate-only']); + + // Necessary because recent versions of ts-jest require TypeScript>=4.3 but we + // still want to test with older versions as well. + await removeDevDependencies(context); + + await shell.shell(['npm', 'install', '--save-dev', `typescript@${tsVersion}`]); + await shell.shell(['npm', 'install']); // Older versions of npm require this to be a separate step from the one above + await shell.shell(['npx', 'tsc', '--version']); + await shell.shell(['npm', 'prune']); + await shell.shell(['npm', 'ls']); // this will fail if we have unmet peer dependencies + + // We just removed the 'jest' dependency so remove the tests as well because they won't compile + await shell.shell(['rm', '-rf', 'test/']); + + await shell.shell(['npm', 'run', 'build']); + await shell.shell(['cdk', 'synth']); + }))); +}); + +async function removeDevDependencies(context: TemporaryDirectoryContext) { + const filename = path.join(context.integTestDir, 'package.json'); + const pj = JSON.parse(await fs.readFile(filename, { encoding: 'utf-8' })); + delete pj.devDependencies; + await fs.writeFile(filename, JSON.stringify(pj, undefined, 2), { encoding: 'utf-8' }); +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/tests/init-typescript-lib/init-typescript-lib.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/init-typescript-lib/init-typescript-lib.integtest.ts new file mode 100644 index 0000000000000..12472c82709cc --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/tests/init-typescript-lib/init-typescript-lib.integtest.ts @@ -0,0 +1,13 @@ +import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib'; + +integTest('typescript init lib', withTemporaryDirectory(withPackages(async (context) => { + const shell = ShellHelper.fromContext(context); + await context.packages.makeCliAvailable(); + + await shell.shell(['cdk', 'init', '-l', 'typescript', 'lib']); + + await shell.shell(['npm', 'prune']); + await shell.shell(['npm', 'ls']); // this will fail if we have unmet peer dependencies + await shell.shell(['npm', 'run', 'build']); + await shell.shell(['npm', 'run', 'test']); +}))); \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/uberpackage/uberpackage.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/uberpackage/uberpackage.integtest.ts similarity index 69% rename from packages/aws-cdk/test/integ/uberpackage/uberpackage.integtest.ts rename to packages/@aws-cdk-testing/cli-integ/tests/uberpackage/uberpackage.integtest.ts index 6521e4c8113a0..ee924b783f377 100644 --- a/packages/aws-cdk/test/integ/uberpackage/uberpackage.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/uberpackage/uberpackage.integtest.ts @@ -1,5 +1,4 @@ -import { withMonolithicCfnIncludeCdkApp } from '../helpers/cdk'; -import { integTest } from '../helpers/test-helpers'; +import { integTest, withMonolithicCfnIncludeCdkApp } from '../../lib'; jest.setTimeout(600_000); diff --git a/packages/@aws-cdk-testing/cli-integ/tsconfig.json b/packages/@aws-cdk-testing/cli-integ/tsconfig.json new file mode 100644 index 0000000000000..f03765e562835 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": ["es2019", "es2020", "dom"], + "strict": true, + "alwaysStrict": true, + "declaration": true, + "inlineSourceMap": true, + "inlineSources": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "resolveJsonModule": true, + "composite": true, + "incremental": true + }, + "include": [ + "**/*.ts", + "**/*.d.ts" + ], + "exclude": [ + "resources/**/*" + ] +} diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index 52d041f0c2fe8..815a1b7ab0699 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -258,7 +258,7 @@ import * as opensearch from '@aws-cdk/aws-opensearchservice'; const user = new iam.User(this, 'User'); const domain = new opensearch.Domain(this, 'Domain', { - version: opensearch.EngineVersion.OPENSEARCH_1_3, + version: opensearch.EngineVersion.OPENSEARCH_2_3, removalPolicy: RemovalPolicy.DESTROY, fineGrainedAccessControl: { masterUserArn: user.userArn }, encryptionAtRest: { enabled: true }, diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.assets.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.assets.json index a7da3cc32abc0..4779f5cbb1c5c 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.assets.json @@ -1,7 +1,7 @@ { - "version": "22.0.0", + "version": "29.0.0", "files": { - "cbf69265acb5253067d9fc78cec3e7b151737dc0ba84d10aedd04a2c12f84bc4": { + "f8a2a9f9e0d429354b6c00646ad4364f5e46ab6ceecf270d2ff59b9befcba8b5": { "source": { "path": "appsync-opensearch.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cbf69265acb5253067d9fc78cec3e7b151737dc0ba84d10aedd04a2c12f84bc4.json", + "objectKey": "f8a2a9f9e0d429354b6c00646ad4364f5e46ab6ceecf270d2ff59b9befcba8b5.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-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.template.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.template.json index 9b3b8ea1cb382..d754b3115a94f 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.template.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/appsync-opensearch.template.json @@ -36,7 +36,7 @@ "EncryptionAtRestOptions": { "Enabled": true }, - "EngineVersion": "OpenSearch_1.3", + "EngineVersion": "OpenSearch_2.3", "LogPublishingOptions": {}, "NodeToNodeEncryptionOptions": { "Enabled": true diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/cdk.out index 145739f539580..d8b441d447f8a 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.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-appsync/test/integ.graphql-opensearch.js.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/integ.json index 9082fbbe8ed5d..bb6303b9a3102 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "22.0.0", + "version": "29.0.0", "testCases": { - "integ.graphql-opensearch": { + "opensearch-2.3-stack/DefaultTest": { "stacks": [ "appsync-opensearch" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "opensearch-2.3-stack/DefaultTest/DeployAssert", + "assertionStackName": "opensearch23stackDefaultTestDeployAssert16E12129" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/manifest.json index 81e53a3ee447f..b2fd7635f79eb 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "29.0.0", "artifacts": { "appsync-opensearch.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}/cbf69265acb5253067d9fc78cec3e7b151737dc0ba84d10aedd04a2c12f84bc4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f8a2a9f9e0d429354b6c00646ad4364f5e46ab6ceecf270d2ff59b9befcba8b5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -98,18 +98,56 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ] + }, + "displayName": "appsync-opensearch" + }, + "opensearch23stackDefaultTestDeployAssert16E12129.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "opensearch23stackDefaultTestDeployAssert16E12129.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "opensearch23stackDefaultTestDeployAssert16E12129": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "opensearch23stackDefaultTestDeployAssert16E12129.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": [ + "opensearch23stackDefaultTestDeployAssert16E12129.assets" ], - "apidsQuerygetTestsResolver5C6FBB59": [ + "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": [ + "opensearch23stackDefaultTestDeployAssert16E12129.assets" + ], + "metadata": { + "/opensearch-2.3-stack/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/opensearch-2.3-stack/DefaultTest/DeployAssert/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "apidsQuerygetTestsResolver5C6FBB59", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "CheckBootstrapVersion" } ] }, - "displayName": "appsync-opensearch" + "displayName": "opensearch-2.3-stack/DefaultTest/DeployAssert" }, "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/opensearch23stackDefaultTestDeployAssert16E12129.assets.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/opensearch23stackDefaultTestDeployAssert16E12129.assets.json new file mode 100644 index 0000000000000..b3ad2c593e0e2 --- /dev/null +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/opensearch23stackDefaultTestDeployAssert16E12129.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "opensearch23stackDefaultTestDeployAssert16E12129.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-appsync/test/integ.graphql-opensearch.js.snapshot/opensearch23stackDefaultTestDeployAssert16E12129.template.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/opensearch23stackDefaultTestDeployAssert16E12129.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/opensearch23stackDefaultTestDeployAssert16E12129.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-appsync/test/integ.graphql-opensearch.js.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/tree.json index 7c9f3a92a3545..038e752c0e9d7 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.js.snapshot/tree.json @@ -70,7 +70,7 @@ "encryptionAtRestOptions": { "enabled": true }, - "engineVersion": "OpenSearch_1.3", + "engineVersion": "OpenSearch_2.3", "logPublishingOptions": {}, "nodeToNodeEncryptionOptions": { "enabled": true @@ -383,12 +383,66 @@ "version": "0.0.0" } }, + "opensearch-2.3-stack": { + "id": "opensearch-2.3-stack", + "path": "opensearch-2.3-stack", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "opensearch-2.3-stack/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "opensearch-2.3-stack/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.209" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "opensearch-2.3-stack/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "opensearch-2.3-stack/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "opensearch-2.3-stack/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" + "version": "10.1.209" } } }, diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts index 67d283b7ca1e6..daf75dad88555 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-opensearch.ts @@ -2,65 +2,78 @@ import * as path from 'path'; import { User } from '@aws-cdk/aws-iam'; import * as opensearch from '@aws-cdk/aws-opensearchservice'; import * as cdk from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; +import { Construct } from 'constructs'; import * as appsync from '../lib'; -const app = new cdk.App(); -const stack = new cdk.Stack(app, 'appsync-opensearch'); -const user = new User(stack, 'User'); -const domain = new opensearch.Domain(stack, 'Domain', { - version: opensearch.EngineVersion.OPENSEARCH_1_3, - removalPolicy: cdk.RemovalPolicy.DESTROY, - fineGrainedAccessControl: { - masterUserArn: user.userArn, - }, - encryptionAtRest: { - enabled: true, - }, - nodeToNodeEncryption: true, - enforceHttps: true, -}); - -const api = new appsync.GraphqlApi(stack, 'api', { - name: 'api', - schema: appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql')), -}); +class OpensSearch23Stack extends cdk.Stack { + constructor(scope: Construct) { + super(scope, 'appsync-opensearch'); -const ds = api.addOpenSearchDataSource('ds', domain); + const user = new User(this, 'User'); -ds.createResolver('QueryGetTests', { - typeName: 'Query', - fieldName: 'getTests', - requestMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ - version: '2017-02-28', - operation: 'GET', - path: '/id/post/_search', - params: { - headers: {}, - queryString: {}, - body: { - from: 0, - size: 50, + const domain = new opensearch.Domain(this, 'Domain', { + version: opensearch.EngineVersion.OPENSEARCH_2_3, + removalPolicy: cdk.RemovalPolicy.DESTROY, + fineGrainedAccessControl: { + masterUserArn: user.userArn, }, - }, - })), - responseMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ - version: '2017-02-28', - operation: 'GET', - path: '/id/post/_search', - params: { - headers: {}, - queryString: {}, - body: { - from: 0, - size: 50, - query: { - term: { - author: '$util.toJson($context.arguments.author)', + encryptionAtRest: { + enabled: true, + }, + nodeToNodeEncryption: true, + enforceHttps: true, + }); + + const api = new appsync.GraphqlApi(this, 'api', { + name: 'api', + schema: appsync.SchemaFile.fromAsset(path.join(__dirname, 'appsync.test.graphql')), + }); + + const ds = api.addOpenSearchDataSource('ds', domain); + + ds.createResolver('QueryGetTests', { + typeName: 'Query', + fieldName: 'getTests', + requestMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ + version: '2017-02-28', + operation: 'GET', + path: '/id/post/_search', + params: { + headers: {}, + queryString: {}, + body: { + from: 0, + size: 50, }, }, - }, - }, - })), + })), + responseMappingTemplate: appsync.MappingTemplate.fromString(JSON.stringify({ + version: '2017-02-28', + operation: 'GET', + path: '/id/post/_search', + params: { + headers: {}, + queryString: {}, + body: { + from: 0, + size: 50, + query: { + term: { + author: '$util.toJson($context.arguments.author)', + }, + }, + }, + }, + })), + }); + } +} + +const app = new cdk.App(); +const testCase = new OpensSearch23Stack(app); +new IntegTest(app, 'opensearch-2.3-stack', { + testCases: [testCase], }); 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 8b818d1b82425..94fb18189e3b7 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 @@ -43,7 +43,7 @@ "jest": "^27.5.1", "lambda-tester": "^3.6.0", "sinon": "^9.2.4", - "nock": "^13.2.9", + "nock": "^13.3.0", "ts-jest": "^27.1.5" } } diff --git a/packages/@aws-cdk/aws-cloudtrail/lib/cloudtrail.ts b/packages/@aws-cdk/aws-cloudtrail/lib/cloudtrail.ts index 8161e56fab336..1838a043429bb 100644 --- a/packages/@aws-cdk/aws-cloudtrail/lib/cloudtrail.ts +++ b/packages/@aws-cdk/aws-cloudtrail/lib/cloudtrail.ts @@ -235,6 +235,7 @@ export class Trail extends Resource { public readonly logGroup?: logs.ILogGroup; private s3bucket: s3.IBucket; + private managementEvents: ReadWriteType | undefined; private eventSelectors: EventSelector[] = []; private topic: sns.ITopic | undefined; private insightTypeValues: InsightSelector[] | undefined; @@ -289,20 +290,14 @@ export class Trail extends Resource { })); } - if (props.managementEvents) { - let managementEvent; - if (props.managementEvents === ReadWriteType.NONE) { - managementEvent = { - includeManagementEvents: false, - }; - } else { - managementEvent = { - includeManagementEvents: true, - readWriteType: props.managementEvents, - }; - } - this.eventSelectors.push(managementEvent); + this.managementEvents = props.managementEvents; + if (this.managementEvents && this.managementEvents !== ReadWriteType.NONE) { + this.eventSelectors.push({ + includeManagementEvents: true, + readWriteType: props.managementEvents, + }); } + this.node.addValidation({ validate: () => this.validateEventSelectors() }); if (props.kmsKey && props.encryptionKey) { throw new Error('Both kmsKey and encryptionKey must not be specified. Use only encryptionKey'); @@ -373,12 +368,17 @@ export class Trail extends Resource { throw new Error('A maximum of 5 event selectors are supported per trail.'); } + let includeAllManagementEvents; + if (this.managementEvents === ReadWriteType.NONE) { + includeAllManagementEvents = false; + } + this.eventSelectors.push({ dataResources: [{ type: dataResourceType, values: dataResourceValues, }], - includeManagementEvents: options.includeManagementEvents, + includeManagementEvents: options.includeManagementEvents ?? includeAllManagementEvents, excludeManagementEventSources: options.excludeManagementEventSources, readWriteType: options.readWriteType, }); @@ -403,7 +403,7 @@ export class Trail extends Resource { } /** - * Log all Lamda data events for all lambda functions the account. + * Log all Lambda data events for all lambda functions the account. * @see https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html * @default false */ @@ -451,6 +451,15 @@ export class Trail extends Resource { public onCloudTrailEvent(id: string, options: events.OnEventOptions = {}): events.Rule { return Trail.onEvent(this, id, options); } + + private validateEventSelectors(): string[] { + const errors: string[] = []; + // Ensure that there is at least one event selector when management events are set to None + if (this.managementEvents === ReadWriteType.NONE && this.eventSelectors.length === 0) { + errors.push('At least one event selector must be added when management event recording is set to None'); + } + return errors; + } } /** diff --git a/packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.test.ts b/packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.test.ts index c041a674621e6..a026f732793ab 100644 --- a/packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.test.ts +++ b/packages/@aws-cdk/aws-cloudtrail/test/cloudtrail.test.ts @@ -625,19 +625,77 @@ describe('cloudtrail', () => { }); }); - test('managementEvents set to None correctly turns off management events', () => { + test('not provided and managementEvents set to None throws missing event selectors error', () => { const stack = getTestStack(); new Trail(stack, 'MyAmazingCloudTrail', { managementEvents: ReadWriteType.NONE, }); + expect(() => { + Template.fromStack(stack); + }).toThrowError(/At least one event selector must be added when management event recording is set to None/); + }); + + test('defaults to not include management events when managementEvents set to None', () => { + const stack = getTestStack(); + + const cloudTrail = new Trail(stack, 'MyAmazingCloudTrail', { + managementEvents: ReadWriteType.NONE, + }); + + const bucket = new s3.Bucket(stack, 'testBucket', { bucketName: 'test-bucket' }); + cloudTrail.addS3EventSelector([{ bucket }]); + Template.fromStack(stack).hasResourceProperties('AWS::CloudTrail::Trail', { - EventSelectors: [ - { - IncludeManagementEvents: false, - }, - ], + EventSelectors: [{ + DataResources: [{ + Type: 'AWS::S3::Object', + Values: [{ + 'Fn::Join': [ + '', + [ + { 'Fn::GetAtt': ['testBucketDF4D7D1A', 'Arn'] }, + '/', + ], + ], + }], + }], + IncludeManagementEvents: false, + }], + }); + }); + + test('includeManagementEvents can be overridden when managementEvents set to None', () => { + const stack = getTestStack(); + + const cloudTrail = new Trail(stack, 'MyAmazingCloudTrail', { + managementEvents: ReadWriteType.NONE, + }); + + const bucket = new s3.Bucket(stack, 'testBucket', { bucketName: 'test-bucket' }); + cloudTrail.addS3EventSelector([{ bucket }], { + includeManagementEvents: true, + readWriteType: ReadWriteType.WRITE_ONLY, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CloudTrail::Trail', { + EventSelectors: [{ + DataResources: [{ + Type: 'AWS::S3::Object', + Values: [{ + 'Fn::Join': [ + '', + [ + { 'Fn::GetAtt': ['testBucketDF4D7D1A', 'Arn'] }, + '/', + ], + ], + }], + }], + IncludeManagementEvents: true, + ReadWriteType: 'WriteOnly', + }], }); }); diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.assets.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.assets.json new file mode 100644 index 0000000000000..9534dc22f99f2 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.assets.json @@ -0,0 +1,19 @@ +{ + "version": "22.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.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-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.template.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.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-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/cdk.out b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/cdk.out new file mode 100644 index 0000000000000..145739f539580 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/integ-cloudtrail-data-events.assets.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/integ-cloudtrail-data-events.assets.json new file mode 100644 index 0000000000000..56a8815860665 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/integ-cloudtrail-data-events.assets.json @@ -0,0 +1,19 @@ +{ + "version": "22.0.0", + "files": { + "1e43b2272a716f06e79a67fe7810bd64d2c4f198ec606c15bac1ce856e05dbbc": { + "source": { + "path": "integ-cloudtrail-data-events.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1e43b2272a716f06e79a67fe7810bd64d2c4f198ec606c15bac1ce856e05dbbc.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-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/integ-cloudtrail-data-events.template.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/integ-cloudtrail-data-events.template.json new file mode 100644 index 0000000000000..50ddad982e7c2 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/integ-cloudtrail-data-events.template.json @@ -0,0 +1,245 @@ +{ + "Resources": { + "Bucket83908E77": { + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "LambdaFunctionServiceRoleC555A460": { + "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" + ] + ] + } + ] + } + }, + "LambdaFunctionBF21E41F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "exports.handler = {}" + }, + "Role": { + "Fn::GetAtt": [ + "LambdaFunctionServiceRoleC555A460", + "Arn" + ] + }, + "Handler": "hello.handler", + "Runtime": "nodejs18.x" + }, + "DependsOn": [ + "LambdaFunctionServiceRoleC555A460" + ] + }, + "TrailS30071F172": { + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "TrailS3PolicyE42170FE": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "TrailS30071F172" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "s3:GetBucketAcl", + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + } + }, + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control" + } + }, + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "Trail022F0CF2": { + "Type": "AWS::CloudTrail::Trail", + "Properties": { + "IsLogging": true, + "S3BucketName": { + "Ref": "TrailS30071F172" + }, + "EnableLogFileValidation": true, + "EventSelectors": [ + { + "DataResources": [ + { + "Type": "AWS::Lambda::Function", + "Values": [ + { + "Fn::GetAtt": [ + "LambdaFunctionBF21E41F", + "Arn" + ] + } + ] + } + ], + "IncludeManagementEvents": false + }, + { + "DataResources": [ + { + "Type": "AWS::S3::Object", + "Values": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Bucket83908E77", + "Arn" + ] + }, + "/" + ] + ] + } + ] + } + ], + "IncludeManagementEvents": false + } + ], + "IncludeGlobalServiceEvents": true, + "IsMultiRegionTrail": true + }, + "DependsOn": [ + "TrailS3PolicyE42170FE" + ] + } + }, + "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-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/integ.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/integ.json new file mode 100644 index 0000000000000..f4758e7039103 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "22.0.0", + "testCases": { + "CloudTrailDataEventsOnlyTest/DefaultTest": { + "stacks": [ + "integ-cloudtrail-data-events" + ], + "assertionStack": "CloudTrailDataEventsOnlyTest/DefaultTest/DeployAssert", + "assertionStackName": "CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/manifest.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/manifest.json new file mode 100644 index 0000000000000..b27cfab19b9e8 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/manifest.json @@ -0,0 +1,141 @@ +{ + "version": "22.0.0", + "artifacts": { + "integ-cloudtrail-data-events.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integ-cloudtrail-data-events.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integ-cloudtrail-data-events": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integ-cloudtrail-data-events.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}/1e43b2272a716f06e79a67fe7810bd64d2c4f198ec606c15bac1ce856e05dbbc.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "integ-cloudtrail-data-events.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-cloudtrail-data-events.assets" + ], + "metadata": { + "/integ-cloudtrail-data-events/Bucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Bucket83908E77" + } + ], + "/integ-cloudtrail-data-events/LambdaFunction/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaFunctionServiceRoleC555A460" + } + ], + "/integ-cloudtrail-data-events/LambdaFunction/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaFunctionBF21E41F" + } + ], + "/integ-cloudtrail-data-events/Trail/S3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TrailS30071F172" + } + ], + "/integ-cloudtrail-data-events/Trail/S3/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TrailS3PolicyE42170FE" + } + ], + "/integ-cloudtrail-data-events/Trail/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Trail022F0CF2" + } + ], + "/integ-cloudtrail-data-events/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-cloudtrail-data-events/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-cloudtrail-data-events" + }, + "CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.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": [ + "CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.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": [ + "CloudTrailDataEventsOnlyTestDefaultTestDeployAssertA7E52868.assets" + ], + "metadata": { + "/CloudTrailDataEventsOnlyTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/CloudTrailDataEventsOnlyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "CloudTrailDataEventsOnlyTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/tree.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/tree.json new file mode 100644 index 0000000000000..99b8d7131da0c --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.js.snapshot/tree.json @@ -0,0 +1,416 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "integ-cloudtrail-data-events": { + "id": "integ-cloudtrail-data-events", + "path": "integ-cloudtrail-data-events", + "children": { + "Bucket": { + "id": "Bucket", + "path": "integ-cloudtrail-data-events/Bucket", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-cloudtrail-data-events/Bucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "LambdaFunction": { + "id": "LambdaFunction", + "path": "integ-cloudtrail-data-events/LambdaFunction", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-cloudtrail-data-events/LambdaFunction/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-cloudtrail-data-events/LambdaFunction/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-cloudtrail-data-events/LambdaFunction/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" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-cloudtrail-data-events/LambdaFunction/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "zipFile": "exports.handler = {}" + }, + "role": { + "Fn::GetAtt": [ + "LambdaFunctionServiceRoleC555A460", + "Arn" + ] + }, + "handler": "hello.handler", + "runtime": "nodejs18.x" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-lambda.Function", + "version": "0.0.0" + } + }, + "Trail": { + "id": "Trail", + "path": "integ-cloudtrail-data-events/Trail", + "children": { + "S3": { + "id": "S3", + "path": "integ-cloudtrail-data-events/Trail/S3", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-cloudtrail-data-events/Trail/S3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "integ-cloudtrail-data-events/Trail/S3/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-cloudtrail-data-events/Trail/S3/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "TrailS30071F172" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "s3:GetBucketAcl", + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + } + }, + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control" + } + }, + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-cloudtrail-data-events/Trail/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudTrail::Trail", + "aws:cdk:cloudformation:props": { + "isLogging": true, + "s3BucketName": { + "Ref": "TrailS30071F172" + }, + "enableLogFileValidation": true, + "eventSelectors": [ + { + "dataResources": [ + { + "type": "AWS::Lambda::Function", + "values": [ + { + "Fn::GetAtt": [ + "LambdaFunctionBF21E41F", + "Arn" + ] + } + ] + } + ], + "includeManagementEvents": false + }, + { + "dataResources": [ + { + "type": "AWS::S3::Object", + "values": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Bucket83908E77", + "Arn" + ] + }, + "/" + ] + ] + } + ] + } + ], + "includeManagementEvents": false + } + ], + "includeGlobalServiceEvents": true, + "isMultiRegionTrail": true + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudtrail.CfnTrail", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudtrail.Trail", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-cloudtrail-data-events/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-cloudtrail-data-events/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "CloudTrailDataEventsOnlyTest": { + "id": "CloudTrailDataEventsOnlyTest", + "path": "CloudTrailDataEventsOnlyTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "CloudTrailDataEventsOnlyTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "CloudTrailDataEventsOnlyTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "CloudTrailDataEventsOnlyTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "CloudTrailDataEventsOnlyTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "CloudTrailDataEventsOnlyTest/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.189" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.ts b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.ts new file mode 100644 index 0000000000000..585805fd7eef9 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-data-events-only.ts @@ -0,0 +1,27 @@ +import * as lambda from '@aws-cdk/aws-lambda'; +import * as s3 from '@aws-cdk/aws-s3'; +import * as cdk from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; +import * as cloudtrail from '../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'integ-cloudtrail-data-events'); + +const bucket = new s3.Bucket(stack, 'Bucket', { removalPolicy: cdk.RemovalPolicy.DESTROY }); +const lambdaFunction = new lambda.Function(stack, 'LambdaFunction', { + runtime: lambda.Runtime.NODEJS_18_X, + handler: 'hello.handler', + code: lambda.Code.fromInline('exports.handler = {}'), +}); + +const trail = new cloudtrail.Trail(stack, 'Trail', { + managementEvents: cloudtrail.ReadWriteType.NONE, +}); +trail.addLambdaEventSelector([lambdaFunction]); +trail.addS3EventSelector([{ bucket }]); + +new integ.IntegTest(app, 'CloudTrailDataEventsOnlyTest', { + testCases: [stack], +}); + +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.assets.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.assets.json new file mode 100644 index 0000000000000..084a100d33a77 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.assets.json @@ -0,0 +1,19 @@ +{ + "version": "22.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.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-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.template.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.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-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/cdk.out b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/cdk.out new file mode 100644 index 0000000000000..145739f539580 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/integ-cloudtrail-defaults.assets.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/integ-cloudtrail-defaults.assets.json new file mode 100644 index 0000000000000..1a7eb49d977f3 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/integ-cloudtrail-defaults.assets.json @@ -0,0 +1,19 @@ +{ + "version": "22.0.0", + "files": { + "820155cafe83250de59eadcf51df6ea51dbf430ef2ad1d8315b693f5b51137c3": { + "source": { + "path": "integ-cloudtrail-defaults.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "820155cafe83250de59eadcf51df6ea51dbf430ef2ad1d8315b693f5b51137c3.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-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/integ-cloudtrail-defaults.template.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/integ-cloudtrail-defaults.template.json new file mode 100644 index 0000000000000..f3ef1b8ef73bb --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/integ-cloudtrail-defaults.template.json @@ -0,0 +1,149 @@ +{ + "Resources": { + "TrailS30071F172": { + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "TrailS3PolicyE42170FE": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "TrailS30071F172" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "s3:GetBucketAcl", + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + } + }, + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control" + } + }, + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "Trail022F0CF2": { + "Type": "AWS::CloudTrail::Trail", + "Properties": { + "IsLogging": true, + "S3BucketName": { + "Ref": "TrailS30071F172" + }, + "EnableLogFileValidation": true, + "EventSelectors": [], + "IncludeGlobalServiceEvents": true, + "IsMultiRegionTrail": true + }, + "DependsOn": [ + "TrailS3PolicyE42170FE" + ] + } + }, + "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-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/integ.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/integ.json new file mode 100644 index 0000000000000..35fc7c9099878 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "22.0.0", + "testCases": { + "CloudTrailDefaultsTest/DefaultTest": { + "stacks": [ + "integ-cloudtrail-defaults" + ], + "assertionStack": "CloudTrailDefaultsTest/DefaultTest/DeployAssert", + "assertionStackName": "CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/manifest.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/manifest.json new file mode 100644 index 0000000000000..54bef72ebb403 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/manifest.json @@ -0,0 +1,123 @@ +{ + "version": "22.0.0", + "artifacts": { + "integ-cloudtrail-defaults.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integ-cloudtrail-defaults.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integ-cloudtrail-defaults": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integ-cloudtrail-defaults.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}/820155cafe83250de59eadcf51df6ea51dbf430ef2ad1d8315b693f5b51137c3.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "integ-cloudtrail-defaults.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-cloudtrail-defaults.assets" + ], + "metadata": { + "/integ-cloudtrail-defaults/Trail/S3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TrailS30071F172" + } + ], + "/integ-cloudtrail-defaults/Trail/S3/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TrailS3PolicyE42170FE" + } + ], + "/integ-cloudtrail-defaults/Trail/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Trail022F0CF2" + } + ], + "/integ-cloudtrail-defaults/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-cloudtrail-defaults/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-cloudtrail-defaults" + }, + "CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.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": [ + "CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.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": [ + "CloudTrailDefaultsTestDefaultTestDeployAssertBD9995EA.assets" + ], + "metadata": { + "/CloudTrailDefaultsTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/CloudTrailDefaultsTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "CloudTrailDefaultsTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/tree.json b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/tree.json new file mode 100644 index 0000000000000..e71632a0ea64d --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.js.snapshot/tree.json @@ -0,0 +1,262 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "integ-cloudtrail-defaults": { + "id": "integ-cloudtrail-defaults", + "path": "integ-cloudtrail-defaults", + "children": { + "Trail": { + "id": "Trail", + "path": "integ-cloudtrail-defaults/Trail", + "children": { + "S3": { + "id": "S3", + "path": "integ-cloudtrail-defaults/Trail/S3", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-cloudtrail-defaults/Trail/S3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "integ-cloudtrail-defaults/Trail/S3/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-cloudtrail-defaults/Trail/S3/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "TrailS30071F172" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "s3:GetBucketAcl", + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + } + }, + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control" + } + }, + "Effect": "Allow", + "Principal": { + "Service": "cloudtrail.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TrailS30071F172", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-cloudtrail-defaults/Trail/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudTrail::Trail", + "aws:cdk:cloudformation:props": { + "isLogging": true, + "s3BucketName": { + "Ref": "TrailS30071F172" + }, + "enableLogFileValidation": true, + "eventSelectors": [], + "includeGlobalServiceEvents": true, + "isMultiRegionTrail": true + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudtrail.CfnTrail", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudtrail.Trail", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-cloudtrail-defaults/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-cloudtrail-defaults/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "CloudTrailDefaultsTest": { + "id": "CloudTrailDefaultsTest", + "path": "CloudTrailDefaultsTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "CloudTrailDefaultsTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "CloudTrailDefaultsTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "CloudTrailDefaultsTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "CloudTrailDefaultsTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "CloudTrailDefaultsTest/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.189" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.ts b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.ts new file mode 100644 index 0000000000000..5691c09704526 --- /dev/null +++ b/packages/@aws-cdk/aws-cloudtrail/test/integ.cloudtrail-defaults.ts @@ -0,0 +1,14 @@ +import * as cdk from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; +import * as cloudtrail from '../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'integ-cloudtrail-defaults'); + +new cloudtrail.Trail(stack, 'Trail'); + +new integ.IntegTest(app, 'CloudTrailDefaultsTest', { + testCases: [stack], +}); + +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index 8418ca3d6bc90..c54ddddef9383 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -99,7 +99,7 @@ "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", "constructs": "^10.0.0", - "punycode": "^2.1.1" + "punycode": "^2.2.0" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { 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 2ccb1f268c707..0185283cc7e78 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 @@ -39,6 +39,6 @@ "eslint-plugin-standard": "^4.1.0", "jest": "^27.5.1", "lambda-tester": "^3.6.0", - "nock": "^13.2.9" + "nock": "^13.3.0" } } diff --git a/packages/@aws-cdk/aws-ecs/README.md b/packages/@aws-cdk/aws-ecs/README.md index afbbd0dec4906..3da06acc88a3f 100644 --- a/packages/@aws-cdk/aws-ecs/README.md +++ b/packages/@aws-cdk/aws-ecs/README.md @@ -95,7 +95,7 @@ const cluster = new ecs.Cluster(this, 'Cluster', { }); ``` -The following code imports an existing cluster using the ARN which can be used to +The following code imports an existing cluster using the ARN which can be used to import an Amazon ECS service either EC2 or Fargate. ```ts @@ -518,8 +518,8 @@ taskDefinition.addContainer('container', { memoryLimitMiB: 1024, systemControls: [ { - namespace: 'net', - value: 'ipv4.tcp_tw_recycle', + namespace: 'net.ipv6.conf.all.default.disable_ipv6', + value: '1', }, ], }); @@ -547,7 +547,7 @@ taskDefinition.addContainer('windowsservercore', { }); ``` -### Using Graviton2 with Fargate +### Using Graviton2 with Fargate AWS Graviton2 supports AWS Fargate. For more details, please see this [blog post](https://aws.amazon.com/blogs/aws/announcing-aws-graviton2-support-for-aws-fargate-get-up-to-40-better-price-performance-for-your-serverless-containers/) @@ -729,7 +729,7 @@ There are two higher-level constructs available which include a load balancer fo `Ec2Service` and `FargateService` provide methods to import existing EC2/Fargate services. The ARN of the existing service has to be specified to import the service. -Since AWS has changed the [ARN format for ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids), +Since AWS has changed the [ARN format for ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids), feature flag `@aws-cdk/aws-ecs:arnFormatIncludesClusterName` must be enabled to use the new ARN format. The feature flag changes behavior for the entire CDK project. Therefore it is not possible to mix the old and the new format in one CDK project. @@ -1094,11 +1094,25 @@ it in the constructor. Then add the Capacity Provider to the cluster. Finally, you can refer to the Provider by its name in your service's or task's Capacity Provider strategy. -By default, an Auto Scaling Group Capacity Provider will manage the Auto Scaling -Group's size for you. It will also enable managed termination protection, in -order to prevent EC2 Auto Scaling from terminating EC2 instances that have tasks -running on them. If you want to disable this behavior, set both -`enableManagedScaling` to and `enableManagedTerminationProtection` to `false`. +By default, Auto Scaling Group Capacity Providers will manage the scale-in and +scale-out behavior of the auto scaling group based on the load your tasks put on +the cluster, this is called [Managed Scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling). If you'd +rather manage scaling behavior yourself set `enableManagedScaling` to `false`. + +Additionally [Managed Termination Protection](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-auto-scaling.html#managed-termination-protection) is enabled by default to +prevent scale-in behavior from terminating instances that have non-daemon tasks +running on them. This is ideal for tasks that should be ran to completion. If your +tasks are safe to interrupt then this protection can be disabled by setting +`enableManagedTerminationProtection` to `false`. Managed Scaling must be enabled for +Managed Termination Protection to work. + +> Currently there is a known [CloudFormation issue](https://github.com/aws/containers-roadmap/issues/631) +> that prevents CloudFormation from automatically deleting Auto Scaling Groups that +> have Managed Termination Protection enabled. To work around this issue you could set +> `enableManagedTerminationProtection` to `false` on the Auto Scaling Group Capacity +> Provider. If you'd rather not disable Managed Termination Protection, you can [manually +> delete the Auto Scaling Group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-process-shutdown.html). +> For other workarounds, see [this GitHub issue](https://github.com/aws/aws-cdk/issues/18179). ```ts declare const vpc: ec2.Vpc; @@ -1236,11 +1250,11 @@ const cluster = new ecs.Cluster(this, 'Cluster', { ## Amazon ECS Service Connect -Service Connect is a managed AWS mesh network offering. It simplifies DNS queries and inter-service communication for +Service Connect is a managed AWS mesh network offering. It simplifies DNS queries and inter-service communication for ECS Services by allowing customers to set up simple DNS aliases for their services, which are accessible to all services that have enabled Service Connect. -To enable Service Connect, you must have created a CloudMap namespace. The CDK can infer your cluster's default CloudMap namespace, +To enable Service Connect, you must have created a CloudMap namespace. The CDK can infer your cluster's default CloudMap namespace, or you can specify a custom namespace. You must also have created a named port mapping on at least one container in your Task Definition. ```ts @@ -1274,7 +1288,7 @@ const service = new ecs.FargateService(this, 'Service', { }); ``` -Service Connect-enabled services may now reach this service at `http-api:80`. Traffic to this endpoint will +Service Connect-enabled services may now reach this service at `http-api:80`. Traffic to this endpoint will be routed to the container's port 8080. To opt a service into using service connect without advertising a port, simply call the 'enableServiceConnect' method on an initialized service. diff --git a/packages/@aws-cdk/aws-ecs/lib/cluster.ts b/packages/@aws-cdk/aws-ecs/lib/cluster.ts index d595e788e08bb..59522d0cff7c3 100644 --- a/packages/@aws-cdk/aws-ecs/lib/cluster.ts +++ b/packages/@aws-cdk/aws-ecs/lib/cluster.ts @@ -259,7 +259,7 @@ export class Cluster extends Resource implements ICluster { } } - private renderExecuteCommandConfiguration() : CfnCluster.ClusterConfigurationProperty { + private renderExecuteCommandConfiguration(): CfnCluster.ClusterConfigurationProperty { return { executeCommandConfiguration: { kmsKeyId: this._executeCommandConfiguration?.kmsKey?.keyArn, @@ -377,7 +377,7 @@ export class Cluster extends Resource implements ICluster { * * @param provider the capacity provider to add to this cluster. */ - public addAsgCapacityProvider(provider: AsgCapacityProvider, options: AddAutoScalingGroupCapacityOptions= {}) { + public addAsgCapacityProvider(provider: AsgCapacityProvider, options: AddAutoScalingGroupCapacityOptions = {}) { // Don't add the same capacity provider more than once. if (this._capacityProviderNames.includes(provider.capacityProviderName)) { return; @@ -1072,14 +1072,25 @@ export interface AsgCapacityProviderProps extends AddAutoScalingGroupCapacityOpt readonly autoScalingGroup: autoscaling.IAutoScalingGroup; /** - * Whether to enable managed scaling + * When enabled the scale-in and scale-out actions of the cluster's Auto Scaling Group will be managed for you. + * This means your cluster will automatically scale instances based on the load your tasks put on the cluster. + * 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 ECS Developer Guide. * * @default true */ readonly enableManagedScaling?: boolean; /** - * Whether to enable managed termination protection + * When enabled the Auto Scaling Group will only terminate EC2 instances that no longer have running non-daemon + * tasks. + * + * Scale-in protection will be automatically enabled on instances. When all non-daemon tasks are + * stopped on an instance, ECS initiates the scale-in process and turns off scale-in protection for the + * instance. The Auto Scaling Group can then terminate the instance. For more information see [Managed termination + * protection](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-auto-scaling.html#managed-termination-protection) + * in the ECS Developer Guide. + * + * Managed scaling must also be enabled. * * @default true */ @@ -1132,7 +1143,7 @@ export class AsgCapacityProvider extends Construct { readonly machineImageType: MachineImageType; /** - * Whether managed termination protection is enabled + * Whether managed termination protection is enabled. */ readonly enableManagedTerminationProtection?: boolean; @@ -1145,19 +1156,18 @@ export class AsgCapacityProvider extends Construct { constructor(scope: Construct, id: string, props: AsgCapacityProviderProps) { super(scope, id); - this.autoScalingGroup = props.autoScalingGroup as autoscaling.AutoScalingGroup; - this.machineImageType = props.machineImageType ?? MachineImageType.AMAZON_LINUX_2; - this.canContainersAccessInstanceRole = props.canContainersAccessInstanceRole; + this.enableManagedTerminationProtection = props.enableManagedTerminationProtection ?? true; - this.enableManagedTerminationProtection = - props.enableManagedTerminationProtection === undefined ? true : props.enableManagedTerminationProtection; - + if (this.enableManagedTerminationProtection && props.enableManagedScaling === false) { + throw new Error('Cannot enable Managed Termination Protection on a Capacity Provider when Managed Scaling is disabled. Either enable Managed Scaling or disable Managed Termination Protection.'); + } if (this.enableManagedTerminationProtection) { this.autoScalingGroup.protectNewInstancesFromScaleIn(); } + if (props.capacityProviderName) { if (!(/^(?!aws|ecs|fargate).+/gm.test(props.capacityProviderName))) { throw new Error(`Invalid Capacity Provider Name: ${props.capacityProviderName}, If a name is specified, it cannot start with aws, ecs, or fargate.`); @@ -1191,7 +1201,7 @@ class MaybeCreateCapacityProviderAssociations implements IAspect { private capacityProviders: string[] private resource?: CfnClusterCapacityProviderAssociations - constructor(scope: Construct, id: string, capacityProviders: string[] ) { + constructor(scope: Construct, id: string, capacityProviders: string[]) { this.scope = scope; this.id = id; this.capacityProviders = capacityProviders; diff --git a/packages/@aws-cdk/aws-ecs/test/cluster.test.ts b/packages/@aws-cdk/aws-ecs/test/cluster.test.ts index 66f8e0b9ec77f..28a92b4653b34 100644 --- a/packages/@aws-cdk/aws-ecs/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-ecs/test/cluster.test.ts @@ -2037,7 +2037,7 @@ describe('cluster', () => { }); - test('can disable managed scaling for ASG capacity provider', () => { + test('can disable Managed Scaling and Managed Termination Protection for ASG capacity provider', () => { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'test'); @@ -2052,6 +2052,7 @@ describe('cluster', () => { new ecs.AsgCapacityProvider(stack, 'provider', { autoScalingGroup, enableManagedScaling: false, + enableManagedTerminationProtection: false, }); // THEN @@ -2061,10 +2062,82 @@ describe('cluster', () => { Ref: 'asgASG4D014670', }, ManagedScaling: Match.absent(), - ManagedTerminationProtection: 'ENABLED', + ManagedTerminationProtection: 'DISABLED', + }, + }); + }); + + test('can disable Managed Termination Protection for ASG capacity provider', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + const vpc = new ec2.Vpc(stack, 'Vpc'); + const autoScalingGroup = new autoscaling.AutoScalingGroup(stack, 'asg', { + vpc, + instanceType: new ec2.InstanceType('bogus'), + machineImage: ecs.EcsOptimizedImage.amazonLinux2(), + }); + + // WHEN + new ecs.AsgCapacityProvider(stack, 'provider', { + autoScalingGroup, + enableManagedTerminationProtection: false, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::ECS::CapacityProvider', { + AutoScalingGroupProvider: { + AutoScalingGroupArn: { + Ref: 'asgASG4D014670', + }, + ManagedScaling: { + Status: 'ENABLED', + TargetCapacity: 100, + }, + ManagedTerminationProtection: 'DISABLED', }, }); + }); + + test('throws error, when ASG capacity provider has Managed Scaling disabled and Managed Termination Protection is undefined (defaults to true)', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + const vpc = new ec2.Vpc(stack, 'Vpc'); + const autoScalingGroup = new autoscaling.AutoScalingGroup(stack, 'asg', { + vpc, + instanceType: new ec2.InstanceType('bogus'), + machineImage: ecs.EcsOptimizedImage.amazonLinux2(), + }); + // THEN + expect(() => { + new ecs.AsgCapacityProvider(stack, 'provider', { + autoScalingGroup, + enableManagedScaling: false, + }); + }).toThrowError('Cannot enable Managed Termination Protection on a Capacity Provider when Managed Scaling is disabled. Either enable Managed Scaling or disable Managed Termination Protection.'); + }); + + test('throws error, when Managed Scaling is disabled and Managed Termination Protection is enabled.', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + const vpc = new ec2.Vpc(stack, 'Vpc'); + const autoScalingGroup = new autoscaling.AutoScalingGroup(stack, 'asg', { + vpc, + instanceType: new ec2.InstanceType('bogus'), + machineImage: ecs.EcsOptimizedImage.amazonLinux2(), + }); + + // THEN + expect(() => { + new ecs.AsgCapacityProvider(stack, 'provider', { + autoScalingGroup, + enableManagedScaling: false, + enableManagedTerminationProtection: true, + }); + }).toThrowError('Cannot enable Managed Termination Protection on a Capacity Provider when Managed Scaling is disabled. Either enable Managed Scaling or disable Managed Termination Protection.'); }); test('capacity provider enables ASG new instance scale-in protection by default', () => { @@ -2599,4 +2672,3 @@ describe('Accessing container instance role', function () { expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('echo ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config'); }); }); - diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index c2060ee3c137d..b1184c3861151 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -93,8 +93,8 @@ "@types/sinon": "^9.0.11", "@types/yaml": "1.9.6", "aws-sdk": "^2.1211.0", - "cdk8s": "^2.6.8", - "cdk8s-plus-24": "2.3.13", + "cdk8s": "^2.6.15", + "cdk8s-plus-24": "2.3.20", "jest": "^27.5.1", "sinon": "^9.2.4" }, diff --git a/packages/@aws-cdk/aws-glue/lib/job.ts b/packages/@aws-cdk/aws-glue/lib/job.ts index 726d397ac90f3..eebb8b1acbdb0 100644 --- a/packages/@aws-cdk/aws-glue/lib/job.ts +++ b/packages/@aws-cdk/aws-glue/lib/job.ts @@ -692,7 +692,7 @@ export class Job extends JobBase { */ private checkNoReservedArgs(defaultArguments?: { [key: string]: string }) { if (defaultArguments) { - const reservedArgs = new Set(['--conf', '--debug', '--mode', '--JOB_NAME']); + const reservedArgs = new Set(['--debug', '--mode', '--JOB_NAME']); Object.keys(defaultArguments).forEach((arg) => { if (reservedArgs.has(arg)) { throw new Error(`The ${arg} argument is reserved by Glue. Don't set it`); diff --git a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/aws-glue-job.assets.json b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/aws-glue-job.assets.json index 29ae3d1255380..8e739ca15edca 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/aws-glue-job.assets.json +++ b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/aws-glue-job.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "29.0.0", "files": { "432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855": { "source": { @@ -14,7 +14,7 @@ } } }, - "0985af21379e9d6e1cba091105ecb533ee38a96b4c738816daf17d951a0752b4": { + "977a2f07e22679bb04b03ce83cc1fac3e6cc269a794e38248ec67106ee39f0a2": { "source": { "path": "aws-glue-job.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0985af21379e9d6e1cba091105ecb533ee38a96b4c738816daf17d951a0752b4.json", + "objectKey": "977a2f07e22679bb04b03ce83cc1fac3e6cc269a794e38248ec67106ee39f0a2.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-glue/test/integ.job.js.snapshot/aws-glue-job.template.json b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/aws-glue-job.template.json index f7838294de6e4..47f34d95c01f7 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/aws-glue-job.template.json +++ b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/aws-glue-job.template.json @@ -173,7 +173,8 @@ ] }, "arg1": "value1", - "arg2": "value2" + "arg2": "value2", + "--conf": "valueConf" }, "ExecutionProperty": { "MaxConcurrentRuns": 2 @@ -527,7 +528,8 @@ ] }, "arg1": "value1", - "arg2": "value2" + "arg2": "value2", + "--conf": "valueConf" }, "ExecutionProperty": { "MaxConcurrentRuns": 2 @@ -881,7 +883,8 @@ ] }, "arg1": "value1", - "arg2": "value2" + "arg2": "value2", + "--conf": "valueConf" }, "ExecutionProperty": { "MaxConcurrentRuns": 2 diff --git a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/cdk.out b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/cdk.out index 145739f539580..d8b441d447f8a 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-glue/test/integ.job.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-glue/test/integ.job.js.snapshot/integ.json b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/integ.json index 28e4fd8c94ff9..fa2e902e93c44 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "29.0.0", "testCases": { "integ.job": { "stacks": [ diff --git a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/manifest.json b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/manifest.json index 9384baab89163..9a6172107f0bc 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "29.0.0", "artifacts": { "aws-glue-job.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}/0985af21379e9d6e1cba091105ecb533ee38a96b4c738816daf17d951a0752b4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/977a2f07e22679bb04b03ce83cc1fac3e6cc269a794e38248ec67106ee39f0a2.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -224,78 +224,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "EtlJobServiceRole837F781B": [ - { - "type": "aws:cdk:logicalId", - "data": "EtlJobServiceRole837F781B", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "EtlJobServiceRoleDefaultPolicy8BFE343B": [ - { - "type": "aws:cdk:logicalId", - "data": "EtlJobServiceRoleDefaultPolicy8BFE343B", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "EtlJobSparkUIBucketBF23744B": [ - { - "type": "aws:cdk:logicalId", - "data": "EtlJobSparkUIBucketBF23744B", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "EtlJob7FC88E45": [ - { - "type": "aws:cdk:logicalId", - "data": "EtlJob7FC88E45", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "EtlJobSuccessMetricRuleA72A3EF6": [ - { - "type": "aws:cdk:logicalId", - "data": "EtlJobSuccessMetricRuleA72A3EF6", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "StreamingJobServiceRole1B4B8BF9": [ - { - "type": "aws:cdk:logicalId", - "data": "StreamingJobServiceRole1B4B8BF9", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "StreamingJobServiceRoleDefaultPolicyA0CC4C68": [ - { - "type": "aws:cdk:logicalId", - "data": "StreamingJobServiceRoleDefaultPolicyA0CC4C68", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "StreamingJob3783CC17": [ - { - "type": "aws:cdk:logicalId", - "data": "StreamingJob3783CC17", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "aws-glue-job" diff --git a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/tree.json b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/tree.json index c601e3512008c..712c057e96df5 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-glue/test/integ.job.js.snapshot/tree.json @@ -203,13 +203,13 @@ "version": "0.0.0" } }, - "Code93a4952ea654434aca8481fb2bc2a836": { - "id": "Code93a4952ea654434aca8481fb2bc2a836", - "path": "aws-glue-job/EtlJob2.0/Code93a4952ea654434aca8481fb2bc2a836", + "Codebeaf1c9f157c9b396ec6972f85317dbc": { + "id": "Codebeaf1c9f157c9b396ec6972f85317dbc", + "path": "aws-glue-job/EtlJob2.0/Codebeaf1c9f157c9b396ec6972f85317dbc", "children": { "Stage": { "id": "Stage", - "path": "aws-glue-job/EtlJob2.0/Code93a4952ea654434aca8481fb2bc2a836/Stage", + "path": "aws-glue-job/EtlJob2.0/Codebeaf1c9f157c9b396ec6972f85317dbc/Stage", "constructInfo": { "fqn": "@aws-cdk/core.AssetStaging", "version": "0.0.0" @@ -217,7 +217,7 @@ }, "AssetBucket": { "id": "AssetBucket", - "path": "aws-glue-job/EtlJob2.0/Code93a4952ea654434aca8481fb2bc2a836/AssetBucket", + "path": "aws-glue-job/EtlJob2.0/Codebeaf1c9f157c9b396ec6972f85317dbc/AssetBucket", "constructInfo": { "fqn": "@aws-cdk/aws-s3.BucketBase", "version": "0.0.0" @@ -275,7 +275,8 @@ ] }, "arg1": "value1", - "arg2": "value2" + "arg2": "value2", + "--conf": "valueConf" }, "executionProperty": { "maxConcurrentRuns": 2 @@ -788,7 +789,8 @@ ] }, "arg1": "value1", - "arg2": "value2" + "arg2": "value2", + "--conf": "valueConf" }, "executionProperty": { "maxConcurrentRuns": 2 @@ -1301,7 +1303,8 @@ ] }, "arg1": "value1", - "arg2": "value2" + "arg2": "value2", + "--conf": "valueConf" }, "executionProperty": { "maxConcurrentRuns": 2 @@ -1974,7 +1977,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.168" + "version": "10.1.209" } } }, diff --git a/packages/@aws-cdk/aws-glue/test/integ.job.ts b/packages/@aws-cdk/aws-glue/test/integ.job.ts index 417ede1793054..791fd734fb0ca 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.job.ts +++ b/packages/@aws-cdk/aws-glue/test/integ.job.ts @@ -38,8 +38,9 @@ const script = glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world. timeout: cdk.Duration.minutes(5), notifyDelayAfter: cdk.Duration.minutes(1), defaultArguments: { - arg1: 'value1', - arg2: 'value2', + 'arg1': 'value1', + 'arg2': 'value2', + '--conf': 'valueConf', }, sparkUI: { enabled: true, diff --git a/packages/@aws-cdk/aws-glue/test/job.test.ts b/packages/@aws-cdk/aws-glue/test/job.test.ts index d30e5897443dd..f03d41d243494 100644 --- a/packages/@aws-cdk/aws-glue/test/job.test.ts +++ b/packages/@aws-cdk/aws-glue/test/job.test.ts @@ -566,7 +566,7 @@ describe('Job', () => { }); test('with reserved args should throw', () => { - ['--conf', '--debug', '--mode', '--JOB_NAME'].forEach((arg, index) => { + ['--debug', '--mode', '--JOB_NAME'].forEach((arg, index) => { const defaultArguments: {[key: string]: string} = {}; defaultArguments[arg] = 'random value'; diff --git a/packages/@aws-cdk/aws-kms/lib/key-lookup.ts b/packages/@aws-cdk/aws-kms/lib/key-lookup.ts index 260e28e96e4c7..0ac02b2185d49 100644 --- a/packages/@aws-cdk/aws-kms/lib/key-lookup.ts +++ b/packages/@aws-cdk/aws-kms/lib/key-lookup.ts @@ -4,6 +4,8 @@ export interface KeyLookupOptions { /** * The alias name of the Key + * + * Must be in the format `alias/`. */ readonly aliasName: string; } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index 411abd350151e..1a111c7e4e155 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.16.13" + "esbuild": "^0.16.16" }, "dependencies": { "@aws-cdk/aws-lambda": "0.0.0", diff --git a/packages/@aws-cdk/aws-lambda/lib/function-hash.ts b/packages/@aws-cdk/aws-lambda/lib/function-hash.ts index a1b20a8e4dac3..48e7553682948 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-hash.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-hash.ts @@ -1,10 +1,10 @@ -import { CfnResource, FeatureFlags, Stack } from '@aws-cdk/core'; +import { CfnResource, FeatureFlags, Stack, Token } from '@aws-cdk/core'; import { md5hash } from '@aws-cdk/core/lib/helpers-internal'; import { LAMBDA_RECOGNIZE_LAYER_VERSION, LAMBDA_RECOGNIZE_VERSION_PROPS } from '@aws-cdk/cx-api'; import { Function as LambdaFunction } from './function'; import { ILayerVersion } from './layers'; -export function calculateFunctionHash(fn: LambdaFunction) { +export function calculateFunctionHash(fn: LambdaFunction, additional: string = '') { const stack = Stack.of(fn); const functionResource = fn.node.defaultChild as CfnResource; @@ -34,7 +34,7 @@ export function calculateFunctionHash(fn: LambdaFunction) { stringifiedConfig = stringifiedConfig + calculateLayersHash(fn._layers); } - return md5hash(stringifiedConfig); + return md5hash(stringifiedConfig + additional); } export function trimFromStart(s: string, maxLength: number) { @@ -130,7 +130,16 @@ function calculateLayersHash(layers: ILayerVersion[]): string { // if there is no layer resource, then the layer was imported // and we will include the layer arn and runtimes in the hash if (layerResource === undefined) { - layerConfig[layer.layerVersionArn] = layer.compatibleRuntimes; + // ARN may have unresolved parts in it, but we didn't deal with this previously + // so deal with it now for backwards compatibility. + if (!Token.isUnresolved(layer.layerVersionArn)) { + layerConfig[layer.layerVersionArn] = layer.compatibleRuntimes; + } else { + layerConfig[layer.node.id] = { + arn: stack.resolve(layer.layerVersionArn), + runtimes: layer.compatibleRuntimes?.map(r => r.name), + }; + } continue; } const config = stack.resolve((layerResource as any)._toCloudFormation()); diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index ced52e6cb5459..a998fad63ae57 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -436,7 +436,7 @@ export class Function extends FunctionBase { cfn.overrideLogicalId(Lazy.uncachedString({ produce: () => { - const hash = calculateFunctionHash(this); + const hash = calculateFunctionHash(this, this.hashMixins.join('')); const logicalId = trimFromStart(originalLogicalId, 255 - 32); return `${logicalId}${hash}`; }, @@ -664,6 +664,7 @@ export class Function extends FunctionBase { private _currentVersion?: Version; private _architecture?: Architecture; + private hashMixins = new Array(); constructor(scope: Construct, id: string, props: FunctionProps) { super(scope, id, { @@ -940,6 +941,31 @@ export class Function extends FunctionBase { return this; } + /** + * Mix additional information into the hash of the Version object + * + * The Lambda Function construct does its best to automatically create a new + * Version when anything about the Function changes (its code, its layers, + * any of the other properties). + * + * However, you can sometimes source information from places that the CDK cannot + * look into, like the deploy-time values of SSM parameters. In those cases, + * the CDK would not force the creation of a new Version object when it actually + * should. + * + * This method can be used to invalidate the current Version object. Pass in + * any string into this method, and make sure the string changes when you know + * a new Version needs to be created. + * + * This method may be called more than once. + */ + public invalidateVersionBasedOn(x: string) { + if (Token.isUnresolved(x)) { + throw new Error('invalidateVersionOn: input may not contain unresolved tokens'); + } + this.hashMixins.push(x); + } + /** * Adds one or more Lambda Layers to this Lambda function. * diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index f7191f7ed90e6..2eb719312000f 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -94,6 +94,7 @@ "@types/aws-lambda": "^8.10.109", "@types/jest": "^27.5.2", "@types/lodash": "^4.14.191", + "@aws-cdk/aws-ssm": "0.0.0", "jest": "^27.5.1", "lodash": "^4.17.21" }, diff --git a/packages/@aws-cdk/aws-lambda/test/function-hash.test.ts b/packages/@aws-cdk/aws-lambda/test/function-hash.test.ts index cf4e0e953faa0..9cff57419184f 100644 --- a/packages/@aws-cdk/aws-lambda/test/function-hash.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/function-hash.test.ts @@ -1,4 +1,6 @@ import * as path from 'path'; +import { Template } from '@aws-cdk/assertions'; +import * as ssm from '@aws-cdk/aws-ssm'; import { resourceSpecification } from '@aws-cdk/cfnspec'; import { App, CfnOutput, CfnResource, Stack } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; @@ -440,3 +442,84 @@ describe('function hash', () => { }); }); }); + +test('imported layer hashes are consistent', () => { + // GIVEN + const app = new App({ + context: { + '@aws-cdk/aws-lambda:recognizeLayerVersion': true, + }, + }); + + // WHEN + const stack1 = new Stack(app, 'Stack1'); + const param1 = ssm.StringParameter.fromStringParameterName(stack1, 'Param', 'ParamName'); + const fn1 = new lambda.Function(stack1, 'Fn', { + code: lambda.Code.fromInline('asdf'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_18_X, + layers: [ + lambda.LayerVersion.fromLayerVersionArn(stack1, 'MyLayer', + `arn:aws:lambda:${stack1.region}::layer:IndexCFN:${param1.stringValue}`), + ], + }); + fn1.currentVersion; // Force creation of version + + const stack2 = new Stack(app, 'Stack2'); + const param2 = ssm.StringParameter.fromStringParameterName(stack2, 'Param', 'ParamName'); + const fn2 = new lambda.Function(stack2, 'Fn', { + code: lambda.Code.fromInline('asdf'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_18_X, + layers: [ + lambda.LayerVersion.fromLayerVersionArn(stack2, 'MyLayer', + `arn:aws:lambda:${stack1.region}::layer:IndexCFN:${param2.stringValue}`), + ], + }); + fn2.currentVersion; // Force creation of version + + // THEN + const template1 = Template.fromStack(stack1); + const template2 = Template.fromStack(stack2); + + expect(template1.toJSON()).toEqual(template2.toJSON()); +}); + +test.each([false, true])('can invalidate version hash using invalidateVersionBasedOn: %p', (doIt) => { + // GIVEN + const app = new App(); + + // WHEN + const stack1 = new Stack(app, 'Stack1'); + const fn1 = new lambda.Function(stack1, 'Fn', { + code: lambda.Code.fromInline('asdf'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_18_X, + }); + if (doIt) { + fn1.invalidateVersionBasedOn('abc'); + } + fn1.currentVersion; // Force creation of version + + const stack2 = new Stack(app, 'Stack2'); + const fn2 = new lambda.Function(stack2, 'Fn', { + code: lambda.Code.fromInline('asdf'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_18_X, + }); + if (doIt) { + fn1.invalidateVersionBasedOn('xyz'); + } + fn2.currentVersion; // Force creation of version + + // THEN + const template1 = Template.fromStack(stack1); + const template2 = Template.fromStack(stack2); + + if (doIt) { + expect(template1.toJSON()).not.toEqual(template2.toJSON()); + } else { + expect(template1.toJSON()).toEqual(template2.toJSON()); + } + +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/README.md b/packages/@aws-cdk/aws-logs/README.md index 369819dba45b1..20467eebbaf5e 100644 --- a/packages/@aws-cdk/aws-logs/README.md +++ b/packages/@aws-cdk/aws-logs/README.md @@ -165,7 +165,8 @@ const mf = new logs.MetricFilter(this, 'MetricFilter', { metricValue: '$.latency', dimensions: { ErrorCode: '$.errorCode', - } + }, + unit: Unit.MILLISECONDS, }); //expose a metric from the metric filter diff --git a/packages/@aws-cdk/aws-logs/lib/log-group.ts b/packages/@aws-cdk/aws-logs/lib/log-group.ts index f13741077af6b..6537a5a518692 100644 --- a/packages/@aws-cdk/aws-logs/lib/log-group.ts +++ b/packages/@aws-cdk/aws-logs/lib/log-group.ts @@ -545,4 +545,12 @@ export interface MetricFilterOptions { * @default - No dimensions attached to metrics. */ readonly dimensions?: Record; + + /** + * The unit to assign to the metric. + * + * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-unit + * @default - No unit attached to metrics. + */ + readonly unit?: cloudwatch.Unit; } diff --git a/packages/@aws-cdk/aws-logs/lib/metric-filter.ts b/packages/@aws-cdk/aws-logs/lib/metric-filter.ts index 69efc0059f123..d3558641fd970 100644 --- a/packages/@aws-cdk/aws-logs/lib/metric-filter.ts +++ b/packages/@aws-cdk/aws-logs/lib/metric-filter.ts @@ -49,6 +49,7 @@ export class MetricFilter extends Resource { metricValue: props.metricValue ?? '1', defaultValue: props.defaultValue, dimensions: props.dimensions ? Object.entries(props.dimensions).map(([key, value]) => ({ key, value })) : undefined, + unit: props.unit, }], }); } diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 4cf3291ddd89c..004f4a36188d2 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -92,7 +92,7 @@ "aws-sdk": "^2.1211.0", "aws-sdk-mock": "5.6.0", "jest": "^27.5.1", - "nock": "^13.2.9", + "nock": "^13.3.0", "sinon": "^9.2.4" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/aws-cdk-expose-metric-integ.assets.json b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/aws-cdk-expose-metric-integ.assets.json index 5d8cc76a02abb..0603866e7ecc1 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/aws-cdk-expose-metric-integ.assets.json +++ b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/aws-cdk-expose-metric-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "22.0.0", "files": { "eca17ca94625bc7a08a880410570afed5eecf3d9a01b6c401155caa073187adb": { "source": { diff --git a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/cdk.out b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/cdk.out index 588d7b269d34f..145739f539580 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.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-logs/test/integ.expose-metric.js.snapshot/integ.json b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/integ.json index 5866daa46d894..499c05ee7f92b 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "22.0.0", "testCases": { "integ.expose-metric": { "stacks": [ diff --git a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/manifest.json b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/manifest.json index 1cacf87af3a15..6cd712655fb1e 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.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" - } - }, "aws-cdk-expose-metric-integ.assets": { "type": "cdk:asset-manifest", "properties": { @@ -71,6 +65,12 @@ ] }, "displayName": "aws-cdk-expose-metric-integ" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/tree.json b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/tree.json index e2dea9af05413..6ea537f2bd600 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.expose-metric.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-logs/test/integ.expose-metric.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-expose-metric-integ": { "id": "aws-cdk-expose-metric-integ", "path": "aws-cdk-expose-metric-integ", @@ -103,17 +95,41 @@ "fqn": "@aws-cdk/aws-cloudwatch.Alarm", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-expose-metric-integ/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-expose-metric-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.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-logs/test/integ.metricfilter-dimensions.js.snapshot/aws-cdk-metricfilter-dimensions-integ.assets.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/aws-cdk-metricfilter-dimensions-integ.assets.json index 5be191e7f4c29..e6a08de288c77 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/aws-cdk-metricfilter-dimensions-integ.assets.json +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/aws-cdk-metricfilter-dimensions-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { "3d99811cf4d8b2d453d889e936569b925ead97bdb93a86d122b34d68818be01d": { "source": { diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/cdk.out b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/cdk.out index 8ecc185e9dbee..145739f539580 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.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-logs/test/integ.metricfilter-dimensions.js.snapshot/integ.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/integ.json index eff8bab92b5dc..e047ea2b82481 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "testCases": { "metricfilter-dimensions/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/manifest.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/manifest.json index 906179f65fb53..805d3adf6b9f2 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.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" - } - }, "aws-cdk-metricfilter-dimensions-integ.assets": { "type": "cdk:asset-manifest", "properties": { @@ -112,6 +106,12 @@ ] }, "displayName": "metricfilter-dimensions/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/metricfilterdimensionsDefaultTestDeployAssertF7E39B09.assets.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/metricfilterdimensionsDefaultTestDeployAssertF7E39B09.assets.json index 9c8f92b52716e..0d794464e8df8 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/metricfilterdimensionsDefaultTestDeployAssertF7E39B09.assets.json +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/metricfilterdimensionsDefaultTestDeployAssertF7E39B09.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "22.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/tree.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/tree.json index 53e7571726531..a3f696846a450 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-dimensions.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" - } - }, "aws-cdk-metricfilter-dimensions-integ": { "id": "aws-cdk-metricfilter-dimensions-integ", "path": "aws-cdk-metricfilter-dimensions-integ", @@ -79,6 +71,22 @@ "fqn": "@aws-cdk/aws-logs.MetricFilter", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-metricfilter-dimensions-integ/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-metricfilter-dimensions-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { @@ -99,12 +107,30 @@ "path": "metricfilter-dimensions/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.95" + "version": "10.1.189" } }, "DeployAssert": { "id": "DeployAssert", "path": "metricfilter-dimensions/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "metricfilter-dimensions/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "metricfilter-dimensions/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "@aws-cdk/core.Stack", "version": "0.0.0" @@ -121,6 +147,14 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/aws-cdk-metricfilter-unit-integ.assets.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/aws-cdk-metricfilter-unit-integ.assets.json new file mode 100644 index 0000000000000..bacf0a330edad --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/aws-cdk-metricfilter-unit-integ.assets.json @@ -0,0 +1,19 @@ +{ + "version": "22.0.0", + "files": { + "1018bc494b7d127e812267baabd1be681787fdf8c894e89c52f41c3caa74fe6d": { + "source": { + "path": "aws-cdk-metricfilter-unit-integ.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1018bc494b7d127e812267baabd1be681787fdf8c894e89c52f41c3caa74fe6d.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-logs/test/integ.metricfilter-unit.js.snapshot/aws-cdk-metricfilter-unit-integ.template.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/aws-cdk-metricfilter-unit-integ.template.json new file mode 100644 index 0000000000000..8c808f7f8b633 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/aws-cdk-metricfilter-unit-integ.template.json @@ -0,0 +1,69 @@ +{ + "Resources": { + "LogGroupF5B46931": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MetricFilter1B93B6E5": { + "Type": "AWS::Logs::MetricFilter", + "Properties": { + "FilterPattern": "{ $.latency = \"*\" }", + "LogGroupName": { + "Ref": "LogGroupF5B46931" + }, + "MetricTransformations": [ + { + "Dimensions": [ + { + "Key": "ErrorCode", + "Value": "$.errorCode" + } + ], + "MetricName": "Latency", + "MetricNamespace": "MyApp", + "MetricValue": "$.latency", + "Unit": "Milliseconds" + } + ] + } + } + }, + "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-logs/test/integ.metricfilter-unit.js.snapshot/cdk.out b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/cdk.out new file mode 100644 index 0000000000000..145739f539580 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/integ.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/integ.json new file mode 100644 index 0000000000000..865f60ba49d1b --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "22.0.0", + "testCases": { + "metricfilter-unit/DefaultTest": { + "stacks": [ + "aws-cdk-metricfilter-unit-integ" + ], + "assertionStack": "metricfilter-unit/DefaultTest/DeployAssert", + "assertionStackName": "metricfilterunitDefaultTestDeployAssertB2F4057A" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/manifest.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/manifest.json new file mode 100644 index 0000000000000..c07ea52967785 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/manifest.json @@ -0,0 +1,117 @@ +{ + "version": "22.0.0", + "artifacts": { + "aws-cdk-metricfilter-unit-integ.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-metricfilter-unit-integ.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-metricfilter-unit-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-metricfilter-unit-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}/1018bc494b7d127e812267baabd1be681787fdf8c894e89c52f41c3caa74fe6d.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-metricfilter-unit-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": [ + "aws-cdk-metricfilter-unit-integ.assets" + ], + "metadata": { + "/aws-cdk-metricfilter-unit-integ/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LogGroupF5B46931" + } + ], + "/aws-cdk-metricfilter-unit-integ/MetricFilter/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MetricFilter1B93B6E5" + } + ], + "/aws-cdk-metricfilter-unit-integ/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-metricfilter-unit-integ/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-metricfilter-unit-integ" + }, + "metricfilterunitDefaultTestDeployAssertB2F4057A.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "metricfilterunitDefaultTestDeployAssertB2F4057A.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "metricfilterunitDefaultTestDeployAssertB2F4057A": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "metricfilterunitDefaultTestDeployAssertB2F4057A.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": [ + "metricfilterunitDefaultTestDeployAssertB2F4057A.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": [ + "metricfilterunitDefaultTestDeployAssertB2F4057A.assets" + ], + "metadata": { + "/metricfilter-unit/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/metricfilter-unit/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "metricfilter-unit/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/metricfilterunitDefaultTestDeployAssertB2F4057A.assets.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/metricfilterunitDefaultTestDeployAssertB2F4057A.assets.json new file mode 100644 index 0000000000000..399d5488e186c --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/metricfilterunitDefaultTestDeployAssertB2F4057A.assets.json @@ -0,0 +1,19 @@ +{ + "version": "22.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "metricfilterunitDefaultTestDeployAssertB2F4057A.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-logs/test/integ.metricfilter-unit.js.snapshot/metricfilterunitDefaultTestDeployAssertB2F4057A.template.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/metricfilterunitDefaultTestDeployAssertB2F4057A.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/metricfilterunitDefaultTestDeployAssertB2F4057A.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-logs/test/integ.metricfilter-unit.js.snapshot/tree.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/tree.json new file mode 100644 index 0000000000000..2f98cf18c4b38 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.js.snapshot/tree.json @@ -0,0 +1,166 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-metricfilter-unit-integ": { + "id": "aws-cdk-metricfilter-unit-integ", + "path": "aws-cdk-metricfilter-unit-integ", + "children": { + "LogGroup": { + "id": "LogGroup", + "path": "aws-cdk-metricfilter-unit-integ/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-metricfilter-unit-integ/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": { + "retentionInDays": 731 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.LogGroup", + "version": "0.0.0" + } + }, + "MetricFilter": { + "id": "MetricFilter", + "path": "aws-cdk-metricfilter-unit-integ/MetricFilter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-metricfilter-unit-integ/MetricFilter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::MetricFilter", + "aws:cdk:cloudformation:props": { + "filterPattern": "{ $.latency = \"*\" }", + "logGroupName": { + "Ref": "LogGroupF5B46931" + }, + "metricTransformations": [ + { + "metricNamespace": "MyApp", + "metricName": "Latency", + "metricValue": "$.latency", + "dimensions": [ + { + "key": "ErrorCode", + "value": "$.errorCode" + } + ], + "unit": "Milliseconds" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnMetricFilter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.MetricFilter", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-metricfilter-unit-integ/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-metricfilter-unit-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "metricfilter-unit": { + "id": "metricfilter-unit", + "path": "metricfilter-unit", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "metricfilter-unit/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "metricfilter-unit/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "metricfilter-unit/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "metricfilter-unit/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "metricfilter-unit/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.189" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.ts b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.ts new file mode 100644 index 0000000000000..249a668c4750b --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter-unit.ts @@ -0,0 +1,34 @@ +import { Unit } from '@aws-cdk/aws-cloudwatch'; +import { App, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core'; +import { IntegTest } from '@aws-cdk/integ-tests'; +import { FilterPattern, LogGroup, MetricFilter } from '../lib'; + +class TestStack extends Stack { + constructor(scope: App, id: string, props?: StackProps) { + super(scope, id, props); + + const logGroup = new LogGroup(this, 'LogGroup', { + removalPolicy: RemovalPolicy.DESTROY, + }); + + new MetricFilter(this, 'MetricFilter', { + logGroup, + metricNamespace: 'MyApp', + metricName: 'Latency', + filterPattern: FilterPattern.exists('$.latency'), + metricValue: '$.latency', + dimensions: { + ErrorCode: '$.errorCode', + }, + unit: Unit.MILLISECONDS, + }); + } +} + +const app = new App(); +const testCase = new TestStack(app, 'aws-cdk-metricfilter-unit-integ'); + +new IntegTest(app, 'metricfilter-unit', { + testCases: [testCase], +}); +app.synth(); diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/aws-cdk-metricfilter-integ.assets.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/aws-cdk-metricfilter-integ.assets.json index 73b08ada6418c..eb9812ecf68e0 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/aws-cdk-metricfilter-integ.assets.json +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/aws-cdk-metricfilter-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "22.0.0", "files": { "3447b1b7683bf722256f63f808f8ac3a927c270228f18c1ff0245b4d5fc3f919": { "source": { diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/cdk.out b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/cdk.out index 588d7b269d34f..145739f539580 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.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-logs/test/integ.metricfilter.lit.js.snapshot/integ.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/integ.json index 872355d7a7d6f..3d96a42caad9a 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "22.0.0", "testCases": { "integ.metricfilter.lit": { "stacks": [ diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/manifest.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/manifest.json index 69626063311d5..1ea63fa73c136 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.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" - } - }, "aws-cdk-metricfilter-integ.assets": { "type": "cdk:asset-manifest", "properties": { @@ -65,6 +59,12 @@ ] }, "displayName": "aws-cdk-metricfilter-integ" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/tree.json b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/tree.json index e24af4a1b21ce..8969855872b25 100644 --- a/packages/@aws-cdk/aws-logs/test/integ.metricfilter.lit.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-logs/test/integ.metricfilter.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" - } - }, "aws-cdk-metricfilter-integ": { "id": "aws-cdk-metricfilter-integ", "path": "aws-cdk-metricfilter-integ", @@ -30,13 +22,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", + "fqn": "@aws-cdk/aws-logs.CfnLogGroup", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "@aws-cdk/aws-logs.LogGroup", "version": "0.0.0" } }, @@ -64,26 +56,50 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", + "fqn": "@aws-cdk/aws-logs.CfnMetricFilter", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Resource", + "fqn": "@aws-cdk/aws-logs.MetricFilter", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-metricfilter-integ/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-metricfilter-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", "version": "0.0.0" } } }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.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-logs/test/metricfilter.test.ts b/packages/@aws-cdk/aws-logs/test/metricfilter.test.ts index 88a925a488afc..39a2b58d39f35 100644 --- a/packages/@aws-cdk/aws-logs/test/metricfilter.test.ts +++ b/packages/@aws-cdk/aws-logs/test/metricfilter.test.ts @@ -1,5 +1,5 @@ import { Template } from '@aws-cdk/assertions'; -import { Metric } from '@aws-cdk/aws-cloudwatch'; +import { Metric, Unit } from '@aws-cdk/aws-cloudwatch'; import { Stack } from '@aws-cdk/core'; import { FilterPattern, LogGroup, MetricFilter } from '../lib'; @@ -133,4 +133,76 @@ describe('metric filter', () => { statistic: 'maximum', })); }); + + test('with unit', () => { + // GIVEN + const stack = new Stack(); + const logGroup = new LogGroup(stack, 'LogGroup'); + + // WHEN + new MetricFilter(stack, 'Subscription', { + logGroup, + metricNamespace: 'AWS/Test', + metricName: 'Latency', + metricValue: '$.latency', + filterPattern: FilterPattern.exists('$.latency'), + dimensions: { + Foo: 'Bar', + }, + unit: Unit.MILLISECONDS, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Logs::MetricFilter', { + MetricTransformations: [{ + MetricNamespace: 'AWS/Test', + MetricName: 'Latency', + MetricValue: '$.latency', + Dimensions: [ + { + Key: 'Foo', + Value: 'Bar', + }, + ], + Unit: 'Milliseconds', + }], + FilterPattern: '{ $.latency = "*" }', + LogGroupName: { Ref: 'LogGroupF5B46931' }, + }); + }); + + test('with no unit', () => { + // GIVEN + const stack = new Stack(); + const logGroup = new LogGroup(stack, 'LogGroup'); + + // WHEN + new MetricFilter(stack, 'Subscription', { + logGroup, + metricNamespace: 'AWS/Test', + metricName: 'Latency', + metricValue: '$.latency', + filterPattern: FilterPattern.exists('$.latency'), + dimensions: { + Foo: 'Bar', + }, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Logs::MetricFilter', { + MetricTransformations: [{ + MetricNamespace: 'AWS/Test', + MetricName: 'Latency', + MetricValue: '$.latency', + Dimensions: [ + { + Key: 'Foo', + Value: 'Bar', + }, + ], + }], + FilterPattern: '{ $.latency = "*" }', + LogGroupName: { Ref: 'LogGroupF5B46931' }, + }); + }); }); diff --git a/packages/@aws-cdk/aws-opensearchservice/lib/version.ts b/packages/@aws-cdk/aws-opensearchservice/lib/version.ts index 0347159408023..55a861a3518f9 100644 --- a/packages/@aws-cdk/aws-opensearchservice/lib/version.ts +++ b/packages/@aws-cdk/aws-opensearchservice/lib/version.ts @@ -71,6 +71,16 @@ export class EngineVersion { /** AWS OpenSearch 1.3 */ public static readonly OPENSEARCH_1_3 = EngineVersion.openSearch('1.3'); + /** + * AWS OpenSearch 2.3 + * + * OpenSearch 2.3 is now available on Amazon OpenSearch Service across 26 + * regions globally. Please refer to the AWS Region Table for more + * information about Amazon OpenSearch Service availability: + * https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/ + * */ + public static readonly OPENSEARCH_2_3 = EngineVersion.openSearch('2.3'); + /** * Custom ElasticSearch version * @param version custom version number diff --git a/packages/@aws-cdk/aws-opensearchservice/package.json b/packages/@aws-cdk/aws-opensearchservice/package.json index a18f45d1c3b65..448c286bcfa09 100644 --- a/packages/@aws-cdk/aws-opensearchservice/package.json +++ b/packages/@aws-cdk/aws-opensearchservice/package.json @@ -91,7 +91,8 @@ "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", - "@types/jest": "^27.5.2" + "@types/jest": "^27.5.2", + "jest-each": "^27.5.1" }, "dependencies": { "@aws-cdk/aws-certificatemanager": "0.0.0", diff --git a/packages/@aws-cdk/aws-opensearchservice/test/domain.test.ts b/packages/@aws-cdk/aws-opensearchservice/test/domain.test.ts index 6e983d88baf7e..76ee62713c58c 100644 --- a/packages/@aws-cdk/aws-opensearchservice/test/domain.test.ts +++ b/packages/@aws-cdk/aws-opensearchservice/test/domain.test.ts @@ -8,6 +8,7 @@ import * as kms from '@aws-cdk/aws-kms'; import * as logs from '@aws-cdk/aws-logs'; import * as route53 from '@aws-cdk/aws-route53'; import { App, Stack, Duration, SecretValue, CfnParameter, Token } from '@aws-cdk/core'; +import each from 'jest-each'; import { Domain, EngineVersion } from '../lib'; let app: App; @@ -29,25 +30,31 @@ const readWriteActions = [ ...writeActions, ]; -const defaultVersion = EngineVersion.OPENSEARCH_1_0; +const testedOpenSearchVersions = [ + EngineVersion.OPENSEARCH_1_0, + EngineVersion.OPENSEARCH_1_1, + EngineVersion.OPENSEARCH_1_2, + EngineVersion.OPENSEARCH_1_3, + EngineVersion.OPENSEARCH_2_3, +]; -test('connections throws if domain is not placed inside a vpc', () => { +each(testedOpenSearchVersions).test('connections throws if domain is not placed inside a vpc', (engineVersion) => { expect(() => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, }).connections; }).toThrowError("Connections are only available on VPC enabled domains. Use the 'vpc' property to place a domain inside a VPC"); }); -test('subnets and security groups can be provided when vpc is used', () => { +each(testedOpenSearchVersions).test('subnets and security groups can be provided when vpc is used', (engineVersion) => { const vpc = new Vpc(stack, 'Vpc'); const securityGroup = new SecurityGroup(stack, 'CustomSecurityGroup', { vpc, }); const domain = new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, vpc, vpcSubnets: [{ subnets: [vpc.privateSubnets[0]] }], securityGroups: [securityGroup], @@ -74,11 +81,11 @@ test('subnets and security groups can be provided when vpc is used', () => { }); -test('default subnets and security group when vpc is used', () => { +each(testedOpenSearchVersions).test('default subnets and security group when vpc is used', (engineVersion) => { const vpc = new Vpc(stack, 'Vpc'); const domain = new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, vpc, }); @@ -109,11 +116,11 @@ test('default subnets and security group when vpc is used', () => { }); -test('connections has no default port if enforceHttps is false', () => { +each(testedOpenSearchVersions).test('connections has no default port if enforceHttps is false', (engineVersion) => { const vpc = new Vpc(stack, 'Vpc'); const domain = new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, vpc, enforceHttps: false, }); @@ -122,11 +129,11 @@ test('connections has no default port if enforceHttps is false', () => { }); -test('connections has default port 443 if enforceHttps is true', () => { +each(testedOpenSearchVersions).test('connections has default port 443 if enforceHttps is true', (engineVersion) => { const vpc = new Vpc(stack, 'Vpc'); const domain = new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, vpc, enforceHttps: true, }); @@ -135,9 +142,9 @@ test('connections has default port 443 if enforceHttps is true', () => { }); -test('default removalpolicy is retain', () => { +each(testedOpenSearchVersions).test('default removalpolicy is retain', (engineVersion) => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, }); Template.fromStack(stack).hasResource('AWS::OpenSearchService::Domain', { @@ -145,12 +152,12 @@ test('default removalpolicy is retain', () => { }); }); -test('grants kms permissions if needed', () => { +each([testedOpenSearchVersions]).test('grants kms permissions if needed', (engineVersion) => { const key = new kms.Key(stack, 'Key'); new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, encryptionAtRest: { kmsKey: key, }, @@ -183,8 +190,14 @@ test('grants kms permissions if needed', () => { }); -test('minimal example renders correctly', () => { - new Domain(stack, 'Domain', { version: defaultVersion }); +each([ + [EngineVersion.OPENSEARCH_1_0, 'OpenSearch_1.0'], + [EngineVersion.OPENSEARCH_1_1, 'OpenSearch_1.1'], + [EngineVersion.OPENSEARCH_1_2, 'OpenSearch_1.2'], + [EngineVersion.OPENSEARCH_1_3, 'OpenSearch_1.3'], + [EngineVersion.OPENSEARCH_2_3, 'OpenSearch_2.3'], +]).test('minimal example renders correctly', (engineVersion, expectedCfVersion) => { + new Domain(stack, 'Domain', { version: engineVersion }); Template.fromStack(stack).hasResourceProperties('AWS::OpenSearchService::Domain', { EBSOptions: { @@ -198,7 +211,7 @@ test('minimal example renders correctly', () => { InstanceType: 'r5.large.search', ZoneAwarenessEnabled: false, }, - EngineVersion: 'OpenSearch_1.0', + EngineVersion: expectedCfVersion, EncryptionAtRestOptions: { Enabled: false, }, @@ -214,9 +227,9 @@ test('minimal example renders correctly', () => { }); }); -test('can enable version upgrade update policy', () => { +each([testedOpenSearchVersions]).test('can enable version upgrade update policy', (engineVersion) => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, enableVersionUpgrade: true, }); @@ -227,9 +240,9 @@ test('can enable version upgrade update policy', () => { }); }); -test('can set a self-referencing custom policy', () => { +each([testedOpenSearchVersions]).test('can set a self-referencing custom policy', (engineVersion) => { const domain = new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, }); domain.addAccessPolicies( @@ -287,11 +300,11 @@ test('can set a self-referencing custom policy', () => { }); }); -describe('UltraWarm instances', () => { +each([testedOpenSearchVersions]).describe('UltraWarm instances', (engineVersion) => { test('can enable UltraWarm instances', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, capacity: { masterNodes: 2, warmNodes: 2, @@ -310,7 +323,7 @@ describe('UltraWarm instances', () => { test('can enable UltraWarm instances with specific instance type', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, capacity: { masterNodes: 2, warmNodes: 2, @@ -330,9 +343,9 @@ describe('UltraWarm instances', () => { }); -test('can use tokens in capacity configuration', () => { +each([testedOpenSearchVersions]).test('can use tokens in capacity configuration', (engineVersion) => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, capacity: { dataNodeInstanceType: Token.asString({ Ref: 'dataNodeInstanceType' }), dataNodes: Token.asNumber({ Ref: 'dataNodes' }), @@ -369,11 +382,11 @@ test('can use tokens in capacity configuration', () => { }); }); -describe('log groups', () => { +each([testedOpenSearchVersions]).describe('log groups', (engineVersion) => { test('slowSearchLogEnabled should create a custom log group', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, logging: { slowSearchLogEnabled: true, }, @@ -399,7 +412,7 @@ describe('log groups', () => { test('slowIndexLogEnabled should create a custom log group', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, logging: { slowIndexLogEnabled: true, }, @@ -425,7 +438,7 @@ describe('log groups', () => { test('appLogEnabled should create a custom log group', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, logging: { appLogEnabled: true, }, @@ -451,7 +464,7 @@ describe('log groups', () => { test('auditLogEnabled should create a custom log group', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, logging: { auditLogEnabled: true, }, @@ -485,7 +498,7 @@ describe('log groups', () => { test('two domains with logging enabled can be created in same stack', () => { new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, logging: { appLogEnabled: true, slowSearchLogEnabled: true, @@ -493,7 +506,7 @@ describe('log groups', () => { }, }); new Domain(stack, 'Domain2', { - version: defaultVersion, + version: engineVersion, logging: { appLogEnabled: true, slowSearchLogEnabled: true, @@ -568,13 +581,13 @@ describe('log groups', () => { test('log group policy is uniquely named for each domain', () => { new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, logging: { appLogEnabled: true, }, }); new Domain(stack, 'Domain2', { - version: defaultVersion, + version: engineVersion, logging: { appLogEnabled: true, }, @@ -620,7 +633,7 @@ describe('log groups', () => { test('enabling audit logs throws without fine grained access control enabled', () => { expect(() => new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, logging: { auditLogEnabled: true, }, @@ -629,7 +642,7 @@ describe('log groups', () => { test('slowSearchLogGroup should use a custom log group', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, logging: { slowSearchLogEnabled: true, slowSearchLogGroup: new logs.LogGroup(stack, 'SlowSearchLogs', { @@ -658,7 +671,7 @@ describe('log groups', () => { test('slowIndexLogEnabled should use a custom log group', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, logging: { slowIndexLogEnabled: true, slowIndexLogGroup: new logs.LogGroup(stack, 'SlowIndexLogs', { @@ -687,7 +700,7 @@ describe('log groups', () => { test('appLogGroup should use a custom log group', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, logging: { appLogEnabled: true, appLogGroup: new logs.LogGroup(stack, 'AppLogs', { @@ -716,7 +729,7 @@ describe('log groups', () => { test('auditLOgGroup should use a custom log group', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, fineGrainedAccessControl: { masterUserName: 'username', }, @@ -753,24 +766,25 @@ describe('log groups', () => { }); -describe('grants', () => { +each(testedOpenSearchVersions).describe('grants', (engineVersion) => { test('"grantRead" allows read actions associated with this domain resource', () => { - testGrant(readActions, (p, d) => d.grantRead(p)); + testGrant(readActions, (p, d) => d.grantRead(p), engineVersion); }); test('"grantWrite" allows write actions associated with this domain resource', () => { - testGrant(writeActions, (p, d) => d.grantWrite(p)); + testGrant(writeActions, (p, d) => d.grantWrite(p), engineVersion); }); test('"grantReadWrite" allows read and write actions associated with this domain resource', () => { - testGrant(readWriteActions, (p, d) => d.grantReadWrite(p)); + testGrant(readWriteActions, (p, d) => d.grantReadWrite(p), engineVersion); }); test('"grantIndexRead" allows read actions associated with an index in this domain resource', () => { testGrant( readActions, (p, d) => d.grantIndexRead('my-index', p), + engineVersion, false, ['/my-index', '/my-index/*'], ); @@ -780,6 +794,7 @@ describe('grants', () => { testGrant( writeActions, (p, d) => d.grantIndexWrite('my-index', p), + engineVersion, false, ['/my-index', '/my-index/*'], ); @@ -789,6 +804,7 @@ describe('grants', () => { testGrant( readWriteActions, (p, d) => d.grantIndexReadWrite('my-index', p), + engineVersion, false, ['/my-index', '/my-index/*'], ); @@ -798,6 +814,7 @@ describe('grants', () => { testGrant( readActions, (p, d) => d.grantPathRead('my-index/my-path', p), + engineVersion, false, ['/my-index/my-path'], ); @@ -807,6 +824,7 @@ describe('grants', () => { testGrant( writeActions, (p, d) => d.grantPathWrite('my-index/my-path', p), + engineVersion, false, ['/my-index/my-path'], ); @@ -816,6 +834,7 @@ describe('grants', () => { testGrant( readWriteActions, (p, d) => d.grantPathReadWrite('my-index/my-path', p), + engineVersion, false, ['/my-index/my-path'], ); @@ -882,12 +901,13 @@ describe('grants', () => { }); -describe('metrics', () => { +each(testedOpenSearchVersions).describe('metrics', (engineVersion) => { test('metricClusterStatusRed', () => { testMetric( (domain) => domain.metricClusterStatusRed(), 'ClusterStatus.red', + engineVersion, Statistic.MAXIMUM, ); }); @@ -896,6 +916,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricClusterStatusYellow(), 'ClusterStatus.yellow', + engineVersion, Statistic.MAXIMUM, ); }); @@ -904,6 +925,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricFreeStorageSpace(), 'FreeStorageSpace', + engineVersion, Statistic.MINIMUM, ); }); @@ -912,6 +934,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricClusterIndexWritesBlocked(), 'ClusterIndexWritesBlocked', + engineVersion, Statistic.MAXIMUM, Duration.minutes(1), ); @@ -921,6 +944,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricNodes(), 'Nodes', + engineVersion, Statistic.MINIMUM, Duration.hours(1), ); @@ -930,6 +954,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricAutomatedSnapshotFailure(), 'AutomatedSnapshotFailure', + engineVersion, Statistic.MAXIMUM, ); }); @@ -938,6 +963,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricCPUUtilization(), 'CPUUtilization', + engineVersion, Statistic.MAXIMUM, ); }); @@ -946,6 +972,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricJVMMemoryPressure(), 'JVMMemoryPressure', + engineVersion, Statistic.MAXIMUM, ); }); @@ -954,6 +981,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricMasterCPUUtilization(), 'MasterCPUUtilization', + engineVersion, Statistic.MAXIMUM, ); }); @@ -962,6 +990,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricMasterJVMMemoryPressure(), 'MasterJVMMemoryPressure', + engineVersion, Statistic.MAXIMUM, ); }); @@ -970,6 +999,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricKMSKeyError(), 'KMSKeyError', + engineVersion, Statistic.MAXIMUM, ); }); @@ -978,6 +1008,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricKMSKeyInaccessible(), 'KMSKeyInaccessible', + engineVersion, Statistic.MAXIMUM, ); }); @@ -986,6 +1017,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricSearchableDocuments(), 'SearchableDocuments', + engineVersion, Statistic.MAXIMUM, ); }); @@ -994,6 +1026,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricSearchLatency(), 'SearchLatency', + engineVersion, 'p99', ); }); @@ -1002,6 +1035,7 @@ describe('metrics', () => { testMetric( (domain) => domain.metricIndexingLatency(), 'IndexingLatency', + engineVersion, 'p99', ); }); @@ -1079,7 +1113,7 @@ describe('import', () => { }); }); -describe('advanced security options', () => { +each(testedOpenSearchVersions).describe('advanced security options', (engineVersion) => { const masterUserArn = 'arn:aws:iam::123456789012:user/JohnDoe'; const masterUserName = 'JohnDoe'; const password = 'password'; @@ -1087,7 +1121,7 @@ describe('advanced security options', () => { test('enable fine-grained access control with a master user ARN', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, fineGrainedAccessControl: { masterUserArn, }, @@ -1120,7 +1154,7 @@ describe('advanced security options', () => { test('enable fine-grained access control with a master user name and password', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, fineGrainedAccessControl: { masterUserName, masterUserPassword, @@ -1155,7 +1189,7 @@ describe('advanced security options', () => { test('enable fine-grained access control with a master user name and dynamically generated password', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, fineGrainedAccessControl: { masterUserName, }, @@ -1220,7 +1254,7 @@ describe('advanced security options', () => { test('enabling fine-grained access control throws without node-to-node encryption enabled', () => { expect(() => new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, fineGrainedAccessControl: { masterUserArn, }, @@ -1234,7 +1268,7 @@ describe('advanced security options', () => { test('enabling fine-grained access control throws without encryption-at-rest enabled', () => { expect(() => new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, fineGrainedAccessControl: { masterUserArn, }, @@ -1248,7 +1282,7 @@ describe('advanced security options', () => { test('enabling fine-grained access control throws without enforceHttps enabled', () => { expect(() => new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, fineGrainedAccessControl: { masterUserArn, }, @@ -1261,12 +1295,12 @@ describe('advanced security options', () => { }); }); -describe('custom endpoints', () => { +each(testedOpenSearchVersions).describe('custom endpoints', (engineVersion) => { const customDomainName = 'search.example.com'; test('custom domain without hosted zone and default cert', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, nodeToNodeEncryption: true, enforceHttps: true, customEndpoint: { @@ -1293,7 +1327,7 @@ describe('custom endpoints', () => { test('custom domain with hosted zone and default cert', () => { const zone = new route53.HostedZone(stack, 'DummyZone', { zoneName: 'example.com' }); new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, nodeToNodeEncryption: true, enforceHttps: true, customEndpoint: { @@ -1350,7 +1384,7 @@ describe('custom endpoints', () => { }); new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, nodeToNodeEncryption: true, enforceHttps: true, customEndpoint: { @@ -1389,7 +1423,7 @@ describe('custom endpoints', () => { }); -describe('custom error responses', () => { +each(testedOpenSearchVersions).describe('custom error responses', (engineVersion) => { test('error when availabilityZoneCount does not match vpcOptions.subnets length', () => { const vpc = new Vpc(stack, 'Vpc', { @@ -1397,7 +1431,7 @@ describe('custom error responses', () => { }); expect(() => new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, zoneAwareness: { enabled: true, availabilityZoneCount: 2, @@ -1415,7 +1449,7 @@ describe('custom error responses', () => { }); new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, vpc, vpcSubnets: [subnets], zoneAwareness: { @@ -1430,19 +1464,19 @@ describe('custom error responses', () => { test('error when master, data or Ultra Warm instance types do not end with .search', () => { const error = /instance types must end with ".search"/; expect(() => new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, capacity: { masterNodeInstanceType: 'c5.large', }, })).toThrow(error); expect(() => new Domain(stack, 'Domain2', { - version: defaultVersion, + version: engineVersion, capacity: { dataNodeInstanceType: 'c5.2xlarge', }, })).toThrow(error); expect(() => new Domain(stack, 'Domain3', { - version: defaultVersion, + version: engineVersion, capacity: { warmInstanceType: 'ultrawarm1.medium', }, @@ -1452,7 +1486,7 @@ describe('custom error responses', () => { test('error when Ultra Warm instance types do not start with ultrawarm', () => { const error = /UltraWarm node instance type must start with "ultrawarm"./; expect(() => new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, capacity: { warmInstanceType: 't3.small.search', }, @@ -1548,7 +1582,7 @@ describe('custom error responses', () => { test('error when i3 or r6g instance types are specified with EBS enabled', () => { expect(() => new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, capacity: { dataNodeInstanceType: 'i3.2xlarge.search', }, @@ -1558,7 +1592,7 @@ describe('custom error responses', () => { }, })).toThrow(/I3 and R6GD instance types do not support EBS storage volumes/); expect(() => new Domain(stack, 'Domain2', { - version: defaultVersion, + version: engineVersion, capacity: { dataNodeInstanceType: 'r6gd.large.search', }, @@ -1572,7 +1606,7 @@ describe('custom error responses', () => { test('error when m3, r3, or t2 instance types are specified with encryption at rest enabled', () => { const error = /M3, R3, and T2 instance types do not support encryption of data at rest/; expect(() => new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, capacity: { masterNodeInstanceType: 'm3.2xlarge.search', }, @@ -1581,7 +1615,7 @@ describe('custom error responses', () => { }, })).toThrow(error); expect(() => new Domain(stack, 'Domain2', { - version: defaultVersion, + version: engineVersion, capacity: { dataNodeInstanceType: 'r3.2xlarge.search', }, @@ -1590,7 +1624,7 @@ describe('custom error responses', () => { }, })).toThrow(error); expect(() => new Domain(stack, 'Domain3', { - version: defaultVersion, + version: engineVersion, capacity: { masterNodeInstanceType: 't2.2xlarge.search', }, @@ -1602,7 +1636,7 @@ describe('custom error responses', () => { test('error when t2.micro is specified with Elasticsearch version > 2.3', () => { expect(() => new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, capacity: { masterNodeInstanceType: 't2.micro.search', }, @@ -1611,7 +1645,7 @@ describe('custom error responses', () => { test('error when any instance type other than R3, I3 and R6GD are specified without EBS enabled', () => { expect(() => new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, ebs: { enabled: false, }, @@ -1620,7 +1654,7 @@ describe('custom error responses', () => { }, })).toThrow(/EBS volumes are required when using instance types other than r3, i3 or r6gd/); expect(() => new Domain(stack, 'Domain2', { - version: defaultVersion, + version: engineVersion, ebs: { enabled: false, }, @@ -1632,7 +1666,7 @@ describe('custom error responses', () => { test('can use compatible master instance types that does not have local storage when data node type is i3 or r6gd', () => { new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, ebs: { enabled: false, }, @@ -1642,7 +1676,7 @@ describe('custom error responses', () => { }, }); new Domain(stack, 'Domain2', { - version: defaultVersion, + version: engineVersion, ebs: { enabled: false, }, @@ -1660,7 +1694,7 @@ describe('custom error responses', () => { const vpc = new Vpc(stack, 'Vpc'); expect(() => new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, vpc, zoneAwareness: { availabilityZoneCount: 4, @@ -1681,14 +1715,14 @@ describe('custom error responses', () => { test('error when t2 or t3 instance types are specified with UltramWarm enabled', () => { const error = /T2 and T3 instance types do not support UltraWarm storage/; expect(() => new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, capacity: { masterNodeInstanceType: 't2.2xlarge.search', warmNodes: 1, }, })).toThrow(error); expect(() => new Domain(stack, 'Domain2', { - version: defaultVersion, + version: engineVersion, capacity: { masterNodeInstanceType: 't3.2xlarge.search', warmNodes: 1, @@ -1698,7 +1732,7 @@ describe('custom error responses', () => { test('error when UltraWarm instance is used and no dedicated master instance specified', () => { expect(() => new Domain(stack, 'Domain1', { - version: defaultVersion, + version: engineVersion, capacity: { warmNodes: 1, masterNodes: 0, @@ -1716,10 +1750,10 @@ test('can specify future version', () => { }); }); -describe('unsigned basic auth', () => { +each(testedOpenSearchVersions).describe('unsigned basic auth', (engineVersion) => { test('can create a domain with unsigned basic auth', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, useUnsignedBasicAuth: true, }); @@ -1747,7 +1781,7 @@ describe('unsigned basic auth', () => { const masterUserArn = 'arn:aws:iam::123456789012:user/JohnDoe'; new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, fineGrainedAccessControl: { masterUserArn, }, @@ -1780,7 +1814,7 @@ describe('unsigned basic auth', () => { const masterUserPassword = SecretValue.unsafePlainText(password); new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, fineGrainedAccessControl: { masterUserName, masterUserPassword, @@ -1811,7 +1845,7 @@ describe('unsigned basic auth', () => { test('fails to create a domain with unsigned basic auth when enforce HTTPS is disabled', () => { expect(() => new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, useUnsignedBasicAuth: true, enforceHttps: false, })).toThrow(/You cannot disable HTTPS and use unsigned basic auth/); @@ -1819,7 +1853,7 @@ describe('unsigned basic auth', () => { test('fails to create a domain with unsigned basic auth when node to node encryption is disabled', () => { expect(() => new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, useUnsignedBasicAuth: true, nodeToNodeEncryption: false, })).toThrow(/You cannot disable node to node encryption and use unsigned basic auth/); @@ -1827,7 +1861,7 @@ describe('unsigned basic auth', () => { test('fails to create a domain with unsigned basic auth when encryption at rest is disabled', () => { expect(() => new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, useUnsignedBasicAuth: true, encryptionAtRest: { enabled: false }, })).toThrow(/You cannot disable encryption at rest and use unsigned basic auth/); @@ -1841,10 +1875,10 @@ describe('unsigned basic auth', () => { }); }); -describe('advanced options', () => { +each(testedOpenSearchVersions).describe('advanced options', (engineVersion) => { test('use advanced options', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, advancedOptions: { 'rest.action.multi.allow_explicit_index': 'true', 'indices.fielddata.cache.size': '50', @@ -1861,7 +1895,7 @@ describe('advanced options', () => { test('advanced options absent by default', () => { new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, }); Template.fromStack(stack).hasResourceProperties('AWS::OpenSearchService::Domain', { @@ -1870,9 +1904,9 @@ describe('advanced options', () => { }); }); -describe('cognito dashboards auth', () => { +each(testedOpenSearchVersions).describe('cognito dashboards auth', (engineVersion) => { test('cognito dashboards auth is not configured by default', () => { - new Domain(stack, 'Domain', { version: defaultVersion }); + new Domain(stack, 'Domain', { version: engineVersion }); Template.fromStack(stack).hasResourceProperties('AWS::OpenSearchService::Domain', { CognitoOptions: Match.absent(), @@ -1886,7 +1920,7 @@ describe('cognito dashboards auth', () => { const role = new iam.Role(stack, 'testrole', { assumedBy: user }); new Domain(stack, 'Domain', { - version: defaultVersion, + version: engineVersion, cognitoDashboardsAuth: { role, identityPoolId, @@ -1913,10 +1947,11 @@ describe('cognito dashboards auth', () => { function testGrant( expectedActions: string[], invocation: (user: iam.IPrincipal, domain: Domain) => void, + engineVersion: EngineVersion, appliesToDomainRoot: Boolean = true, paths: string[] = ['/*'], ) { - const domain = new Domain(stack, 'Domain', { version: defaultVersion }); + const domain = new Domain(stack, 'Domain', { version: engineVersion }); const user = new iam.User(stack, 'user'); invocation(user, domain); @@ -1968,10 +2003,11 @@ function testGrant( function testMetric( invocation: (domain: Domain) => Metric, metricName: string, + engineVersion: EngineVersion, statistic: string = Statistic.SUM, period: Duration = Duration.minutes(5), ) { - const domain = new Domain(stack, 'Domain', { version: defaultVersion }); + const domain = new Domain(stack, 'Domain', { version: engineVersion }); const metric = invocation(domain); diff --git a/packages/@aws-cdk/aws-route53-patterns/README.md b/packages/@aws-cdk/aws-route53-patterns/README.md index a8c9c6b3874e0..cf34a9c6e1276 100644 --- a/packages/@aws-cdk/aws-route53-patterns/README.md +++ b/packages/@aws-cdk/aws-route53-patterns/README.md @@ -51,3 +51,32 @@ new patterns.HttpsRedirect(this, 'Redirect', { }), }); ``` + +To have `HttpsRedirect` use the `Certificate` construct as the default +created certificate instead of the deprecated `DnsValidatedCertificate` +construct, enable the `@aws-cdk/aws-route53-patters:useCertificate` +feature flag. If you are creating the stack in a region other than `us-east-1` +you must also enable `crossRegionReferences` on the stack. + +```ts +declare const app: App; +const stack = new Stack(app, 'Stack', { + crossRegionReferences: true, + env: { + region: 'us-east-2', + }, +}); + +new patterns.HttpsRedirect(this, 'Redirect', { + recordNames: ['foo.example.com'], + targetDomain: 'bar.example.com', + zone: route53.HostedZone.fromHostedZoneAttributes(this, 'HostedZone', { + hostedZoneId: 'ID', + zoneName: 'example.com', + }), +}); +``` + +It is safe to upgrade to `@aws-cdk/aws-route53-patterns:useCertificate` since +the new certificate will be created and updated on the CloudFront distribution +before the old certificate is deleted. diff --git a/packages/@aws-cdk/aws-route53-patterns/lib/website-redirect.ts b/packages/@aws-cdk/aws-route53-patterns/lib/website-redirect.ts index 20f0eacd8ec2e..dfb2e44be5c7b 100644 --- a/packages/@aws-cdk/aws-route53-patterns/lib/website-redirect.ts +++ b/packages/@aws-cdk/aws-route53-patterns/lib/website-redirect.ts @@ -1,10 +1,11 @@ -import { md5hash } from '@aws-cdk/core/lib/helpers-internal'; -import { DnsValidatedCertificate, ICertificate } from '@aws-cdk/aws-certificatemanager'; +import { DnsValidatedCertificate, ICertificate, Certificate, CertificateValidation } from '@aws-cdk/aws-certificatemanager'; import { CloudFrontWebDistribution, OriginProtocolPolicy, PriceClass, ViewerCertificate, ViewerProtocolPolicy } from '@aws-cdk/aws-cloudfront'; import { ARecord, AaaaRecord, IHostedZone, RecordTarget } from '@aws-cdk/aws-route53'; import { CloudFrontTarget } from '@aws-cdk/aws-route53-targets'; import { BlockPublicAccess, Bucket, RedirectProtocol } from '@aws-cdk/aws-s3'; -import { ArnFormat, RemovalPolicy, Stack, Token } from '@aws-cdk/core'; +import { ArnFormat, RemovalPolicy, Stack, Token, FeatureFlags } from '@aws-cdk/core'; +import { md5hash } from '@aws-cdk/core/lib/helpers-internal'; +import { ROUTE53_PATTERNS_USE_CERTIFICATE } from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; /** @@ -63,13 +64,7 @@ export class HttpsRedirect extends Construct { throw new Error(`The certificate must be in the us-east-1 region and the certificate you provided is in ${certificateRegion}.`); } } - - const redirectCert = props.certificate ?? new DnsValidatedCertificate(this, 'RedirectCertificate', { - domainName: domainNames[0], - subjectAlternativeNames: domainNames, - hostedZone: props.zone, - region: 'us-east-1', - }); + const redirectCert = props.certificate ?? this.createCertificate(domainNames, props.zone); const redirectBucket = new Bucket(this, 'RedirectBucket', { websiteRedirect: { @@ -107,4 +102,70 @@ export class HttpsRedirect extends Construct { new AaaaRecord(this, `RedirectAliasRecordSix${hash}`, aliasProps); }); } + + /** + * Gets the stack to use for creating the Certificate + * If the current stack is not in `us-east-1` then this + * will create a new `us-east-1` stack. + * + * CloudFront is a global resource which you can create (via CloudFormation) from + * _any_ region. So I could create a CloudFront distribution in `us-east-2` if I wanted + * to (maybe the rest of my application lives there). The problem is that some supporting resources + * that CloudFront uses (i.e. ACM Certificates) are required to exist in `us-east-1`. This means + * that if I want to create a CloudFront distribution in `us-east-2` I still need to create a ACM certificate in + * `us-east-1`. + * + * In order to do this correctly we need to know which region the CloudFront distribution is being created in. + * We have two options, either require the user to specify the region or make an assumption if they do not. + * This implementation requires the user specify the region. + */ + private certificateScope(): Construct { + const stack = Stack.of(this); + const parent = stack.node.scope; + if (!parent) { + throw new Error(`Stack ${stack.stackId} must be created in the scope of an App or Stage`); + } + if (Token.isUnresolved(stack.region)) { + throw new Error(`When ${ROUTE53_PATTERNS_USE_CERTIFICATE} is enabled, a region must be defined on the Stack`); + } + if (stack.region !== 'us-east-1') { + const stackId = `certificate-redirect-stack-${stack.node.addr}`; + const certStack = parent.node.tryFindChild(stackId) as Stack; + return certStack ?? new Stack(parent, stackId, { + env: { region: 'us-east-1', account: stack.account }, + }); + } + return this; + } + + /** + * Creates a certificate. + * + * If the `ROUTE53_PATTERNS_USE_CERTIFICATE` feature flag is set then + * this will use the `Certificate` class otherwise it will use the + * `DnsValidatedCertificate` class + * + * This is also safe to upgrade since the new certificate will be created and updated + * on the CloudFront distribution before the old one is deleted. + */ + private createCertificate(domainNames: string[], zone: IHostedZone): ICertificate { + const useCertificate = FeatureFlags.of(this).isEnabled(ROUTE53_PATTERNS_USE_CERTIFICATE); + if (useCertificate) { + // this preserves backwards compatibility. Previously the certificate was always created in `this` scope + // so we need to keep the name the same + const id = (this.certificateScope() === this) ? 'RedirectCertificate' : 'RedirectCertificate'+this.node.addr; + return new Certificate(this.certificateScope(), id, { + domainName: domainNames[0], + subjectAlternativeNames: domainNames, + validation: CertificateValidation.fromDns(zone), + }); + } else { + return new DnsValidatedCertificate(this, 'RedirectCertificate', { + domainName: domainNames[0], + subjectAlternativeNames: domainNames, + hostedZone: zone, + region: 'us-east-1', + }); + } + } } diff --git a/packages/@aws-cdk/aws-route53-patterns/package.json b/packages/@aws-cdk/aws-route53-patterns/package.json index 21f2fd6d4dd6e..8b2d298daf4ed 100644 --- a/packages/@aws-cdk/aws-route53-patterns/package.json +++ b/packages/@aws-cdk/aws-route53-patterns/package.json @@ -76,6 +76,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", @@ -89,6 +90,7 @@ "@aws-cdk/aws-route53-targets": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", "constructs": "^10.0.0" }, @@ -101,6 +103,7 @@ "@aws-cdk/aws-route53-targets": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", "constructs": "^10.0.0" }, diff --git a/packages/@aws-cdk/aws-route53-patterns/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-route53-patterns/rosetta/default.ts-fixture index 1ec9038bfff0b..e3c0d143d05a6 100644 --- a/packages/@aws-cdk/aws-route53-patterns/rosetta/default.ts-fixture +++ b/packages/@aws-cdk/aws-route53-patterns/rosetta/default.ts-fixture @@ -1,6 +1,6 @@ // Fixture with packages imported, but nothing else import { Construct } from 'constructs'; -import { Stack } from '@aws-cdk/core'; +import { Stack, App } from '@aws-cdk/core'; import * as route53 from '@aws-cdk/aws-route53'; import * as patterns from '@aws-cdk/aws-route53-patterns'; diff --git a/packages/@aws-cdk/aws-route53-patterns/test/bucket-website-target.test.ts b/packages/@aws-cdk/aws-route53-patterns/test/bucket-website-target.test.ts index 91f81a467a43f..972129fa02f79 100644 --- a/packages/@aws-cdk/aws-route53-patterns/test/bucket-website-target.test.ts +++ b/packages/@aws-cdk/aws-route53-patterns/test/bucket-website-target.test.ts @@ -2,6 +2,7 @@ import { Template } from '@aws-cdk/assertions'; import { Certificate } from '@aws-cdk/aws-certificatemanager'; import { HostedZone } from '@aws-cdk/aws-route53'; import { App, Stack } from '@aws-cdk/core'; +import { ROUTE53_PATTERNS_USE_CERTIFICATE } from '@aws-cdk/cx-api'; import { HttpsRedirect } from '../lib'; test('create HTTPS redirect', () => { @@ -152,3 +153,144 @@ test('throws when certificate in region other than us-east-1 is supplied', () => }); }).toThrow(/The certificate must be in the us-east-1 region and the certificate you provided is in us-east-2./); }); + +describe('Uses Certificate when @aws-cdk/aws-route53-patters:useCertificate=true', () => { + test('explicit different region', () => { + // GIVEN + const app = new App({ + context: { + [ROUTE53_PATTERNS_USE_CERTIFICATE]: true, + }, + }); + + // WHEN + const stack = new Stack(app, 'test', { env: { region: 'us-east-2' }, crossRegionReferences: true }); + new HttpsRedirect(stack, 'Redirect', { + recordNames: ['foo.example.com'], + targetDomain: 'bar.example.com', + zone: HostedZone.fromHostedZoneAttributes(stack, 'HostedZone', { + hostedZoneId: 'ID', + zoneName: 'example.com', + }), + }); + + // THEN + const certStack = app.node.findChild(`certificate-redirect-stack-${stack.node.addr}`) as Stack; + Template.fromStack(certStack).hasResourceProperties('AWS::CertificateManager::Certificate', { + DomainName: 'foo.example.com', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CloudFront::Distribution', { + DistributionConfig: { + ViewerCertificate: { + AcmCertificateArn: { + 'Fn::GetAtt': [ + 'ExportsReader8B249524', + '/cdk/exports/test/certificateredirectstackc8e2763df63c0f7e0c9afe0394e299bb731e281e8euseast1RefRedirectCertificatec8693e36481e135aa76e35c2db892ec6a33a94c7461E1B6E15A36EB7DA', + ], + }, + }, + }, + }); + }); + + test('explicit same region', () => { + // GIVEN + const app = new App({ + context: { + [ROUTE53_PATTERNS_USE_CERTIFICATE]: true, + }, + }); + + // WHEN + const stack = new Stack(app, 'test', { env: { region: 'us-east-1' }, crossRegionReferences: true }); + new HttpsRedirect(stack, 'Redirect', { + recordNames: ['foo.example.com'], + targetDomain: 'bar.example.com', + zone: HostedZone.fromHostedZoneAttributes(stack, 'HostedZone', { + hostedZoneId: 'ID', + zoneName: 'example.com', + }), + }); + + // THEN + const certStack = app.node.tryFindChild(`certificate-redirect-stack-${stack.node.addr}`); + expect(certStack).toBeUndefined(); + Template.fromStack(stack).hasResourceProperties('AWS::CertificateManager::Certificate', { + DomainName: 'foo.example.com', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CloudFront::Distribution', { + DistributionConfig: { + ViewerCertificate: { + AcmCertificateArn: { + Ref: 'RedirectRedirectCertificateB4F2F130', + }, + }, + }, + }); + }); + + test('same support stack used for multiple certificates', () => { + // GIVEN + const app = new App({ + context: { + [ROUTE53_PATTERNS_USE_CERTIFICATE]: true, + }, + }); + + // WHEN + const stack = new Stack(app, 'test', { env: { region: 'us-east-2' }, crossRegionReferences: true }); + new HttpsRedirect(stack, 'Redirect', { + recordNames: ['foo.example.com'], + targetDomain: 'bar.example.com', + zone: HostedZone.fromHostedZoneAttributes(stack, 'HostedZone', { + hostedZoneId: 'ID', + zoneName: 'example.com', + }), + }); + + new HttpsRedirect(stack, 'Redirect2', { + recordNames: ['foo2.example.com'], + targetDomain: 'bar2.example.com', + zone: HostedZone.fromHostedZoneAttributes(stack, 'HostedZone2', { + hostedZoneId: 'ID', + zoneName: 'example.com', + }), + }); + + // THEN + const certStack = app.node.tryFindChild(`certificate-redirect-stack-${stack.node.addr}`) as Stack; + Template.fromStack(certStack).hasResourceProperties('AWS::CertificateManager::Certificate', { + DomainName: 'foo.example.com', + }); + Template.fromStack(certStack).hasResourceProperties('AWS::CertificateManager::Certificate', { + DomainName: 'foo2.example.com', + }); + }); + + test('unresolved region throws', () => { + // GIVEN + const app = new App({ + context: { + [ROUTE53_PATTERNS_USE_CERTIFICATE]: true, + }, + }); + + // WHEN + const stack = new Stack(app, 'test'); + + // THEN + expect(() => { + new HttpsRedirect(stack, 'Redirect', { + recordNames: ['foo.example.com'], + targetDomain: 'bar.example.com', + zone: HostedZone.fromHostedZoneAttributes(stack, 'HostedZone', { + hostedZoneId: 'ID', + zoneName: 'example.com', + }), + }); + + }).toThrow(/When @aws-cdk\/aws-route53-patters:useCertificate is enabled, a region must be defined on the Stack/); + }); +}); diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/cdk.out b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/cdk.out new file mode 100644 index 0000000000000..145739f539580 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integ-https-redirect-same-region.assets.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integ-https-redirect-same-region.assets.json new file mode 100644 index 0000000000000..a829f07fccabf --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integ-https-redirect-same-region.assets.json @@ -0,0 +1,20 @@ +{ + "version": "22.0.0", + "files": { + "cfd1c229f1b6f82ba7c98886bbb9cce3f98c3d07fc1cee4b2525494d7cd8d4bf": { + "source": { + "path": "integ-https-redirect-same-region.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-us-east-1": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", + "objectKey": "cfd1c229f1b6f82ba7c98886bbb9cce3f98c3d07fc1cee4b2525494d7cd8d4bf.json", + "region": "us-east-1", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integ-https-redirect-same-region.template.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integ-https-redirect-same-region.template.json new file mode 100644 index 0000000000000..c36c3fe38ac1c --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integ-https-redirect-same-region.template.json @@ -0,0 +1,217 @@ +{ + "Resources": { + "redirectRedirectCertificateD6C59F7F": { + "Type": "AWS::CertificateManager::Certificate", + "Properties": { + "DomainName": "integ-same-region.example.com", + "DomainValidationOptions": [ + { + "DomainName": "integ-same-region.example.com", + "HostedZoneId": "Z23ABC4XYZL05B" + }, + { + "DomainName": "integ-same-region.example.com", + "HostedZoneId": "Z23ABC4XYZL05B" + } + ], + "SubjectAlternativeNames": [ + "integ-same-region.example.com" + ], + "Tags": [ + { + "Key": "Name", + "Value": "integ-https-redirect-same-region/redirect/RedirectCertificate" + } + ], + "ValidationMethod": "DNS" + } + }, + "redirectRedirectBucketAA44E2FE": { + "Type": "AWS::S3::Bucket", + "Properties": { + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true + }, + "WebsiteConfiguration": { + "RedirectAllRequestsTo": { + "HostName": "aws.amazon.com", + "Protocol": "https" + } + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "redirectRedirectDistributionCFDistribution1A4C48E3": { + "Type": "AWS::CloudFront::Distribution", + "Properties": { + "DistributionConfig": { + "Aliases": [ + "integ-same-region.example.com" + ], + "Comment": "Redirect to aws.amazon.com from integ-same-region.example.com", + "DefaultCacheBehavior": { + "AllowedMethods": [ + "GET", + "HEAD" + ], + "CachedMethods": [ + "GET", + "HEAD" + ], + "Compress": true, + "ForwardedValues": { + "Cookies": { + "Forward": "none" + }, + "QueryString": false + }, + "TargetOriginId": "origin1", + "ViewerProtocolPolicy": "redirect-to-https" + }, + "DefaultRootObject": "", + "Enabled": true, + "HttpVersion": "http2", + "IPV6Enabled": true, + "Origins": [ + { + "ConnectionAttempts": 3, + "ConnectionTimeout": 10, + "CustomOriginConfig": { + "HTTPPort": 80, + "HTTPSPort": 443, + "OriginKeepaliveTimeout": 5, + "OriginProtocolPolicy": "http-only", + "OriginReadTimeout": 30, + "OriginSSLProtocols": [ + "TLSv1.2" + ] + }, + "DomainName": { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "/", + { + "Fn::GetAtt": [ + "redirectRedirectBucketAA44E2FE", + "WebsiteURL" + ] + } + ] + } + ] + }, + "Id": "origin1" + } + ], + "PriceClass": "PriceClass_All", + "ViewerCertificate": { + "AcmCertificateArn": { + "Ref": "redirectRedirectCertificateD6C59F7F" + }, + "SslSupportMethod": "sni-only" + } + } + } + }, + "redirectRedirectAliasRecorde7728a9F2A656C": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "Name": "integ-same-region.example.com.", + "Type": "A", + "AliasTarget": { + "DNSName": { + "Fn::GetAtt": [ + "redirectRedirectDistributionCFDistribution1A4C48E3", + "DomainName" + ] + }, + "HostedZoneId": { + "Fn::FindInMap": [ + "AWSCloudFrontPartitionHostedZoneIdMap", + { + "Ref": "AWS::Partition" + }, + "zoneId" + ] + } + }, + "HostedZoneId": "Z23ABC4XYZL05B" + } + }, + "redirectRedirectAliasRecordSixe7728a9391F03E": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "Name": "integ-same-region.example.com.", + "Type": "AAAA", + "AliasTarget": { + "DNSName": { + "Fn::GetAtt": [ + "redirectRedirectDistributionCFDistribution1A4C48E3", + "DomainName" + ] + }, + "HostedZoneId": { + "Fn::FindInMap": [ + "AWSCloudFrontPartitionHostedZoneIdMap", + { + "Ref": "AWS::Partition" + }, + "zoneId" + ] + } + }, + "HostedZoneId": "Z23ABC4XYZL05B" + } + } + }, + "Mappings": { + "AWSCloudFrontPartitionHostedZoneIdMap": { + "aws": { + "zoneId": "Z2FDTNDATAQYW2" + }, + "aws-cn": { + "zoneId": "Z3RFFRIM2A3IF5" + } + } + }, + "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-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integ.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integ.json new file mode 100644 index 0000000000000..5fa00cc3de2a0 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integ.json @@ -0,0 +1,14 @@ +{ + "enableLookups": true, + "version": "22.0.0", + "testCases": { + "integ-test/DefaultTest": { + "stacks": [ + "integ-https-redirect-same-region" + ], + "stackUpdateWorkflow": false, + "assertionStack": "integ-test/DefaultTest/DeployAssert", + "assertionStackName": "integtestDefaultTestDeployAssert24D5C536" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json new file mode 100644 index 0000000000000..6aa47f90e9d7f --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json @@ -0,0 +1,19 @@ +{ + "version": "22.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "integtestDefaultTestDeployAssert24D5C536.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-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integtestDefaultTestDeployAssert24D5C536.template.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integtestDefaultTestDeployAssert24D5C536.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/integtestDefaultTestDeployAssert24D5C536.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-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/manifest.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/manifest.json new file mode 100644 index 0000000000000..ee2d553282578 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/manifest.json @@ -0,0 +1,177 @@ +{ + "version": "22.0.0", + "artifacts": { + "integ-https-redirect-same-region.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integ-https-redirect-same-region.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integ-https-redirect-same-region": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/us-east-1", + "properties": { + "templateFile": "integ-https-redirect-same-region.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/cfd1c229f1b6f82ba7c98886bbb9cce3f98c3d07fc1cee4b2525494d7cd8d4bf.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "integ-https-redirect-same-region.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-us-east-1", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "integ-https-redirect-same-region.assets" + ], + "metadata": { + "/integ-https-redirect-same-region/redirect/RedirectCertificate/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectCertificateD6C59F7F" + } + ], + "/integ-https-redirect-same-region/redirect/RedirectBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectBucketAA44E2FE" + } + ], + "/integ-https-redirect-same-region/redirect/RedirectDistribution/CFDistribution": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectDistributionCFDistribution1A4C48E3" + } + ], + "/integ-https-redirect-same-region/redirect/RedirectAliasRecorde7728a/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectAliasRecorde7728a9F2A656C" + } + ], + "/integ-https-redirect-same-region/redirect/RedirectAliasRecordSixe7728a/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectAliasRecordSixe7728a9391F03E" + } + ], + "/integ-https-redirect-same-region/AWSCloudFrontPartitionHostedZoneIdMap": [ + { + "type": "aws:cdk:logicalId", + "data": "AWSCloudFrontPartitionHostedZoneIdMap" + } + ], + "/integ-https-redirect-same-region/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-https-redirect-same-region/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ], + "redirectRedirectCertificateCertificateRequestorFunctionServiceRole9E01E94F": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectCertificateCertificateRequestorFunctionServiceRole9E01E94F", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "redirectRedirectCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy7AC24A96": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy7AC24A96", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "redirectRedirectCertificateCertificateRequestorFunctionBBD1548C": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectCertificateCertificateRequestorFunctionBBD1548C", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "redirectRedirectCertificateCertificateRequestorResourceBB4D62C1": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectCertificateCertificateRequestorResourceBB4D62C1", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ] + }, + "displayName": "integ-https-redirect-same-region" + }, + "integtestDefaultTestDeployAssert24D5C536.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integtestDefaultTestDeployAssert24D5C536.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integtestDefaultTestDeployAssert24D5C536": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integtestDefaultTestDeployAssert24D5C536.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": [ + "integtestDefaultTestDeployAssert24D5C536.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": [ + "integtestDefaultTestDeployAssert24D5C536.assets" + ], + "metadata": { + "/integ-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "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-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/tree.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/tree.json new file mode 100644 index 0000000000000..93f7bbb68dd62 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.js.snapshot/tree.json @@ -0,0 +1,384 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "integ-https-redirect-same-region": { + "id": "integ-https-redirect-same-region", + "path": "integ-https-redirect-same-region", + "children": { + "HostedZone": { + "id": "HostedZone", + "path": "integ-https-redirect-same-region/HostedZone", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "redirect": { + "id": "redirect", + "path": "integ-https-redirect-same-region/redirect", + "children": { + "RedirectCertificate": { + "id": "RedirectCertificate", + "path": "integ-https-redirect-same-region/redirect/RedirectCertificate", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-https-redirect-same-region/redirect/RedirectCertificate/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CertificateManager::Certificate", + "aws:cdk:cloudformation:props": { + "domainName": "integ-same-region.example.com", + "domainValidationOptions": [ + { + "domainName": "integ-same-region.example.com", + "hostedZoneId": "Z23ABC4XYZL05B" + }, + { + "domainName": "integ-same-region.example.com", + "hostedZoneId": "Z23ABC4XYZL05B" + } + ], + "subjectAlternativeNames": [ + "integ-same-region.example.com" + ], + "tags": [ + { + "key": "Name", + "value": "integ-https-redirect-same-region/redirect/RedirectCertificate" + } + ], + "validationMethod": "DNS" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-certificatemanager.CfnCertificate", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-certificatemanager.Certificate", + "version": "0.0.0" + } + }, + "RedirectBucket": { + "id": "RedirectBucket", + "path": "integ-https-redirect-same-region/redirect/RedirectBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-https-redirect-same-region/redirect/RedirectBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "publicAccessBlockConfiguration": { + "blockPublicAcls": true, + "blockPublicPolicy": true, + "ignorePublicAcls": true, + "restrictPublicBuckets": true + }, + "websiteConfiguration": { + "redirectAllRequestsTo": { + "hostName": "aws.amazon.com", + "protocol": "https" + } + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "RedirectDistribution": { + "id": "RedirectDistribution", + "path": "integ-https-redirect-same-region/redirect/RedirectDistribution", + "children": { + "CFDistribution": { + "id": "CFDistribution", + "path": "integ-https-redirect-same-region/redirect/RedirectDistribution/CFDistribution", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudFront::Distribution", + "aws:cdk:cloudformation:props": { + "distributionConfig": { + "comment": "Redirect to aws.amazon.com from integ-same-region.example.com", + "enabled": true, + "defaultRootObject": "", + "httpVersion": "http2", + "priceClass": "PriceClass_All", + "ipv6Enabled": true, + "origins": [ + { + "id": "origin1", + "domainName": { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "/", + { + "Fn::GetAtt": [ + "redirectRedirectBucketAA44E2FE", + "WebsiteURL" + ] + } + ] + } + ] + }, + "customOriginConfig": { + "httpPort": 80, + "httpsPort": 443, + "originKeepaliveTimeout": 5, + "originReadTimeout": 30, + "originProtocolPolicy": "http-only", + "originSslProtocols": [ + "TLSv1.2" + ] + }, + "connectionAttempts": 3, + "connectionTimeout": 10 + } + ], + "defaultCacheBehavior": { + "allowedMethods": [ + "GET", + "HEAD" + ], + "cachedMethods": [ + "GET", + "HEAD" + ], + "compress": true, + "forwardedValues": { + "queryString": false, + "cookies": { + "forward": "none" + } + }, + "targetOriginId": "origin1", + "viewerProtocolPolicy": "redirect-to-https" + }, + "aliases": [ + "integ-same-region.example.com" + ], + "viewerCertificate": { + "acmCertificateArn": { + "Ref": "redirectRedirectCertificateD6C59F7F" + }, + "sslSupportMethod": "sni-only" + } + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudfront.CfnDistribution", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudfront.CloudFrontWebDistribution", + "version": "0.0.0" + } + }, + "RedirectAliasRecorde7728a": { + "id": "RedirectAliasRecorde7728a", + "path": "integ-https-redirect-same-region/redirect/RedirectAliasRecorde7728a", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-https-redirect-same-region/redirect/RedirectAliasRecorde7728a/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "name": "integ-same-region.example.com.", + "type": "A", + "aliasTarget": { + "hostedZoneId": { + "Fn::FindInMap": [ + "AWSCloudFrontPartitionHostedZoneIdMap", + { + "Ref": "AWS::Partition" + }, + "zoneId" + ] + }, + "dnsName": { + "Fn::GetAtt": [ + "redirectRedirectDistributionCFDistribution1A4C48E3", + "DomainName" + ] + } + }, + "hostedZoneId": "Z23ABC4XYZL05B" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.ARecord", + "version": "0.0.0" + } + }, + "RedirectAliasRecordSixe7728a": { + "id": "RedirectAliasRecordSixe7728a", + "path": "integ-https-redirect-same-region/redirect/RedirectAliasRecordSixe7728a", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-https-redirect-same-region/redirect/RedirectAliasRecordSixe7728a/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "name": "integ-same-region.example.com.", + "type": "AAAA", + "aliasTarget": { + "hostedZoneId": { + "Fn::FindInMap": [ + "AWSCloudFrontPartitionHostedZoneIdMap", + { + "Ref": "AWS::Partition" + }, + "zoneId" + ] + }, + "dnsName": { + "Fn::GetAtt": [ + "redirectRedirectDistributionCFDistribution1A4C48E3", + "DomainName" + ] + } + }, + "hostedZoneId": "Z23ABC4XYZL05B" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.AaaaRecord", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53-patterns.HttpsRedirect", + "version": "0.0.0" + } + }, + "AWSCloudFrontPartitionHostedZoneIdMap": { + "id": "AWSCloudFrontPartitionHostedZoneIdMap", + "path": "integ-https-redirect-same-region/AWSCloudFrontPartitionHostedZoneIdMap", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnMapping", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-https-redirect-same-region/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-https-redirect-same-region/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "integ-test": { + "id": "integ-test", + "path": "integ-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "integ-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "integ-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.168" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "integ-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "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.168" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.ts b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.ts new file mode 100644 index 0000000000000..d5f79d88d0697 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect-same-region.ts @@ -0,0 +1,38 @@ +import { PublicHostedZone } from '@aws-cdk/aws-route53'; +import { Stack, App } from '@aws-cdk/core'; +// import { ROUTE53_PATTERNS_USE_CERTIFICATE } from '@aws-cdk/cx-api'; +import { IntegTest } from '@aws-cdk/integ-tests'; +import { HttpsRedirect } from '../lib'; +const hostedZoneId = process.env.CDK_INTEG_HOSTED_ZONE_ID ?? process.env.HOSTED_ZONE_ID; +if (!hostedZoneId) throw new Error('For this test you must provide your own HostedZoneId as an env var "HOSTED_ZONE_ID"'); +const hostedZoneName = process.env.CDK_INTEG_HOSTED_ZONE_NAME ?? process.env.HOSTED_ZONE_NAME; +if (!hostedZoneName) throw new Error('For this test you must provide your own HostedZoneName as an env var "HOSTED_ZONE_NAME"'); +const domainName = process.env.CDK_INTEG_DOMAIN_NAME ?? process.env.DOMAIN_NAME; +if (!domainName) throw new Error('For this test you must provide your own Domain Name as an env var "DOMAIN_NAME"'); + +const app = new App({ + // uncomment this to test the old behavior + // postCliContext: { + // [ROUTE53_PATTERNS_USE_CERTIFICATE]: false, + // }, +}); +const testCase = new Stack(app, 'integ-https-redirect-same-region', { + env: { region: 'us-east-1' }, +}); + +const hostedZone = PublicHostedZone.fromHostedZoneAttributes(testCase, 'HostedZone', { + hostedZoneId, + zoneName: hostedZoneName, +}); +new HttpsRedirect(testCase, 'redirect', { + zone: hostedZone, + recordNames: [`integ-same-region.${hostedZoneName}`], + targetDomain: 'aws.amazon.com', +}); + +new IntegTest(app, 'integ-test', { + testCases: [testCase], + enableLookups: true, + stackUpdateWorkflow: false, +}); + diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3/__entrypoint__.js b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3/__entrypoint__.js new file mode 100644 index 0000000000000..1e3a3093c1706 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3/__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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLFNBQVM7Q0FDNUIsQ0FBQztBQUVGLE1BQU0sZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDbEcsTUFBTSwwQkFBMEIsR0FBRyw4REFBOEQsQ0FBQztBQVczRixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsTUFBTSxjQUFjLEdBQUcsRUFBRSxHQUFHLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLENBQUM7SUFDeEQsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxjQUFjLEVBQUUsU0FBUyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFM0QsdUVBQXVFO0lBQ3ZFLHVFQUF1RTtJQUN2RSxhQUFhO0lBQ2IsSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsSUFBSSxLQUFLLENBQUMsa0JBQWtCLEtBQUssZ0NBQWdDLEVBQUU7UUFDbkcsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsdURBQXVELENBQUMsQ0FBQztRQUN0RSxNQUFNLGNBQWMsQ0FBQyxTQUFTLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFDdkMsT0FBTztLQUNSO0lBRUQsSUFBSTtRQUNGLHlFQUF5RTtRQUN6RSxpRUFBaUU7UUFDakUsd0NBQXdDO1FBQ3hDLGlFQUFpRTtRQUNqRSxNQUFNLFdBQVcsR0FBWSxPQUFPLENBQUMsZ0JBQVEsQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLE9BQU8sQ0FBQztRQUN4RSxNQUFNLE1BQU0sR0FBRyxNQUFNLFdBQVcsQ0FBQyxjQUFjLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFFMUQsdURBQXVEO1FBQ3ZELE1BQU0sYUFBYSxHQUFHLGNBQWMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFFcEQsMkJBQTJCO1FBQzNCLE1BQU0sY0FBYyxDQUFDLFNBQVMsRUFBRSxhQUFhLENBQUMsQ0FBQztLQUNoRDtJQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ1YsTUFBTSxJQUFJLEdBQWE7WUFDckIsR0FBRyxLQUFLO1lBQ1IsTUFBTSxFQUFFLGdCQUFRLENBQUMsa0JBQWtCLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPO1NBQzFELENBQUM7UUFFRixJQUFJLENBQUMsSUFBSSxDQUFDLGtCQUFrQixFQUFFO1lBQzVCLHlFQUF5RTtZQUN6RSxtRUFBbUU7WUFDbkUsd0VBQXdFO1lBQ3hFLHFFQUFxRTtZQUNyRSxnQ0FBZ0M7WUFDaEMsSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsRUFBRTtnQkFDbEMsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsNEdBQTRHLENBQUMsQ0FBQztnQkFDM0gsSUFBSSxDQUFDLGtCQUFrQixHQUFHLGdDQUFnQyxDQUFDO2FBQzVEO2lCQUFNO2dCQUNMLGtFQUFrRTtnQkFDbEUsNkRBQTZEO2dCQUM3RCxnQkFBUSxDQUFDLEdBQUcsQ0FBQyw2REFBNkQsSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUM7YUFDcEc7U0FDRjtRQUVELG1FQUFtRTtRQUNuRSxNQUFNLGNBQWMsQ0FBQyxRQUFRLEVBQUUsSUFBSSxDQUFDLENBQUM7S0FDdEM7QUFDSCxDQUFDO0FBbkRELDBCQW1EQztBQUVELFNBQVMsY0FBYyxDQUNyQixVQUF5RixFQUN6RixrQkFBMEMsRUFBRztJQUU3QyxzRUFBc0U7SUFDdEUsdUJBQXVCO0lBQ3ZCLE1BQU0sa0JBQWtCLEdBQUcsZUFBZSxDQUFDLGtCQUFrQixJQUFJLFVBQVUsQ0FBQyxrQkFBa0IsSUFBSSxVQUFVLENBQUMsU0FBUyxDQUFDO0lBRXZILGtFQUFrRTtJQUNsRSxJQUFJLFVBQVUsQ0FBQyxXQUFXLEtBQUssUUFBUSxJQUFJLGtCQUFrQixLQUFLLFVBQVUsQ0FBQyxrQkFBa0IsRUFBRTtRQUMvRixNQUFNLElBQUksS0FBSyxDQUFDLHdEQUF3RCxVQUFVLENBQUMsa0JBQWtCLFNBQVMsZUFBZSxDQUFDLGtCQUFrQixtQkFBbUIsQ0FBQyxDQUFDO0tBQ3RLO0lBRUQsMERBQTBEO0lBQzFELE9BQU87UUFDTCxHQUFHLFVBQVU7UUFDYixHQUFHLGVBQWU7UUFDbEIsa0JBQWtCLEVBQUUsa0JBQWtCO0tBQ3ZDLENBQUM7QUFDSixDQUFDO0FBRUQsS0FBSyxVQUFVLGNBQWMsQ0FBQyxNQUE0QixFQUFFLEtBQWU7SUFDekUsTUFBTSxJQUFJLEdBQW1EO1FBQzNELE1BQU0sRUFBRSxNQUFNO1FBQ2QsTUFBTSxFQUFFLEtBQUssQ0FBQyxNQUFNLElBQUksTUFBTTtRQUM5QixPQUFPLEVBQUUsS0FBSyxDQUFDLE9BQU87UUFDdEIsU0FBUyxFQUFFLEtBQUssQ0FBQyxTQUFTO1FBQzFCLGtCQUFrQixFQUFFLEtBQUssQ0FBQyxrQkFBa0IsSUFBSSwwQkFBMEI7UUFDMUUsaUJBQWlCLEVBQUUsS0FBSyxDQUFDLGlCQUFpQjtRQUMxQyxNQUFNLEVBQUUsS0FBSyxDQUFDLE1BQU07UUFDcEIsSUFBSSxFQUFFLEtBQUssQ0FBQyxJQUFJO0tBQ2pCLENBQUM7SUFFRixnQkFBUSxDQUFDLEdBQUcsQ0FBQyxtQ0FBbUMsRUFBRSxJQUFJLENBQUMsQ0FBQztJQUV4RCxNQUFNLFlBQVksR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzFDLE1BQU0sU0FBUyxHQUFHLEdBQUcsQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQy9DLE1BQU0sR0FBRyxHQUFHO1FBQ1YsUUFBUSxFQUFFLFNBQVMsQ0FBQyxRQUFRO1FBQzVCLElBQUksRUFBRSxTQUFTLENBQUMsSUFBSTtRQUNwQixNQUFNLEVBQUUsS0FBSztRQUNiLE9BQU8sRUFBRSxFQUFFLGNBQWMsRUFBRSxFQUFFLEVBQUUsZ0JBQWdCLEVBQUUsWUFBWSxDQUFDLE1BQU0sRUFBRTtLQUN2RSxDQUFDO0lBRUYsTUFBTSxZQUFZLEdBQUc7UUFDbkIsUUFBUSxFQUFFLENBQUM7UUFDWCxLQUFLLEVBQUUsSUFBSTtLQUNaLENBQUM7SUFDRixNQUFNLFdBQVcsQ0FBQyxZQUFZLEVBQUUsZ0JBQVEsQ0FBQyxlQUFlLENBQUMsQ0FBQyxHQUFHLEVBQUUsWUFBWSxDQUFDLENBQUM7QUFDL0UsQ0FBQztBQUVELEtBQUssVUFBVSxzQkFBc0IsQ0FBQyxPQUE2QixFQUFFLFlBQW9CO0lBQ3ZGLE9BQU8sSUFBSSxPQUFPLENBQUMsQ0FBQyxPQUFPLEVBQUUsTUFBTSxFQUFFLEVBQUU7UUFDckMsSUFBSTtZQUNGLE1BQU0sT0FBTyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsT0FBTyxFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUMsT0FBTyxFQUFFLENBQUMsQ0FBQztZQUN2RCxPQUFPLENBQUMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLENBQUMsQ0FBQztZQUM1QixPQUFPLENBQUMsS0FBSyxDQUFDLFlBQVksQ0FBQyxDQUFDO1lBQzVCLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQztTQUNmO1FBQUMsT0FBTyxDQUFDLEVBQUU7WUFDVixNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUM7U0FDWDtJQUNILENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUVELFNBQVMsVUFBVSxDQUFDLEdBQVcsRUFBRSxHQUFHLE1BQWE7SUFDL0Msc0NBQXNDO0lBQ3RDLE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxFQUFFLEdBQUcsTUFBTSxDQUFDLENBQUM7QUFDOUIsQ0FBQztBQVNELFNBQWdCLFdBQVcsQ0FBMEIsT0FBcUIsRUFBRSxFQUE0QjtJQUN0RyxPQUFPLEtBQUssRUFBRSxHQUFHLEVBQUssRUFBRSxFQUFFO1FBQ3hCLElBQUksUUFBUSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUM7UUFDaEMsSUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQztRQUN2QixPQUFPLElBQUksRUFBRTtZQUNYLElBQUk7Z0JBQ0YsT0FBTyxNQUFNLEVBQUUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO2FBQ3hCO1lBQUMsT0FBTyxDQUFDLEVBQUU7Z0JBQ1YsSUFBSSxRQUFRLEVBQUUsSUFBSSxDQUFDLEVBQUU7b0JBQ25CLE1BQU0sQ0FBQyxDQUFDO2lCQUNUO2dCQUNELE1BQU0sS0FBSyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLEVBQUUsQ0FBQyxDQUFDLENBQUM7Z0JBQzVDLEVBQUUsSUFBSSxDQUFDLENBQUM7YUFDVDtTQUNGO0lBQ0gsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQWhCRCxrQ0FnQkM7QUFFRCxLQUFLLFVBQVUsS0FBSyxDQUFDLEVBQVU7SUFDN0IsT0FBTyxJQUFJLE9BQU8sQ0FBQyxDQUFDLEVBQUUsRUFBRSxFQUFFLENBQUMsVUFBVSxDQUFDLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ2pELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBodHRwcyBmcm9tICdodHRwcyc7XG5pbXBvcnQgKiBhcyB1cmwgZnJvbSAndXJsJztcblxuLy8gZm9yIHVuaXQgdGVzdHNcbmV4cG9ydCBjb25zdCBleHRlcm5hbCA9IHtcbiAgc2VuZEh0dHBSZXF1ZXN0OiBkZWZhdWx0U2VuZEh0dHBSZXF1ZXN0LFxuICBsb2c6IGRlZmF1bHRMb2csXG4gIGluY2x1ZGVTdGFja1RyYWNlczogdHJ1ZSxcbiAgdXNlckhhbmRsZXJJbmRleDogJy4vaW5kZXgnLFxufTtcblxuY29uc3QgQ1JFQVRFX0ZBSUxFRF9QSFlTSUNBTF9JRF9NQVJLRVIgPSAnQVdTQ0RLOjpDdXN0b21SZXNvdXJjZVByb3ZpZGVyRnJhbWV3b3JrOjpDUkVBVEVfRkFJTEVEJztcbmNvbnN0IE1JU1NJTkdfUEhZU0lDQUxfSURfTUFSS0VSID0gJ0FXU0NESzo6Q3VzdG9tUmVzb3VyY2VQcm92aWRlckZyYW1ld29yazo6TUlTU0lOR19QSFlTSUNBTF9JRCc7XG5cbmV4cG9ydCB0eXBlIFJlc3BvbnNlID0gQVdTTGFtYmRhLkNsb3VkRm9ybWF0aW9uQ3VzdG9tUmVzb3VyY2VFdmVudCAmIEhhbmRsZXJSZXNwb25zZTtcbmV4cG9ydCB0eXBlIEhhbmRsZXIgPSAoZXZlbnQ6IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlRXZlbnQsIGNvbnRleHQ6IEFXU0xhbWJkYS5Db250ZXh0KSA9PiBQcm9taXNlPEhhbmRsZXJSZXNwb25zZSB8IHZvaWQ+O1xuZXhwb3J0IHR5cGUgSGFuZGxlclJlc3BvbnNlID0gdW5kZWZpbmVkIHwge1xuICBEYXRhPzogYW55O1xuICBQaHlzaWNhbFJlc291cmNlSWQ/OiBzdHJpbmc7XG4gIFJlYXNvbj86IHN0cmluZztcbiAgTm9FY2hvPzogYm9vbGVhbjtcbn07XG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBoYW5kbGVyKGV2ZW50OiBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZUV2ZW50LCBjb250ZXh0OiBBV1NMYW1iZGEuQ29udGV4dCkge1xuICBjb25zdCBzYW5pdGl6ZWRFdmVudCA9IHsgLi4uZXZlbnQsIFJlc3BvbnNlVVJMOiAnLi4uJyB9O1xuICBleHRlcm5hbC5sb2coSlNPTi5zdHJpbmdpZnkoc2FuaXRpemVkRXZlbnQsIHVuZGVmaW5lZCwgMikpO1xuXG4gIC8vIGlnbm9yZSBERUxFVEUgZXZlbnQgd2hlbiB0aGUgcGh5c2ljYWwgcmVzb3VyY2UgSUQgaXMgdGhlIG1hcmtlciB0aGF0XG4gIC8vIGluZGljYXRlcyB0aGF0IHRoaXMgREVMRVRFIGlzIGEgc3Vic2VxdWVudCBERUxFVEUgdG8gYSBmYWlsZWQgQ1JFQVRFXG4gIC8vIG9wZXJhdGlvbi5cbiAgaWYgKGV2ZW50LlJlcXVlc3RUeXBlID09PSAnRGVsZXRlJyAmJiBldmVudC5QaHlzaWNhbFJlc291cmNlSWQgPT09IENSRUFURV9GQUlMRURfUEhZU0lDQUxfSURfTUFSS0VSKSB7XG4gICAgZXh0ZXJuYWwubG9nKCdpZ25vcmluZyBERUxFVEUgZXZlbnQgY2F1c2VkIGJ5IGEgZmFpbGVkIENSRUFURSBldmVudCcpO1xuICAgIGF3YWl0IHN1Ym1pdFJlc3BvbnNlKCdTVUNDRVNTJywgZXZlbnQpO1xuICAgIHJldHVybjtcbiAgfVxuXG4gIHRyeSB7XG4gICAgLy8gaW52b2tlIHRoZSB1c2VyIGhhbmRsZXIuIHRoaXMgaXMgaW50ZW50aW9uYWxseSBpbnNpZGUgdGhlIHRyeS1jYXRjaCB0b1xuICAgIC8vIGVuc3VyZSB0aGF0IGlmIHRoZXJlIGlzIGFuIGVycm9yIGl0J3MgcmVwb3J0ZWQgYXMgYSBmYWlsdXJlIHRvXG4gICAgLy8gY2xvdWRmb3JtYXRpb24gKG90aGVyd2lzZSBjZm4gd2FpdHMpLlxuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tcmVxdWlyZS1pbXBvcnRzXG4gICAgY29uc3QgdXNlckhhbmRsZXI6IEhhbmRsZXIgPSByZXF1aXJlKGV4dGVybmFsLnVzZXJIYW5kbGVySW5kZXgpLmhhbmRsZXI7XG4gICAgY29uc3QgcmVzdWx0ID0gYXdhaXQgdXNlckhhbmRsZXIoc2FuaXRpemVkRXZlbnQsIGNvbnRleHQpO1xuXG4gICAgLy8gdmFsaWRhdGUgdXNlciByZXNwb25zZSBhbmQgY3JlYXRlIHRoZSBjb21iaW5lZCBldmVudFxuICAgIGNvbnN0IHJlc3BvbnNlRXZlbnQgPSByZW5kZXJSZXNwb25zZShldmVudCwgcmVzdWx0KTtcblxuICAgIC8vIHN1Ym1pdCB0byBjZm4gYXMgc3VjY2Vzc1xuICAgIGF3YWl0IHN1Ym1pdFJlc3BvbnNlKCdTVUNDRVNTJywgcmVzcG9uc2VFdmVudCk7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBjb25zdCByZXNwOiBSZXNwb25zZSA9IHtcbiAgICAgIC4uLmV2ZW50LFxuICAgICAgUmVhc29uOiBleHRlcm5hbC5pbmNsdWRlU3RhY2tUcmFjZXMgPyBlLnN0YWNrIDogZS5tZXNzYWdlLFxuICAgIH07XG5cbiAgICBpZiAoIXJlc3AuUGh5c2ljYWxSZXNvdXJjZUlkKSB7XG4gICAgICAvLyBzcGVjaWFsIGNhc2U6IGlmIENSRUFURSBmYWlscywgd2hpY2ggdXN1YWxseSBpbXBsaWVzLCB3ZSB1c3VhbGx5IGRvbid0XG4gICAgICAvLyBoYXZlIGEgcGh5c2ljYWwgcmVzb3VyY2UgaWQuIGluIHRoaXMgY2FzZSwgdGhlIHN1YnNlcXVlbnQgREVMRVRFXG4gICAgICAvLyBvcGVyYXRpb24gZG9lcyBub3QgaGF2ZSBhbnkgbWVhbmluZywgYW5kIHdpbGwgbGlrZWx5IGZhaWwgYXMgd2VsbC4gdG9cbiAgICAgIC8vIGFkZHJlc3MgdGhpcywgd2UgdXNlIGEgbWFya2VyIHNvIHRoZSBwcm92aWRlciBmcmFtZXdvcmsgY2FuIHNpbXBseVxuICAgICAgLy8gaWdub3JlIHRoZSBzdWJzZXF1ZW50IERFTEVURS5cbiAgICAgIGlmIChldmVudC5SZXF1ZXN0VHlwZSA9PT0gJ0NyZWF0ZScpIHtcbiAgICAgICAgZXh0ZXJuYWwubG9nKCdDUkVBVEUgZmFpbGVkLCByZXNwb25kaW5nIHdpdGggYSBtYXJrZXIgcGh5c2ljYWwgcmVzb3VyY2UgaWQgc28gdGhhdCB0aGUgc3Vic2VxdWVudCBERUxFVEUgd2lsbCBiZSBpZ25vcmVkJyk7XG4gICAgICAgIHJlc3AuUGh5c2ljYWxSZXNvdXJjZUlkID0gQ1JFQVRFX0ZBSUxFRF9QSFlTSUNBTF9JRF9NQVJLRVI7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyBvdGhlcndpc2UsIGlmIFBoeXNpY2FsUmVzb3VyY2VJZCBpcyBub3Qgc3BlY2lmaWVkLCBzb21ldGhpbmcgaXNcbiAgICAgICAgLy8gdGVycmlibHkgd3JvbmcgYmVjYXVzZSBhbGwgb3RoZXIgZXZlbnRzIHNob3VsZCBoYXZlIGFuIElELlxuICAgICAgICBleHRlcm5hbC5sb2coYEVSUk9SOiBNYWxmb3JtZWQgZXZlbnQuIFwiUGh5c2ljYWxSZXNvdXJjZUlkXCIgaXMgcmVxdWlyZWQ6ICR7SlNPTi5zdHJpbmdpZnkoZXZlbnQpfWApO1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIHRoaXMgaXMgYW4gYWN0dWFsIGVycm9yLCBmYWlsIHRoZSBhY3Rpdml0eSBhbHRvZ2V0aGVyIGFuZCBleGlzdC5cbiAgICBhd2FpdCBzdWJtaXRSZXNwb25zZSgnRkFJTEVEJywgcmVzcCk7XG4gIH1cbn1cblxuZnVuY3Rpb24gcmVuZGVyUmVzcG9uc2UoXG4gIGNmblJlcXVlc3Q6IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlRXZlbnQgJiB7IFBoeXNpY2FsUmVzb3VyY2VJZD86IHN0cmluZyB9LFxuICBoYW5kbGVyUmVzcG9uc2U6IHZvaWQgfCBIYW5kbGVyUmVzcG9uc2UgPSB7IH0pOiBSZXNwb25zZSB7XG5cbiAgLy8gaWYgcGh5c2ljYWwgSUQgaXMgbm90IHJldHVybmVkLCB3ZSBoYXZlIHNvbWUgZGVmYXVsdHMgZm9yIHlvdSBiYXNlZFxuICAvLyBvbiB0aGUgcmVxdWVzdCB0eXBlLlxuICBjb25zdCBwaHlzaWNhbFJlc291cmNlSWQgPSBoYW5kbGVyUmVzcG9uc2UuUGh5c2ljYWxSZXNvdXJjZUlkID8/IGNmblJlcXVlc3QuUGh5c2ljYWxSZXNvdXJjZUlkID8/IGNmblJlcXVlc3QuUmVxdWVzdElkO1xuXG4gIC8vIGlmIHdlIGFyZSBpbiBERUxFVEUgYW5kIHBoeXNpY2FsIElEIHdhcyBjaGFuZ2VkLCBpdCdzIGFuIGVycm9yLlxuICBpZiAoY2ZuUmVxdWVzdC5SZXF1ZXN0VHlwZSA9PT0gJ0RlbGV0ZScgJiYgcGh5c2ljYWxSZXNvdXJjZUlkICE9PSBjZm5SZXF1ZXN0LlBoeXNpY2FsUmVzb3VyY2VJZCkge1xuICAgIHRocm93IG5ldyBFcnJvcihgREVMRVRFOiBjYW5ub3QgY2hhbmdlIHRoZSBwaHlzaWNhbCByZXNvdXJjZSBJRCBmcm9tIFwiJHtjZm5SZXF1ZXN0LlBoeXNpY2FsUmVzb3VyY2VJZH1cIiB0byBcIiR7aGFuZGxlclJlc3BvbnNlLlBoeXNpY2FsUmVzb3VyY2VJZH1cIiBkdXJpbmcgZGVsZXRpb25gKTtcbiAgfVxuXG4gIC8vIG1lcmdlIHJlcXVlc3QgZXZlbnQgYW5kIHJlc3VsdCBldmVudCAocmVzdWx0IHByZXZhaWxzKS5cbiAgcmV0dXJuIHtcbiAgICAuLi5jZm5SZXF1ZXN0LFxuICAgIC4uLmhhbmRsZXJSZXNwb25zZSxcbiAgICBQaHlzaWNhbFJlc291cmNlSWQ6IHBoeXNpY2FsUmVzb3VyY2VJZCxcbiAgfTtcbn1cblxuYXN5bmMgZnVuY3Rpb24gc3VibWl0UmVzcG9uc2Uoc3RhdHVzOiAnU1VDQ0VTUycgfCAnRkFJTEVEJywgZXZlbnQ6IFJlc3BvbnNlKSB7XG4gIGNvbnN0IGpzb246IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlUmVzcG9uc2UgPSB7XG4gICAgU3RhdHVzOiBzdGF0dXMsXG4gICAgUmVhc29uOiBldmVudC5SZWFzb24gPz8gc3RhdHVzLFxuICAgIFN0YWNrSWQ6IGV2ZW50LlN0YWNrSWQsXG4gICAgUmVxdWVzdElkOiBldmVudC5SZXF1ZXN0SWQsXG4gICAgUGh5c2ljYWxSZXNvdXJjZUlkOiBldmVudC5QaHlzaWNhbFJlc291cmNlSWQgfHwgTUlTU0lOR19QSFlTSUNBTF9JRF9NQVJLRVIsXG4gICAgTG9naWNhbFJlc291cmNlSWQ6IGV2ZW50LkxvZ2ljYWxSZXNvdXJjZUlkLFxuICAgIE5vRWNobzogZXZlbnQuTm9FY2hvLFxuICAgIERhdGE6IGV2ZW50LkRhdGEsXG4gIH07XG5cbiAgZXh0ZXJuYWwubG9nKCdzdWJtaXQgcmVzcG9uc2UgdG8gY2xvdWRmb3JtYXRpb24nLCBqc29uKTtcblxuICBjb25zdCByZXNwb25zZUJvZHkgPSBKU09OLnN0cmluZ2lmeShqc29uKTtcbiAgY29uc3QgcGFyc2VkVXJsID0gdXJsLnBhcnNlKGV2ZW50LlJlc3BvbnNlVVJMKTtcbiAgY29uc3QgcmVxID0ge1xuICAgIGhvc3RuYW1lOiBwYXJzZWRVcmwuaG9zdG5hbWUsXG4gICAgcGF0aDogcGFyc2VkVXJsLnBhdGgsXG4gICAgbWV0aG9kOiAnUFVUJyxcbiAgICBoZWFkZXJzOiB7ICdjb250ZW50LXR5cGUnOiAnJywgJ2NvbnRlbnQtbGVuZ3RoJzogcmVzcG9uc2VCb2R5Lmxlbmd0aCB9LFxuICB9O1xuXG4gIGNvbnN0IHJldHJ5T3B0aW9ucyA9IHtcbiAgICBhdHRlbXB0czogNSxcbiAgICBzbGVlcDogMTAwMCxcbiAgfTtcbiAgYXdhaXQgd2l0aFJldHJpZXMocmV0cnlPcHRpb25zLCBleHRlcm5hbC5zZW5kSHR0cFJlcXVlc3QpKHJlcSwgcmVzcG9uc2VCb2R5KTtcbn1cblxuYXN5bmMgZnVuY3Rpb24gZGVmYXVsdFNlbmRIdHRwUmVxdWVzdChvcHRpb25zOiBodHRwcy5SZXF1ZXN0T3B0aW9ucywgcmVzcG9uc2VCb2R5OiBzdHJpbmcpOiBQcm9taXNlPHZvaWQ+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICB0cnkge1xuICAgICAgY29uc3QgcmVxdWVzdCA9IGh0dHBzLnJlcXVlc3Qob3B0aW9ucywgXyA9PiByZXNvbHZlKCkpO1xuICAgICAgcmVxdWVzdC5vbignZXJyb3InLCByZWplY3QpO1xuICAgICAgcmVxdWVzdC53cml0ZShyZXNwb25zZUJvZHkpO1xuICAgICAgcmVxdWVzdC5lbmQoKTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZWplY3QoZSk7XG4gICAgfVxuICB9KTtcbn1cblxuZnVuY3Rpb24gZGVmYXVsdExvZyhmbXQ6IHN0cmluZywgLi4ucGFyYW1zOiBhbnlbXSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tY29uc29sZVxuICBjb25zb2xlLmxvZyhmbXQsIC4uLnBhcmFtcyk7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgUmV0cnlPcHRpb25zIHtcbiAgLyoqIEhvdyBtYW55IHJldHJpZXMgKHdpbGwgYXQgbGVhc3QgdHJ5IG9uY2UpICovXG4gIHJlYWRvbmx5IGF0dGVtcHRzOiBudW1iZXI7XG4gIC8qKiBTbGVlcCBiYXNlLCBpbiBtcyAqL1xuICByZWFkb25seSBzbGVlcDogbnVtYmVyO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gd2l0aFJldHJpZXM8QSBleHRlbmRzIEFycmF5PGFueT4sIEI+KG9wdGlvbnM6IFJldHJ5T3B0aW9ucywgZm46ICguLi54czogQSkgPT4gUHJvbWlzZTxCPik6ICguLi54czogQSkgPT4gUHJvbWlzZTxCPiB7XG4gIHJldHVybiBhc3luYyAoLi4ueHM6IEEpID0+IHtcbiAgICBsZXQgYXR0ZW1wdHMgPSBvcHRpb25zLmF0dGVtcHRzO1xuICAgIGxldCBtcyA9IG9wdGlvbnMuc2xlZXA7XG4gICAgd2hpbGUgKHRydWUpIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIHJldHVybiBhd2FpdCBmbiguLi54cyk7XG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIGlmIChhdHRlbXB0cy0tIDw9IDApIHtcbiAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSAqIG1zKSk7XG4gICAgICAgIG1zICo9IDI7XG4gICAgICB9XG4gICAgfVxuICB9O1xufVxuXG5hc3luYyBmdW5jdGlvbiBzbGVlcChtczogbnVtYmVyKTogUHJvbWlzZTx2b2lkPiB7XG4gIHJldHVybiBuZXcgUHJvbWlzZSgob2spID0+IHNldFRpbWVvdXQob2ssIG1zKSk7XG59Il19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3/index.js b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3/index.js new file mode 100644 index 0000000000000..9f71f540e4994 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/asset.f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3/index.js @@ -0,0 +1,148 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +/*eslint-disable no-console*/ +/* eslint-disable import/no-extraneous-dependencies */ +const aws_sdk_1 = require("aws-sdk"); +async function handler(event) { + const props = event.ResourceProperties.WriterProps; + const exports = props.exports; + const ssm = new aws_sdk_1.SSM({ region: props.region }); + try { + switch (event.RequestType) { + case 'Create': + console.info(`Creating new SSM Parameter exports in region ${props.region}`); + await throwIfAnyInUse(ssm, exports); + await putParameters(ssm, exports); + return; + case 'Update': + const oldProps = event.OldResourceProperties.WriterProps; + const oldExports = oldProps.exports; + const newExports = except(exports, oldExports); + // throw an error to fail the deployment if any export value is changing + const changedExports = changed(oldExports, exports); + if (changedExports.length > 0) { + throw new Error('Some exports have changed!\n' + changedExports.join('\n')); + } + // if we are removing any exports that are in use, then throw an + // error to fail the deployment + const removedExports = except(oldExports, exports); + await throwIfAnyInUse(ssm, removedExports); + // if the ones we are removing are not in use then delete them + await ssm.deleteParameters({ + Names: Object.keys(removedExports), + }).promise(); + // also throw an error if we are creating a new export that already exists for some reason + await throwIfAnyInUse(ssm, newExports); + console.info(`Creating new SSM Parameter exports in region ${props.region}`); + await putParameters(ssm, newExports); + return; + case 'Delete': + // if any of the exports are currently in use then throw an error to fail + // the stack deletion. + await throwIfAnyInUse(ssm, exports); + // if none are in use then delete all of them + await ssm.deleteParameters({ + Names: Object.keys(exports), + }).promise(); + return; + default: + return; + } + } + catch (e) { + console.error('Error processing event: ', e); + throw e; + } +} +exports.handler = handler; +; +/** + * Create parameters for existing exports + */ +async function putParameters(ssm, parameters) { + await Promise.all(Array.from(Object.entries(parameters), ([name, value]) => { + return ssm.putParameter({ + Name: name, + Value: value, + Type: 'String', + }).promise(); + })); +} +/** + * Query for existing parameters that are in use + */ +async function throwIfAnyInUse(ssm, parameters) { + const tagResults = new Map(); + await Promise.all(Object.keys(parameters).map(async (name) => { + const result = await isInUse(ssm, name); + if (result.size > 0) { + tagResults.set(name, result); + } + })); + if (tagResults.size > 0) { + const message = Object.entries(tagResults) + .map((result) => `${result[0]} is in use by stack(s) ${result[1].join(' ')}`) + .join('\n'); + throw new Error(`Exports cannot be updated: \n${message}`); + } +} +/** + * Check if a parameter is in use + */ +async function isInUse(ssm, parameterName) { + const tagResults = new Set(); + try { + const result = await ssm.listTagsForResource({ + ResourceId: parameterName, + ResourceType: 'Parameter', + }).promise(); + result.TagList?.forEach(tag => { + const tagParts = tag.Key.split(':'); + if (tagParts[0] === 'aws-cdk' && tagParts[1] === 'strong-ref') { + tagResults.add(tagParts[2]); + } + }); + } + catch (e) { + // an InvalidResourceId means that the parameter doesn't exist + // which we should ignore since that means it's not in use + if (e.code === 'InvalidResourceId') { + return new Set(); + } + throw e; + } + return tagResults; +} +/** + * Return only the items from source that do not exist in the filter + * + * @param source the source object to perform the filter on + * @param filter filter out items that exist in this object + * @returns any exports that don't exist in the filter + */ +function except(source, filter) { + return Object.keys(source) + .filter(key => (!filter.hasOwnProperty(key))) + .reduce((acc, curr) => { + acc[curr] = source[curr]; + return acc; + }, {}); +} +/** + * Return items that exist in both the the old parameters and the new parameters, + * but have different values + * + * @param oldParams the exports that existed previous to this execution + * @param newParams the exports for the current execution + * @returns any parameters that have different values + */ +function changed(oldParams, newParams) { + return Object.keys(oldParams) + .filter(key => (newParams.hasOwnProperty(key) && oldParams[key] !== newParams[key])) + .reduce((acc, curr) => { + acc.push(curr); + return acc; + }, []); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2QkFBNkI7QUFDN0Isc0RBQXNEO0FBQ3RELHFDQUE4QjtBQUd2QixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtEO0lBQzlFLE1BQU0sS0FBSyxHQUF3QixLQUFLLENBQUMsa0JBQWtCLENBQUMsV0FBVyxDQUFDO0lBQ3hFLE1BQU0sT0FBTyxHQUFHLEtBQUssQ0FBQyxPQUE2QixDQUFDO0lBRXBELE1BQU0sR0FBRyxHQUFHLElBQUksYUFBRyxDQUFDLEVBQUUsTUFBTSxFQUFFLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDO0lBQzlDLElBQUk7UUFDRixRQUFRLEtBQUssQ0FBQyxXQUFXLEVBQUU7WUFDekIsS0FBSyxRQUFRO2dCQUNYLE9BQU8sQ0FBQyxJQUFJLENBQUMsZ0RBQWdELEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDO2dCQUM3RSxNQUFNLGVBQWUsQ0FBQyxHQUFHLEVBQUUsT0FBTyxDQUFDLENBQUM7Z0JBQ3BDLE1BQU0sYUFBYSxDQUFDLEdBQUcsRUFBRSxPQUFPLENBQUMsQ0FBQztnQkFDbEMsT0FBTztZQUNULEtBQUssUUFBUTtnQkFDWCxNQUFNLFFBQVEsR0FBd0IsS0FBSyxDQUFDLHFCQUFxQixDQUFDLFdBQVcsQ0FBQztnQkFDOUUsTUFBTSxVQUFVLEdBQUcsUUFBUSxDQUFDLE9BQTZCLENBQUM7Z0JBQzFELE1BQU0sVUFBVSxHQUFHLE1BQU0sQ0FBQyxPQUFPLEVBQUUsVUFBVSxDQUFDLENBQUM7Z0JBRS9DLHdFQUF3RTtnQkFDeEUsTUFBTSxjQUFjLEdBQUcsT0FBTyxDQUFDLFVBQVUsRUFBRSxPQUFPLENBQUMsQ0FBQztnQkFDcEQsSUFBSSxjQUFjLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRTtvQkFDN0IsTUFBTSxJQUFJLEtBQUssQ0FBQyw4QkFBOEIsR0FBRSxjQUFjLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7aUJBQzVFO2dCQUNELGdFQUFnRTtnQkFDaEUsK0JBQStCO2dCQUMvQixNQUFNLGNBQWMsR0FBRyxNQUFNLENBQUMsVUFBVSxFQUFFLE9BQU8sQ0FBQyxDQUFDO2dCQUNuRCxNQUFNLGVBQWUsQ0FBQyxHQUFHLEVBQUUsY0FBYyxDQUFDLENBQUM7Z0JBQzNDLDhEQUE4RDtnQkFDOUQsTUFBTSxHQUFHLENBQUMsZ0JBQWdCLENBQUM7b0JBQ3pCLEtBQUssRUFBRSxNQUFNLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQztpQkFDbkMsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDO2dCQUViLDBGQUEwRjtnQkFDMUYsTUFBTSxlQUFlLENBQUMsR0FBRyxFQUFFLFVBQVUsQ0FBQyxDQUFDO2dCQUN2QyxPQUFPLENBQUMsSUFBSSxDQUFDLGdEQUFnRCxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQztnQkFDN0UsTUFBTSxhQUFhLENBQUMsR0FBRyxFQUFFLFVBQVUsQ0FBQyxDQUFDO2dCQUNyQyxPQUFPO1lBQ1QsS0FBSyxRQUFRO2dCQUNYLHlFQUF5RTtnQkFDekUsc0JBQXNCO2dCQUN0QixNQUFNLGVBQWUsQ0FBQyxHQUFHLEVBQUUsT0FBTyxDQUFDLENBQUM7Z0JBQ3BDLDZDQUE2QztnQkFDN0MsTUFBTSxHQUFHLENBQUMsZ0JBQWdCLENBQUM7b0JBQ3pCLEtBQUssRUFBRSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQztpQkFDNUIsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDO2dCQUNiLE9BQU87WUFDVDtnQkFDRSxPQUFPO1NBQ1Y7S0FDRjtJQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ1YsT0FBTyxDQUFDLEtBQUssQ0FBQywwQkFBMEIsRUFBRSxDQUFDLENBQUMsQ0FBQztRQUM3QyxNQUFNLENBQUMsQ0FBQztLQUNUO0FBQ0gsQ0FBQztBQXBERCwwQkFvREM7QUFBQSxDQUFDO0FBRUY7O0dBRUc7QUFDSCxLQUFLLFVBQVUsYUFBYSxDQUFDLEdBQVEsRUFBRSxVQUE4QjtJQUNuRSxNQUFNLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLEVBQUUsRUFBRTtRQUN6RSxPQUFPLEdBQUcsQ0FBQyxZQUFZLENBQUM7WUFDdEIsSUFBSSxFQUFFLElBQUk7WUFDVixLQUFLLEVBQUUsS0FBSztZQUNaLElBQUksRUFBRSxRQUFRO1NBQ2YsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDO0lBQ2YsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNOLENBQUM7QUFFRDs7R0FFRztBQUNILEtBQUssVUFBVSxlQUFlLENBQUMsR0FBUSxFQUFFLFVBQThCO0lBQ3JFLE1BQU0sVUFBVSxHQUE2QixJQUFJLEdBQUcsRUFBRSxDQUFDO0lBQ3ZELE1BQU0sT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxLQUFLLEVBQUUsSUFBWSxFQUFFLEVBQUU7UUFDbkUsTUFBTSxNQUFNLEdBQUcsTUFBTSxPQUFPLENBQUMsR0FBRyxFQUFFLElBQUksQ0FBQyxDQUFDO1FBQ3hDLElBQUksTUFBTSxDQUFDLElBQUksR0FBRyxDQUFDLEVBQUU7WUFDbkIsVUFBVSxDQUFDLEdBQUcsQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDLENBQUM7U0FDOUI7SUFDSCxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBRUosSUFBSSxVQUFVLENBQUMsSUFBSSxHQUFHLENBQUMsRUFBRTtRQUN2QixNQUFNLE9BQU8sR0FBVyxNQUFNLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQzthQUMvQyxHQUFHLENBQUMsQ0FBQyxNQUEwQixFQUFFLEVBQUUsQ0FBQyxHQUFHLE1BQU0sQ0FBQyxDQUFDLENBQUMsMEJBQTBCLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQzthQUNoRyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDZCxNQUFNLElBQUksS0FBSyxDQUFDLGdDQUFnQyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0tBQzVEO0FBQ0gsQ0FBQztBQUVEOztHQUVHO0FBQ0gsS0FBSyxVQUFVLE9BQU8sQ0FBQyxHQUFRLEVBQUUsYUFBcUI7SUFDcEQsTUFBTSxVQUFVLEdBQWdCLElBQUksR0FBRyxFQUFFLENBQUM7SUFDMUMsSUFBSTtRQUNGLE1BQU0sTUFBTSxHQUFHLE1BQU0sR0FBRyxDQUFDLG1CQUFtQixDQUFDO1lBQzNDLFVBQVUsRUFBRSxhQUFhO1lBQ3pCLFlBQVksRUFBRSxXQUFXO1NBQzFCLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUNiLE1BQU0sQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLEdBQUcsQ0FBQyxFQUFFO1lBQzVCLE1BQU0sUUFBUSxHQUFHLEdBQUcsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1lBQ3BDLElBQUksUUFBUSxDQUFDLENBQUMsQ0FBQyxLQUFLLFNBQVMsSUFBSSxRQUFRLENBQUMsQ0FBQyxDQUFDLEtBQUssWUFBWSxFQUFFO2dCQUM3RCxVQUFVLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO2FBQzdCO1FBQ0gsQ0FBQyxDQUFDLENBQUM7S0FDSjtJQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ1YsOERBQThEO1FBQzlELDBEQUEwRDtRQUMxRCxJQUFJLENBQUMsQ0FBQyxJQUFJLEtBQUssbUJBQW1CLEVBQUU7WUFDbEMsT0FBTyxJQUFJLEdBQUcsRUFBRSxDQUFDO1NBQ2xCO1FBQ0QsTUFBTSxDQUFDLENBQUM7S0FDVDtJQUNELE9BQU8sVUFBVSxDQUFDO0FBQ3BCLENBQUM7QUFFRDs7Ozs7O0dBTUc7QUFDSCxTQUFTLE1BQU0sQ0FBQyxNQUEwQixFQUFFLE1BQTBCO0lBQ3BFLE9BQU8sTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUM7U0FDdkIsTUFBTSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxjQUFjLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQztTQUM1QyxNQUFNLENBQUMsQ0FBQyxHQUF1QixFQUFFLElBQVksRUFBRSxFQUFFO1FBQ2hELEdBQUcsQ0FBQyxJQUFJLENBQUMsR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDekIsT0FBTyxHQUFHLENBQUM7SUFDYixDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUM7QUFDWCxDQUFDO0FBRUQ7Ozs7Ozs7R0FPRztBQUNILFNBQVMsT0FBTyxDQUFDLFNBQTZCLEVBQUUsU0FBNkI7SUFDM0UsT0FBTyxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQztTQUMxQixNQUFNLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxjQUFjLENBQUMsR0FBRyxDQUFDLElBQUksU0FBUyxDQUFDLEdBQUcsQ0FBQyxLQUFLLFNBQVMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO1NBQ25GLE1BQU0sQ0FBQyxDQUFDLEdBQWEsRUFBRSxJQUFZLEVBQUUsRUFBRTtRQUN0QyxHQUFHLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ2YsT0FBTyxHQUFHLENBQUM7SUFDYixDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUM7QUFDWCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyplc2xpbnQtZGlzYWJsZSBuby1jb25zb2xlKi9cbi8qIGVzbGludC1kaXNhYmxlIGltcG9ydC9uby1leHRyYW5lb3VzLWRlcGVuZGVuY2llcyAqL1xuaW1wb3J0IHsgU1NNIH0gZnJvbSAnYXdzLXNkayc7XG5pbXBvcnQgeyBDcm9zc1JlZ2lvbkV4cG9ydHMsIEV4cG9ydFdyaXRlckNSUHJvcHMgfSBmcm9tICcuLi90eXBlcyc7XG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBoYW5kbGVyKGV2ZW50OiBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZUV2ZW50KSB7XG4gIGNvbnN0IHByb3BzOiBFeHBvcnRXcml0ZXJDUlByb3BzID0gZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLldyaXRlclByb3BzO1xuICBjb25zdCBleHBvcnRzID0gcHJvcHMuZXhwb3J0cyBhcyBDcm9zc1JlZ2lvbkV4cG9ydHM7XG5cbiAgY29uc3Qgc3NtID0gbmV3IFNTTSh7IHJlZ2lvbjogcHJvcHMucmVnaW9uIH0pO1xuICB0cnkge1xuICAgIHN3aXRjaCAoZXZlbnQuUmVxdWVzdFR5cGUpIHtcbiAgICAgIGNhc2UgJ0NyZWF0ZSc6XG4gICAgICAgIGNvbnNvbGUuaW5mbyhgQ3JlYXRpbmcgbmV3IFNTTSBQYXJhbWV0ZXIgZXhwb3J0cyBpbiByZWdpb24gJHtwcm9wcy5yZWdpb259YCk7XG4gICAgICAgIGF3YWl0IHRocm93SWZBbnlJblVzZShzc20sIGV4cG9ydHMpO1xuICAgICAgICBhd2FpdCBwdXRQYXJhbWV0ZXJzKHNzbSwgZXhwb3J0cyk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIGNhc2UgJ1VwZGF0ZSc6XG4gICAgICAgIGNvbnN0IG9sZFByb3BzOiBFeHBvcnRXcml0ZXJDUlByb3BzID0gZXZlbnQuT2xkUmVzb3VyY2VQcm9wZXJ0aWVzLldyaXRlclByb3BzO1xuICAgICAgICBjb25zdCBvbGRFeHBvcnRzID0gb2xkUHJvcHMuZXhwb3J0cyBhcyBDcm9zc1JlZ2lvbkV4cG9ydHM7XG4gICAgICAgIGNvbnN0IG5ld0V4cG9ydHMgPSBleGNlcHQoZXhwb3J0cywgb2xkRXhwb3J0cyk7XG5cbiAgICAgICAgLy8gdGhyb3cgYW4gZXJyb3IgdG8gZmFpbCB0aGUgZGVwbG95bWVudCBpZiBhbnkgZXhwb3J0IHZhbHVlIGlzIGNoYW5naW5nXG4gICAgICAgIGNvbnN0IGNoYW5nZWRFeHBvcnRzID0gY2hhbmdlZChvbGRFeHBvcnRzLCBleHBvcnRzKTtcbiAgICAgICAgaWYgKGNoYW5nZWRFeHBvcnRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NvbWUgZXhwb3J0cyBoYXZlIGNoYW5nZWQhXFxuJysgY2hhbmdlZEV4cG9ydHMuam9pbignXFxuJykpO1xuICAgICAgICB9XG4gICAgICAgIC8vIGlmIHdlIGFyZSByZW1vdmluZyBhbnkgZXhwb3J0cyB0aGF0IGFyZSBpbiB1c2UsIHRoZW4gdGhyb3cgYW5cbiAgICAgICAgLy8gZXJyb3IgdG8gZmFpbCB0aGUgZGVwbG95bWVudFxuICAgICAgICBjb25zdCByZW1vdmVkRXhwb3J0cyA9IGV4Y2VwdChvbGRFeHBvcnRzLCBleHBvcnRzKTtcbiAgICAgICAgYXdhaXQgdGhyb3dJZkFueUluVXNlKHNzbSwgcmVtb3ZlZEV4cG9ydHMpO1xuICAgICAgICAvLyBpZiB0aGUgb25lcyB3ZSBhcmUgcmVtb3ZpbmcgYXJlIG5vdCBpbiB1c2UgdGhlbiBkZWxldGUgdGhlbVxuICAgICAgICBhd2FpdCBzc20uZGVsZXRlUGFyYW1ldGVycyh7XG4gICAgICAgICAgTmFtZXM6IE9iamVjdC5rZXlzKHJlbW92ZWRFeHBvcnRzKSxcbiAgICAgICAgfSkucHJvbWlzZSgpO1xuXG4gICAgICAgIC8vIGFsc28gdGhyb3cgYW4gZXJyb3IgaWYgd2UgYXJlIGNyZWF0aW5nIGEgbmV3IGV4cG9ydCB0aGF0IGFscmVhZHkgZXhpc3RzIGZvciBzb21lIHJlYXNvblxuICAgICAgICBhd2FpdCB0aHJvd0lmQW55SW5Vc2Uoc3NtLCBuZXdFeHBvcnRzKTtcbiAgICAgICAgY29uc29sZS5pbmZvKGBDcmVhdGluZyBuZXcgU1NNIFBhcmFtZXRlciBleHBvcnRzIGluIHJlZ2lvbiAke3Byb3BzLnJlZ2lvbn1gKTtcbiAgICAgICAgYXdhaXQgcHV0UGFyYW1ldGVycyhzc20sIG5ld0V4cG9ydHMpO1xuICAgICAgICByZXR1cm47XG4gICAgICBjYXNlICdEZWxldGUnOlxuICAgICAgICAvLyBpZiBhbnkgb2YgdGhlIGV4cG9ydHMgYXJlIGN1cnJlbnRseSBpbiB1c2UgdGhlbiB0aHJvdyBhbiBlcnJvciB0byBmYWlsXG4gICAgICAgIC8vIHRoZSBzdGFjayBkZWxldGlvbi5cbiAgICAgICAgYXdhaXQgdGhyb3dJZkFueUluVXNlKHNzbSwgZXhwb3J0cyk7XG4gICAgICAgIC8vIGlmIG5vbmUgYXJlIGluIHVzZSB0aGVuIGRlbGV0ZSBhbGwgb2YgdGhlbVxuICAgICAgICBhd2FpdCBzc20uZGVsZXRlUGFyYW1ldGVycyh7XG4gICAgICAgICAgTmFtZXM6IE9iamVjdC5rZXlzKGV4cG9ydHMpLFxuICAgICAgICB9KS5wcm9taXNlKCk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBjb25zb2xlLmVycm9yKCdFcnJvciBwcm9jZXNzaW5nIGV2ZW50OiAnLCBlKTtcbiAgICB0aHJvdyBlO1xuICB9XG59O1xuXG4vKipcbiAqIENyZWF0ZSBwYXJhbWV0ZXJzIGZvciBleGlzdGluZyBleHBvcnRzXG4gKi9cbmFzeW5jIGZ1bmN0aW9uIHB1dFBhcmFtZXRlcnMoc3NtOiBTU00sIHBhcmFtZXRlcnM6IENyb3NzUmVnaW9uRXhwb3J0cyk6IFByb21pc2U8dm9pZD4ge1xuICBhd2FpdCBQcm9taXNlLmFsbChBcnJheS5mcm9tKE9iamVjdC5lbnRyaWVzKHBhcmFtZXRlcnMpLCAoW25hbWUsIHZhbHVlXSkgPT4ge1xuICAgIHJldHVybiBzc20ucHV0UGFyYW1ldGVyKHtcbiAgICAgIE5hbWU6IG5hbWUsXG4gICAgICBWYWx1ZTogdmFsdWUsXG4gICAgICBUeXBlOiAnU3RyaW5nJyxcbiAgICB9KS5wcm9taXNlKCk7XG4gIH0pKTtcbn1cblxuLyoqXG4gKiBRdWVyeSBmb3IgZXhpc3RpbmcgcGFyYW1ldGVycyB0aGF0IGFyZSBpbiB1c2VcbiAqL1xuYXN5bmMgZnVuY3Rpb24gdGhyb3dJZkFueUluVXNlKHNzbTogU1NNLCBwYXJhbWV0ZXJzOiBDcm9zc1JlZ2lvbkV4cG9ydHMpOiBQcm9taXNlPHZvaWQ+IHtcbiAgY29uc3QgdGFnUmVzdWx0czogTWFwPHN0cmluZywgU2V0PHN0cmluZz4+ID0gbmV3IE1hcCgpO1xuICBhd2FpdCBQcm9taXNlLmFsbChPYmplY3Qua2V5cyhwYXJhbWV0ZXJzKS5tYXAoYXN5bmMgKG5hbWU6IHN0cmluZykgPT4ge1xuICAgIGNvbnN0IHJlc3VsdCA9IGF3YWl0IGlzSW5Vc2Uoc3NtLCBuYW1lKTtcbiAgICBpZiAocmVzdWx0LnNpemUgPiAwKSB7XG4gICAgICB0YWdSZXN1bHRzLnNldChuYW1lLCByZXN1bHQpO1xuICAgIH1cbiAgfSkpO1xuXG4gIGlmICh0YWdSZXN1bHRzLnNpemUgPiAwKSB7XG4gICAgY29uc3QgbWVzc2FnZTogc3RyaW5nID0gT2JqZWN0LmVudHJpZXModGFnUmVzdWx0cylcbiAgICAgIC5tYXAoKHJlc3VsdDogW3N0cmluZywgc3RyaW5nW11dKSA9PiBgJHtyZXN1bHRbMF19IGlzIGluIHVzZSBieSBzdGFjayhzKSAke3Jlc3VsdFsxXS5qb2luKCcgJyl9YClcbiAgICAgIC5qb2luKCdcXG4nKTtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYEV4cG9ydHMgY2Fubm90IGJlIHVwZGF0ZWQ6IFxcbiR7bWVzc2FnZX1gKTtcbiAgfVxufVxuXG4vKipcbiAqIENoZWNrIGlmIGEgcGFyYW1ldGVyIGlzIGluIHVzZVxuICovXG5hc3luYyBmdW5jdGlvbiBpc0luVXNlKHNzbTogU1NNLCBwYXJhbWV0ZXJOYW1lOiBzdHJpbmcpOiBQcm9taXNlPFNldDxzdHJpbmc+PiB7XG4gIGNvbnN0IHRhZ1Jlc3VsdHM6IFNldDxzdHJpbmc+ID0gbmV3IFNldCgpO1xuICB0cnkge1xuICAgIGNvbnN0IHJlc3VsdCA9IGF3YWl0IHNzbS5saXN0VGFnc0ZvclJlc291cmNlKHtcbiAgICAgIFJlc291cmNlSWQ6IHBhcmFtZXRlck5hbWUsXG4gICAgICBSZXNvdXJjZVR5cGU6ICdQYXJhbWV0ZXInLFxuICAgIH0pLnByb21pc2UoKTtcbiAgICByZXN1bHQuVGFnTGlzdD8uZm9yRWFjaCh0YWcgPT4ge1xuICAgICAgY29uc3QgdGFnUGFydHMgPSB0YWcuS2V5LnNwbGl0KCc6Jyk7XG4gICAgICBpZiAodGFnUGFydHNbMF0gPT09ICdhd3MtY2RrJyAmJiB0YWdQYXJ0c1sxXSA9PT0gJ3N0cm9uZy1yZWYnKSB7XG4gICAgICAgIHRhZ1Jlc3VsdHMuYWRkKHRhZ1BhcnRzWzJdKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIC8vIGFuIEludmFsaWRSZXNvdXJjZUlkIG1lYW5zIHRoYXQgdGhlIHBhcmFtZXRlciBkb2Vzbid0IGV4aXN0XG4gICAgLy8gd2hpY2ggd2Ugc2hvdWxkIGlnbm9yZSBzaW5jZSB0aGF0IG1lYW5zIGl0J3Mgbm90IGluIHVzZVxuICAgIGlmIChlLmNvZGUgPT09ICdJbnZhbGlkUmVzb3VyY2VJZCcpIHtcbiAgICAgIHJldHVybiBuZXcgU2V0KCk7XG4gICAgfVxuICAgIHRocm93IGU7XG4gIH1cbiAgcmV0dXJuIHRhZ1Jlc3VsdHM7XG59XG5cbi8qKlxuICogUmV0dXJuIG9ubHkgdGhlIGl0ZW1zIGZyb20gc291cmNlIHRoYXQgZG8gbm90IGV4aXN0IGluIHRoZSBmaWx0ZXJcbiAqXG4gKiBAcGFyYW0gc291cmNlIHRoZSBzb3VyY2Ugb2JqZWN0IHRvIHBlcmZvcm0gdGhlIGZpbHRlciBvblxuICogQHBhcmFtIGZpbHRlciBmaWx0ZXIgb3V0IGl0ZW1zIHRoYXQgZXhpc3QgaW4gdGhpcyBvYmplY3RcbiAqIEByZXR1cm5zIGFueSBleHBvcnRzIHRoYXQgZG9uJ3QgZXhpc3QgaW4gdGhlIGZpbHRlclxuICovXG5mdW5jdGlvbiBleGNlcHQoc291cmNlOiBDcm9zc1JlZ2lvbkV4cG9ydHMsIGZpbHRlcjogQ3Jvc3NSZWdpb25FeHBvcnRzKTogQ3Jvc3NSZWdpb25FeHBvcnRzIHtcbiAgcmV0dXJuIE9iamVjdC5rZXlzKHNvdXJjZSlcbiAgICAuZmlsdGVyKGtleSA9PiAoIWZpbHRlci5oYXNPd25Qcm9wZXJ0eShrZXkpKSlcbiAgICAucmVkdWNlKChhY2M6IENyb3NzUmVnaW9uRXhwb3J0cywgY3Vycjogc3RyaW5nKSA9PiB7XG4gICAgICBhY2NbY3Vycl0gPSBzb3VyY2VbY3Vycl07XG4gICAgICByZXR1cm4gYWNjO1xuICAgIH0sIHt9KTtcbn1cblxuLyoqXG4gKiBSZXR1cm4gaXRlbXMgdGhhdCBleGlzdCBpbiBib3RoIHRoZSB0aGUgb2xkIHBhcmFtZXRlcnMgYW5kIHRoZSBuZXcgcGFyYW1ldGVycyxcbiAqIGJ1dCBoYXZlIGRpZmZlcmVudCB2YWx1ZXNcbiAqXG4gKiBAcGFyYW0gb2xkUGFyYW1zIHRoZSBleHBvcnRzIHRoYXQgZXhpc3RlZCBwcmV2aW91cyB0byB0aGlzIGV4ZWN1dGlvblxuICogQHBhcmFtIG5ld1BhcmFtcyB0aGUgZXhwb3J0cyBmb3IgdGhlIGN1cnJlbnQgZXhlY3V0aW9uXG4gKiBAcmV0dXJucyBhbnkgcGFyYW1ldGVycyB0aGF0IGhhdmUgZGlmZmVyZW50IHZhbHVlc1xuICovXG5mdW5jdGlvbiBjaGFuZ2VkKG9sZFBhcmFtczogQ3Jvc3NSZWdpb25FeHBvcnRzLCBuZXdQYXJhbXM6IENyb3NzUmVnaW9uRXhwb3J0cyk6IHN0cmluZ1tdIHtcbiAgcmV0dXJuIE9iamVjdC5rZXlzKG9sZFBhcmFtcylcbiAgICAuZmlsdGVyKGtleSA9PiAobmV3UGFyYW1zLmhhc093blByb3BlcnR5KGtleSkgJiYgb2xkUGFyYW1zW2tleV0gIT09IG5ld1BhcmFtc1trZXldKSlcbiAgICAucmVkdWNlKChhY2M6IHN0cmluZ1tdLCBjdXJyOiBzdHJpbmcpID0+IHtcbiAgICAgIGFjYy5wdXNoKGN1cnIpO1xuICAgICAgcmV0dXJuIGFjYztcbiAgICB9LCBbXSk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/cdk.out b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/cdk.out new file mode 100644 index 0000000000000..145739f539580 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets.json new file mode 100644 index 0000000000000..e221be027f9c8 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets.json @@ -0,0 +1,34 @@ +{ + "version": "22.0.0", + "files": { + "f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3": { + "source": { + "path": "asset.f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3", + "packaging": "zip" + }, + "destinations": { + "current_account-us-east-1": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", + "objectKey": "f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3.zip", + "region": "us-east-1", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" + } + } + }, + "151fa1442d357caf21d6defe3b499266d5fbe2b66340d5f26f0b397618e6bb3e": { + "source": { + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-us-east-1": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", + "objectKey": "151fa1442d357caf21d6defe3b499266d5fbe2b66340d5f26f0b397618e6bb3e.json", + "region": "us-east-1", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json new file mode 100644 index 0000000000000..18c4cea0de6cd --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json @@ -0,0 +1,162 @@ +{ + "Resources": { + "RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76D1272753": { + "Type": "AWS::CertificateManager::Certificate", + "Properties": { + "DomainName": "integ.example.com", + "DomainValidationOptions": [ + { + "DomainName": "integ.example.com", + "HostedZoneId": "Z23ABC4XYZL05B" + }, + { + "DomainName": "integ.example.com", + "HostedZoneId": "Z23ABC4XYZL05B" + } + ], + "SubjectAlternativeNames": [ + "integ.example.com" + ], + "Tags": [ + { + "Key": "Name", + "Value": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76" + } + ], + "ValidationMethod": "DNS" + } + }, + "ExportsWriteruseast2828FA26B86FBEFA7": { + "Type": "Custom::CrossRegionExportWriter", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCrossRegionExportWriterCustomResourceProviderHandlerD8786E8A", + "Arn" + ] + }, + "WriterProps": { + "region": "us-east-2", + "exports": { + "/cdk/exports/integ-https-redirect/certificateredirectstackc8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61useast1RefRedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76D1272753FE4DCC12": { + "Ref": "RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76D1272753" + } + } + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomCrossRegionExportWriterCustomResourceProviderRoleC951B1E1": { + "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": [ + { + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:ssm:us-east-2:", + { + "Ref": "AWS::AccountId" + }, + ":parameter/cdk/exports/*" + ] + ] + }, + "Action": [ + "ssm:DeleteParameters", + "ssm:ListTagsForResource", + "ssm:GetParameters", + "ssm:PutParameter" + ] + } + ] + } + } + ] + } + }, + "CustomCrossRegionExportWriterCustomResourceProviderHandlerD8786E8A": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" + }, + "S3Key": "f86f86755c3b2013542fc4f9405bfe145a86c0bec508dd0b37baabe2055d33f3.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomCrossRegionExportWriterCustomResourceProviderRoleC951B1E1", + "Arn" + ] + }, + "Runtime": "nodejs14.x" + }, + "DependsOn": [ + "CustomCrossRegionExportWriterCustomResourceProviderRoleC951B1E1" + ] + } + }, + "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-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.assets.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.assets.json new file mode 100644 index 0000000000000..75c61d57d421c --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.assets.json @@ -0,0 +1,34 @@ +{ + "version": "22.0.0", + "files": { + "881fb88a24d47c6beb950259ab9414e1d83df8f26c3d62891d2872b4e71648d6": { + "source": { + "path": "asset.881fb88a24d47c6beb950259ab9414e1d83df8f26c3d62891d2872b4e71648d6", + "packaging": "zip" + }, + "destinations": { + "current_account-us-east-2": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2", + "objectKey": "881fb88a24d47c6beb950259ab9414e1d83df8f26c3d62891d2872b4e71648d6.zip", + "region": "us-east-2", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-2" + } + } + }, + "a319b5b28789d829846f7567b897cb5b94bbe2fc82080acaa6448f7ceab8c046": { + "source": { + "path": "integ-https-redirect.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-us-east-2": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2", + "objectKey": "a319b5b28789d829846f7567b897cb5b94bbe2fc82080acaa6448f7ceab8c046.json", + "region": "us-east-2", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-2" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.template.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.template.json new file mode 100644 index 0000000000000..495fadcd05632 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ-https-redirect.template.json @@ -0,0 +1,290 @@ +{ + "Resources": { + "redirectRedirectBucketAA44E2FE": { + "Type": "AWS::S3::Bucket", + "Properties": { + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true + }, + "WebsiteConfiguration": { + "RedirectAllRequestsTo": { + "HostName": "aws.amazon.com", + "Protocol": "https" + } + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "redirectRedirectDistributionCFDistribution1A4C48E3": { + "Type": "AWS::CloudFront::Distribution", + "Properties": { + "DistributionConfig": { + "Aliases": [ + "integ.example.com" + ], + "Comment": "Redirect to aws.amazon.com from integ.example.com", + "DefaultCacheBehavior": { + "AllowedMethods": [ + "GET", + "HEAD" + ], + "CachedMethods": [ + "GET", + "HEAD" + ], + "Compress": true, + "ForwardedValues": { + "Cookies": { + "Forward": "none" + }, + "QueryString": false + }, + "TargetOriginId": "origin1", + "ViewerProtocolPolicy": "redirect-to-https" + }, + "DefaultRootObject": "", + "Enabled": true, + "HttpVersion": "http2", + "IPV6Enabled": true, + "Origins": [ + { + "ConnectionAttempts": 3, + "ConnectionTimeout": 10, + "CustomOriginConfig": { + "HTTPPort": 80, + "HTTPSPort": 443, + "OriginKeepaliveTimeout": 5, + "OriginProtocolPolicy": "http-only", + "OriginReadTimeout": 30, + "OriginSSLProtocols": [ + "TLSv1.2" + ] + }, + "DomainName": { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "/", + { + "Fn::GetAtt": [ + "redirectRedirectBucketAA44E2FE", + "WebsiteURL" + ] + } + ] + } + ] + }, + "Id": "origin1" + } + ], + "PriceClass": "PriceClass_All", + "ViewerCertificate": { + "AcmCertificateArn": { + "Fn::GetAtt": [ + "ExportsReader8B249524", + "/cdk/exports/integ-https-redirect/certificateredirectstackc8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61useast1RefRedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76D1272753FE4DCC12" + ] + }, + "SslSupportMethod": "sni-only" + } + } + } + }, + "redirectRedirectAliasRecord700dc535A8D685": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "Name": "integ.example.com.", + "Type": "A", + "AliasTarget": { + "DNSName": { + "Fn::GetAtt": [ + "redirectRedirectDistributionCFDistribution1A4C48E3", + "DomainName" + ] + }, + "HostedZoneId": { + "Fn::FindInMap": [ + "AWSCloudFrontPartitionHostedZoneIdMap", + { + "Ref": "AWS::Partition" + }, + "zoneId" + ] + } + }, + "HostedZoneId": "Z23ABC4XYZL05B" + } + }, + "redirectRedirectAliasRecordSix700dc5B6BB8C6E": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "Name": "integ.example.com.", + "Type": "AAAA", + "AliasTarget": { + "DNSName": { + "Fn::GetAtt": [ + "redirectRedirectDistributionCFDistribution1A4C48E3", + "DomainName" + ] + }, + "HostedZoneId": { + "Fn::FindInMap": [ + "AWSCloudFrontPartitionHostedZoneIdMap", + { + "Ref": "AWS::Partition" + }, + "zoneId" + ] + } + }, + "HostedZoneId": "Z23ABC4XYZL05B" + } + }, + "ExportsReader8B249524": { + "Type": "Custom::CrossRegionExportReader", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCrossRegionExportReaderCustomResourceProviderHandler46647B68", + "Arn" + ] + }, + "ReaderProps": { + "region": "us-east-2", + "prefix": "integ-https-redirect", + "imports": { + "/cdk/exports/integ-https-redirect/certificateredirectstackc8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61useast1RefRedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76D1272753FE4DCC12": "{{resolve:ssm:/cdk/exports/integ-https-redirect/certificateredirectstackc8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61useast1RefRedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76D1272753FE4DCC12}}" + } + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomCrossRegionExportReaderCustomResourceProviderRole10531BBD": { + "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": [ + { + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:ssm:us-east-2:", + { + "Ref": "AWS::AccountId" + }, + ":parameter/cdk/exports/integ-https-redirect/*" + ] + ] + }, + "Action": [ + "ssm:AddTagsToResource", + "ssm:RemoveTagsFromResource", + "ssm:GetParameters" + ] + } + ] + } + } + ] + } + }, + "CustomCrossRegionExportReaderCustomResourceProviderHandler46647B68": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2" + }, + "S3Key": "881fb88a24d47c6beb950259ab9414e1d83df8f26c3d62891d2872b4e71648d6.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomCrossRegionExportReaderCustomResourceProviderRole10531BBD", + "Arn" + ] + }, + "Runtime": "nodejs14.x" + }, + "DependsOn": [ + "CustomCrossRegionExportReaderCustomResourceProviderRole10531BBD" + ] + } + }, + "Mappings": { + "AWSCloudFrontPartitionHostedZoneIdMap": { + "aws": { + "zoneId": "Z2FDTNDATAQYW2" + }, + "aws-cn": { + "zoneId": "Z3RFFRIM2A3IF5" + } + } + }, + "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-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ.json new file mode 100644 index 0000000000000..73c21d7411b5e --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integ.json @@ -0,0 +1,14 @@ +{ + "enableLookups": true, + "version": "22.0.0", + "testCases": { + "integ-test/DefaultTest": { + "stacks": [ + "integ-https-redirect" + ], + "stackUpdateWorkflow": false, + "assertionStack": "integ-test/DefaultTest/DeployAssert", + "assertionStackName": "integtestDefaultTestDeployAssert24D5C536" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json new file mode 100644 index 0000000000000..6aa47f90e9d7f --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json @@ -0,0 +1,19 @@ +{ + "version": "22.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "integtestDefaultTestDeployAssert24D5C536.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-route53-patterns/test/integ.hosted-redirect.js.snapshot/integtestDefaultTestDeployAssert24D5C536.template.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integtestDefaultTestDeployAssert24D5C536.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/integtestDefaultTestDeployAssert24D5C536.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-route53-patterns/test/integ.hosted-redirect.js.snapshot/manifest.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/manifest.json new file mode 100644 index 0000000000000..f3d2ab25d620e --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/manifest.json @@ -0,0 +1,261 @@ +{ + "version": "22.0.0", + "artifacts": { + "integ-https-redirect.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integ-https-redirect.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integ-https-redirect": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/us-east-2", + "properties": { + "templateFile": "integ-https-redirect.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-2", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-2", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-2/a319b5b28789d829846f7567b897cb5b94bbe2fc82080acaa6448f7ceab8c046.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "integ-https-redirect.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-us-east-2", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61", + "integ-https-redirect.assets" + ], + "metadata": { + "/integ-https-redirect/redirect/RedirectBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectBucketAA44E2FE" + } + ], + "/integ-https-redirect/redirect/RedirectDistribution/CFDistribution": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectDistributionCFDistribution1A4C48E3" + } + ], + "/integ-https-redirect/redirect/RedirectAliasRecord700dc5/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectAliasRecord700dc535A8D685" + } + ], + "/integ-https-redirect/redirect/RedirectAliasRecordSix700dc5/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectAliasRecordSix700dc5B6BB8C6E" + } + ], + "/integ-https-redirect/AWSCloudFrontPartitionHostedZoneIdMap": [ + { + "type": "aws:cdk:logicalId", + "data": "AWSCloudFrontPartitionHostedZoneIdMap" + } + ], + "/integ-https-redirect/ExportsReader/Resource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsReader8B249524" + } + ], + "/integ-https-redirect/Custom::CrossRegionExportReaderCustomResourceProvider/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomCrossRegionExportReaderCustomResourceProviderRole10531BBD" + } + ], + "/integ-https-redirect/Custom::CrossRegionExportReaderCustomResourceProvider/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomCrossRegionExportReaderCustomResourceProviderHandler46647B68" + } + ], + "/integ-https-redirect/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-https-redirect/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ], + "redirectRedirectCertificateCertificateRequestorFunctionServiceRole9E01E94F": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectCertificateCertificateRequestorFunctionServiceRole9E01E94F", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "redirectRedirectCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy7AC24A96": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectCertificateCertificateRequestorFunctionServiceRoleDefaultPolicy7AC24A96", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "redirectRedirectCertificateCertificateRequestorFunctionBBD1548C": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectCertificateCertificateRequestorFunctionBBD1548C", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "redirectRedirectCertificateCertificateRequestorResourceBB4D62C1": [ + { + "type": "aws:cdk:logicalId", + "data": "redirectRedirectCertificateCertificateRequestorResourceBB4D62C1", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ] + }, + "displayName": "integ-https-redirect" + }, + "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/us-east-1", + "properties": { + "templateFile": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/151fa1442d357caf21d6defe3b499266d5fbe2b66340d5f26f0b397618e6bb3e.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-us-east-1", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61.assets" + ], + "metadata": { + "/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76D1272753" + } + ], + "/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/ExportsWriteruseast2828FA26B/Resource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsWriteruseast2828FA26B86FBEFA7" + } + ], + "/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/Custom::CrossRegionExportWriterCustomResourceProvider/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomCrossRegionExportWriterCustomResourceProviderRoleC951B1E1" + } + ], + "/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/Custom::CrossRegionExportWriterCustomResourceProvider/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomCrossRegionExportWriterCustomResourceProviderHandlerD8786E8A" + } + ], + "/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61" + }, + "integtestDefaultTestDeployAssert24D5C536.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integtestDefaultTestDeployAssert24D5C536.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integtestDefaultTestDeployAssert24D5C536": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integtestDefaultTestDeployAssert24D5C536.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": [ + "integtestDefaultTestDeployAssert24D5C536.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": [ + "integtestDefaultTestDeployAssert24D5C536.assets" + ], + "metadata": { + "/integ-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "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-route53-patterns/test/integ.hosted-redirect.js.snapshot/tree.json b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/tree.json new file mode 100644 index 0000000000000..e09494c03c2b5 --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.js.snapshot/tree.json @@ -0,0 +1,537 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "integ-https-redirect": { + "id": "integ-https-redirect", + "path": "integ-https-redirect", + "children": { + "HostedZone": { + "id": "HostedZone", + "path": "integ-https-redirect/HostedZone", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "redirect": { + "id": "redirect", + "path": "integ-https-redirect/redirect", + "children": { + "RedirectBucket": { + "id": "RedirectBucket", + "path": "integ-https-redirect/redirect/RedirectBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-https-redirect/redirect/RedirectBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "publicAccessBlockConfiguration": { + "blockPublicAcls": true, + "blockPublicPolicy": true, + "ignorePublicAcls": true, + "restrictPublicBuckets": true + }, + "websiteConfiguration": { + "redirectAllRequestsTo": { + "hostName": "aws.amazon.com", + "protocol": "https" + } + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "RedirectDistribution": { + "id": "RedirectDistribution", + "path": "integ-https-redirect/redirect/RedirectDistribution", + "children": { + "CFDistribution": { + "id": "CFDistribution", + "path": "integ-https-redirect/redirect/RedirectDistribution/CFDistribution", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudFront::Distribution", + "aws:cdk:cloudformation:props": { + "distributionConfig": { + "comment": "Redirect to aws.amazon.com from integ.example.com", + "enabled": true, + "defaultRootObject": "", + "httpVersion": "http2", + "priceClass": "PriceClass_All", + "ipv6Enabled": true, + "origins": [ + { + "id": "origin1", + "domainName": { + "Fn::Select": [ + 2, + { + "Fn::Split": [ + "/", + { + "Fn::GetAtt": [ + "redirectRedirectBucketAA44E2FE", + "WebsiteURL" + ] + } + ] + } + ] + }, + "customOriginConfig": { + "httpPort": 80, + "httpsPort": 443, + "originKeepaliveTimeout": 5, + "originReadTimeout": 30, + "originProtocolPolicy": "http-only", + "originSslProtocols": [ + "TLSv1.2" + ] + }, + "connectionAttempts": 3, + "connectionTimeout": 10 + } + ], + "defaultCacheBehavior": { + "allowedMethods": [ + "GET", + "HEAD" + ], + "cachedMethods": [ + "GET", + "HEAD" + ], + "compress": true, + "forwardedValues": { + "queryString": false, + "cookies": { + "forward": "none" + } + }, + "targetOriginId": "origin1", + "viewerProtocolPolicy": "redirect-to-https" + }, + "aliases": [ + "integ.example.com" + ], + "viewerCertificate": { + "acmCertificateArn": { + "Fn::GetAtt": [ + "ExportsReader8B249524", + "/cdk/exports/integ-https-redirect/certificateredirectstackc8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61useast1RefRedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76D1272753FE4DCC12" + ] + }, + "sslSupportMethod": "sni-only" + } + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudfront.CfnDistribution", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudfront.CloudFrontWebDistribution", + "version": "0.0.0" + } + }, + "RedirectAliasRecord700dc5": { + "id": "RedirectAliasRecord700dc5", + "path": "integ-https-redirect/redirect/RedirectAliasRecord700dc5", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-https-redirect/redirect/RedirectAliasRecord700dc5/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "name": "integ.example.com.", + "type": "A", + "aliasTarget": { + "hostedZoneId": { + "Fn::FindInMap": [ + "AWSCloudFrontPartitionHostedZoneIdMap", + { + "Ref": "AWS::Partition" + }, + "zoneId" + ] + }, + "dnsName": { + "Fn::GetAtt": [ + "redirectRedirectDistributionCFDistribution1A4C48E3", + "DomainName" + ] + } + }, + "hostedZoneId": "Z23ABC4XYZL05B" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.ARecord", + "version": "0.0.0" + } + }, + "RedirectAliasRecordSix700dc5": { + "id": "RedirectAliasRecordSix700dc5", + "path": "integ-https-redirect/redirect/RedirectAliasRecordSix700dc5", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-https-redirect/redirect/RedirectAliasRecordSix700dc5/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "name": "integ.example.com.", + "type": "AAAA", + "aliasTarget": { + "hostedZoneId": { + "Fn::FindInMap": [ + "AWSCloudFrontPartitionHostedZoneIdMap", + { + "Ref": "AWS::Partition" + }, + "zoneId" + ] + }, + "dnsName": { + "Fn::GetAtt": [ + "redirectRedirectDistributionCFDistribution1A4C48E3", + "DomainName" + ] + } + }, + "hostedZoneId": "Z23ABC4XYZL05B" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.AaaaRecord", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53-patterns.HttpsRedirect", + "version": "0.0.0" + } + }, + "AWSCloudFrontPartitionHostedZoneIdMap": { + "id": "AWSCloudFrontPartitionHostedZoneIdMap", + "path": "integ-https-redirect/AWSCloudFrontPartitionHostedZoneIdMap", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnMapping", + "version": "0.0.0" + } + }, + "ExportsReader": { + "id": "ExportsReader", + "path": "integ-https-redirect/ExportsReader", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-https-redirect/ExportsReader/Resource", + "children": { + "Default": { + "id": "Default", + "path": "integ-https-redirect/ExportsReader/Resource/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.168" + } + }, + "Custom::CrossRegionExportReaderCustomResourceProvider": { + "id": "Custom::CrossRegionExportReaderCustomResourceProvider", + "path": "integ-https-redirect/Custom::CrossRegionExportReaderCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "integ-https-redirect/Custom::CrossRegionExportReaderCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "integ-https-redirect/Custom::CrossRegionExportReaderCustomResourceProvider/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "integ-https-redirect/Custom::CrossRegionExportReaderCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResourceProvider", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-https-redirect/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-https-redirect/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61": { + "id": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61", + "children": { + "RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76": { + "id": "RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76", + "children": { + "Resource": { + "id": "Resource", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CertificateManager::Certificate", + "aws:cdk:cloudformation:props": { + "domainName": "integ.example.com", + "domainValidationOptions": [ + { + "domainName": "integ.example.com", + "hostedZoneId": "Z23ABC4XYZL05B" + }, + { + "domainName": "integ.example.com", + "hostedZoneId": "Z23ABC4XYZL05B" + } + ], + "subjectAlternativeNames": [ + "integ.example.com" + ], + "tags": [ + { + "key": "Name", + "value": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/RedirectCertificatec8615644f6b8e5372f779988c9aad3c31ec249ee76" + } + ], + "validationMethod": "DNS" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-certificatemanager.CfnCertificate", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-certificatemanager.Certificate", + "version": "0.0.0" + } + }, + "ExportsWriteruseast2828FA26B": { + "id": "ExportsWriteruseast2828FA26B", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/ExportsWriteruseast2828FA26B", + "children": { + "Resource": { + "id": "Resource", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/ExportsWriteruseast2828FA26B/Resource", + "children": { + "Default": { + "id": "Default", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/ExportsWriteruseast2828FA26B/Resource/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.168" + } + }, + "Custom::CrossRegionExportWriterCustomResourceProvider": { + "id": "Custom::CrossRegionExportWriterCustomResourceProvider", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/Custom::CrossRegionExportWriterCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/Custom::CrossRegionExportWriterCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/Custom::CrossRegionExportWriterCustomResourceProvider/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/Custom::CrossRegionExportWriterCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResourceProvider", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "certificate-redirect-stack-c8dcaeced090b732e39f9a17bfcca0bf8d20ce4f61/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "integ-test": { + "id": "integ-test", + "path": "integ-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "integ-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "integ-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.168" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "integ-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "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.168" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.ts b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.ts new file mode 100644 index 0000000000000..1c6a2dff626aa --- /dev/null +++ b/packages/@aws-cdk/aws-route53-patterns/test/integ.hosted-redirect.ts @@ -0,0 +1,42 @@ +import { PublicHostedZone } from '@aws-cdk/aws-route53'; +import { Stack, App } from '@aws-cdk/core'; +// import { ROUTE53_PATTERNS_USE_CERTIFICATE } from '@aws-cdk/cx-api'; +import { IntegTest } from '@aws-cdk/integ-tests'; +import { HttpsRedirect } from '../lib'; +const hostedZoneId = process.env.CDK_INTEG_HOSTED_ZONE_ID ?? process.env.HOSTED_ZONE_ID; +if (!hostedZoneId) throw new Error('For this test you must provide your own HostedZoneId as an env var "HOSTED_ZONE_ID"'); +const hostedZoneName = process.env.CDK_INTEG_HOSTED_ZONE_NAME ?? process.env.HOSTED_ZONE_NAME; +if (!hostedZoneName) throw new Error('For this test you must provide your own HostedZoneName as an env var "HOSTED_ZONE_NAME"'); +const domainName = process.env.CDK_INTEG_DOMAIN_NAME ?? process.env.DOMAIN_NAME; +if (!domainName) throw new Error('For this test you must provide your own Domain Name as an env var "DOMAIN_NAME"'); + +const app = new App({ + // uncomment this to test the old behavior + // postCliContext: { + // [ROUTE53_PATTERNS_USE_CERTIFICATE]: false, + // }, +}); +const testCase = new Stack(app, 'integ-https-redirect', { + crossRegionReferences: true, + env: { + account: process.env.CDK_DEFAULT_ACCOUNT, + region: 'us-east-2', // specifying region to test cross region functionality + }, +}); + +const hostedZone = PublicHostedZone.fromHostedZoneAttributes(testCase, 'HostedZone', { + hostedZoneId, + zoneName: hostedZoneName, +}); +new HttpsRedirect(testCase, 'redirect', { + zone: hostedZone, + recordNames: [`integ.${hostedZoneName}`], + targetDomain: 'aws.amazon.com', +}); + +new IntegTest(app, 'integ-test', { + testCases: [testCase], + enableLookups: true, + stackUpdateWorkflow: false, +}); + diff --git a/packages/@aws-cdk/aws-route53/README.md b/packages/@aws-cdk/aws-route53/README.md index a98bf93f65495..e8b9acaa30793 100644 --- a/packages/@aws-cdk/aws-route53/README.md +++ b/packages/@aws-cdk/aws-route53/README.md @@ -132,7 +132,7 @@ Constructs are available for A, AAAA, CAA, CNAME, MX, NS, SRV and TXT records. Use the `CaaAmazonRecord` construct to easily restrict certificate authorities allowed to issue certificates for a domain to Amazon only. -### Working with existing record sets +### Replacing existing record sets (dangerous!) Use the `deleteExisting` prop to delete an existing record set before deploying the new one. This is useful if you want to minimize downtime and avoid "manual" actions while deploying a @@ -140,6 +140,11 @@ stack with a record set that already exists. This is typically the case for reco are not already "owned" by CloudFormation or "owned" by another stack or construct that is going to be deleted (migration). +> **N.B.:** this feature is dangerous, use with caution! It can only be used safely when +> `deleteExisting` is set to `true` as soon as the resource is added to the stack. Changing +> an existing Record Set's `deleteExisting` property from `false -> true` after deployment +> will delete the record! + ```ts declare const myZone: route53.HostedZone; diff --git a/packages/@aws-cdk/aws-route53/lib/record-set.ts b/packages/@aws-cdk/aws-route53/lib/record-set.ts index 03e7bc1cf5c1c..590bc31835ed2 100644 --- a/packages/@aws-cdk/aws-route53/lib/record-set.ts +++ b/packages/@aws-cdk/aws-route53/lib/record-set.ts @@ -177,12 +177,17 @@ export interface RecordSetOptions { readonly comment?: string; /** - * Whether to delete the same record set in the hosted zone if it already exists. + * Whether to delete the same record set in the hosted zone if it already exists (dangerous!) * * This allows to deploy a new record set while minimizing the downtime because the * new record set will be created immediately after the existing one is deleted. It * also avoids "manual" actions to delete existing record sets. * + * > **N.B.:** this feature is dangerous, use with caution! It can only be used safely when + * > `deleteExisting` is set to `true` as soon as the resource is added to the stack. Changing + * > an existing Record Set's `deleteExisting` property from `false -> true` after deployment + * > will delete the record! + * * @default false */ readonly deleteExisting?: boolean; diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index 340c9fa408625..13e7aea23fbd0 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -19,6 +19,7 @@ import { Tags, Token, Tokenization, + Annotations, } from '@aws-cdk/core'; import { CfnReference } from '@aws-cdk/core/lib/private/cfn-reference'; import * as cxapi from '@aws-cdk/cx-api'; @@ -1833,8 +1834,19 @@ export class Bucket extends BucketBase { if (props.serverAccessLogsBucket instanceof Bucket) { props.serverAccessLogsBucket.allowLogDelivery(this, props.serverAccessLogsPrefix); - } else if (props.serverAccessLogsPrefix) { + // It is possible that `serverAccessLogsBucket` was specified but is some other `IBucket` + // that cannot have the ACLs or bucket policy applied. In that scenario, we should only + // setup log delivery permissions to `this` if a bucket was not specified at all, as documented. + // For example, we should not allow log delivery to `this` if given an imported bucket or + // another situation that causes `instanceof` to fail + } else if (!props.serverAccessLogsBucket && props.serverAccessLogsPrefix) { this.allowLogDelivery(this, props.serverAccessLogsPrefix); + } else if (props.serverAccessLogsBucket) { + // A `serverAccessLogsBucket` was provided but it is not a concrete `Bucket` and it + // may not be possible to configure the ACLs or bucket policy as required. + Annotations.of(this).addWarning( + `Unable to add necessary logging permissions to imported target bucket: ${props.serverAccessLogsBucket}`, + ); } for (const inventory of props.inventories ?? []) { @@ -2201,19 +2213,26 @@ export class Bucket extends BucketBase { */ private allowLogDelivery(from: IBucket, prefix?: string) { if (FeatureFlags.of(this).isEnabled(cxapi.S3_SERVER_ACCESS_LOGS_USE_BUCKET_POLICY)) { - this.addToResourcePolicy(new iam.PolicyStatement({ - effect: iam.Effect.ALLOW, - principals: [new iam.ServicePrincipal('logging.s3.amazonaws.com')], - actions: ['s3:PutObject'], - resources: [this.arnForObjects(prefix ? `${prefix}*`: '*')], - conditions: { + let conditions = undefined; + // The conditions for the bucket policy can be applied only when the buckets are in + // the same stack and a concrete bucket instance (not imported). Otherwise, the + // necessary imports may result in a cyclic dependency between the stacks. + if (from instanceof Bucket && Stack.of(this) === Stack.of(from)) { + conditions = { ArnLike: { 'aws:SourceArn': from.bucketArn, }, StringEquals: { 'aws:SourceAccount': from.env.account, }, - }, + }; + } + this.addToResourcePolicy(new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + principals: [new iam.ServicePrincipal('logging.s3.amazonaws.com')], + actions: ['s3:PutObject'], + resources: [this.arnForObjects(prefix ? `${prefix}*`: '*')], + conditions: conditions, })); } else if (this.accessControl && this.accessControl !== BucketAccessControl.LOG_DELIVERY_WRITE) { throw new Error("Cannot enable log delivery to this bucket because the bucket's ACL has been set and can't be changed"); diff --git a/packages/@aws-cdk/aws-s3/test/bucket.test.ts b/packages/@aws-cdk/aws-s3/test/bucket.test.ts index 1ff083281004e..39ed37c32823a 100644 --- a/packages/@aws-cdk/aws-s3/test/bucket.test.ts +++ b/packages/@aws-cdk/aws-s3/test/bucket.test.ts @@ -1,5 +1,5 @@ import { EOL } from 'os'; -import { Match, Template } from '@aws-cdk/assertions'; +import { Annotations, Match, Template } from '@aws-cdk/assertions'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as cdk from '@aws-cdk/core'; @@ -2205,6 +2205,31 @@ describe('bucket', () => { ).toThrow(/Cannot enable log delivery to this bucket because the bucket's ACL has been set and can't be changed/); }); + test('Bucket skips setting up access log ACL but configures delivery for an imported target bucket', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const accessLogBucket = s3.Bucket.fromBucketName(stack, 'TargetBucket', 'target-logs-bucket'); + new s3.Bucket(stack, 'TestBucket', { + serverAccessLogsBucket: accessLogBucket, + serverAccessLogsPrefix: 'test/', + }); + + // THEN + const template = Template.fromStack(stack); + template.hasResourceProperties('AWS::S3::Bucket', { + LoggingConfiguration: { + DestinationBucketName: stack.resolve(accessLogBucket.bucketName), + LogFilePrefix: 'test/', + }, + }); + template.allResourcesProperties('AWS::S3::Bucket', { + AccessControl: Match.absent(), + }); + Annotations.fromStack(stack).hasWarning('*', Match.stringLikeRegexp('Unable to add necessary logging permissions to imported target bucket')); + }); + test('Bucket Allow Log delivery should use the recommended policy when flag enabled', () => { // GIVEN const stack = new cdk.Stack(); diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.assets.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.assets.json new file mode 100644 index 0000000000000..158be521a0100 --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.assets.json @@ -0,0 +1,19 @@ +{ + "version": "22.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.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-s3/test/integ.bucket-import-server-access-logs.js.snapshot/ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.template.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.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-s3/test/integ.bucket-import-server-access-logs.js.snapshot/asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c/__entrypoint__.js b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c/__entrypoint__.js new file mode 100644 index 0000000000000..1e3a3093c1706 --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c/__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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLFNBQVM7Q0FDNUIsQ0FBQztBQUVGLE1BQU0sZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDbEcsTUFBTSwwQkFBMEIsR0FBRyw4REFBOEQsQ0FBQztBQVczRixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsTUFBTSxjQUFjLEdBQUcsRUFBRSxHQUFHLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLENBQUM7SUFDeEQsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxjQUFjLEVBQUUsU0FBUyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFM0QsdUVBQXVFO0lBQ3ZFLHVFQUF1RTtJQUN2RSxhQUFhO0lBQ2IsSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsSUFBSSxLQUFLLENBQUMsa0JBQWtCLEtBQUssZ0NBQWdDLEVBQUU7UUFDbkcsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsdURBQXVELENBQUMsQ0FBQztRQUN0RSxNQUFNLGNBQWMsQ0FBQyxTQUFTLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFDdkMsT0FBTztLQUNSO0lBRUQsSUFBSTtRQUNGLHlFQUF5RTtRQUN6RSxpRUFBaUU7UUFDakUsd0NBQXdDO1FBQ3hDLGlFQUFpRTtRQUNqRSxNQUFNLFdBQVcsR0FBWSxPQUFPLENBQUMsZ0JBQVEsQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLE9BQU8sQ0FBQztRQUN4RSxNQUFNLE1BQU0sR0FBRyxNQUFNLFdBQVcsQ0FBQyxjQUFjLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFFMUQsdURBQXVEO1FBQ3ZELE1BQU0sYUFBYSxHQUFHLGNBQWMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFFcEQsMkJBQTJCO1FBQzNCLE1BQU0sY0FBYyxDQUFDLFNBQVMsRUFBRSxhQUFhLENBQUMsQ0FBQztLQUNoRDtJQUFDLE9BQU8sQ0FBQyxFQUFFO1FBQ1YsTUFBTSxJQUFJLEdBQWE7WUFDckIsR0FBRyxLQUFLO1lBQ1IsTUFBTSxFQUFFLGdCQUFRLENBQUMsa0JBQWtCLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPO1NBQzFELENBQUM7UUFFRixJQUFJLENBQUMsSUFBSSxDQUFDLGtCQUFrQixFQUFFO1lBQzVCLHlFQUF5RTtZQUN6RSxtRUFBbUU7WUFDbkUsd0VBQXdFO1lBQ3hFLHFFQUFxRTtZQUNyRSxnQ0FBZ0M7WUFDaEMsSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsRUFBRTtnQkFDbEMsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsNEdBQTRHLENBQUMsQ0FBQztnQkFDM0gsSUFBSSxDQUFDLGtCQUFrQixHQUFHLGdDQUFnQyxDQUFDO2FBQzVEO2lCQUFNO2dCQUNMLGtFQUFrRTtnQkFDbEUsNkRBQTZEO2dCQUM3RCxnQkFBUSxDQUFDLEdBQUcsQ0FBQyw2REFBNkQsSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUM7YUFDcEc7U0FDRjtRQUVELG1FQUFtRTtRQUNuRSxNQUFNLGNBQWMsQ0FBQyxRQUFRLEVBQUUsSUFBSSxDQUFDLENBQUM7S0FDdEM7QUFDSCxDQUFDO0FBbkRELDBCQW1EQztBQUVELFNBQVMsY0FBYyxDQUNyQixVQUF5RixFQUN6RixrQkFBMEMsRUFBRztJQUU3QyxzRUFBc0U7SUFDdEUsdUJBQXVCO0lBQ3ZCLE1BQU0sa0JBQWtCLEdBQUcsZUFBZSxDQUFDLGtCQUFrQixJQUFJLFVBQVUsQ0FBQyxrQkFBa0IsSUFBSSxVQUFVLENBQUMsU0FBUyxDQUFDO0lBRXZILGtFQUFrRTtJQUNsRSxJQUFJLFVBQVUsQ0FBQyxXQUFXLEtBQUssUUFBUSxJQUFJLGtCQUFrQixLQUFLLFVBQVUsQ0FBQyxrQkFBa0IsRUFBRTtRQUMvRixNQUFNLElBQUksS0FBSyxDQUFDLHdEQUF3RCxVQUFVLENBQUMsa0JBQWtCLFNBQVMsZUFBZSxDQUFDLGtCQUFrQixtQkFBbUIsQ0FBQyxDQUFDO0tBQ3RLO0lBRUQsMERBQTBEO0lBQzFELE9BQU87UUFDTCxHQUFHLFVBQVU7UUFDYixHQUFHLGVBQWU7UUFDbEIsa0JBQWtCLEVBQUUsa0JBQWtCO0tBQ3ZDLENBQUM7QUFDSixDQUFDO0FBRUQsS0FBSyxVQUFVLGNBQWMsQ0FBQyxNQUE0QixFQUFFLEtBQWU7SUFDekUsTUFBTSxJQUFJLEdBQW1EO1FBQzNELE1BQU0sRUFBRSxNQUFNO1FBQ2QsTUFBTSxFQUFFLEtBQUssQ0FBQyxNQUFNLElBQUksTUFBTTtRQUM5QixPQUFPLEVBQUUsS0FBSyxDQUFDLE9BQU87UUFDdEIsU0FBUyxFQUFFLEtBQUssQ0FBQyxTQUFTO1FBQzFCLGtCQUFrQixFQUFFLEtBQUssQ0FBQyxrQkFBa0IsSUFBSSwwQkFBMEI7UUFDMUUsaUJBQWlCLEVBQUUsS0FBSyxDQUFDLGlCQUFpQjtRQUMxQyxNQUFNLEVBQUUsS0FBSyxDQUFDLE1BQU07UUFDcEIsSUFBSSxFQUFFLEtBQUssQ0FBQyxJQUFJO0tBQ2pCLENBQUM7SUFFRixnQkFBUSxDQUFDLEdBQUcsQ0FBQyxtQ0FBbUMsRUFBRSxJQUFJLENBQUMsQ0FBQztJQUV4RCxNQUFNLFlBQVksR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzFDLE1BQU0sU0FBUyxHQUFHLEdBQUcsQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQy9DLE1BQU0sR0FBRyxHQUFHO1FBQ1YsUUFBUSxFQUFFLFNBQVMsQ0FBQyxRQUFRO1FBQzVCLElBQUksRUFBRSxTQUFTLENBQUMsSUFBSTtRQUNwQixNQUFNLEVBQUUsS0FBSztRQUNiLE9BQU8sRUFBRSxFQUFFLGNBQWMsRUFBRSxFQUFFLEVBQUUsZ0JBQWdCLEVBQUUsWUFBWSxDQUFDLE1BQU0sRUFBRTtLQUN2RSxDQUFDO0lBRUYsTUFBTSxZQUFZLEdBQUc7UUFDbkIsUUFBUSxFQUFFLENBQUM7UUFDWCxLQUFLLEVBQUUsSUFBSTtLQUNaLENBQUM7SUFDRixNQUFNLFdBQVcsQ0FBQyxZQUFZLEVBQUUsZ0JBQVEsQ0FBQyxlQUFlLENBQUMsQ0FBQyxHQUFHLEVBQUUsWUFBWSxDQUFDLENBQUM7QUFDL0UsQ0FBQztBQUVELEtBQUssVUFBVSxzQkFBc0IsQ0FBQyxPQUE2QixFQUFFLFlBQW9CO0lBQ3ZGLE9BQU8sSUFBSSxPQUFPLENBQUMsQ0FBQyxPQUFPLEVBQUUsTUFBTSxFQUFFLEVBQUU7UUFDckMsSUFBSTtZQUNGLE1BQU0sT0FBTyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsT0FBTyxFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUMsT0FBTyxFQUFFLENBQUMsQ0FBQztZQUN2RCxPQUFPLENBQUMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLENBQUMsQ0FBQztZQUM1QixPQUFPLENBQUMsS0FBSyxDQUFDLFlBQVksQ0FBQyxDQUFDO1lBQzVCLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQztTQUNmO1FBQUMsT0FBTyxDQUFDLEVBQUU7WUFDVixNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUM7U0FDWDtJQUNILENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUVELFNBQVMsVUFBVSxDQUFDLEdBQVcsRUFBRSxHQUFHLE1BQWE7SUFDL0Msc0NBQXNDO0lBQ3RDLE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxFQUFFLEdBQUcsTUFBTSxDQUFDLENBQUM7QUFDOUIsQ0FBQztBQVNELFNBQWdCLFdBQVcsQ0FBMEIsT0FBcUIsRUFBRSxFQUE0QjtJQUN0RyxPQUFPLEtBQUssRUFBRSxHQUFHLEVBQUssRUFBRSxFQUFFO1FBQ3hCLElBQUksUUFBUSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUM7UUFDaEMsSUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQztRQUN2QixPQUFPLElBQUksRUFBRTtZQUNYLElBQUk7Z0JBQ0YsT0FBTyxNQUFNLEVBQUUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO2FBQ3hCO1lBQUMsT0FBTyxDQUFDLEVBQUU7Z0JBQ1YsSUFBSSxRQUFRLEVBQUUsSUFBSSxDQUFDLEVBQUU7b0JBQ25CLE1BQU0sQ0FBQyxDQUFDO2lCQUNUO2dCQUNELE1BQU0sS0FBSyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLEVBQUUsQ0FBQyxDQUFDLENBQUM7Z0JBQzVDLEVBQUUsSUFBSSxDQUFDLENBQUM7YUFDVDtTQUNGO0lBQ0gsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQWhCRCxrQ0FnQkM7QUFFRCxLQUFLLFVBQVUsS0FBSyxDQUFDLEVBQVU7SUFDN0IsT0FBTyxJQUFJLE9BQU8sQ0FBQyxDQUFDLEVBQUUsRUFBRSxFQUFFLENBQUMsVUFBVSxDQUFDLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ2pELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBodHRwcyBmcm9tICdodHRwcyc7XG5pbXBvcnQgKiBhcyB1cmwgZnJvbSAndXJsJztcblxuLy8gZm9yIHVuaXQgdGVzdHNcbmV4cG9ydCBjb25zdCBleHRlcm5hbCA9IHtcbiAgc2VuZEh0dHBSZXF1ZXN0OiBkZWZhdWx0U2VuZEh0dHBSZXF1ZXN0LFxuICBsb2c6IGRlZmF1bHRMb2csXG4gIGluY2x1ZGVTdGFja1RyYWNlczogdHJ1ZSxcbiAgdXNlckhhbmRsZXJJbmRleDogJy4vaW5kZXgnLFxufTtcblxuY29uc3QgQ1JFQVRFX0ZBSUxFRF9QSFlTSUNBTF9JRF9NQVJLRVIgPSAnQVdTQ0RLOjpDdXN0b21SZXNvdXJjZVByb3ZpZGVyRnJhbWV3b3JrOjpDUkVBVEVfRkFJTEVEJztcbmNvbnN0IE1JU1NJTkdfUEhZU0lDQUxfSURfTUFSS0VSID0gJ0FXU0NESzo6Q3VzdG9tUmVzb3VyY2VQcm92aWRlckZyYW1ld29yazo6TUlTU0lOR19QSFlTSUNBTF9JRCc7XG5cbmV4cG9ydCB0eXBlIFJlc3BvbnNlID0gQVdTTGFtYmRhLkNsb3VkRm9ybWF0aW9uQ3VzdG9tUmVzb3VyY2VFdmVudCAmIEhhbmRsZXJSZXNwb25zZTtcbmV4cG9ydCB0eXBlIEhhbmRsZXIgPSAoZXZlbnQ6IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlRXZlbnQsIGNvbnRleHQ6IEFXU0xhbWJkYS5Db250ZXh0KSA9PiBQcm9taXNlPEhhbmRsZXJSZXNwb25zZSB8IHZvaWQ+O1xuZXhwb3J0IHR5cGUgSGFuZGxlclJlc3BvbnNlID0gdW5kZWZpbmVkIHwge1xuICBEYXRhPzogYW55O1xuICBQaHlzaWNhbFJlc291cmNlSWQ/OiBzdHJpbmc7XG4gIFJlYXNvbj86IHN0cmluZztcbiAgTm9FY2hvPzogYm9vbGVhbjtcbn07XG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBoYW5kbGVyKGV2ZW50OiBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZUV2ZW50LCBjb250ZXh0OiBBV1NMYW1iZGEuQ29udGV4dCkge1xuICBjb25zdCBzYW5pdGl6ZWRFdmVudCA9IHsgLi4uZXZlbnQsIFJlc3BvbnNlVVJMOiAnLi4uJyB9O1xuICBleHRlcm5hbC5sb2coSlNPTi5zdHJpbmdpZnkoc2FuaXRpemVkRXZlbnQsIHVuZGVmaW5lZCwgMikpO1xuXG4gIC8vIGlnbm9yZSBERUxFVEUgZXZlbnQgd2hlbiB0aGUgcGh5c2ljYWwgcmVzb3VyY2UgSUQgaXMgdGhlIG1hcmtlciB0aGF0XG4gIC8vIGluZGljYXRlcyB0aGF0IHRoaXMgREVMRVRFIGlzIGEgc3Vic2VxdWVudCBERUxFVEUgdG8gYSBmYWlsZWQgQ1JFQVRFXG4gIC8vIG9wZXJhdGlvbi5cbiAgaWYgKGV2ZW50LlJlcXVlc3RUeXBlID09PSAnRGVsZXRlJyAmJiBldmVudC5QaHlzaWNhbFJlc291cmNlSWQgPT09IENSRUFURV9GQUlMRURfUEhZU0lDQUxfSURfTUFSS0VSKSB7XG4gICAgZXh0ZXJuYWwubG9nKCdpZ25vcmluZyBERUxFVEUgZXZlbnQgY2F1c2VkIGJ5IGEgZmFpbGVkIENSRUFURSBldmVudCcpO1xuICAgIGF3YWl0IHN1Ym1pdFJlc3BvbnNlKCdTVUNDRVNTJywgZXZlbnQpO1xuICAgIHJldHVybjtcbiAgfVxuXG4gIHRyeSB7XG4gICAgLy8gaW52b2tlIHRoZSB1c2VyIGhhbmRsZXIuIHRoaXMgaXMgaW50ZW50aW9uYWxseSBpbnNpZGUgdGhlIHRyeS1jYXRjaCB0b1xuICAgIC8vIGVuc3VyZSB0aGF0IGlmIHRoZXJlIGlzIGFuIGVycm9yIGl0J3MgcmVwb3J0ZWQgYXMgYSBmYWlsdXJlIHRvXG4gICAgLy8gY2xvdWRmb3JtYXRpb24gKG90aGVyd2lzZSBjZm4gd2FpdHMpLlxuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tcmVxdWlyZS1pbXBvcnRzXG4gICAgY29uc3QgdXNlckhhbmRsZXI6IEhhbmRsZXIgPSByZXF1aXJlKGV4dGVybmFsLnVzZXJIYW5kbGVySW5kZXgpLmhhbmRsZXI7XG4gICAgY29uc3QgcmVzdWx0ID0gYXdhaXQgdXNlckhhbmRsZXIoc2FuaXRpemVkRXZlbnQsIGNvbnRleHQpO1xuXG4gICAgLy8gdmFsaWRhdGUgdXNlciByZXNwb25zZSBhbmQgY3JlYXRlIHRoZSBjb21iaW5lZCBldmVudFxuICAgIGNvbnN0IHJlc3BvbnNlRXZlbnQgPSByZW5kZXJSZXNwb25zZShldmVudCwgcmVzdWx0KTtcblxuICAgIC8vIHN1Ym1pdCB0byBjZm4gYXMgc3VjY2Vzc1xuICAgIGF3YWl0IHN1Ym1pdFJlc3BvbnNlKCdTVUNDRVNTJywgcmVzcG9uc2VFdmVudCk7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBjb25zdCByZXNwOiBSZXNwb25zZSA9IHtcbiAgICAgIC4uLmV2ZW50LFxuICAgICAgUmVhc29uOiBleHRlcm5hbC5pbmNsdWRlU3RhY2tUcmFjZXMgPyBlLnN0YWNrIDogZS5tZXNzYWdlLFxuICAgIH07XG5cbiAgICBpZiAoIXJlc3AuUGh5c2ljYWxSZXNvdXJjZUlkKSB7XG4gICAgICAvLyBzcGVjaWFsIGNhc2U6IGlmIENSRUFURSBmYWlscywgd2hpY2ggdXN1YWxseSBpbXBsaWVzLCB3ZSB1c3VhbGx5IGRvbid0XG4gICAgICAvLyBoYXZlIGEgcGh5c2ljYWwgcmVzb3VyY2UgaWQuIGluIHRoaXMgY2FzZSwgdGhlIHN1YnNlcXVlbnQgREVMRVRFXG4gICAgICAvLyBvcGVyYXRpb24gZG9lcyBub3QgaGF2ZSBhbnkgbWVhbmluZywgYW5kIHdpbGwgbGlrZWx5IGZhaWwgYXMgd2VsbC4gdG9cbiAgICAgIC8vIGFkZHJlc3MgdGhpcywgd2UgdXNlIGEgbWFya2VyIHNvIHRoZSBwcm92aWRlciBmcmFtZXdvcmsgY2FuIHNpbXBseVxuICAgICAgLy8gaWdub3JlIHRoZSBzdWJzZXF1ZW50IERFTEVURS5cbiAgICAgIGlmIChldmVudC5SZXF1ZXN0VHlwZSA9PT0gJ0NyZWF0ZScpIHtcbiAgICAgICAgZXh0ZXJuYWwubG9nKCdDUkVBVEUgZmFpbGVkLCByZXNwb25kaW5nIHdpdGggYSBtYXJrZXIgcGh5c2ljYWwgcmVzb3VyY2UgaWQgc28gdGhhdCB0aGUgc3Vic2VxdWVudCBERUxFVEUgd2lsbCBiZSBpZ25vcmVkJyk7XG4gICAgICAgIHJlc3AuUGh5c2ljYWxSZXNvdXJjZUlkID0gQ1JFQVRFX0ZBSUxFRF9QSFlTSUNBTF9JRF9NQVJLRVI7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyBvdGhlcndpc2UsIGlmIFBoeXNpY2FsUmVzb3VyY2VJZCBpcyBub3Qgc3BlY2lmaWVkLCBzb21ldGhpbmcgaXNcbiAgICAgICAgLy8gdGVycmlibHkgd3JvbmcgYmVjYXVzZSBhbGwgb3RoZXIgZXZlbnRzIHNob3VsZCBoYXZlIGFuIElELlxuICAgICAgICBleHRlcm5hbC5sb2coYEVSUk9SOiBNYWxmb3JtZWQgZXZlbnQuIFwiUGh5c2ljYWxSZXNvdXJjZUlkXCIgaXMgcmVxdWlyZWQ6ICR7SlNPTi5zdHJpbmdpZnkoZXZlbnQpfWApO1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIHRoaXMgaXMgYW4gYWN0dWFsIGVycm9yLCBmYWlsIHRoZSBhY3Rpdml0eSBhbHRvZ2V0aGVyIGFuZCBleGlzdC5cbiAgICBhd2FpdCBzdWJtaXRSZXNwb25zZSgnRkFJTEVEJywgcmVzcCk7XG4gIH1cbn1cblxuZnVuY3Rpb24gcmVuZGVyUmVzcG9uc2UoXG4gIGNmblJlcXVlc3Q6IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlRXZlbnQgJiB7IFBoeXNpY2FsUmVzb3VyY2VJZD86IHN0cmluZyB9LFxuICBoYW5kbGVyUmVzcG9uc2U6IHZvaWQgfCBIYW5kbGVyUmVzcG9uc2UgPSB7IH0pOiBSZXNwb25zZSB7XG5cbiAgLy8gaWYgcGh5c2ljYWwgSUQgaXMgbm90IHJldHVybmVkLCB3ZSBoYXZlIHNvbWUgZGVmYXVsdHMgZm9yIHlvdSBiYXNlZFxuICAvLyBvbiB0aGUgcmVxdWVzdCB0eXBlLlxuICBjb25zdCBwaHlzaWNhbFJlc291cmNlSWQgPSBoYW5kbGVyUmVzcG9uc2UuUGh5c2ljYWxSZXNvdXJjZUlkID8/IGNmblJlcXVlc3QuUGh5c2ljYWxSZXNvdXJjZUlkID8/IGNmblJlcXVlc3QuUmVxdWVzdElkO1xuXG4gIC8vIGlmIHdlIGFyZSBpbiBERUxFVEUgYW5kIHBoeXNpY2FsIElEIHdhcyBjaGFuZ2VkLCBpdCdzIGFuIGVycm9yLlxuICBpZiAoY2ZuUmVxdWVzdC5SZXF1ZXN0VHlwZSA9PT0gJ0RlbGV0ZScgJiYgcGh5c2ljYWxSZXNvdXJjZUlkICE9PSBjZm5SZXF1ZXN0LlBoeXNpY2FsUmVzb3VyY2VJZCkge1xuICAgIHRocm93IG5ldyBFcnJvcihgREVMRVRFOiBjYW5ub3QgY2hhbmdlIHRoZSBwaHlzaWNhbCByZXNvdXJjZSBJRCBmcm9tIFwiJHtjZm5SZXF1ZXN0LlBoeXNpY2FsUmVzb3VyY2VJZH1cIiB0byBcIiR7aGFuZGxlclJlc3BvbnNlLlBoeXNpY2FsUmVzb3VyY2VJZH1cIiBkdXJpbmcgZGVsZXRpb25gKTtcbiAgfVxuXG4gIC8vIG1lcmdlIHJlcXVlc3QgZXZlbnQgYW5kIHJlc3VsdCBldmVudCAocmVzdWx0IHByZXZhaWxzKS5cbiAgcmV0dXJuIHtcbiAgICAuLi5jZm5SZXF1ZXN0LFxuICAgIC4uLmhhbmRsZXJSZXNwb25zZSxcbiAgICBQaHlzaWNhbFJlc291cmNlSWQ6IHBoeXNpY2FsUmVzb3VyY2VJZCxcbiAgfTtcbn1cblxuYXN5bmMgZnVuY3Rpb24gc3VibWl0UmVzcG9uc2Uoc3RhdHVzOiAnU1VDQ0VTUycgfCAnRkFJTEVEJywgZXZlbnQ6IFJlc3BvbnNlKSB7XG4gIGNvbnN0IGpzb246IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlUmVzcG9uc2UgPSB7XG4gICAgU3RhdHVzOiBzdGF0dXMsXG4gICAgUmVhc29uOiBldmVudC5SZWFzb24gPz8gc3RhdHVzLFxuICAgIFN0YWNrSWQ6IGV2ZW50LlN0YWNrSWQsXG4gICAgUmVxdWVzdElkOiBldmVudC5SZXF1ZXN0SWQsXG4gICAgUGh5c2ljYWxSZXNvdXJjZUlkOiBldmVudC5QaHlzaWNhbFJlc291cmNlSWQgfHwgTUlTU0lOR19QSFlTSUNBTF9JRF9NQVJLRVIsXG4gICAgTG9naWNhbFJlc291cmNlSWQ6IGV2ZW50LkxvZ2ljYWxSZXNvdXJjZUlkLFxuICAgIE5vRWNobzogZXZlbnQuTm9FY2hvLFxuICAgIERhdGE6IGV2ZW50LkRhdGEsXG4gIH07XG5cbiAgZXh0ZXJuYWwubG9nKCdzdWJtaXQgcmVzcG9uc2UgdG8gY2xvdWRmb3JtYXRpb24nLCBqc29uKTtcblxuICBjb25zdCByZXNwb25zZUJvZHkgPSBKU09OLnN0cmluZ2lmeShqc29uKTtcbiAgY29uc3QgcGFyc2VkVXJsID0gdXJsLnBhcnNlKGV2ZW50LlJlc3BvbnNlVVJMKTtcbiAgY29uc3QgcmVxID0ge1xuICAgIGhvc3RuYW1lOiBwYXJzZWRVcmwuaG9zdG5hbWUsXG4gICAgcGF0aDogcGFyc2VkVXJsLnBhdGgsXG4gICAgbWV0aG9kOiAnUFVUJyxcbiAgICBoZWFkZXJzOiB7ICdjb250ZW50LXR5cGUnOiAnJywgJ2NvbnRlbnQtbGVuZ3RoJzogcmVzcG9uc2VCb2R5Lmxlbmd0aCB9LFxuICB9O1xuXG4gIGNvbnN0IHJldHJ5T3B0aW9ucyA9IHtcbiAgICBhdHRlbXB0czogNSxcbiAgICBzbGVlcDogMTAwMCxcbiAgfTtcbiAgYXdhaXQgd2l0aFJldHJpZXMocmV0cnlPcHRpb25zLCBleHRlcm5hbC5zZW5kSHR0cFJlcXVlc3QpKHJlcSwgcmVzcG9uc2VCb2R5KTtcbn1cblxuYXN5bmMgZnVuY3Rpb24gZGVmYXVsdFNlbmRIdHRwUmVxdWVzdChvcHRpb25zOiBodHRwcy5SZXF1ZXN0T3B0aW9ucywgcmVzcG9uc2VCb2R5OiBzdHJpbmcpOiBQcm9taXNlPHZvaWQ+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICB0cnkge1xuICAgICAgY29uc3QgcmVxdWVzdCA9IGh0dHBzLnJlcXVlc3Qob3B0aW9ucywgXyA9PiByZXNvbHZlKCkpO1xuICAgICAgcmVxdWVzdC5vbignZXJyb3InLCByZWplY3QpO1xuICAgICAgcmVxdWVzdC53cml0ZShyZXNwb25zZUJvZHkpO1xuICAgICAgcmVxdWVzdC5lbmQoKTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZWplY3QoZSk7XG4gICAgfVxuICB9KTtcbn1cblxuZnVuY3Rpb24gZGVmYXVsdExvZyhmbXQ6IHN0cmluZywgLi4ucGFyYW1zOiBhbnlbXSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tY29uc29sZVxuICBjb25zb2xlLmxvZyhmbXQsIC4uLnBhcmFtcyk7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgUmV0cnlPcHRpb25zIHtcbiAgLyoqIEhvdyBtYW55IHJldHJpZXMgKHdpbGwgYXQgbGVhc3QgdHJ5IG9uY2UpICovXG4gIHJlYWRvbmx5IGF0dGVtcHRzOiBudW1iZXI7XG4gIC8qKiBTbGVlcCBiYXNlLCBpbiBtcyAqL1xuICByZWFkb25seSBzbGVlcDogbnVtYmVyO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gd2l0aFJldHJpZXM8QSBleHRlbmRzIEFycmF5PGFueT4sIEI+KG9wdGlvbnM6IFJldHJ5T3B0aW9ucywgZm46ICguLi54czogQSkgPT4gUHJvbWlzZTxCPik6ICguLi54czogQSkgPT4gUHJvbWlzZTxCPiB7XG4gIHJldHVybiBhc3luYyAoLi4ueHM6IEEpID0+IHtcbiAgICBsZXQgYXR0ZW1wdHMgPSBvcHRpb25zLmF0dGVtcHRzO1xuICAgIGxldCBtcyA9IG9wdGlvbnMuc2xlZXA7XG4gICAgd2hpbGUgKHRydWUpIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIHJldHVybiBhd2FpdCBmbiguLi54cyk7XG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIGlmIChhdHRlbXB0cy0tIDw9IDApIHtcbiAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSAqIG1zKSk7XG4gICAgICAgIG1zICo9IDI7XG4gICAgICB9XG4gICAgfVxuICB9O1xufVxuXG5hc3luYyBmdW5jdGlvbiBzbGVlcChtczogbnVtYmVyKTogUHJvbWlzZTx2b2lkPiB7XG4gIHJldHVybiBuZXcgUHJvbWlzZSgob2spID0+IHNldFRpbWVvdXQob2ssIG1zKSk7XG59Il19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c/index.js b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c/index.js new file mode 100644 index 0000000000000..7ce4156d4ba41 --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c/index.js @@ -0,0 +1,78 @@ +"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 AUTO_DELETE_OBJECTS_TAG = 'aws-cdk:auto-delete-objects'; +const s3 = new aws_sdk_1.S3(); +async function handler(event) { + switch (event.RequestType) { + case 'Create': + return; + case 'Update': + return onUpdate(event); + case 'Delete': + return onDelete(event.ResourceProperties?.BucketName); + } +} +exports.handler = handler; +async function onUpdate(event) { + const updateEvent = event; + const oldBucketName = updateEvent.OldResourceProperties?.BucketName; + const newBucketName = updateEvent.ResourceProperties?.BucketName; + const bucketNameHasChanged = newBucketName != null && oldBucketName != null && newBucketName !== oldBucketName; + /* If the name of the bucket has changed, CloudFormation will try to delete the bucket + and create a new one with the new name. So we have to delete the contents of the + bucket so that this operation does not fail. */ + if (bucketNameHasChanged) { + return onDelete(oldBucketName); + } +} +/** + * Recursively delete all items in the bucket + * + * @param bucketName the bucket name + */ +async function emptyBucket(bucketName) { + const listedObjects = await s3.listObjectVersions({ Bucket: bucketName }).promise(); + const contents = [...listedObjects.Versions ?? [], ...listedObjects.DeleteMarkers ?? []]; + if (contents.length === 0) { + return; + } + const records = contents.map((record) => ({ Key: record.Key, VersionId: record.VersionId })); + await s3.deleteObjects({ Bucket: bucketName, Delete: { Objects: records } }).promise(); + if (listedObjects?.IsTruncated) { + await emptyBucket(bucketName); + } +} +async function onDelete(bucketName) { + if (!bucketName) { + throw new Error('No BucketName was provided.'); + } + if (!await isBucketTaggedForDeletion(bucketName)) { + process.stdout.write(`Bucket does not have '${AUTO_DELETE_OBJECTS_TAG}' tag, skipping cleaning.\n`); + return; + } + try { + await emptyBucket(bucketName); + } + catch (e) { + if (e.code !== 'NoSuchBucket') { + throw e; + } + // Bucket doesn't exist. Ignoring + } +} +/** + * The bucket will only be tagged for deletion if it's being deleted in the same + * deployment as this Custom Resource. + * + * If the Custom Resource is every deleted before the bucket, it must be because + * `autoDeleteObjects` has been switched to false, in which case the tag would have + * been removed before we get to this Delete event. + */ +async function isBucketTaggedForDeletion(bucketName) { + const response = await s3.getBucketTagging({ Bucket: bucketName }).promise(); + return response.TagSet.some(tag => tag.Key === AUTO_DELETE_OBJECTS_TAG && tag.Value === 'true'); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2REFBNkQ7QUFDN0QscUNBQTZCO0FBRTdCLE1BQU0sdUJBQXVCLEdBQUcsNkJBQTZCLENBQUM7QUFFOUQsTUFBTSxFQUFFLEdBQUcsSUFBSSxZQUFFLEVBQUUsQ0FBQztBQUViLEtBQUssVUFBVSxPQUFPLENBQUMsS0FBa0Q7SUFDOUUsUUFBUSxLQUFLLENBQUMsV0FBVyxFQUFFO1FBQ3pCLEtBQUssUUFBUTtZQUNYLE9BQU87UUFDVCxLQUFLLFFBQVE7WUFDWCxPQUFPLFFBQVEsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUN6QixLQUFLLFFBQVE7WUFDWCxPQUFPLFFBQVEsQ0FBQyxLQUFLLENBQUMsa0JBQWtCLEVBQUUsVUFBVSxDQUFDLENBQUM7S0FDekQ7QUFDSCxDQUFDO0FBVEQsMEJBU0M7QUFFRCxLQUFLLFVBQVUsUUFBUSxDQUFDLEtBQWtEO0lBQ3hFLE1BQU0sV0FBVyxHQUFHLEtBQTBELENBQUM7SUFDL0UsTUFBTSxhQUFhLEdBQUcsV0FBVyxDQUFDLHFCQUFxQixFQUFFLFVBQVUsQ0FBQztJQUNwRSxNQUFNLGFBQWEsR0FBRyxXQUFXLENBQUMsa0JBQWtCLEVBQUUsVUFBVSxDQUFDO0lBQ2pFLE1BQU0sb0JBQW9CLEdBQUcsYUFBYSxJQUFJLElBQUksSUFBSSxhQUFhLElBQUksSUFBSSxJQUFJLGFBQWEsS0FBSyxhQUFhLENBQUM7SUFFL0c7O3NEQUVrRDtJQUNsRCxJQUFJLG9CQUFvQixFQUFFO1FBQ3hCLE9BQU8sUUFBUSxDQUFDLGFBQWEsQ0FBQyxDQUFDO0tBQ2hDO0FBQ0gsQ0FBQztBQUVEOzs7O0dBSUc7QUFDSCxLQUFLLFVBQVUsV0FBVyxDQUFDLFVBQWtCO0lBQzNDLE1BQU0sYUFBYSxHQUFHLE1BQU0sRUFBRSxDQUFDLGtCQUFrQixDQUFDLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDcEYsTUFBTSxRQUFRLEdBQUcsQ0FBQyxHQUFHLGFBQWEsQ0FBQyxRQUFRLElBQUksRUFBRSxFQUFFLEdBQUcsYUFBYSxDQUFDLGFBQWEsSUFBSSxFQUFFLENBQUMsQ0FBQztJQUN6RixJQUFJLFFBQVEsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFO1FBQ3pCLE9BQU87S0FDUjtJQUVELE1BQU0sT0FBTyxHQUFHLFFBQVEsQ0FBQyxHQUFHLENBQUMsQ0FBQyxNQUFXLEVBQUUsRUFBRSxDQUFDLENBQUMsRUFBRSxHQUFHLEVBQUUsTUFBTSxDQUFDLEdBQUcsRUFBRSxTQUFTLEVBQUUsTUFBTSxDQUFDLFNBQVMsRUFBRSxDQUFDLENBQUMsQ0FBQztJQUNsRyxNQUFNLEVBQUUsQ0FBQyxhQUFhLENBQUMsRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7SUFFdkYsSUFBSSxhQUFhLEVBQUUsV0FBVyxFQUFFO1FBQzlCLE1BQU0sV0FBVyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0tBQy9CO0FBQ0gsQ0FBQztBQUVELEtBQUssVUFBVSxRQUFRLENBQUMsVUFBbUI7SUFDekMsSUFBSSxDQUFDLFVBQVUsRUFBRTtRQUNmLE1BQU0sSUFBSSxLQUFLLENBQUMsNkJBQTZCLENBQUMsQ0FBQztLQUNoRDtJQUNELElBQUksQ0FBQyxNQUFNLHlCQUF5QixDQUFDLFVBQVUsQ0FBQyxFQUFFO1FBQ2hELE9BQU8sQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLHlCQUF5Qix1QkFBdUIsNkJBQTZCLENBQUMsQ0FBQztRQUNwRyxPQUFPO0tBQ1I7SUFDRCxJQUFJO1FBQ0YsTUFBTSxXQUFXLENBQUMsVUFBVSxDQUFDLENBQUM7S0FDL0I7SUFBQyxPQUFPLENBQUMsRUFBRTtRQUNWLElBQUksQ0FBQyxDQUFDLElBQUksS0FBSyxjQUFjLEVBQUU7WUFDN0IsTUFBTSxDQUFDLENBQUM7U0FDVDtRQUNELGlDQUFpQztLQUNsQztBQUNILENBQUM7QUFFRDs7Ozs7OztHQU9HO0FBQ0gsS0FBSyxVQUFVLHlCQUF5QixDQUFDLFVBQWtCO0lBQ3pELE1BQU0sUUFBUSxHQUFHLE1BQU0sRUFBRSxDQUFDLGdCQUFnQixDQUFDLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDN0UsT0FBTyxRQUFRLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsQ0FBQyxHQUFHLEtBQUssdUJBQXVCLElBQUksR0FBRyxDQUFDLEtBQUssS0FBSyxNQUFNLENBQUMsQ0FBQztBQUNsRyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGltcG9ydC9uby1leHRyYW5lb3VzLWRlcGVuZGVuY2llc1xuaW1wb3J0IHsgUzMgfSBmcm9tICdhd3Mtc2RrJztcblxuY29uc3QgQVVUT19ERUxFVEVfT0JKRUNUU19UQUcgPSAnYXdzLWNkazphdXRvLWRlbGV0ZS1vYmplY3RzJztcblxuY29uc3QgczMgPSBuZXcgUzMoKTtcblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGhhbmRsZXIoZXZlbnQ6IEFXU0xhbWJkYS5DbG91ZEZvcm1hdGlvbkN1c3RvbVJlc291cmNlRXZlbnQpIHtcbiAgc3dpdGNoIChldmVudC5SZXF1ZXN0VHlwZSkge1xuICAgIGNhc2UgJ0NyZWF0ZSc6XG4gICAgICByZXR1cm47XG4gICAgY2FzZSAnVXBkYXRlJzpcbiAgICAgIHJldHVybiBvblVwZGF0ZShldmVudCk7XG4gICAgY2FzZSAnRGVsZXRlJzpcbiAgICAgIHJldHVybiBvbkRlbGV0ZShldmVudC5SZXNvdXJjZVByb3BlcnRpZXM/LkJ1Y2tldE5hbWUpO1xuICB9XG59XG5cbmFzeW5jIGZ1bmN0aW9uIG9uVXBkYXRlKGV2ZW50OiBBV1NMYW1iZGEuQ2xvdWRGb3JtYXRpb25DdXN0b21SZXNvdXJjZUV2ZW50KSB7XG4gIGNvbnN0IHVwZGF0ZUV2ZW50ID0gZXZlbnQgYXMgQVdTTGFtYmRhLkNsb3VkRm9ybWF0aW9uQ3VzdG9tUmVzb3VyY2VVcGRhdGVFdmVudDtcbiAgY29uc3Qgb2xkQnVja2V0TmFtZSA9IHVwZGF0ZUV2ZW50Lk9sZFJlc291cmNlUHJvcGVydGllcz8uQnVja2V0TmFtZTtcbiAgY29uc3QgbmV3QnVja2V0TmFtZSA9IHVwZGF0ZUV2ZW50LlJlc291cmNlUHJvcGVydGllcz8uQnVja2V0TmFtZTtcbiAgY29uc3QgYnVja2V0TmFtZUhhc0NoYW5nZWQgPSBuZXdCdWNrZXROYW1lICE9IG51bGwgJiYgb2xkQnVja2V0TmFtZSAhPSBudWxsICYmIG5ld0J1Y2tldE5hbWUgIT09IG9sZEJ1Y2tldE5hbWU7XG5cbiAgLyogSWYgdGhlIG5hbWUgb2YgdGhlIGJ1Y2tldCBoYXMgY2hhbmdlZCwgQ2xvdWRGb3JtYXRpb24gd2lsbCB0cnkgdG8gZGVsZXRlIHRoZSBidWNrZXRcbiAgICAgYW5kIGNyZWF0ZSBhIG5ldyBvbmUgd2l0aCB0aGUgbmV3IG5hbWUuIFNvIHdlIGhhdmUgdG8gZGVsZXRlIHRoZSBjb250ZW50cyBvZiB0aGVcbiAgICAgYnVja2V0IHNvIHRoYXQgdGhpcyBvcGVyYXRpb24gZG9lcyBub3QgZmFpbC4gKi9cbiAgaWYgKGJ1Y2tldE5hbWVIYXNDaGFuZ2VkKSB7XG4gICAgcmV0dXJuIG9uRGVsZXRlKG9sZEJ1Y2tldE5hbWUpO1xuICB9XG59XG5cbi8qKlxuICogUmVjdXJzaXZlbHkgZGVsZXRlIGFsbCBpdGVtcyBpbiB0aGUgYnVja2V0XG4gKlxuICogQHBhcmFtIGJ1Y2tldE5hbWUgdGhlIGJ1Y2tldCBuYW1lXG4gKi9cbmFzeW5jIGZ1bmN0aW9uIGVtcHR5QnVja2V0KGJ1Y2tldE5hbWU6IHN0cmluZykge1xuICBjb25zdCBsaXN0ZWRPYmplY3RzID0gYXdhaXQgczMubGlzdE9iamVjdFZlcnNpb25zKHsgQnVja2V0OiBidWNrZXROYW1lIH0pLnByb21pc2UoKTtcbiAgY29uc3QgY29udGVudHMgPSBbLi4ubGlzdGVkT2JqZWN0cy5WZXJzaW9ucyA/PyBbXSwgLi4ubGlzdGVkT2JqZWN0cy5EZWxldGVNYXJrZXJzID8/IFtdXTtcbiAgaWYgKGNvbnRlbnRzLmxlbmd0aCA9PT0gMCkge1xuICAgIHJldHVybjtcbiAgfVxuXG4gIGNvbnN0IHJlY29yZHMgPSBjb250ZW50cy5tYXAoKHJlY29yZDogYW55KSA9PiAoeyBLZXk6IHJlY29yZC5LZXksIFZlcnNpb25JZDogcmVjb3JkLlZlcnNpb25JZCB9KSk7XG4gIGF3YWl0IHMzLmRlbGV0ZU9iamVjdHMoeyBCdWNrZXQ6IGJ1Y2tldE5hbWUsIERlbGV0ZTogeyBPYmplY3RzOiByZWNvcmRzIH0gfSkucHJvbWlzZSgpO1xuXG4gIGlmIChsaXN0ZWRPYmplY3RzPy5Jc1RydW5jYXRlZCkge1xuICAgIGF3YWl0IGVtcHR5QnVja2V0KGJ1Y2tldE5hbWUpO1xuICB9XG59XG5cbmFzeW5jIGZ1bmN0aW9uIG9uRGVsZXRlKGJ1Y2tldE5hbWU/OiBzdHJpbmcpIHtcbiAgaWYgKCFidWNrZXROYW1lKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdObyBCdWNrZXROYW1lIHdhcyBwcm92aWRlZC4nKTtcbiAgfVxuICBpZiAoIWF3YWl0IGlzQnVja2V0VGFnZ2VkRm9yRGVsZXRpb24oYnVja2V0TmFtZSkpIHtcbiAgICBwcm9jZXNzLnN0ZG91dC53cml0ZShgQnVja2V0IGRvZXMgbm90IGhhdmUgJyR7QVVUT19ERUxFVEVfT0JKRUNUU19UQUd9JyB0YWcsIHNraXBwaW5nIGNsZWFuaW5nLlxcbmApO1xuICAgIHJldHVybjtcbiAgfVxuICB0cnkge1xuICAgIGF3YWl0IGVtcHR5QnVja2V0KGJ1Y2tldE5hbWUpO1xuICB9IGNhdGNoIChlKSB7XG4gICAgaWYgKGUuY29kZSAhPT0gJ05vU3VjaEJ1Y2tldCcpIHtcbiAgICAgIHRocm93IGU7XG4gICAgfVxuICAgIC8vIEJ1Y2tldCBkb2Vzbid0IGV4aXN0LiBJZ25vcmluZ1xuICB9XG59XG5cbi8qKlxuICogVGhlIGJ1Y2tldCB3aWxsIG9ubHkgYmUgdGFnZ2VkIGZvciBkZWxldGlvbiBpZiBpdCdzIGJlaW5nIGRlbGV0ZWQgaW4gdGhlIHNhbWVcbiAqIGRlcGxveW1lbnQgYXMgdGhpcyBDdXN0b20gUmVzb3VyY2UuXG4gKlxuICogSWYgdGhlIEN1c3RvbSBSZXNvdXJjZSBpcyBldmVyeSBkZWxldGVkIGJlZm9yZSB0aGUgYnVja2V0LCBpdCBtdXN0IGJlIGJlY2F1c2VcbiAqIGBhdXRvRGVsZXRlT2JqZWN0c2AgaGFzIGJlZW4gc3dpdGNoZWQgdG8gZmFsc2UsIGluIHdoaWNoIGNhc2UgdGhlIHRhZyB3b3VsZCBoYXZlXG4gKiBiZWVuIHJlbW92ZWQgYmVmb3JlIHdlIGdldCB0byB0aGlzIERlbGV0ZSBldmVudC5cbiAqL1xuYXN5bmMgZnVuY3Rpb24gaXNCdWNrZXRUYWdnZWRGb3JEZWxldGlvbihidWNrZXROYW1lOiBzdHJpbmcpIHtcbiAgY29uc3QgcmVzcG9uc2UgPSBhd2FpdCBzMy5nZXRCdWNrZXRUYWdnaW5nKHsgQnVja2V0OiBidWNrZXROYW1lIH0pLnByb21pc2UoKTtcbiAgcmV0dXJuIHJlc3BvbnNlLlRhZ1NldC5zb21lKHRhZyA9PiB0YWcuS2V5ID09PSBBVVRPX0RFTEVURV9PQkpFQ1RTX1RBRyAmJiB0YWcuVmFsdWUgPT09ICd0cnVlJyk7XG59Il19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-delivery.assets.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-delivery.assets.json new file mode 100644 index 0000000000000..3f6f0869c8925 --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-delivery.assets.json @@ -0,0 +1,32 @@ +{ + "version": "22.0.0", + "files": { + "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c": { + "source": { + "path": "asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "f7cd2df39343e955bf8713c630fe64d9469d0fb8da00f7858ca7874cf6aac7de": { + "source": { + "path": "aws-cdk-s3-access-logs-delivery.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "f7cd2df39343e955bf8713c630fe64d9469d0fb8da00f7858ca7874cf6aac7de.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-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-delivery.template.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-delivery.template.json new file mode 100644 index 0000000000000..9e11433c069ae --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-delivery.template.json @@ -0,0 +1,242 @@ +{ + "Resources": { + "SourceBucketDDD2130A": { + "Type": "AWS::S3::Bucket", + "Properties": { + "AccessControl": "BucketOwnerFullControl", + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + }, + "LoggingConfiguration": { + "DestinationBucketName": { + "Fn::ImportValue": "aws-cdk-s3-access-logs-target:ExportsOutputRefTargetBucket6BBF34294FF727AE" + }, + "LogFilePrefix": "test/" + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "BucketOwnerEnforced" + } + ] + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SourceBucketPolicy703DFBF9": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "SourceBucketDDD2130A" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "SourceBucketDDD2130A", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SourceBucketDDD2130A", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "SourceBucketDDD2130A", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SourceBucketDDD2130A", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "SourceBucketAutoDeleteObjectsCustomResourceC68FC040": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "SourceBucketDDD2130A" + } + }, + "DependsOn": [ + "SourceBucketPolicy703DFBF9" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "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" + } + ] + } + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + }, + "Runtime": "nodejs14.x", + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "SourceBucketDDD2130A" + }, + " S3 bucket." + ] + ] + } + }, + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + ] + } + }, + "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-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-target.assets.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-target.assets.json new file mode 100644 index 0000000000000..d1dfc1490358c --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-target.assets.json @@ -0,0 +1,32 @@ +{ + "version": "22.0.0", + "files": { + "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c": { + "source": { + "path": "asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "7767e504f330181294764f50bba67f4220e9e1651037459e9e6d1d6c06601eac": { + "source": { + "path": "aws-cdk-s3-access-logs-target.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "7767e504f330181294764f50bba67f4220e9e1651037459e9e6d1d6c06601eac.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-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-target.template.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-target.template.json new file mode 100644 index 0000000000000..737bbf0a2aae6 --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/aws-cdk-s3-access-logs-target.template.json @@ -0,0 +1,267 @@ +{ + "Resources": { + "TargetBucket6BBF3429": { + "Type": "AWS::S3::Bucket", + "Properties": { + "AccessControl": "BucketOwnerFullControl", + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + }, + "OwnershipControls": { + "Rules": [ + { + "ObjectOwnership": "BucketOwnerEnforced" + } + ] + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true + }, + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "TargetBucketPolicyDDA8DC0A": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "TargetBucket6BBF3429" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "s3:PutObject", + "Effect": "Allow", + "Principal": { + "Service": "logging.s3.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + "/test/*" + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "TargetBucketAutoDeleteObjectsCustomResourceB87F72D2": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "TargetBucket6BBF3429" + } + }, + "DependsOn": [ + "TargetBucketPolicyDDA8DC0A" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "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" + } + ] + } + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + }, + "Runtime": "nodejs14.x", + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "TargetBucket6BBF3429" + }, + " S3 bucket." + ] + ] + } + }, + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + ] + } + }, + "Outputs": { + "ExportsOutputRefTargetBucket6BBF34294FF727AE": { + "Value": { + "Ref": "TargetBucket6BBF3429" + }, + "Export": { + "Name": "aws-cdk-s3-access-logs-target:ExportsOutputRefTargetBucket6BBF34294FF727AE" + } + } + }, + "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-s3/test/integ.bucket-import-server-access-logs.js.snapshot/cdk.out b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/cdk.out new file mode 100644 index 0000000000000..145739f539580 --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"22.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/integ.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/integ.json new file mode 100644 index 0000000000000..67c79ca839b8c --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "22.0.0", + "testCases": { + "ServerAccessLogsImportTest/DefaultTest": { + "stacks": [ + "aws-cdk-s3-access-logs-delivery" + ], + "assertionStack": "ServerAccessLogsImportTest/DefaultTest/DeployAssert", + "assertionStackName": "ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/manifest.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/manifest.json new file mode 100644 index 0000000000000..5d197f4fd7011 --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/manifest.json @@ -0,0 +1,219 @@ +{ + "version": "22.0.0", + "artifacts": { + "aws-cdk-s3-access-logs-target.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-s3-access-logs-target.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-s3-access-logs-target": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-s3-access-logs-target.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}/7767e504f330181294764f50bba67f4220e9e1651037459e9e6d1d6c06601eac.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-s3-access-logs-target.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-s3-access-logs-target.assets" + ], + "metadata": { + "/aws-cdk-s3-access-logs-target/TargetBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TargetBucket6BBF3429" + } + ], + "/aws-cdk-s3-access-logs-target/TargetBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TargetBucketPolicyDDA8DC0A" + } + ], + "/aws-cdk-s3-access-logs-target/TargetBucket/AutoDeleteObjectsCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "TargetBucketAutoDeleteObjectsCustomResourceB87F72D2" + } + ], + "/aws-cdk-s3-access-logs-target/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + } + ], + "/aws-cdk-s3-access-logs-target/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F" + } + ], + "/aws-cdk-s3-access-logs-target/Exports/Output{\"Ref\":\"TargetBucket6BBF3429\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefTargetBucket6BBF34294FF727AE" + } + ], + "/aws-cdk-s3-access-logs-target/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-s3-access-logs-target/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-s3-access-logs-target" + }, + "aws-cdk-s3-access-logs-delivery.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-s3-access-logs-delivery.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-s3-access-logs-delivery": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-s3-access-logs-delivery.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}/f7cd2df39343e955bf8713c630fe64d9469d0fb8da00f7858ca7874cf6aac7de.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-s3-access-logs-delivery.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-s3-access-logs-target", + "aws-cdk-s3-access-logs-delivery.assets" + ], + "metadata": { + "/aws-cdk-s3-access-logs-delivery/SourceBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SourceBucketDDD2130A" + } + ], + "/aws-cdk-s3-access-logs-delivery/SourceBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SourceBucketPolicy703DFBF9" + } + ], + "/aws-cdk-s3-access-logs-delivery/SourceBucket/AutoDeleteObjectsCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "SourceBucketAutoDeleteObjectsCustomResourceC68FC040" + } + ], + "/aws-cdk-s3-access-logs-delivery/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + } + ], + "/aws-cdk-s3-access-logs-delivery/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F" + } + ], + "/aws-cdk-s3-access-logs-delivery/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-s3-access-logs-delivery/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-s3-access-logs-delivery" + }, + "ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.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": [ + "ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.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": [ + "ServerAccessLogsImportTestDefaultTestDeployAssert076DA7F5.assets" + ], + "metadata": { + "/ServerAccessLogsImportTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/ServerAccessLogsImportTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "ServerAccessLogsImportTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/tree.json b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/tree.json new file mode 100644 index 0000000000000..a560510a2ffa3 --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.js.snapshot/tree.json @@ -0,0 +1,586 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-s3-access-logs-target": { + "id": "aws-cdk-s3-access-logs-target", + "path": "aws-cdk-s3-access-logs-target", + "children": { + "TargetBucket": { + "id": "TargetBucket", + "path": "aws-cdk-s3-access-logs-target/TargetBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-s3-access-logs-target/TargetBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "accessControl": "BucketOwnerFullControl", + "bucketEncryption": { + "serverSideEncryptionConfiguration": [ + { + "serverSideEncryptionByDefault": { + "sseAlgorithm": "AES256" + } + } + ] + }, + "ownershipControls": { + "rules": [ + { + "objectOwnership": "BucketOwnerEnforced" + } + ] + }, + "publicAccessBlockConfiguration": { + "blockPublicAcls": true, + "blockPublicPolicy": true, + "ignorePublicAcls": true, + "restrictPublicBuckets": true + }, + "tags": [ + { + "key": "aws-cdk:auto-delete-objects", + "value": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "aws-cdk-s3-access-logs-target/TargetBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-s3-access-logs-target/TargetBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "TargetBucket6BBF3429" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "s3:PutObject", + "Effect": "Allow", + "Principal": { + "Service": "logging.s3.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TargetBucket6BBF3429", + "Arn" + ] + }, + "/test/*" + ] + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } + }, + "AutoDeleteObjectsCustomResource": { + "id": "AutoDeleteObjectsCustomResource", + "path": "aws-cdk-s3-access-logs-target/TargetBucket/AutoDeleteObjectsCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-s3-access-logs-target/TargetBucket/AutoDeleteObjectsCustomResource/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-s3.Bucket", + "version": "0.0.0" + } + }, + "Custom::S3AutoDeleteObjectsCustomResourceProvider": { + "id": "Custom::S3AutoDeleteObjectsCustomResourceProvider", + "path": "aws-cdk-s3-access-logs-target/Custom::S3AutoDeleteObjectsCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "aws-cdk-s3-access-logs-target/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-cdk-s3-access-logs-target/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "aws-cdk-s3-access-logs-target/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResourceProvider", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "aws-cdk-s3-access-logs-target/Exports", + "children": { + "Output{\"Ref\":\"TargetBucket6BBF3429\"}": { + "id": "Output{\"Ref\":\"TargetBucket6BBF3429\"}", + "path": "aws-cdk-s3-access-logs-target/Exports/Output{\"Ref\":\"TargetBucket6BBF3429\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-s3-access-logs-target/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-s3-access-logs-target/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "aws-cdk-s3-access-logs-delivery": { + "id": "aws-cdk-s3-access-logs-delivery", + "path": "aws-cdk-s3-access-logs-delivery", + "children": { + "SourceBucket": { + "id": "SourceBucket", + "path": "aws-cdk-s3-access-logs-delivery/SourceBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-s3-access-logs-delivery/SourceBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "accessControl": "BucketOwnerFullControl", + "bucketEncryption": { + "serverSideEncryptionConfiguration": [ + { + "serverSideEncryptionByDefault": { + "sseAlgorithm": "AES256" + } + } + ] + }, + "loggingConfiguration": { + "destinationBucketName": { + "Fn::ImportValue": "aws-cdk-s3-access-logs-target:ExportsOutputRefTargetBucket6BBF34294FF727AE" + }, + "logFilePrefix": "test/" + }, + "ownershipControls": { + "rules": [ + { + "objectOwnership": "BucketOwnerEnforced" + } + ] + }, + "publicAccessBlockConfiguration": { + "blockPublicAcls": true, + "blockPublicPolicy": true, + "ignorePublicAcls": true, + "restrictPublicBuckets": true + }, + "tags": [ + { + "key": "aws-cdk:auto-delete-objects", + "value": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "aws-cdk-s3-access-logs-delivery/SourceBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-s3-access-logs-delivery/SourceBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "SourceBucketDDD2130A" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "SourceBucketDDD2130A", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SourceBucketDDD2130A", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "SourceBucketDDD2130A", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "SourceBucketDDD2130A", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } + }, + "AutoDeleteObjectsCustomResource": { + "id": "AutoDeleteObjectsCustomResource", + "path": "aws-cdk-s3-access-logs-delivery/SourceBucket/AutoDeleteObjectsCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-s3-access-logs-delivery/SourceBucket/AutoDeleteObjectsCustomResource/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-s3.Bucket", + "version": "0.0.0" + } + }, + "Custom::S3AutoDeleteObjectsCustomResourceProvider": { + "id": "Custom::S3AutoDeleteObjectsCustomResourceProvider", + "path": "aws-cdk-s3-access-logs-delivery/Custom::S3AutoDeleteObjectsCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "aws-cdk-s3-access-logs-delivery/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-cdk-s3-access-logs-delivery/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "aws-cdk-s3-access-logs-delivery/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResourceProvider", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-s3-access-logs-delivery/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-s3-access-logs-delivery/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "ServerAccessLogsImportTest": { + "id": "ServerAccessLogsImportTest", + "path": "ServerAccessLogsImportTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "ServerAccessLogsImportTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "ServerAccessLogsImportTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "ServerAccessLogsImportTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "ServerAccessLogsImportTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "ServerAccessLogsImportTest/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.189" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.ts b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.ts new file mode 100644 index 0000000000000..3039a216b4489 --- /dev/null +++ b/packages/@aws-cdk/aws-s3/test/integ.bucket-import-server-access-logs.ts @@ -0,0 +1,38 @@ +#!/usr/bin/env node +import * as cdk from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; +import * as s3 from '../lib'; + +// Reproduces the issues experienced in #23588 and #23547, both resulting from +// not validating log delivery is applied correctly when the target bucket for +// server access logs is in another account. +const app = new cdk.App(); +const targetBucketStack = new cdk.Stack(app, 'aws-cdk-s3-access-logs-target'); +const sourceBucketStack = new cdk.Stack(app, 'aws-cdk-s3-access-logs-delivery'); + +const targetBucket = new s3.Bucket(targetBucketStack, 'TargetBucket', { + autoDeleteObjects: true, + removalPolicy: cdk.RemovalPolicy.DESTROY, + blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL, + enforceSSL: true, + objectOwnership: s3.ObjectOwnership.BUCKET_OWNER_ENFORCED, + encryption: s3.BucketEncryption.S3_MANAGED, + accessControl: s3.BucketAccessControl.BUCKET_OWNER_FULL_CONTROL, +}); +new s3.Bucket(sourceBucketStack, 'SourceBucket', { + autoDeleteObjects: true, + removalPolicy: cdk.RemovalPolicy.DESTROY, + blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL, + enforceSSL: true, + objectOwnership: s3.ObjectOwnership.BUCKET_OWNER_ENFORCED, + encryption: s3.BucketEncryption.S3_MANAGED, + accessControl: s3.BucketAccessControl.BUCKET_OWNER_FULL_CONTROL, + serverAccessLogsBucket: targetBucket, + serverAccessLogsPrefix: 'test/', +}); + +new integ.IntegTest(app, 'ServerAccessLogsImportTest', { + testCases: [sourceBucketStack], +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-servicecatalog/lib/private/product-stack-synthesizer.ts b/packages/@aws-cdk/aws-servicecatalog/lib/private/product-stack-synthesizer.ts index 55cb511b65424..d451f34fc51ad 100644 --- a/packages/@aws-cdk/aws-servicecatalog/lib/private/product-stack-synthesizer.ts +++ b/packages/@aws-cdk/aws-servicecatalog/lib/private/product-stack-synthesizer.ts @@ -1,3 +1,4 @@ +import * as path from 'path'; import { CfnBucket, IBucket } from '@aws-cdk/aws-s3'; import { BucketDeployment, Source } from '@aws-cdk/aws-s3-deployment'; import * as cdk from '@aws-cdk/core'; @@ -42,7 +43,11 @@ export class ProductStackSynthesizer extends cdk.StackSynthesizer { const physicalName = this.physicalNameOfBucket(this.assetBucket); const bucketName = physicalName; - const s3Filename = asset.fileName?.split('.')[1] + '.zip'; + if (!asset.fileName) { + throw new Error('Asset file name is undefined'); + } + const assetFileBaseName = path.basename(asset.fileName); + const s3Filename = assetFileBaseName.split('.')[1] + '.zip'; const objectKey = `${s3Filename}`; const s3ObjectUrl = `s3://${bucketName}/${objectKey}`; const httpUrl = `https://s3.${bucketName}/${objectKey}`; diff --git a/packages/@aws-cdk/aws-servicecatalog/test/product-stack.test.ts b/packages/@aws-cdk/aws-servicecatalog/test/product-stack.test.ts index e9caacbce81ed..fd897111d1f5e 100644 --- a/packages/@aws-cdk/aws-servicecatalog/test/product-stack.test.ts +++ b/packages/@aws-cdk/aws-servicecatalog/test/product-stack.test.ts @@ -1,5 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; +import { Template } from '@aws-cdk/assertions'; +import * as lambda from '@aws-cdk/aws-lambda'; import * as s3 from '@aws-cdk/aws-s3'; import * as s3_assets from '@aws-cdk/aws-s3-assets'; import * as sns from '@aws-cdk/aws-sns'; @@ -32,13 +34,69 @@ describe('ProductStack', () => { assetBucket: testAssetBucket, }); - // WHEN - new s3_assets.Asset(productStack, 'testAsset', { - path: path.join(__dirname, 'assets'), + new lambda.Function(productStack, 'HelloHandler', { + runtime: lambda.Runtime.PYTHON_3_9, + code: lambda.Code.fromAsset(path.join(__dirname, 'assets')), + handler: 'index.handler', }); + // WHEN + const assembly = app.synth(); + // THEN expect(productStack._getAssetBucket()).toBeDefined(); + const template = JSON.parse(fs.readFileSync(path.join(assembly.directory, productStack.templateFile), 'utf-8')); + Template.fromJSON(template).hasResourceProperties('AWS::Lambda::Function', { + Code: { + S3Bucket: 'test-asset-bucket', + S3Key: 'd3833f63e813b3a96ea04c8c50ca98209330867f5f6ac358efca11f85a3476c2.zip', + }, + }); + }); + + test('Used defined Asset bucket in product stack with nested assets', () => { + // GIVEN + const app = new cdk.App( + { outdir: 'cdk.out' }, + ); + const mainStack = new cdk.Stack(app, 'MyStack'); + let templateFileUrl = ''; + class PortfolioStage extends cdk.Stage { + constructor(scope: Construct, id: string) { + super(scope, id); + + const portfolioStack: cdk.Stack = new cdk.Stack(this, 'NestedStack'); + + const testAssetBucket = new s3.Bucket(portfolioStack, 'TestAssetBucket', { + bucketName: 'test-asset-bucket', + }); + const productStack = new servicecatalog.ProductStack(portfolioStack, 'MyProductStack', { + assetBucket: testAssetBucket, + }); + + new lambda.Function(productStack, 'HelloHandler', { + runtime: lambda.Runtime.PYTHON_3_9, + code: lambda.Code.fromAsset(path.join(__dirname, 'assets')), + handler: 'index.handler', + }); + + expect(productStack._getAssetBucket()).toBeDefined(); + templateFileUrl = productStack.templateFile; + } + } + const portfolioStage = new PortfolioStage(mainStack, 'PortfolioStage'); + + // WHEN + app.synth(); + + //THEN + const template = JSON.parse(fs.readFileSync(path.join(portfolioStage.outdir, templateFileUrl), 'utf-8')); + Template.fromJSON(template).hasResourceProperties('AWS::Lambda::Function', { + Code: { + S3Bucket: 'test-asset-bucket', + S3Key: 'd3833f63e813b3a96ea04c8c50ca98209330867f5f6ac358efca11f85a3476c2.zip', + }, + }); }); test('fails if bucketName is not specified in product stack with assets', () => { diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts index ee0465eae5d12..e596fb573bcc5 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/application.ts @@ -277,7 +277,7 @@ export class Application extends ApplicationBase { this.applicationManagerUrl = new cdk.CfnOutput(this, 'ApplicationManagerUrl', { value: `https://${this.env.region}.console.aws.amazon.com/systems-manager/appmanager/application/AWS_AppRegistry_Application-${this.applicationName}`, - description: `Application manager url for application ${this.applicationName}`, + description: 'Application manager url for the application created.', }); } diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts index 5da8699bdc1f7..db3cafa031758 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/lib/target-application.ts @@ -92,7 +92,7 @@ class CreateTargetApplication extends TargetApplication { public bind(scope: Construct): BindTargetApplicationResult { const stackId = this.applicationOptions.stackId ?? 'ApplicationAssociatorStack'; (this.applicationOptions.description as string) = - this.applicationOptions.description || `Stack that holds the ${this.applicationOptions.applicationName} application`; + this.applicationOptions.description || 'Stack to create AppRegistry application'; (this.applicationOptions.env as cdk.Environment) = this.applicationOptions.env || { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }; const applicationStack = new cdk.Stack(scope, stackId, this.applicationOptions); diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/cdk.out b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/cdk.out index 145739f539580..d8b441d447f8a 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.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-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.assets.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.assets.json index 0f728aa69a648..17d3b8241176a 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.assets.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.assets.json @@ -1,7 +1,7 @@ { - "version": "22.0.0", + "version": "29.0.0", "files": { - "225f3d7f7d17bfb53aa17ae8a44119a756f2fc51682bfd5ee27b84ea25f994eb": { + "8bf01e42edcc7e9cd4c65b9db9e52d2d6564f931bc84e7f564a1a4c43e499d6e": { "source": { "path": "integ-servicecatalogappregistry-application.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "225f3d7f7d17bfb53aa17ae8a44119a756f2fc51682bfd5ee27b84ea25f994eb.json", + "objectKey": "8bf01e42edcc7e9cd4c65b9db9e52d2d6564f931bc84e7f564a1a4c43e499d6e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.template.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.template.json index d569907291d49..34343c5e60207 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.template.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ-servicecatalogappregistry-application.template.json @@ -3,8 +3,8 @@ "TestApplication2FBC585F": { "Type": "AWS::ServiceCatalogAppRegistry::Application", "Properties": { - "Name": "myApplication", - "Description": "my application description" + "Name": "TestApplication", + "Description": "Test application description" } }, "TestApplicationResourceAssociationd232b63e52a8414E905D": { @@ -123,7 +123,7 @@ }, "Outputs": { "TestApplicationApplicationManagerUrlE1058321": { - "Description": "Application manager url for application myApplication", + "Description": "Application manager url for the application created.", "Value": { "Fn::Join": [ "", @@ -132,7 +132,7 @@ { "Ref": "AWS::Region" }, - ".console.aws.amazon.com/systems-manager/appmanager/application/AWS_AppRegistry_Application-myApplication" + ".console.aws.amazon.com/systems-manager/appmanager/application/AWS_AppRegistry_Application-TestApplication" ] ] } diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ.json index 7db84c3e5dfa8..f211b281f65e2 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "29.0.0", "testCases": { "integ.application": { "stacks": [ diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/manifest.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/manifest.json index 6a0143a97aaf2..431629ee09836 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "29.0.0", "artifacts": { "integ-servicecatalogappregistry-application.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}/225f3d7f7d17bfb53aa17ae8a44119a756f2fc51682bfd5ee27b84ea25f994eb.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8bf01e42edcc7e9cd4c65b9db9e52d2d6564f931bc84e7f564a1a4c43e499d6e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/tree.json b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/tree.json index 5e4d14f15093e..e1dc8a2ae0954 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.js.snapshot/tree.json @@ -18,8 +18,8 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::ServiceCatalogAppRegistry::Application", "aws:cdk:cloudformation:props": { - "name": "myApplication", - "description": "my application description" + "name": "TestApplication", + "description": "Test application description" } }, "constructInfo": { @@ -249,7 +249,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.209" } } }, diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts index 06c0395e31bfa..7f952e6c05b8a 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts +++ b/packages/@aws-cdk/aws-servicecatalogappregistry/test/integ.application.ts @@ -6,8 +6,8 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'integ-servicecatalogappregistry-application'); const application = new appreg.Application(stack, 'TestApplication', { - applicationName: 'myApplication', - description: 'my application description', + applicationName: 'TestApplication', + description: 'Test application description', }); const attributeGroup = new appreg.AttributeGroup(stack, 'TestAttributeGroup', { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/aws-sdk/call-aws-service.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/aws-sdk/call-aws-service.ts index 7a2c33ed321cd..a00becd176307 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/aws-sdk/call-aws-service.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/aws-sdk/call-aws-service.ts @@ -80,12 +80,17 @@ export class CallAwsService extends sfn.TaskStateBase { throw new Error('The RUN_JOB integration pattern is not supported for CallAwsService'); } + const iamServiceMap: Record = { + sfn: 'states', + }; + const iamService = iamServiceMap[props.service] ?? props.service; + this.taskPolicies = [ new iam.PolicyStatement({ resources: props.iamResources, // The prefix and the action name are case insensitive // https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_action.html - actions: [props.iamAction ?? `${props.service}:${props.action}`], + actions: [props.iamAction ?? `${iamService}:${props.action}`], }), ...props.additionalIamStatements ?? [], ]; diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/call-aws-service.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/call-aws-service.test.ts index 9f7321ac8acad..df4f5bc0681f2 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/call-aws-service.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/call-aws-service.test.ts @@ -198,3 +198,34 @@ test('can pass additional IAM statements', () => { }, }); }); + +test('IAM policy for sfn', () => { + // WHEN + const task = new tasks.CallAwsService(stack, 'SendTaskSuccess', { + service: 'sfn', + action: 'sendTaskSuccess', + iamResources: ['*'], + parameters: { + Output: sfn.JsonPath.objectAt('$.output'), + TaskToken: sfn.JsonPath.stringAt('$.taskToken'), + }, + }); + + new sfn.StateMachine(stack, 'StateMachine', { + definition: task, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'states:sendTaskSuccess', + Effect: 'Allow', + Resource: '*', + }, + ], + Version: '2012-10-17', + }, + }); +}); 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 new file mode 100644 index 0000000000000..6148c62b6e667 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json @@ -0,0 +1,32 @@ +{ + "version": "21.0.0", + "files": { + "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": { + "source": { + "path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "53ea1c76e8a088a3e3455a07f903c3cdc7054d8399d75bc242655e2569ec4dbe": { + "source": { + "path": "IntegTestDefaultTestDeployAssertE3E7D2A4.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "53ea1c76e8a088a3e3455a07f903c3cdc7054d8399d75bc242655e2569ec4dbe.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-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 new file mode 100644 index 0000000000000..fc708a5502a33 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json @@ -0,0 +1,398 @@ +{ + "Resources": { + "AwsApiCallStepFunctionsstartExecution": { + "Type": "Custom::DeployAssert@SdkCallStepFunctionsstartExecution", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "StepFunctions", + "api": "startExecution", + "parameters": { + "stateMachineArn": { + "Fn::ImportValue": "aws-stepfunctions-tasks-call-aws-service-sfn-integ:ExportsOutputRefParentStateMachine74EA937A758ECF42" + } + }, + "flattenResponse": "true", + "salt": "1668703230385" + }, + "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": [ + "states:StartExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "states:DescribeExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "states:StartExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + } + ] + } + } + ] + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip" + }, + "Timeout": 120, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + }, + "AwsApiCallStepFunctionsdescribeExecution": { + "Type": "Custom::DeployAssert@SdkCallStepFunctionsdescribeExecution", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "StepFunctions", + "api": "describeExecution", + "expected": "{\"$ObjectLike\":{\"status\":\"SUCCEEDED\"}}", + "stateMachineArn": { + "Ref": "AwsApiCallStepFunctionsdescribeExecutionWaitFor3BA9FD23" + }, + "parameters": { + "executionArn": { + "Fn::GetAtt": [ + "AwsApiCallStepFunctionsstartExecution", + "apiCallResponse.executionArn" + ] + } + }, + "flattenResponse": "false", + "salt": "1668703230386" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallStepFunctionsdescribeExecutionWaitForIsCompleteProviderInvoke90973546": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallStepFunctionsdescribeExecutionWaitForRole0A7F8888", + "Arn" + ] + } + } + }, + "AwsApiCallStepFunctionsdescribeExecutionWaitForTimeoutProviderInvoke59993CEE": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "Principal": { + "Fn::GetAtt": [ + "AwsApiCallStepFunctionsdescribeExecutionWaitForRole0A7F8888", + "Arn" + ] + } + } + }, + "AwsApiCallStepFunctionsdescribeExecutionWaitForRole0A7F8888": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ] + }, + "Policies": [ + { + "PolicyName": "InlineInvokeFunctions", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + } + ] + } + ] + } + } + ] + } + }, + "AwsApiCallStepFunctionsdescribeExecutionWaitFor3BA9FD23": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":3,\"MaxAttempts\":3,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE", + "Arn" + ] + }, + "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "RoleArn": { + "Fn::GetAtt": [ + "AwsApiCallStepFunctionsdescribeExecutionWaitForRole0A7F8888", + "Arn" + ] + } + }, + "DependsOn": [ + "AwsApiCallStepFunctionsdescribeExecutionWaitForRole0A7F8888" + ] + }, + "SingletonFunction76b3e830a873425f8453eddd85c86925Role918961BB": { + "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": [ + "states:DescribeExecution" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + } + ] + } + } + ] + } + }, + "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip" + }, + "Timeout": 120, + "Handler": "index.isComplete", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction76b3e830a873425f8453eddd85c86925Role918961BB", + "Arn" + ] + } + } + }, + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aRoleB84BD8CE": { + "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" + } + ] + } + }, + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip" + }, + "Timeout": 120, + "Handler": "index.onTimeout", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aRoleB84BD8CE", + "Arn" + ] + } + } + } + }, + "Outputs": { + "AssertionResultsAwsApiCallStepFunctionsdescribeExecution": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallStepFunctionsdescribeExecution", + "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-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js new file mode 100644 index 0000000000000..2d6c2f0e85497 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js @@ -0,0 +1,768 @@ +"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, + isComplete: () => isComplete, + onTimeout: () => onTimeout +}); +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 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); + } + 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); + } + } + async handleIsComplete() { + try { + const result = await this.processEvent(this.event.ResourceProperties); + return result; + } catch (e) { + console.log(e); + return; + } finally { + clearTimeout(this.timeout); + } + } + 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.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 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) + }; + 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(); + 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", + 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 new file mode 100644 index 0000000000000..59f47b0672a8d --- /dev/null +++ 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 @@ -0,0 +1,19 @@ +{ + "version": "21.0.0", + "files": { + "fcef80800545996bab4797d29627b1585634a87818a16071170e90379fe35e65": { + "source": { + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "fcef80800545996bab4797d29627b1585634a87818a16071170e90379fe35e65.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-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 new file mode 100644 index 0000000000000..a214d3d9ec31e --- /dev/null +++ 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 @@ -0,0 +1,184 @@ +{ + "Resources": { + "ChildStateMachineRoleA7F7AB78": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "ChildStateMachineRoleDefaultPolicy8B4560F0": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "states:sendTaskSuccess", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ChildStateMachineRoleDefaultPolicy8B4560F0", + "Roles": [ + { + "Ref": "ChildStateMachineRoleA7F7AB78" + } + ] + } + }, + "ChildStateMachine9133117F": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "RoleArn": { + "Fn::GetAtt": [ + "ChildStateMachineRoleA7F7AB78", + "Arn" + ] + }, + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"SendTaskSuccess\",\"States\":{\"SendTaskSuccess\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":states:::aws-sdk:sfn:sendTaskSuccess\",\"Parameters\":{\"Output.$\":\"$.output\",\"TaskToken.$\":\"$.taskToken\"}}}}" + ] + ] + } + }, + "DependsOn": [ + "ChildStateMachineRoleDefaultPolicy8B4560F0", + "ChildStateMachineRoleA7F7AB78" + ] + }, + "ParentStateMachineRoleE902D002": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "ParentStateMachineRoleDefaultPolicyA368A0BA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "states:StartExecution", + "Effect": "Allow", + "Resource": { + "Ref": "ChildStateMachine9133117F" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ParentStateMachineRoleDefaultPolicyA368A0BA", + "Roles": [ + { + "Ref": "ParentStateMachineRoleE902D002" + } + ] + } + }, + "ParentStateMachine74EA937A": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "RoleArn": { + "Fn::GetAtt": [ + "ParentStateMachineRoleE902D002", + "Arn" + ] + }, + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"StepFunctionsStartExecution\",\"States\":{\"StepFunctionsStartExecution\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":states:::states:startExecution.waitForTaskToken\",\"Parameters\":{\"Input\":{\"output.$\":\"$\",\"taskToken.$\":\"$$.Task.Token\"},\"StateMachineArn\":\"", + { + "Ref": "ChildStateMachine9133117F" + }, + "\"}}}}" + ] + ] + } + }, + "DependsOn": [ + "ParentStateMachineRoleDefaultPolicyA368A0BA", + "ParentStateMachineRoleE902D002" + ] + } + }, + "Outputs": { + "ExportsOutputRefParentStateMachine74EA937A758ECF42": { + "Value": { + "Ref": "ParentStateMachine74EA937A" + }, + "Export": { + "Name": "aws-stepfunctions-tasks-call-aws-service-sfn-integ:ExportsOutputRefParentStateMachine74EA937A758ECF42" + } + } + }, + "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-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 new file mode 100644 index 0000000000000..8ecc185e9dbee --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"21.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 new file mode 100644 index 0000000000000..03ef4432a038e --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "21.0.0", + "testCases": { + "IntegTest/DefaultTest": { + "stacks": [ + "aws-stepfunctions-tasks-call-aws-service-sfn-integ" + ], + "assertionStack": "IntegTest/DefaultTest/DeployAssert", + "assertionStackName": "IntegTestDefaultTestDeployAssertE3E7D2A4" + } + } +} \ 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/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/manifest.json new file mode 100644 index 0000000000000..639f8b88a3695 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/manifest.json @@ -0,0 +1,226 @@ +{ + "version": "21.0.0", + "artifacts": { + "aws-stepfunctions-tasks-call-aws-service-sfn-integ.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-stepfunctions-tasks-call-aws-service-sfn-integ.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-stepfunctions-tasks-call-aws-service-sfn-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-stepfunctions-tasks-call-aws-service-sfn-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}/fcef80800545996bab4797d29627b1585634a87818a16071170e90379fe35e65.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-stepfunctions-tasks-call-aws-service-sfn-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": [ + "aws-stepfunctions-tasks-call-aws-service-sfn-integ.assets" + ], + "metadata": { + "/aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ChildStateMachineRoleA7F7AB78" + } + ], + "/aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ChildStateMachineRoleDefaultPolicy8B4560F0" + } + ], + "/aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ChildStateMachine9133117F" + } + ], + "/aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ParentStateMachineRoleE902D002" + } + ], + "/aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ParentStateMachineRoleDefaultPolicyA368A0BA" + } + ], + "/aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ParentStateMachine74EA937A" + } + ], + "/aws-stepfunctions-tasks-call-aws-service-sfn-integ/Exports/Output{\"Ref\":\"ParentStateMachine74EA937A\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefParentStateMachine74EA937A758ECF42" + } + ], + "/aws-stepfunctions-tasks-call-aws-service-sfn-integ/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-stepfunctions-tasks-call-aws-service-sfn-integ/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-stepfunctions-tasks-call-aws-service-sfn-integ" + }, + "IntegTestDefaultTestDeployAssertE3E7D2A4.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "IntegTestDefaultTestDeployAssertE3E7D2A4": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "IntegTestDefaultTestDeployAssertE3E7D2A4.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}/53ea1c76e8a088a3e3455a07f903c3cdc7054d8399d75bc242655e2569ec4dbe.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "IntegTestDefaultTestDeployAssertE3E7D2A4.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-stepfunctions-tasks-call-aws-service-sfn-integ", + "IntegTestDefaultTestDeployAssertE3E7D2A4.assets" + ], + "metadata": { + "/IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallStepFunctionsstartExecution" + } + ], + "/IntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" + } + ], + "/IntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" + } + ], + "/IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallStepFunctionsdescribeExecution" + } + ], + "/IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/IsCompleteProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallStepFunctionsdescribeExecutionWaitForIsCompleteProviderInvoke90973546" + } + ], + "/IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/TimeoutProvider/Invoke": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallStepFunctionsdescribeExecutionWaitForTimeoutProviderInvoke59993CEE" + } + ], + "/IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallStepFunctionsdescribeExecutionWaitForRole0A7F8888" + } + ], + "/IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallStepFunctionsdescribeExecutionWaitFor3BA9FD23" + } + ], + "/IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallStepFunctionsdescribeExecution" + } + ], + "/IntegTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction76b3e830a873425f8453eddd85c86925Role918961BB" + } + ], + "/IntegTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction76b3e830a873425f8453eddd85c86925Handler81461ECE" + } + ], + "/IntegTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aRoleB84BD8CE" + } + ], + "/IntegTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41aHandlerADF3E6EA" + } + ], + "/IntegTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/IntegTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "IntegTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ 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/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/tree.json new file mode 100644 index 0000000000000..4f6841d4358fb --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.js.snapshot/tree.json @@ -0,0 +1,667 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-stepfunctions-tasks-call-aws-service-sfn-integ": { + "id": "aws-stepfunctions-tasks-call-aws-service-sfn-integ", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ", + "children": { + "SendTaskSuccess": { + "id": "SendTaskSuccess", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/SendTaskSuccess", + "constructInfo": { + "fqn": "@aws-cdk/aws-stepfunctions-tasks.CallAwsService", + "version": "0.0.0" + } + }, + "ChildStateMachine": { + "id": "ChildStateMachine", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine", + "children": { + "Role": { + "id": "Role", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "states:sendTaskSuccess", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ChildStateMachineRoleDefaultPolicy8B4560F0", + "roles": [ + { + "Ref": "ChildStateMachineRoleA7F7AB78" + } + ] + } + }, + "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" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ChildStateMachine/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine", + "aws:cdk:cloudformation:props": { + "roleArn": { + "Fn::GetAtt": [ + "ChildStateMachineRoleA7F7AB78", + "Arn" + ] + }, + "definitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"SendTaskSuccess\",\"States\":{\"SendTaskSuccess\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":states:::aws-sdk:sfn:sendTaskSuccess\",\"Parameters\":{\"Output.$\":\"$.output\",\"TaskToken.$\":\"$.taskToken\"}}}}" + ] + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-stepfunctions.CfnStateMachine", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-stepfunctions.StateMachine", + "version": "0.0.0" + } + }, + "StepFunctionsStartExecution": { + "id": "StepFunctionsStartExecution", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/StepFunctionsStartExecution", + "constructInfo": { + "fqn": "@aws-cdk/aws-stepfunctions-tasks.StepFunctionsStartExecution", + "version": "0.0.0" + } + }, + "ParentStateMachine": { + "id": "ParentStateMachine", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine", + "children": { + "Role": { + "id": "Role", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "states:StartExecution", + "Effect": "Allow", + "Resource": { + "Ref": "ChildStateMachine9133117F" + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ParentStateMachineRoleDefaultPolicyA368A0BA", + "roles": [ + { + "Ref": "ParentStateMachineRoleE902D002" + } + ] + } + }, + "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" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/ParentStateMachine/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine", + "aws:cdk:cloudformation:props": { + "roleArn": { + "Fn::GetAtt": [ + "ParentStateMachineRoleE902D002", + "Arn" + ] + }, + "definitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"StepFunctionsStartExecution\",\"States\":{\"StepFunctionsStartExecution\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":states:::states:startExecution.waitForTaskToken\",\"Parameters\":{\"Input\":{\"output.$\":\"$\",\"taskToken.$\":\"$$.Task.Token\"},\"StateMachineArn\":\"", + { + "Ref": "ChildStateMachine9133117F" + }, + "\"}}}}" + ] + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-stepfunctions.CfnStateMachine", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-stepfunctions.StateMachine", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/Exports", + "children": { + "Output{\"Ref\":\"ParentStateMachine74EA937A\"}": { + "id": "Output{\"Ref\":\"ParentStateMachine74EA937A\"}", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/Exports/Output{\"Ref\":\"ParentStateMachine74EA937A\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-stepfunctions-tasks-call-aws-service-sfn-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "IntegTest": { + "id": "IntegTest", + "path": "IntegTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "IntegTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "IntegTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "IntegTest/DefaultTest/DeployAssert", + "children": { + "AwsApiCallStepFunctionsstartExecution": { + "id": "AwsApiCallStepFunctionsstartExecution", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution/Default", + "children": { + "Default": { + "id": "Default", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution/Default/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/integ-tests.AwsApiCall", + "version": "0.0.0" + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81": { + "id": "SingletonFunction1488541a7b23466481b69b4408076b81", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", + "children": { + "Staging": { + "id": "Staging", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + }, + "AwsApiCallStepFunctionsdescribeExecution": { + "id": "AwsApiCallStepFunctionsdescribeExecution", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/Default", + "children": { + "Default": { + "id": "Default", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "WaitFor": { + "id": "WaitFor", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor", + "children": { + "IsCompleteProvider": { + "id": "IsCompleteProvider", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/IsCompleteProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/IsCompleteProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/IsCompleteProvider/Invoke", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "TimeoutProvider": { + "id": "TimeoutProvider", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/TimeoutProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/TimeoutProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + }, + "Invoke": { + "id": "Invoke", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/TimeoutProvider/Invoke", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/WaitFor/Resource", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.WaiterStateMachine", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AwsApiCall", + "version": "0.0.0" + } + }, + "SingletonFunction76b3e830a873425f8453eddd85c86925": { + "id": "SingletonFunction76b3e830a873425f8453eddd85c86925", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925", + "children": { + "Staging": { + "id": "Staging", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction76b3e830a873425f8453eddd85c86925/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + }, + "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a": { + "id": "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a", + "children": { + "Staging": { + "id": "Staging", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "IntegTest/DefaultTest/DeployAssert/SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.161" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "IntegTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "IntegTest/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-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.ts new file mode 100644 index 0000000000000..06cb7aa72623f --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/aws-sdk/integ.call-aws-service-sfn.ts @@ -0,0 +1,51 @@ +import * as sfn from '@aws-cdk/aws-stepfunctions'; +import * as cdk from '@aws-cdk/core'; +import { IntegTest, ExpectedResult } from '@aws-cdk/integ-tests'; +import { CallAwsService, StepFunctionsStartExecution } from '../../lib'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-stepfunctions-tasks-call-aws-service-sfn-integ'); + +const task = new CallAwsService(stack, 'SendTaskSuccess', { + service: 'sfn', + action: 'sendTaskSuccess', + iamResources: ['*'], + parameters: { + Output: sfn.JsonPath.objectAt('$.output'), + TaskToken: sfn.JsonPath.stringAt('$.taskToken'), + }, +}); + +const childStateMachine = new sfn.StateMachine(stack, 'ChildStateMachine', { + definition: task, +}); + +const stateMachine = new sfn.StateMachine(stack, 'ParentStateMachine', { + definition: new StepFunctionsStartExecution(stack, 'StepFunctionsStartExecution', { + stateMachine: childStateMachine, + integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN, + input: sfn.TaskInput.fromObject({ + output: sfn.JsonPath.entirePayload, + taskToken: sfn.JsonPath.taskToken, + }), + }), +}); + +// THEN +const integ = new IntegTest(app, 'IntegTest', { + testCases: [stack], +}); +const res = integ.assertions.awsApiCall('StepFunctions', 'startExecution', { + stateMachineArn: stateMachine.stateMachineArn, +}); +const executionArn = res.getAttString('executionArn'); +integ.assertions.awsApiCall('StepFunctions', 'describeExecution', { + executionArn, +}).expect(ExpectedResult.objectLike({ + status: 'SUCCEEDED', +})).waitForAssertions({ + totalTimeout: cdk.Duration.seconds(10), + interval: cdk.Duration.seconds(3), +}); + +app.synth(); diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 4ee9e6a4f21ea..0096664d36de4 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,89 @@ +# CloudFormation Resource Specification v107.0.0 + +## New Resource Types + + +## Attribute Changes + +* AWS::ApiGateway::RestApi RestApiId (__added__) +* AWS::AuditManager::Assessment Delegations (__deleted__) +* AWS::DataSync::Task ErrorCode (__deleted__) +* AWS::DataSync::Task ErrorDetail (__deleted__) +* AWS::MediaPackage::Channel HlsIngest (__deleted__) +* AWS::MediaPackage::Channel HlsIngest.ingestEndpoints (__deleted__) +* AWS::RDS::DBCluster MasterUserSecret.SecretArn (__added__) +* AWS::RDS::DBInstance MasterUserSecret.SecretArn (__added__) + +## Property Changes + +* AWS::ApiGateway::RestApi Parameters.DuplicatesAllowed (__deleted__) +* AWS::AppSync::DataSource EventBridgeConfig (__added__) +* AWS::AuditManager::Assessment Delegations (__added__) +* AWS::DataSync::LocationFSxLustre FsxFilesystemArn.Required (__changed__) + * Old: true + * New: false +* AWS::DataSync::LocationFSxWindows FsxFilesystemArn.Required (__changed__) + * Old: true + * New: false +* AWS::DataSync::LocationFSxWindows Password.Required (__changed__) + * Old: true + * New: false +* AWS::DataSync::LocationNFS ServerHostname.Required (__changed__) + * Old: true + * New: false +* AWS::DataSync::LocationNFS Subdirectory.Required (__changed__) + * Old: true + * New: false +* AWS::DataSync::LocationObjectStorage BucketName.Required (__changed__) + * Old: true + * New: false +* AWS::DataSync::LocationObjectStorage ServerHostname.Required (__changed__) + * Old: true + * New: false +* AWS::DataSync::LocationSMB Password.Required (__changed__) + * Old: true + * New: false +* AWS::DataSync::LocationSMB ServerHostname.Required (__changed__) + * Old: true + * New: false +* AWS::DataSync::LocationSMB Subdirectory.Required (__changed__) + * Old: true + * New: false +* AWS::EC2::PlacementGroup PartitionCount (__added__) +* AWS::EC2::PlacementGroup Tags (__added__) +* AWS::IoT::JobTemplate JobExecutionsRetryConfig (__added__) +* AWS::Lambda::EventSourceMapping ScalingConfig (__added__) +* AWS::MediaPackage::Channel HlsIngest (__added__) +* AWS::RDS::DBCluster ManageMasterUserPassword (__added__) +* AWS::RDS::DBCluster MasterUserSecret (__added__) +* AWS::RDS::DBInstance ManageMasterUserPassword (__added__) +* AWS::RDS::DBInstance MasterUserSecret (__added__) + +## Property Type Changes + +* AWS::AppSync::DataSource.EventBridgeConfig (__added__) +* AWS::IoT::JobTemplate.JobExecutionsRetryConfig (__added__) +* AWS::IoT::JobTemplate.RetryCriteria (__added__) +* AWS::Lambda::EventSourceMapping.ScalingConfig (__added__) +* AWS::RDS::DBCluster.MasterUserSecret (__added__) +* AWS::RDS::DBInstance.MasterUserSecret (__added__) +* AWS::AppRunner::Service.CodeConfigurationValues RuntimeEnvironmentSecrets (__added__) +* AWS::AppRunner::Service.ImageConfiguration RuntimeEnvironmentSecrets (__added__) +* AWS::MediaPackage::Channel.IngestEndpoint Id.Required (__changed__) + * Old: false + * New: true +* AWS::MediaPackage::Channel.IngestEndpoint Password.Required (__changed__) + * Old: false + * New: true +* AWS::MediaPackage::Channel.IngestEndpoint Url.Required (__changed__) + * Old: false + * New: true +* AWS::MediaPackage::Channel.IngestEndpoint Username.Required (__changed__) + * Old: false + * New: true +* AWS::MediaPackage::PackagingConfiguration.DashPackage IncludeIframeOnlyStream (__added__) + + # CloudFormation Resource Specification v106.0.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version index 8cc2138c2964a..86cf4ece30e5b 100644 --- a/packages/@aws-cdk/cfnspec/cfn.version +++ b/packages/@aws-cdk/cfnspec/cfn.version @@ -1 +1 @@ -106.0.0 +107.0.0 diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json index 1fdf405f795b6..2474f1e238237 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ACMPCA::Certificate.ApiPassthrough": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-apipassthrough.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json index b668af02c672a..5f54e830574ea 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::APS::Workspace.LoggingConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json index acb6ca326ef75..8a36feb2d78fe 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AccessAnalyzer::Analyzer.ArchiveRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-accessanalyzer-analyzer-archiverule.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json index 78e881e5eeccb..738b447423efb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AmazonMQ::Broker.ConfigurationId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-configurationid.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json index 796ec064fdfb7..4ad3334b7f3aa 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Amplify::App.AutoBranchCreationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json index 71af08989bd02..8ba1a4d652dd9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AmplifyUIBuilder::Component.ActionParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-actionparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json index e6b939bfdd585..98843c6f1ece0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ApiGateway::ApiKey.StageKey": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-apikey-stagekey.html", @@ -1329,6 +1329,9 @@ }, "AWS::ApiGateway::RestApi": { "Attributes": { + "RestApiId": { + "PrimitiveType": "String" + }, "RootResourceId": { "PrimitiveType": "String" } @@ -1411,7 +1414,6 @@ }, "Parameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html#cfn-apigateway-restapi-parameters", - "DuplicatesAllowed": false, "PrimitiveItemType": "String", "Required": false, "Type": "Map", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json index c5ff77eeca388..dbc76c3c1ba4b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ApiGatewayV2::Api.BodyS3Location": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json index f82dd87f2c31c..d654da8142251 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AppConfig::Application.Tags": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appconfig-application-tags.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json index 00b74ba7aa8c2..d0996d873b21e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AppFlow::Connector.ConnectorProvisioningConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connector-connectorprovisioningconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json index d4b60ed4032ef..6bea294230384 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AppIntegrations::DataIntegration.ScheduleConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-dataintegration-scheduleconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json index 7a7b1ea4582e7..2864f071849ac 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AppMesh::GatewayRoute.GatewayRouteHostnameMatch": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-gatewayroutehostnamematch.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json index e948be7d1c0e0..a48164c813f47 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AppRunner::ObservabilityConfiguration.TraceConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-observabilityconfiguration-traceconfiguration.html", @@ -67,6 +67,14 @@ "Required": true, "UpdateType": "Mutable" }, + "RuntimeEnvironmentSecrets": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfigurationvalues.html#cfn-apprunner-service-codeconfigurationvalues-runtimeenvironmentsecrets", + "DuplicatesAllowed": true, + "ItemType": "KeyValuePair", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "RuntimeEnvironmentVariables": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-codeconfigurationvalues.html#cfn-apprunner-service-codeconfigurationvalues-runtimeenvironmentvariables", "DuplicatesAllowed": true, @@ -184,6 +192,14 @@ "Required": false, "UpdateType": "Mutable" }, + "RuntimeEnvironmentSecrets": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html#cfn-apprunner-service-imageconfiguration-runtimeenvironmentsecrets", + "DuplicatesAllowed": true, + "ItemType": "KeyValuePair", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "RuntimeEnvironmentVariables": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-imageconfiguration.html#cfn-apprunner-service-imageconfiguration-runtimeenvironmentvariables", "DuplicatesAllowed": true, diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json index 6f69ef69082f3..aa59e6dd2e01b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AppStream::AppBlock.S3Location": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-appblock-s3location.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json index 5c95c3c5aa036..fae73fe566433 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AppSync::DataSource.AuthorizationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-authorizationconfig.html", @@ -110,6 +110,17 @@ } } }, + "AWS::AppSync::DataSource.EventBridgeConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-eventbridgeconfig.html", + "Properties": { + "EventBusArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-eventbridgeconfig.html#cfn-appsync-datasource-eventbridgeconfig-eventbusarn", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::AppSync::DataSource.HttpConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-httpconfig.html", "Properties": { @@ -610,6 +621,12 @@ "Type": "ElasticsearchConfig", "UpdateType": "Mutable" }, + "EventBridgeConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-datasource.html#cfn-appsync-datasource-eventbridgeconfig", + "Required": false, + "Type": "EventBridgeConfig", + "UpdateType": "Mutable" + }, "HttpConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-datasource.html#cfn-appsync-datasource-httpconfig", "Required": false, diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json index 841a812bdf060..c9aa7ff17fa29 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ApplicationAutoScaling::ScalableTarget.ScalableTargetAction": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scalabletargetaction.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json index 6f6ad4b862593..ab3d279426040 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ApplicationInsights::Application.Alarm": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json index 496e7a0544357..7813c5112b4ed 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Athena::WorkGroup.EncryptionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json index edbde1b0e73c2..8ec5dfc3a9bbc 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AuditManager::Assessment.AWSAccount": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-auditmanager-assessment-awsaccount.html", @@ -173,10 +173,6 @@ }, "CreationTime": { "PrimitiveType": "Double" - }, - "Delegations": { - "ItemType": "Delegation", - "Type": "List" } }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-auditmanager-assessment.html", @@ -193,6 +189,14 @@ "Type": "AWSAccount", "UpdateType": "Immutable" }, + "Delegations": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-auditmanager-assessment.html#cfn-auditmanager-assessment-delegations", + "DuplicatesAllowed": true, + "ItemType": "Delegation", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "Description": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-auditmanager-assessment.html#cfn-auditmanager-assessment-description", "PrimitiveType": "String", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json index e56b76b858692..679591864fc39 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AutoScaling::AutoScalingGroup.AcceleratorCountRequest": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json index 9ae9337d46c08..c7a12daa5eb3f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::AutoScalingPlans::ScalingPlan.ApplicationSource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-applicationsource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json index 8be59b0400ac7..c8f622c2196e4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Backup::BackupPlan.AdvancedBackupSettingResourceType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-advancedbackupsettingresourcetype.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json index 0b1fe11e079b6..189775b36b6f7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Batch::ComputeEnvironment.ComputeResources": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json index 5400cd5e355cd..402685f319d8f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::BillingConductor::BillingGroup.AccountGrouping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billingconductor-billinggroup-accountgrouping.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json index 5da5b19131897..f0760f36c20b2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Budgets::Budget.AutoAdjustData": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-autoadjustdata.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json index 8c52ded989ad5..0fc4ea2d08bf3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CE::AnomalyMonitor.ResourceTag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ce-anomalymonitor-resourcetag.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json index 96cb938a31a72..d1fb3803512d1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CUR::ReportDefinition": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json index fcac0529b4026..daf14e2d77ca4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Cassandra::Table.BillingMode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-billingmode.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json index a5a1e92c2fc28..5cc52c10a208a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CertificateManager::Account.ExpiryEventsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-certificatemanager-account-expiryeventsconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json index 4843fbdf0541b..41c773de1d629 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Chatbot::SlackChannelConfiguration": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json index 816d72f04b1de..06cd158532ac2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Cloud9::EnvironmentEC2.Repository": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloud9-environmentec2-repository.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json index 9a4ec75f4429d..fd9597fb77fb4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CloudFormation::HookVersion.LoggingConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-hookversion-loggingconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json index 647d3f9ed7013..f81a0cda2106e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CloudFront::CachePolicy.CachePolicyConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-cachepolicy-cachepolicyconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json index 3303fd8452d7e..9d548ab3b4848 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CloudTrail::EventDataStore.AdvancedEventSelector": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-eventdatastore-advancedeventselector.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json index 92b074178b590..a0537d846962b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CloudWatch::Alarm.Dimension": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-dimension.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json index 066ca59ddadab..6d090bcab726c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CodeArtifact::Domain": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json index 95c5cb2e72bf1..278a15a4cc5ff 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CodeBuild::Project.Artifacts": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json index f3b0cb8c2702d..fcb896314db7a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CodeCommit::Repository.Code": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-code.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json index c67ab192e357e..bcf4b967062d0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CodeDeploy::DeploymentConfig.MinimumHealthyHosts": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json index 83d7ccb369042..aea4997053c20 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CodeGuruProfiler::ProfilingGroup.AgentPermissions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codeguruprofiler-profilinggroup-agentpermissions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json index 0e9bd89d01bcc..072000a8a4741 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CodeGuruReviewer::RepositoryAssociation": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json index 99ea0419a7802..ae7e621d3f85e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CodePipeline::CustomActionType.ArtifactDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-customactiontype-artifactdetails.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json index e84ac0b95fffc..6d319209979c8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CodeStar::GitHubRepository.Code": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestar-githubrepository-code.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json index 3ba6671c14a89..360c6288b850f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CodeStarConnections::Connection": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json index 3dc4d9c7553f4..9776d317fc1e0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CodeStarNotifications::NotificationRule.Target": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json index 490fe48a774d9..a2cd9dcb90532 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Cognito::IdentityPool.CognitoIdentityProvider": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-cognitoidentityprovider.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json index 8a0e6d506f8b4..061db37e37e93 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Config::ConfigRule.CustomPolicyDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-custompolicydetails.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json index c62efbf0946ee..f9b79b2085986 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Connect::HoursOfOperation.HoursOfOperationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-hoursofoperation-hoursofoperationconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ConnectCampaigns.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ConnectCampaigns.json index 6ffe3bd53d34f..f2c9f841e7f18 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ConnectCampaigns.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ConnectCampaigns.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ConnectCampaigns::Campaign.DialerConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaigns-campaign-dialerconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ControlTower.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ControlTower.json index dffc9f3cb6686..f0d827d7d8fa7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ControlTower.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ControlTower.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::ControlTower::EnabledControl": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json index d281b168d1df2..8f926207cc3d0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::CustomerProfiles::Integration.ConnectorOperator": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-integration-connectoroperator.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json index a7f75256a0e63..8061582f6af7b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::DAX::Cluster.SSESpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dax-cluster-ssespecification.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json index 70ea224c09036..928f69d8eb0a3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::DLM::LifecyclePolicy.Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json index cb7ef7571a795..4bba2f85c55c9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::DMS::Endpoint.DocDbSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-endpoint-docdbsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json index 918c60f314fbe..34d93dc4edd48 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::DataBrew::Dataset.CsvOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-dataset-csvoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json index fccbc661676d5..eabda1f45ba93 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::DataPipeline::Pipeline.Field": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-field.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json index bf1726839acbb..3ce196223039b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::DataSync::LocationEFS.Ec2Config": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-locationefs-ec2config.html", @@ -463,7 +463,7 @@ "FsxFilesystemArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationfsxlustre.html#cfn-datasync-locationfsxlustre-fsxfilesystemarn", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Immutable" }, "SecurityGroupArns": { @@ -607,13 +607,13 @@ "FsxFilesystemArn": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationfsxwindows.html#cfn-datasync-locationfsxwindows-fsxfilesystemarn", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Immutable" }, "Password": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationfsxwindows.html#cfn-datasync-locationfsxwindows-password", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Immutable" }, "SecurityGroupArns": { @@ -769,13 +769,13 @@ "ServerHostname": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationnfs.html#cfn-datasync-locationnfs-serverhostname", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Immutable" }, "Subdirectory": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationnfs.html#cfn-datasync-locationnfs-subdirectory", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "Tags": { @@ -816,7 +816,7 @@ "BucketName": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationobjectstorage.html#cfn-datasync-locationobjectstorage-bucketname", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Immutable" }, "SecretKey": { @@ -828,7 +828,7 @@ "ServerHostname": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationobjectstorage.html#cfn-datasync-locationobjectstorage-serverhostname", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Immutable" }, "ServerPort": { @@ -938,19 +938,19 @@ "Password": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationsmb.html#cfn-datasync-locationsmb-password", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "ServerHostname": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationsmb.html#cfn-datasync-locationsmb-serverhostname", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Immutable" }, "Subdirectory": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-locationsmb.html#cfn-datasync-locationsmb-subdirectory", "PrimitiveType": "String", - "Required": true, + "Required": false, "UpdateType": "Mutable" }, "Tags": { @@ -975,12 +975,6 @@ "PrimitiveItemType": "String", "Type": "List" }, - "ErrorCode": { - "PrimitiveType": "String" - }, - "ErrorDetail": { - "PrimitiveType": "String" - }, "SourceNetworkInterfaceArns": { "PrimitiveItemType": "String", "Type": "List" diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json index cfedaf25eaa73..b6eb8fbda1eeb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Detective::Graph": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json index 6fd55a62211a7..c436a1744275c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::DevOpsGuru::NotificationChannel.NotificationChannelConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-devopsguru-notificationchannel-notificationchannelconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json index 768a0c589b457..0792db0ef7962 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::DirectoryService::MicrosoftAD.VpcSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-directoryservice-microsoftad-vpcsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json index c9caf271aba17..601504b296ba3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::DocDB::DBCluster": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDBElastic.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDBElastic.json index 8b5970fe22d36..5377a9f2ab6ed 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDBElastic.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDBElastic.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::DocDBElastic::Cluster": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json index 4f3adc42c9d74..8aa57c99a75f0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::DynamoDB::GlobalTable.AttributeDefinition": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-attributedefinition.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json index a69a843ef34f8..d1c1d95844c14 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::EC2::CapacityReservation.TagSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-tagspecification.html", @@ -6799,6 +6799,12 @@ }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-placementgroup.html", "Properties": { + "PartitionCount": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-placementgroup.html#cfn-ec2-placementgroup-partitioncount", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Immutable" + }, "SpreadLevel": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-placementgroup.html#cfn-ec2-placementgroup-spreadlevel", "PrimitiveType": "String", @@ -6810,6 +6816,14 @@ "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-placementgroup.html#cfn-ec2-placementgroup-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" } } }, diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json index 749daf0d1ea18..a9c49b8418d6a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ECR::PublicRepository.RepositoryCatalogData": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecr-publicrepository-repositorycatalogdata.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json index 4cb5101960e7e..cab6fa29799f3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ECS::CapacityProvider.AutoScalingGroupProvider": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json index 073355f518c28..46a2b676abee4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::EFS::AccessPoint.AccessPointTag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-efs-accesspoint-accesspointtag.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json index 11835cd4b266b..c196766b96860 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::EKS::Cluster.ClusterLogging": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-clusterlogging.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json index d8bf014243e9c..8f4d96cac5e46 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::EMR::Cluster.Application": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-application.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json index 155a1a06e587a..1d80f0555fd16 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::EMRContainers::VirtualCluster.ContainerInfo": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrcontainers-virtualcluster-containerinfo.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json index ba9504c3cc5db..a332d384042ae 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::EMRServerless::Application.AutoStartConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostartconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json index efcd8b03beca5..bf998b9477616 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ElastiCache::CacheCluster.CloudWatchLogsDestinationDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-cloudwatchlogsdestinationdetails.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json index 5d41f4e35d1d9..af599333af5a8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ElasticBeanstalk::Application.ApplicationResourceLifecycleConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticbeanstalk-application-applicationresourcelifecycleconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json index 123a3c0e2c404..99c52b6d8ce16 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ElasticLoadBalancing::LoadBalancer.AccessLoggingPolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json index d517c26c64087..6e1929785d1d7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ElasticLoadBalancingV2::Listener.Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json index b1e8a5e79d758..176a7e2173014 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Elasticsearch::Domain.AdvancedSecurityOptionsInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-advancedsecurityoptionsinput.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json index ecddf61fa488d..9aa543601b632 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::EventSchemas::Discoverer.TagsEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventschemas-discoverer-tagsentry.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json index 7d4401fd3ea7b..98ef0e5d9b5fc 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Events::Connection.ApiKeyAuthParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-apikeyauthparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json index cdc5b42cbd092..f75d6ed8e7bf1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Evidently::Experiment.MetricGoalObject": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json index 21121d8802852..97558c1e7e750 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::FIS::ExperimentTemplate.CloudWatchLogsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fis-experimenttemplate-cloudwatchlogsconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json index b523254f57adb..5707552a19290 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::FMS::Policy.IEMap": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-iemap.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json index da21517b4cba0..56e1e5a1a2d06 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::FSx::DataRepositoryAssociation.AutoExportPolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-datarepositoryassociation-autoexportpolicy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json index cf644710cce52..c62095975027b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::FinSpace::Environment.FederationParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-finspace-environment-federationparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json index 2932ce66680ef..a2a3b2bde7c19 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Forecast::Dataset.AttributesItems": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-forecast-dataset-attributesitems.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json index b2927bed0dacd..c707a7c0f5eb2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::FraudDetector::Detector.EntityType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-frauddetector-detector-entitytype.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json index 474770e853ad7..1af755bb59bb1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::GameLift::Alias.RoutingStrategy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-alias-routingstrategy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json index 547c007909879..7952bcd99a4e3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::GlobalAccelerator::EndpointGroup.EndpointConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json index e19179fad5c1a..31594a857dcc4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Glue::Classifier.CsvClassifier": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-csvclassifier.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Grafana.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Grafana.json index 62997c39da0b1..953d0b37ae308 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Grafana.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Grafana.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Grafana::Workspace.AssertionAttributes": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-grafana-workspace-assertionattributes.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json index e3ead9e0a438d..19a8f55f2e183 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Greengrass::ConnectorDefinition.Connector": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connector.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json index 1f70b75b42cef..26dd989d4f528 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::GreengrassV2::ComponentVersion.ComponentDependencyRequirement": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentdependencyrequirement.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json index 72bfa94fb4df7..41fe029b70352 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::GroundStation::Config.AntennaDownlinkConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-groundstation-config-antennadownlinkconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json index d1339961b54a3..263659de526f3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::GuardDuty::Detector.CFNDataSourceConfigurations": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-detector-cfndatasourceconfigurations.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json index 3839bdba4a5a0..2982114cf2e4d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::HealthLake::FHIRDatastore.CreatedAt": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-healthlake-fhirdatastore-createdat.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json index 16bd173cc3879..86d46d7cf0d81 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IAM::Group.Policy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json index 8246220458e65..69eef6d1e0585 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IVS::RecordingConfiguration.DestinationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ivs-recordingconfiguration-destinationconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IdentityStore.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IdentityStore.json index edb5c47a40dc0..37ee3ed8ccea4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IdentityStore.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IdentityStore.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IdentityStore::GroupMembership.MemberId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-identitystore-groupmembership-memberid.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json index 840f915a1bd8e..a2a34340fe952 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ImageBuilder::ContainerRecipe.ComponentConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-containerrecipe-componentconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json index d19a69a5c55cf..b3091c1445657 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Inspector::AssessmentTarget": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json index 582e9e9eece9e..0c82110633147 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::InspectorV2::Filter.DateFilter": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-inspectorv2-filter-datefilter.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json index 74d1dd302b059..b148c5126ea36 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoT::AccountAuditConfiguration.AuditCheckConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-accountauditconfiguration-auditcheckconfiguration.html", @@ -294,6 +294,19 @@ } } }, + "AWS::IoT::JobTemplate.JobExecutionsRetryConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-jobtemplate-jobexecutionsretryconfig.html", + "Properties": { + "RetryCriteriaList": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-jobtemplate-jobexecutionsretryconfig.html#cfn-iot-jobtemplate-jobexecutionsretryconfig-retrycriterialist", + "DuplicatesAllowed": true, + "ItemType": "RetryCriteria", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::IoT::JobTemplate.JobExecutionsRolloutConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-jobtemplate-jobexecutionsrolloutconfig.html", "Properties": { @@ -345,6 +358,23 @@ } } }, + "AWS::IoT::JobTemplate.RetryCriteria": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-jobtemplate-retrycriteria.html", + "Properties": { + "FailureType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-jobtemplate-retrycriteria.html#cfn-iot-jobtemplate-retrycriteria-failuretype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "NumberOfRetries": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-jobtemplate-retrycriteria.html#cfn-iot-jobtemplate-retrycriteria-numberofretries", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::IoT::JobTemplate.TimeoutConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-jobtemplate-timeoutconfig.html", "Properties": { @@ -2312,6 +2342,12 @@ "Required": false, "UpdateType": "Immutable" }, + "JobExecutionsRetryConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-jobexecutionsretryconfig", + "Required": false, + "Type": "JobExecutionsRetryConfig", + "UpdateType": "Mutable" + }, "JobExecutionsRolloutConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-jobtemplate.html#cfn-iot-jobtemplate-jobexecutionsrolloutconfig", "Required": false, diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json index 98dae796b859a..67f9f041484cb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoT1Click::Project.DeviceTemplate": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot1click-project-devicetemplate.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json index 1c5fe09eef49a..d42576ca8bf3c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoTAnalytics::Channel.ChannelStorage": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-channel-channelstorage.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json index eb3f0480aa5de..54317cb7fef0b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoTCoreDeviceAdvisor::SuiteDefinition.DeviceUnderTest": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotcoredeviceadvisor-suitedefinition-deviceundertest.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json index ae02439a5cb9a..a4f16e94eeaf9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoTEvents::AlarmModel.AcknowledgeFlow": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-acknowledgeflow.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json index 31e88b88f0645..b12f5ccec7312 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::IoTFleetHub::Application": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetWise.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetWise.json index 6ffe8e71f0fef..8db61776ca55a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetWise.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetWise.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoTFleetWise::Campaign.CollectionScheme": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotfleetwise-campaign-collectionscheme.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json index beacf455a2226..57ae5f81defb1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoTSiteWise::AccessPolicy.AccessPolicyIdentity": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-accesspolicy-accesspolicyidentity.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json index 44fce883090fe..cc1d12fcd6b7a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoTThingsGraph::FlowTemplate.DefinitionDocument": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotthingsgraph-flowtemplate-definitiondocument.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json index 55237f35d375b..d869bc28a4878 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoTTwinMaker::ComponentType.DataConnector": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iottwinmaker-componenttype-dataconnector.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json index e470fecb29da6..ab86ed6a33484 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::IoTWireless::DeviceProfile.LoRaWANDeviceProfile": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotwireless-deviceprofile-lorawandeviceprofile.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json index e576930380f46..95fbfadb9b8e4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::KMS::Alias": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json index e97973134f9df..c9580498269cf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::KafkaConnect::Connector.ApacheKafkaCluster": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kafkaconnect-connector-apachekafkacluster.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json index 9789b6eafec68..94d789931f3a2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Kendra::DataSource.AccessControlListConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-accesscontrollistconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json index d52c98dc524fb..9150a534f9906 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Kinesis::Stream.StreamEncryption": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streamencryption.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json index 6bc4724ea1da5..975bda95caa47 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::KinesisAnalytics::Application.CSVMappingParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-csvmappingparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json index e67473a755247..422581141b4fd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::KinesisAnalyticsV2::Application.ApplicationCodeConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalyticsv2-application-applicationcodeconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json index 27348f041d0a7..5348aaaa06a47 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::KinesisFirehose::DeliveryStream.AmazonOpenSearchServerlessBufferingHints": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-amazonopensearchserverlessbufferinghints.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json index b8a71a4632cb0..59307c8b085a7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::KinesisVideo::SignalingChannel": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json index 67a158a417f48..20609f50bedb7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::LakeFormation::DataCellsFilter.ColumnWildcard": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lakeformation-datacellsfilter-columnwildcard.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json index 8ed2d0553c62c..d64250e7be4b2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Lambda::Alias.AliasRoutingConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html", @@ -175,6 +175,17 @@ } } }, + "AWS::Lambda::EventSourceMapping.ScalingConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-scalingconfig.html", + "Properties": { + "MaximumConcurrency": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-scalingconfig.html#cfn-lambda-eventsourcemapping-scalingconfig-maximumconcurrency", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Lambda::EventSourceMapping.SelfManagedEventSource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedeventsource.html", "Properties": { @@ -675,6 +686,12 @@ "Type": "List", "UpdateType": "Mutable" }, + "ScalingConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-scalingconfig", + "Required": false, + "Type": "ScalingConfig", + "UpdateType": "Mutable" + }, "SelfManagedEventSource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedeventsource", "Required": false, diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json index 1553d46b24c3a..23a3ebd69a067 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Lex::Bot.AdvancedRecognitionSetting": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-advancedrecognitionsetting.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json index 9c866cc7437db..8df04c0b3e913 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::LicenseManager::License.BorrowConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-licensemanager-license-borrowconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json index 501c5663e683e..13cd10e463777 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Lightsail::Bucket.AccessRules": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-bucket-accessrules.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json index eca9c842d7961..e2de91a675777 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Location::Map.MapConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-location-map-mapconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json index 8af6944a94736..ee01f69f3456d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Logs::MetricFilter.Dimension": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-dimension.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json index e9709c142f40e..71004c230c3ba 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::LookoutEquipment::InferenceScheduler.DataInputConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutequipment-inferencescheduler-datainputconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json index 599c911241fee..6350ee5f8b15b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::LookoutMetrics::Alert.Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-action.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json index fb92288b9639c..d6c62a045a312 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::LookoutVision::Project": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_M2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_M2.json index 6e7c8d919b4f8..e58d9f2ddfd08 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_M2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_M2.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::M2::Application.Definition": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-m2-application-definition.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json index bb1737bda9959..6f130422d7c55 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::MSK::Cluster.BrokerLogs": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-brokerlogs.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json index 53ecf642f30c7..bc774ba82cf76 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::MWAA::Environment.LoggingConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json index f5e480989eda4..a26520d99495b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Macie::AllowList.Criteria": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-macie-allowlist-criteria.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json index b9ae365f57a44..fd60b22993dab 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ManagedBlockchain::Member.ApprovalThresholdPolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-managedblockchain-member-approvalthresholdpolicy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json index 8eae91dd8cc11..3667601f8f0ea 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::MediaConnect::Flow.Encryption": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-encryption.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json index dbe97f99c5e3a..507e3ce24e6bc 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::MediaConvert::JobTemplate.AccelerationSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconvert-jobtemplate-accelerationsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json index d7e04da3b8a91..796133fb6c213 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::MediaLive::Channel.AacSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-aacsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json index 2481f74fac3eb..fce25bea04c33 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::MediaPackage::Asset.EgressEndpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-asset-egressendpoint.html", @@ -37,25 +37,25 @@ "Id": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-id", "PrimitiveType": "String", - "Required": false, + "Required": true, "UpdateType": "Mutable" }, "Password": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-password", "PrimitiveType": "String", - "Required": false, + "Required": true, "UpdateType": "Mutable" }, "Url": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-url", "PrimitiveType": "String", - "Required": false, + "Required": true, "UpdateType": "Mutable" }, "Username": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-ingestendpoint.html#cfn-mediapackage-channel-ingestendpoint-username", "PrimitiveType": "String", - "Required": false, + "Required": true, "UpdateType": "Mutable" } } @@ -697,6 +697,12 @@ "Required": false, "UpdateType": "Mutable" }, + "IncludeIframeOnlyStream": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-includeiframeonlystream", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "PeriodTriggers": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-packagingconfiguration-dashpackage.html#cfn-mediapackage-packagingconfiguration-dashpackage-periodtriggers", "DuplicatesAllowed": true, @@ -1033,13 +1039,6 @@ "Attributes": { "Arn": { "PrimitiveType": "String" - }, - "HlsIngest": { - "Type": "HlsIngest" - }, - "HlsIngest.ingestEndpoints": { - "ItemType": "IngestEndpoint", - "Type": "List" } }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html", @@ -1056,6 +1055,12 @@ "Type": "LogConfiguration", "UpdateType": "Mutable" }, + "HlsIngest": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html#cfn-mediapackage-channel-hlsingest", + "Required": false, + "Type": "HlsIngest", + "UpdateType": "Mutable" + }, "Id": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html#cfn-mediapackage-channel-id", "PrimitiveType": "String", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json index 4c27b98f36e68..8cebd7b21732f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::MediaStore::Container.CorsRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediastore-container-corsrule.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json index 70dc28bf99710..6a55e1d5bf6d5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::MediaTailor::PlaybackConfiguration.AdMarkerPassthrough": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-playbackconfiguration-admarkerpassthrough.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json index ce2940a5c8b54..06f7a1babd4dc 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::MemoryDB::Cluster.Endpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-memorydb-cluster-endpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json index e1fcd79086502..945c32c631879 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Neptune::DBCluster.DBClusterRole": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-neptune-dbcluster-dbclusterrole.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json index 00212c6ba1c99..7fa60b655acdf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::NetworkFirewall::Firewall.SubnetMapping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-subnetmapping.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json index 8fb7ff1a79a12..b8f48f8392f64 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::NetworkManager::ConnectAttachment.ConnectAttachmentOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-connectattachment-connectattachmentoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json index 4fb7c4b793b2a..5c4f8dd06ac35 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::NimbleStudio::LaunchProfile.StreamConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-nimblestudio-launchprofile-streamconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Oam.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Oam.json index 281db56b93d6c..99e14b7e2bce3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Oam.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Oam.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Oam::Link": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchServerless.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchServerless.json index d3d6528877f67..b9af56935e27c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchServerless.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchServerless.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::OpenSearchServerless::SecurityConfig.SamlConfigOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-securityconfig-samlconfigoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json index c0ae53ff2b3b4..73f19a924d1d4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::OpenSearchService::Domain.AdvancedSecurityOptionsInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-advancedsecurityoptionsinput.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json index ed5e8ccb3929a..8d1e0c1d6f970 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::OpsWorks::App.DataSource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-datasource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json index 023c47b6bc0ff..8c55fbe1fab4e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::OpsWorksCM::Server.EngineAttribute": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworkscm-server-engineattribute.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Organizations.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Organizations.json index 04d961c8871b9..83b35bf920f36 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Organizations.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Organizations.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Organizations::Account": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json index 1e9a59d43a737..1564233a0ba0e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Panorama::ApplicationInstance.ManifestOverridesPayload": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-panorama-applicationinstance-manifestoverridespayload.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json index a8e0cf6720d70..65d84bd4a11c0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Personalize::Dataset.DataSource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-personalize-dataset-datasource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json index 8cd5adb3c069b..a31b2e832b7aa 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Pinpoint::ApplicationSettings.CampaignHook": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-campaignhook.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json index a968dd97710f9..451dc8713338c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::PinpointEmail::ConfigurationSet.DeliveryOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpointemail-configurationset-deliveryoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pipes.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pipes.json index f1f2f3698cabc..8afb59ad0c6b3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pipes.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pipes.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Pipes::Pipe.AwsVpcConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-awsvpcconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json index 9244428af213d..1584ce4511112 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::QLDB::Stream.KinesisConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qldb-stream-kinesisconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json index f33294a293f62..3a12d9b95f357 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::QuickSight::Analysis.AnalysisError": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-analysiserror.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json index 6c700c4534f23..289a0d7f86712 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::RAM::ResourceShare": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json index ff23618bec497..25eb39e27a2ad 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::RDS::DBCluster.DBClusterRole": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-dbclusterrole.html", @@ -35,6 +35,23 @@ } } }, + "AWS::RDS::DBCluster.MasterUserSecret": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-masterusersecret.html", + "Properties": { + "KmsKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-masterusersecret.html#cfn-rds-dbcluster-masterusersecret-kmskeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SecretArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-masterusersecret.html#cfn-rds-dbcluster-masterusersecret-secretarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::RDS::DBCluster.ReadEndpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-readendpoint.html", "Properties": { @@ -144,6 +161,23 @@ } } }, + "AWS::RDS::DBInstance.MasterUserSecret": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbinstance-masterusersecret.html", + "Properties": { + "KmsKeyId": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbinstance-masterusersecret.html#cfn-rds-dbinstance-masterusersecret-kmskeyid", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "SecretArn": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbinstance-masterusersecret.html#cfn-rds-dbinstance-masterusersecret-secretarn", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::RDS::DBInstance.ProcessorFeature": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbinstance-processorfeature.html", "Properties": { @@ -385,6 +419,9 @@ "Endpoint.Port": { "PrimitiveType": "String" }, + "MasterUserSecret.SecretArn": { + "PrimitiveType": "String" + }, "ReadEndpoint.Address": { "PrimitiveType": "String" } @@ -553,12 +590,24 @@ "Required": false, "UpdateType": "Immutable" }, + "ManageMasterUserPassword": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-managemasteruserpassword", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "MasterUserPassword": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-masteruserpassword", "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" }, + "MasterUserSecret": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-masterusersecret", + "Required": false, + "Type": "MasterUserSecret", + "UpdateType": "Mutable" + }, "MasterUsername": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-masterusername", "PrimitiveType": "String", @@ -759,6 +808,9 @@ }, "Endpoint.Port": { "PrimitiveType": "String" + }, + "MasterUserSecret.SecretArn": { + "PrimitiveType": "String" } }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html", @@ -961,12 +1013,24 @@ "Required": false, "UpdateType": "Mutable" }, + "ManageMasterUserPassword": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html#cfn-rds-dbinstance-managemasteruserpassword", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "MasterUserPassword": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html#cfn-rds-dbinstance-masteruserpassword", "PrimitiveType": "String", "Required": false, "UpdateType": "Mutable" }, + "MasterUserSecret": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html#cfn-rds-dbinstance-masterusersecret", + "Required": false, + "Type": "MasterUserSecret", + "UpdateType": "Mutable" + }, "MasterUsername": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html#cfn-rds-dbinstance-masterusername", "PrimitiveType": "String", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json index bff358647e3df..ed3bb3301ed34 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::RUM::AppMonitor.AppMonitorConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json index fd7a82454ef9f..028e40a5342d5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Redshift::Cluster.Endpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshift-cluster-endpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RedshiftServerless.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RedshiftServerless.json index e9e49570f96cb..732a495d03211 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RedshiftServerless.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RedshiftServerless.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::RedshiftServerless::Namespace.Namespace": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshiftserverless-namespace-namespace.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json index 3ca6011356d5a..b515322a9202e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::RefactorSpaces::Application.ApiGatewayProxyInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-application-apigatewayproxyinput.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Rekognition.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Rekognition.json index 575c06ae58b95..68631605954b2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Rekognition.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Rekognition.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Rekognition::StreamProcessor.BoundingBox": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rekognition-streamprocessor-boundingbox.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json index 1f9bf7b9c017f..00c665e558c30 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ResilienceHub::App.PhysicalResourceId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-physicalresourceid.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceExplorer2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceExplorer2.json index c547c2cf09a40..06ba0bb28c46f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceExplorer2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceExplorer2.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ResourceExplorer2::View.Filters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourceexplorer2-view-filters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json index c457051e96f33..c5a4aefa4830a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ResourceGroups::Group.ConfigurationItem": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-configurationitem.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json index c2a7b91ba3f83..3d8d75aba7ef9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::RoboMaker::RobotApplication.RobotSoftwareSuite": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-robomaker-robotapplication-robotsoftwaresuite.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RolesAnywhere.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RolesAnywhere.json index 3592da00ef5d1..bc6ba4c2e29fe 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RolesAnywhere.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RolesAnywhere.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::RolesAnywhere::TrustAnchor.Source": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rolesanywhere-trustanchor-source.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json index 869d1eaf8e4d4..50d7979db4734 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Route53::CidrCollection.Location": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-cidrcollection-location.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json index 0f94d70660ddd..8e695317d1733 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Route53RecoveryControl::Cluster.ClusterEndpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoverycontrol-cluster-clusterendpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json index d9c77609a9cd0..a1d0ddc7b5594 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Route53RecoveryReadiness::ResourceSet.DNSTargetResource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoveryreadiness-resourceset-dnstargetresource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json index 34167ffeb4b20..140a635edd409 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Route53Resolver::FirewallRuleGroup.FirewallRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53resolver-firewallrulegroup-firewallrule.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json index d8a7b5ed81c04..7eb5d0cf37eb8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::S3::AccessPoint.PolicyStatus": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-policystatus.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json index 2c35a5bc518b9..52b2f95cd2a45 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::S3ObjectLambda::AccessPoint.AwsLambda": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-awslambda.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json index e14bb91b9703d..c0c92dd68ab8c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::S3Outposts::AccessPoint.VpcConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-accesspoint-vpcconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json index 521331a6ee33e..e2d8ae4ee7b1f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SDB::Domain": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json index 1c40bfed761c2..0c87b5aebe164 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::SES::ConfigurationSet.DashboardOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-configurationset-dashboardoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json index 7c40bd5721426..d08b041e94caa 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::SNS::Topic.Subscription": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-topic-subscription.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json index 49b0c550144b2..500bf5ba4591e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SQS::Queue": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json index b0902a49f613e..e78500856a687 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::SSM::Association.InstanceAssociationOutputLocation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-association-instanceassociationoutputlocation.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json index e2adf35c699f4..206f8f4d96bd2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::SSMContacts::Contact.ChannelTargetInfo": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmcontacts-contact-channeltargetinfo.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json index 38a67273ccd55..581445630df6b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::SSMIncidents::ReplicationSet.RegionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-replicationset-regionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json index c3dfed55179ab..9420a93c47d32 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::SSO::InstanceAccessControlAttributeConfiguration.AccessControlAttribute": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sso-instanceaccesscontrolattributeconfiguration-accesscontrolattribute.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SageMaker.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SageMaker.json index db3c464a9543c..e6bfbbecf2f28 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SageMaker.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SageMaker.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::SageMaker::App.ResourceSpec": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-app-resourcespec.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Scheduler.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Scheduler.json index f625fa5291a70..f846c9a9194f2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Scheduler.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Scheduler.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Scheduler::Schedule.AwsVpcConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-awsvpcconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json index 6d2b169dab091..7b910ec7575df 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::SecretsManager::RotationSchedule.HostedRotationLambda": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-secretsmanager-rotationschedule-hostedrotationlambda.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json index a9aeac8115c44..225841f504bb2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SecurityHub::Hub": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json index f434377a43776..7fdcc6afd3af5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ServiceCatalog::CloudFormationProduct.ProvisioningArtifactProperties": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicecatalog-cloudformationproduct-provisioningartifactproperties.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json index 45c3ce562f522..d418cae63a717 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::ServiceCatalogAppRegistry::Application": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json index 03e2e04bb9aa3..e4355e2cecc35 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::ServiceDiscovery::PrivateDnsNamespace.PrivateDnsPropertiesMutable": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-privatednsnamespace-privatednspropertiesmutable.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json index 7393151da0852..6f706f895cb3f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Signer::SigningProfile.SignatureValidityPeriod": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-signer-signingprofile-signaturevalidityperiod.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json index 61f1a5c802031..7059b67420b53 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::StepFunctions::Activity.TagsEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-tagsentry.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SupportApp.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SupportApp.json index 381792c85ea1f..d685930682492 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SupportApp.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SupportApp.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SupportApp::AccountAlias": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json index 7bf5c8abcbb91..b04d2fc34893e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Synthetics::Canary.ArtifactConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-artifactconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json index 5637503f86681..cefb779eb0281 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Timestream::ScheduledQuery.DimensionMapping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-dimensionmapping.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json index 555c06d701564..a186095583935 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Transfer::Connector.As2Config": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-connector-as2config.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json index cad7c3e4a5fb3..e306e9b33ed87 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::VoiceID::Domain.ServerSideEncryptionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-voiceid-domain-serversideencryptionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json index ddcafcb6368d2..3243af1558a4b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::WAF::ByteMatchSet.ByteMatchTuple": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-bytematchset-bytematchtuples.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json index ab848de185240..d882a90765294 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::WAFRegional::ByteMatchSet.ByteMatchTuple": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-bytematchset-bytematchtuple.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json index 4f84b1b414d48..595461e8984a7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::WAFv2::LoggingConfiguration.ActionCondition": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-actioncondition.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json index e21579f130aec..41b8b98cd8ab6 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::Wisdom::Assistant.ServerSideEncryptionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wisdom-assistant-serversideencryptionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json index ac415ab54b88f..ceb2f3e83bae5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::WorkSpaces::ConnectionAlias.ConnectionAliasAssociation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspaces-connectionalias-connectionaliasassociation.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json index b34b8a74cd7a8..6f3f25f74f4c0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "AWS::XRay::Group.InsightsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-group-insightsconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json index cfe6bdddbfc89..d967ee9dc0292 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "Alexa::ASK::Skill.AuthenticationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ask-skill-authenticationconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json index 75db42cd96a73..53dd0b161efdf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json @@ -1,5 +1,5 @@ { - "$version": "106.0.0", + "$version": "107.0.0", "PropertyTypes": { "Tag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json index 7af9c5f68860f..5297fe34ac1e9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json @@ -1,3 +1,3 @@ { - "ResourceSpecificationVersion": "106.0.0" + "ResourceSpecificationVersion": "107.0.0" } diff --git a/packages/@aws-cdk/cli-lib/.eslintrc.js b/packages/@aws-cdk/cli-lib/.eslintrc.js new file mode 100644 index 0000000000000..2658ee8727166 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/cli-lib/.gitignore b/packages/@aws-cdk/cli-lib/.gitignore new file mode 100644 index 0000000000000..65127280662be --- /dev/null +++ b/packages/@aws-cdk/cli-lib/.gitignore @@ -0,0 +1,25 @@ +*.js +*.js.map +*.d.ts +!lib/init-templates/**/javascript/**/* +node_modules +dist +.jsii +tsconfig.json + +# Generated by generate.sh +build-info.json + +.LAST_BUILD +.nyc_output +coverage +nyc.config.js +.LAST_PACKAGE +*.snk + +assets.json +npm-shrinkwrap.json +!.eslintrc.js +!jest.config.js + +junit.xml diff --git a/packages/@aws-cdk/cli-lib/.npmignore b/packages/@aws-cdk/cli-lib/.npmignore new file mode 100644 index 0000000000000..23e07b36e8bbc --- /dev/null +++ b/packages/@aws-cdk/cli-lib/.npmignore @@ -0,0 +1,36 @@ +# Ignore artifacts +**/cdk.out +.LAST_BUILD +*.snk +junit.xml +coverage +.nyc_output +*.tgz +dist +.LAST_PACKAGE +*.tsbuildinfo + +# Ignore configs and test files +.eslintrc.js +test/ +tsconfig.json + +# Make the linter happy, but... +!*.js +# ... we don't actualy want unbundled files +*.js +*.ts + +# Explicitly allow all required files +!lib/main.js +!lib/bridge.js +!lib/setup-sandbox.js +!*.d.ts +!*.lit.ts +!rosetta/ +!.jsii +!.jsii.tabl.json +!.warnings.jsii.js +!build-info.json +!NOTICE +!THIRD_PARTY_LICENSES diff --git a/packages/@aws-cdk/cli-lib/LICENSE b/packages/@aws-cdk/cli-lib/LICENSE new file mode 100644 index 0000000000000..9b722c65c5481 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/cli-lib/NOTICE b/packages/@aws-cdk/cli-lib/NOTICE new file mode 100644 index 0000000000000..0dd703eaedb4a --- /dev/null +++ b/packages/@aws-cdk/cli-lib/NOTICE @@ -0,0 +1,16 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Third party attributions of this package can be found in the THIRD_PARTY_LICENSES file diff --git a/packages/@aws-cdk/cli-lib/README.md b/packages/@aws-cdk/cli-lib/README.md new file mode 100644 index 0000000000000..186637d6e0b09 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/README.md @@ -0,0 +1,114 @@ +# AWS CDK CLI Library + + +--- + +![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge) + +> The APIs of higher level constructs in this module are experimental and under active development. +> They are subject to non-backward compatible changes or removal in any future version. These are +> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be +> announced in the release notes. This means that while you may use them, you may need to update +> your source code when upgrading to a newer version of this package. + +--- + + + +## ⚠️ Experimental module + +This package is highly experimental. Expect frequent API changes and incomplete features. +Known issues include: + +- **JavaScript/TypeScript only**\ + The jsii packages are currently not in a working state. +- **No useful return values**\ + All output is currently printed to stdout/stderr +- **Missing or Broken options**\ + Some CLI options might not be available in this package or broken + +## Overview + +Provides a library to interact with the AWS CDK CLI programmatically from jsii supported languages. +Currently the package includes implementations for: + +- `cdk deploy` +- `cdk synth` +- `cdk destroy` +- `cdk list` + +## Setup + +### AWS CDK app directory + +Obtain an `AwsCdkCli` class from an AWS CDK app directory (containing a `cdk.json` file): + +```ts fixture=imports +const cli = AwsCdkCli.fromCdkAppDirectory("/path/to/cdk/app"); +``` + +### Cloud Assembly Directory Producer + +You can also create `AwsCdkCli` from a class implementing `ICloudAssemblyDirectoryProducer`. +AWS CDK apps might need to be synthesized multiple times with additional context values before they are ready. + +The `produce()` method of the `ICloudAssemblyDirectoryProducer` interface provides this multi-pass ability. +It is invoked with the context values of the current iteration and should use these values to synthesize a Cloud Assembly. +The return value is the path to the assembly directory. + +A basic implementation would look like this: + +```ts fixture=imports +class MyProducer implements ICloudAssemblyDirectoryProducer { + async produce(context: Record) { + const app = new cdk.App({ context }); + const stack = new cdk.Stack(app); + return app.synth().directory; + } +} +``` + +For all features (e.g. lookups) to work correctly, `cdk.App()` must be instantiated with the received `context` values. +Since it is not possible to update the context of an app, it must be created as part of the `produce()` method. + +The producer can than be used like this: + +```ts fixture=producer +const cli = AwsCdkCli.fromCloudAssemblyDirectoryProducer(new MyProducer()); +``` + +## Commands + +### list + +```ts +// await this asynchronous method call using a language feature +cli.list(); +``` + +### synth + +```ts +// await this asynchronous method call using a language feature +cli.synth({ + stacks: ['MyTestStack'], +}); +``` + +### deploy + +```ts +// await this asynchronous method call using a language feature +cli.deploy({ + stacks: ['MyTestStack'], +}); +``` + +### destroy + +```ts +// await this asynchronous method call using a language feature +cli.destroy({ + stacks: ['MyTestStack'], +}); +``` diff --git a/packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES new file mode 100644 index 0000000000000..0430fca553dcc --- /dev/null +++ b/packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES @@ -0,0 +1,3852 @@ +The @aws-cdk/cli-lib package includes the following third-party software/licensing: + +** @jsii/check-node@1.72.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.72.0 | Apache-2.0 +jsii +Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + +---------------- + +** @tootallnate/once@1.1.2 - https://www.npmjs.com/package/@tootallnate/once/v/1.1.2 | MIT + +---------------- + +** acorn-walk@8.2.0 - https://www.npmjs.com/package/acorn-walk/v/8.2.0 | MIT +MIT License + +Copyright (C) 2012-2020 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** acorn@8.8.1 - https://www.npmjs.com/package/acorn/v/8.8.1 | MIT +MIT License + +Copyright (C) 2012-2022 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** agent-base@6.0.2 - https://www.npmjs.com/package/agent-base/v/6.0.2 | MIT + +---------------- + +** ajv@8.12.0 - https://www.npmjs.com/package/ajv/v/8.12.0 | MIT +The MIT License (MIT) + +Copyright (c) 2015-2021 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + +---------------- + +** ansi-regex@5.0.1 - https://www.npmjs.com/package/ansi-regex/v/5.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** ansi-styles@4.3.0 - https://www.npmjs.com/package/ansi-styles/v/4.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** anymatch@3.1.3 - https://www.npmjs.com/package/anymatch/v/3.1.3 | ISC +The ISC License + +Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** archiver-utils@2.1.0 - https://www.npmjs.com/package/archiver-utils/v/2.1.0 | MIT +Copyright (c) 2015 Chris Talkington. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** archiver@5.3.1 - https://www.npmjs.com/package/archiver/v/5.3.1 | MIT +Copyright (c) 2012-2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** ast-types@0.13.4 - https://www.npmjs.com/package/ast-types/v/0.13.4 | MIT +Copyright (c) 2013 Ben Newman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** astral-regex@2.0.0 - https://www.npmjs.com/package/astral-regex/v/2.0.0 | MIT +MIT License + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** async@3.2.4 - https://www.npmjs.com/package/async/v/3.2.4 | MIT +Copyright (c) 2010-2018 Caolan McMahon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** at-least-node@1.0.0 - https://www.npmjs.com/package/at-least-node/v/1.0.0 | ISC +The ISC License +Copyright (c) 2020 Ryan Zimmerman + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** aws-sdk@2.1287.0 - https://www.npmjs.com/package/aws-sdk/v/2.1287.0 | Apache-2.0 +AWS SDK for JavaScript +Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +This product includes software developed at +Amazon Web Services, Inc. (http://aws.amazon.com/). + + +---------------- + +** balanced-match@1.0.2 - https://www.npmjs.com/package/balanced-match/v/1.0.2 | MIT + +---------------- + +** binary-extensions@2.2.0 - https://www.npmjs.com/package/binary-extensions/v/2.2.0 | MIT +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** bl@4.1.0 - https://www.npmjs.com/package/bl/v/4.1.0 | MIT + +---------------- + +** brace-expansion@1.1.11 - https://www.npmjs.com/package/brace-expansion/v/1.1.11 | MIT +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** brace-expansion@2.0.1 - https://www.npmjs.com/package/brace-expansion/v/2.0.1 | MIT +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** braces@3.0.2 - https://www.npmjs.com/package/braces/v/3.0.2 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** buffer-crc32@0.2.13 - https://www.npmjs.com/package/buffer-crc32/v/0.2.13 | MIT +The MIT License + +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** buffer-from@1.1.2 - https://www.npmjs.com/package/buffer-from/v/1.1.2 | MIT +MIT License + +Copyright (c) 2016, 2018 Linus Unnebäck + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** bytes@3.1.2 - https://www.npmjs.com/package/bytes/v/3.1.2 | MIT +(The MIT License) + +Copyright (c) 2012-2014 TJ Holowaychuk +Copyright (c) 2015 Jed Watson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** camelcase@6.3.0 - https://www.npmjs.com/package/camelcase/v/6.3.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** chalk@4.1.2 - https://www.npmjs.com/package/chalk/v/4.1.2 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** chokidar@3.5.3 - https://www.npmjs.com/package/chokidar/v/3.5.3 | MIT +The MIT License (MIT) + +Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** cliui@7.0.4 - https://www.npmjs.com/package/cliui/v/7.0.4 | ISC +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** color-convert@2.0.1 - https://www.npmjs.com/package/color-convert/v/2.0.1 | MIT +Copyright (c) 2011-2016 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** color-name@1.1.4 - https://www.npmjs.com/package/color-name/v/1.1.4 | MIT +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** compress-commons@4.1.1 - https://www.npmjs.com/package/compress-commons/v/4.1.1 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** concat-map@0.0.1 - https://www.npmjs.com/package/concat-map/v/0.0.1 | MIT +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** core-util-is@1.0.3 - https://www.npmjs.com/package/core-util-is/v/1.0.3 | MIT +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +---------------- + +** crc-32@1.2.2 - https://www.npmjs.com/package/crc-32/v/1.2.2 | Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (C) 2014-present SheetJS LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +---------------- + +** crc32-stream@4.0.2 - https://www.npmjs.com/package/crc32-stream/v/4.0.2 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- + +** data-uri-to-buffer@3.0.1 - https://www.npmjs.com/package/data-uri-to-buffer/v/3.0.1 | MIT + +---------------- + +** debug@4.3.4 - https://www.npmjs.com/package/debug/v/4.3.4 | MIT +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** decamelize@5.0.1 - https://www.npmjs.com/package/decamelize/v/5.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** degenerator@3.0.2 - https://www.npmjs.com/package/degenerator/v/3.0.2 | MIT + +---------------- + +** depd@2.0.0 - https://www.npmjs.com/package/depd/v/2.0.0 | MIT +(The MIT License) + +Copyright (c) 2014-2018 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** diff@5.1.0 - https://www.npmjs.com/package/diff/v/5.1.0 | BSD-3-Clause +Software License Agreement (BSD License) + +Copyright (c) 2009-2015, Kevin Decker + +All rights reserved. + +Redistribution and use of this software in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither the name of Kevin Decker nor the names of its + contributors may be used to endorse or promote products + derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------- + +** emoji-regex@8.0.0 - https://www.npmjs.com/package/emoji-regex/v/8.0.0 | MIT +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** end-of-stream@1.4.4 - https://www.npmjs.com/package/end-of-stream/v/1.4.4 | MIT +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------- + +** escalade@3.1.1 - https://www.npmjs.com/package/escalade/v/3.1.1 | MIT +MIT License + +Copyright (c) Luke Edwards (lukeed.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** escodegen@1.14.3 - https://www.npmjs.com/package/escodegen/v/1.14.3 | BSD-2-Clause +Copyright (C) 2012 Yusuke Suzuki (twitter: @Constellation) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** esprima@4.0.1 - https://www.npmjs.com/package/esprima/v/4.0.1 | BSD-2-Clause +Copyright JS Foundation and other contributors, https://js.foundation/ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** estraverse@4.3.0 - https://www.npmjs.com/package/estraverse/v/4.3.0 | BSD-2-Clause +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** esutils@2.0.3 - https://www.npmjs.com/package/esutils/v/2.0.3 | BSD-2-Clause +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** eventemitter3@4.0.7 - https://www.npmjs.com/package/eventemitter3/v/4.0.7 | MIT +The MIT License (MIT) + +Copyright (c) 2014 Arnout Kazemier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** fast-deep-equal@3.1.3 - https://www.npmjs.com/package/fast-deep-equal/v/3.1.3 | MIT +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** file-uri-to-path@2.0.0 - https://www.npmjs.com/package/file-uri-to-path/v/2.0.0 | MIT +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** fill-range@7.0.1 - https://www.npmjs.com/package/fill-range/v/7.0.1 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** fs-constants@1.0.0 - https://www.npmjs.com/package/fs-constants/v/1.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2018 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** fs-extra@8.1.0 - https://www.npmjs.com/package/fs-extra/v/8.1.0 | MIT +(The MIT License) + +Copyright (c) 2011-2017 JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** fs-extra@9.1.0 - https://www.npmjs.com/package/fs-extra/v/9.1.0 | MIT +(The MIT License) + +Copyright (c) 2011-2017 JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** fs.realpath@1.0.0 - https://www.npmjs.com/package/fs.realpath/v/1.0.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + Copyright Joyent, Inc. and other Node contributors. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + +---------------- + +** ftp@0.3.10 - https://www.npmjs.com/package/ftp/v/0.3.10 | MIT +Copyright Brian White. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +---------------- + +** get-caller-file@2.0.5 - https://www.npmjs.com/package/get-caller-file/v/2.0.5 | ISC + +---------------- + +** get-uri@3.0.2 - https://www.npmjs.com/package/get-uri/v/3.0.2 | MIT + +---------------- + +** glob-parent@5.1.2 - https://www.npmjs.com/package/glob-parent/v/5.1.2 | ISC +The ISC License + +Copyright (c) 2015, 2019 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** glob@7.2.3 - https://www.npmjs.com/package/glob/v/7.2.3 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ + + +---------------- + +** graceful-fs@4.2.10 - https://www.npmjs.com/package/graceful-fs/v/4.2.10 | ISC +The ISC License + +Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** has-flag@4.0.0 - https://www.npmjs.com/package/has-flag/v/4.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** http-errors@2.0.0 - https://www.npmjs.com/package/http-errors/v/2.0.0 | MIT + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com +Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** http-proxy-agent@4.0.1 - https://www.npmjs.com/package/http-proxy-agent/v/4.0.1 | MIT + +---------------- + +** https-proxy-agent@5.0.1 - https://www.npmjs.com/package/https-proxy-agent/v/5.0.1 | MIT + +---------------- + +** iconv-lite@0.4.24 - https://www.npmjs.com/package/iconv-lite/v/0.4.24 | MIT +Copyright (c) 2011 Alexander Shtuchkin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** inflight@1.0.6 - https://www.npmjs.com/package/inflight/v/1.0.6 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** inherits@2.0.4 - https://www.npmjs.com/package/inherits/v/2.0.4 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + + +---------------- + +** ip@1.1.8 - https://www.npmjs.com/package/ip/v/1.1.8 | MIT + +---------------- + +** ip@2.0.0 - https://www.npmjs.com/package/ip/v/2.0.0 | MIT + +---------------- + +** is-binary-path@2.1.0 - https://www.npmjs.com/package/is-binary-path/v/2.1.0 | MIT +MIT License + +Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** is-extglob@2.1.1 - https://www.npmjs.com/package/is-extglob/v/2.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-fullwidth-code-point@3.0.0 - https://www.npmjs.com/package/is-fullwidth-code-point/v/3.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** is-glob@4.0.3 - https://www.npmjs.com/package/is-glob/v/4.0.3 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** is-number@7.0.0 - https://www.npmjs.com/package/is-number/v/7.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** isarray@0.0.1 - https://www.npmjs.com/package/isarray/v/0.0.1 | MIT + +---------------- + +** isarray@1.0.0 - https://www.npmjs.com/package/isarray/v/1.0.0 | MIT + +---------------- + +** jmespath@0.16.0 - https://www.npmjs.com/package/jmespath/v/0.16.0 | Apache-2.0 +Copyright 2014 James Saryerwinnie + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +---------------- + +** jsonfile@4.0.0 - https://www.npmjs.com/package/jsonfile/v/4.0.0 | MIT +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** jsonfile@6.1.0 - https://www.npmjs.com/package/jsonfile/v/6.1.0 | MIT +(The MIT License) + +Copyright (c) 2012-2015, JP Richardson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files +(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, + merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** jsonschema@1.4.1 - https://www.npmjs.com/package/jsonschema/v/1.4.1 | MIT +jsonschema is licensed under MIT license. + +Copyright (C) 2012-2015 Tom de Grunt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** lazystream@1.0.1 - https://www.npmjs.com/package/lazystream/v/1.0.1 | MIT +Copyright (c) 2013 J. Pommerening, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + + +---------------- + +** lodash.defaults@4.2.0 - https://www.npmjs.com/package/lodash.defaults/v/4.2.0 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lodash.difference@4.5.0 - https://www.npmjs.com/package/lodash.difference/v/4.5.0 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lodash.flatten@4.4.0 - https://www.npmjs.com/package/lodash.flatten/v/4.4.0 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lodash.isplainobject@4.0.6 - https://www.npmjs.com/package/lodash.isplainobject/v/4.0.6 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lodash.truncate@4.4.2 - https://www.npmjs.com/package/lodash.truncate/v/4.4.2 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lodash.union@4.6.0 - https://www.npmjs.com/package/lodash.union/v/4.6.0 | MIT +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +---------------- + +** lru-cache@5.1.1 - https://www.npmjs.com/package/lru-cache/v/5.1.1 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** lru-cache@6.0.0 - https://www.npmjs.com/package/lru-cache/v/6.0.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** mime@2.6.0 - https://www.npmjs.com/package/mime/v/2.6.0 | MIT +The MIT License (MIT) + +Copyright (c) 2010 Benjamin Thomas, Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** minimatch@3.1.2 - https://www.npmjs.com/package/minimatch/v/3.1.2 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** minimatch@5.1.2 - https://www.npmjs.com/package/minimatch/v/5.1.2 | ISC +The ISC License + +Copyright (c) 2011-2022 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** ms@2.1.2 - https://www.npmjs.com/package/ms/v/2.1.2 | MIT + +---------------- + +** mute-stream@0.0.8 - https://www.npmjs.com/package/mute-stream/v/0.0.8 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** netmask@2.0.2 - https://www.npmjs.com/package/netmask/v/2.0.2 | MIT + +---------------- + +** normalize-path@3.0.0 - https://www.npmjs.com/package/normalize-path/v/3.0.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** once@1.4.0 - https://www.npmjs.com/package/once/v/1.4.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** p-finally@1.0.0 - https://www.npmjs.com/package/p-finally/v/1.0.0 | MIT +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** p-queue@6.6.2 - https://www.npmjs.com/package/p-queue/v/6.6.2 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** p-timeout@3.2.0 - https://www.npmjs.com/package/p-timeout/v/3.2.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** pac-proxy-agent@5.0.0 - https://www.npmjs.com/package/pac-proxy-agent/v/5.0.0 | MIT + +---------------- + +** pac-resolver@5.0.1 - https://www.npmjs.com/package/pac-resolver/v/5.0.1 | MIT + +---------------- + +** path-is-absolute@1.0.1 - https://www.npmjs.com/package/path-is-absolute/v/1.0.1 | MIT +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** picomatch@2.3.1 - https://www.npmjs.com/package/picomatch/v/2.3.1 | MIT +The MIT License (MIT) + +Copyright (c) 2017-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** process-nextick-args@2.0.1 - https://www.npmjs.com/package/process-nextick-args/v/2.0.1 | MIT + +---------------- + +** promptly@3.2.0 - https://www.npmjs.com/package/promptly/v/3.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** proxy-agent@5.0.0 - https://www.npmjs.com/package/proxy-agent/v/5.0.0 | MIT + +---------------- + +** proxy-from-env@1.1.0 - https://www.npmjs.com/package/proxy-from-env/v/1.1.0 | MIT +The MIT License + +Copyright (C) 2016-2018 Rob Wu + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** raw-body@2.5.1 - https://www.npmjs.com/package/raw-body/v/2.5.1 | MIT +The MIT License (MIT) + +Copyright (c) 2013-2014 Jonathan Ong +Copyright (c) 2014-2022 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** read@1.0.7 - https://www.npmjs.com/package/read/v/1.0.7 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** readable-stream@1.1.14 - https://www.npmjs.com/package/readable-stream/v/1.1.14 | MIT +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +---------------- + +** readable-stream@2.3.7 - https://www.npmjs.com/package/readable-stream/v/2.3.7 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +---------------- + +** readable-stream@3.6.0 - https://www.npmjs.com/package/readable-stream/v/3.6.0 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +---------------- + +** readdir-glob@1.1.2 - https://www.npmjs.com/package/readdir-glob/v/1.1.2 | Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Yann Armelin + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +---------------- + +** readdirp@3.6.0 - https://www.npmjs.com/package/readdirp/v/3.6.0 | MIT +MIT License + +Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** require-directory@2.1.1 - https://www.npmjs.com/package/require-directory/v/2.1.1 | MIT +The MIT License (MIT) + +Copyright (c) 2011 Troy Goode + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** safe-buffer@5.1.2 - https://www.npmjs.com/package/safe-buffer/v/5.1.2 | MIT +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** safe-buffer@5.2.1 - https://www.npmjs.com/package/safe-buffer/v/5.2.1 | MIT +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** safer-buffer@2.1.2 - https://www.npmjs.com/package/safer-buffer/v/2.1.2 | MIT +MIT License + +Copyright (c) 2018 Nikita Skovoroda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** sax@1.2.4 - https://www.npmjs.com/package/sax/v/1.2.4 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +==== + +`String.fromCodePoint` by Mathias Bynens used according to terms of MIT +License, as follows: + + Copyright Mathias Bynens + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** semver@7.3.8 - https://www.npmjs.com/package/semver/v/7.3.8 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** setprototypeof@1.2.0 - https://www.npmjs.com/package/setprototypeof/v/1.2.0 | ISC +Copyright (c) 2015, Wes Todd + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** slice-ansi@4.0.0 - https://www.npmjs.com/package/slice-ansi/v/4.0.0 | MIT +MIT License + +Copyright (c) DC +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** smart-buffer@4.2.0 - https://www.npmjs.com/package/smart-buffer/v/4.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2013-2017 Josh Glazebrook + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** socks-proxy-agent@5.0.1 - https://www.npmjs.com/package/socks-proxy-agent/v/5.0.1 | MIT + +---------------- + +** socks@2.7.1 - https://www.npmjs.com/package/socks/v/2.7.1 | MIT +The MIT License (MIT) + +Copyright (c) 2013 Josh Glazebrook + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** source-map-support@0.5.21 - https://www.npmjs.com/package/source-map-support/v/0.5.21 | MIT + +---------------- + +** source-map@0.6.1 - https://www.npmjs.com/package/source-map/v/0.6.1 | BSD-3-Clause + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** statuses@2.0.1 - https://www.npmjs.com/package/statuses/v/2.0.1 | MIT + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** string_decoder@0.10.31 - https://www.npmjs.com/package/string_decoder/v/0.10.31 | MIT +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** string_decoder@1.1.1 - https://www.npmjs.com/package/string_decoder/v/1.1.1 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +---------------- + +** string_decoder@1.3.0 - https://www.npmjs.com/package/string_decoder/v/1.3.0 | MIT +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + + +---------------- + +** string-width@4.2.3 - https://www.npmjs.com/package/string-width/v/4.2.3 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** strip-ansi@6.0.1 - https://www.npmjs.com/package/strip-ansi/v/6.0.1 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** supports-color@7.2.0 - https://www.npmjs.com/package/supports-color/v/7.2.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** table@6.8.1 - https://www.npmjs.com/package/table/v/6.8.1 | BSD-3-Clause +Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +---------------- + +** tar-stream@2.2.0 - https://www.npmjs.com/package/tar-stream/v/2.2.0 | MIT +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +---------------- + +** to-regex-range@5.0.1 - https://www.npmjs.com/package/to-regex-range/v/5.0.1 | MIT +The MIT License (MIT) + +Copyright (c) 2015-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** toidentifier@1.0.1 - https://www.npmjs.com/package/toidentifier/v/1.0.1 | MIT +MIT License + +Copyright (c) 2016 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +---------------- + +** tslib@2.4.1 - https://www.npmjs.com/package/tslib/v/2.4.1 | 0BSD +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +---------------- + +** universalify@0.1.2 - https://www.npmjs.com/package/universalify/v/0.1.2 | MIT +(The MIT License) + +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** universalify@2.0.0 - https://www.npmjs.com/package/universalify/v/2.0.0 | MIT +(The MIT License) + +Copyright (c) 2017, Ryan Zimmerman + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the 'Software'), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** unpipe@1.0.0 - https://www.npmjs.com/package/unpipe/v/1.0.0 | MIT +(The MIT License) + +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** util-deprecate@1.0.2 - https://www.npmjs.com/package/util-deprecate/v/1.0.2 | MIT +(The MIT License) + +Copyright (c) 2014 Nathan Rajlich + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** uuid@8.0.0 - https://www.npmjs.com/package/uuid/v/8.0.0 | MIT + +---------------- + +** uuid@8.3.2 - https://www.npmjs.com/package/uuid/v/8.3.2 | MIT + +---------------- + +** vm2@3.9.13 - https://www.npmjs.com/package/vm2/v/3.9.13 | MIT + +---------------- + +** wrap-ansi@7.0.0 - https://www.npmjs.com/package/wrap-ansi/v/7.0.0 | MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +---------------- + +** wrappy@1.0.2 - https://www.npmjs.com/package/wrappy/v/1.0.2 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** xml2js@0.4.19 - https://www.npmjs.com/package/xml2js/v/0.4.19 | MIT +Copyright 2010, 2011, 2012, 2013. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +---------------- + +** xmlbuilder@9.0.7 - https://www.npmjs.com/package/xmlbuilder/v/9.0.7 | MIT +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** xregexp@2.0.0 - https://www.npmjs.com/package/xregexp/v/2.0.0 | MIT + +---------------- + +** y18n@5.0.8 - https://www.npmjs.com/package/y18n/v/5.0.8 | ISC +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +---------------- + +** yallist@3.1.1 - https://www.npmjs.com/package/yallist/v/3.1.1 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** yallist@4.0.0 - https://www.npmjs.com/package/yallist/v/4.0.0 | ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** yaml@1.10.2 - https://www.npmjs.com/package/yaml/v/1.10.2 | ISC +Copyright 2018 Eemeli Aro + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +---------------- + +** yargs-parser@20.2.9 - https://www.npmjs.com/package/yargs-parser/v/20.2.9 | ISC +Copyright (c) 2016, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +---------------- + +** yargs@16.2.0 - https://www.npmjs.com/package/yargs/v/16.2.0 | MIT +MIT License + +Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +---------------- + +** zip-stream@4.1.0 - https://www.npmjs.com/package/zip-stream/v/4.1.0 | MIT +Copyright (c) 2014 Chris Talkington, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------- diff --git a/packages/@aws-cdk/cli-lib/jest.config.js b/packages/@aws-cdk/cli-lib/jest.config.js new file mode 100644 index 0000000000000..d052cbb29f05d --- /dev/null +++ b/packages/@aws-cdk/cli-lib/jest.config.js @@ -0,0 +1,10 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = { + ...baseConfig, + coverageThreshold: { + global: { + ...baseConfig.coverageThreshold.global, + branches: 60, + }, + }, +}; diff --git a/packages/@aws-cdk/cli-lib/lib/cli.ts b/packages/@aws-cdk/cli-lib/lib/cli.ts new file mode 100644 index 0000000000000..3926162cfc081 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/lib/cli.ts @@ -0,0 +1,295 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { exec as runCli } from 'aws-cdk/lib'; +// eslint-disable-next-line import/no-extraneous-dependencies +import { createAssembly, prepareContext, prepareDefaultEnvironment } from 'aws-cdk/lib/api/cxapp/exec'; +import { SharedOptions, DeployOptions, DestroyOptions, SynthOptions, ListOptions, StackActivityProgress } from './commands'; + +/** + * AWS CDK CLI operations + */ +export interface IAwsCdkCli { + /** + * cdk list + */ + list(options?: ListOptions): Promise; + + /** + * cdk synth + */ + synth(options?: SynthOptions): Promise; + + /** + * cdk deploy + */ + deploy(options?: DeployOptions): Promise; + + /** + * cdk destroy + */ + destroy(options?: DestroyOptions): Promise; +} + +/** + * Configuration for creating a CLI from an AWS CDK App directory + */ +export interface CdkAppDirectoryProps { + /** + * Command-line for executing your app or a cloud assembly directory + * e.g. "node bin/my-app.js" + * or + * "cdk.out" + * + * @default - read from cdk.json + */ + readonly app?: string + + /** + * Emits the synthesized cloud assembly into a directory + * + * @default cdk.out + */ + readonly output?: string; +} + +/** + * A class returning the path to a Cloud Assembly Directory when its `produce` method is invoked with the current context + * + * AWS CDK apps might need to be synthesized multiple times with additional context values before they are ready. + * When running the CLI from inside a directory, this is implemented by invoking the app multiple times. + * Here the `produce()` method provides this multi-pass ability. + */ +export interface ICloudAssemblyDirectoryProducer { + /** + * The working directory used to run the Cloud Assembly from. + * This is were a `cdk.context.json` files will be written. + * + * @default - current working directory + */ + workingDirectory?: string; + + /** + * Synthesize a Cloud Assembly directory for a given context. + * + * For all features to work correctly, `cdk.App()` must be instantiated with the received context values in the method body. + * Usually obtained similar to this: + * ```ts fixture=imports + * class MyProducer implements ICloudAssemblyDirectoryProducer { + * async produce(context: Record) { + * const app = new cdk.App({ context }); + * // create stacks here + * return app.synth().directory; + * } + * } + * ``` + */ + produce(context: Record): Promise +} + +/** + * Provides a programmatic interface for interacting with the AWS CDK CLI + */ +export class AwsCdkCli implements IAwsCdkCli { + /** + * Create the CLI from a directory containing an AWS CDK app + * @param directory the directory of the AWS CDK app. Defaults to the current working directory. + * @param props additional configuration properties + * @returns an instance of `AwsCdkCli` + */ + public static fromCdkAppDirectory(directory?: string, props: CdkAppDirectoryProps = {}) { + return new AwsCdkCli(async (args) => changeDir( + () => { + if (props.app) { + args.push('--app', props.app); + } + if (props.output) { + args.push('--output', props.output); + } + + return runCli(args); + }, + directory, + )); + } + + /** + * Create the CLI from a CloudAssemblyDirectoryProducer + */ + public static fromCloudAssemblyDirectoryProducer(producer: ICloudAssemblyDirectoryProducer) { + return new AwsCdkCli(async (args) => changeDir( + () => runCli(args, async (sdk, config) => { + const env = await prepareDefaultEnvironment(sdk); + const context = await prepareContext(config, env); + + return withEnv(async() => createAssembly(await producer.produce(context)), env); + }), + producer.workingDirectory, + )); + } + + private constructor( + private readonly cli: (args: string[]) => Promise, + ) {} + + /** + * Execute the CLI with a list of arguments + */ + private async exec(args: string[]) { + return this.cli(args); + } + + /** + * cdk list + */ + public async list(options: ListOptions = {}) { + const listCommandArgs: string[] = [ + ...renderBooleanArg('long', options.long), + ...this.createDefaultArguments(options), + ]; + + await this.exec(['ls', ...listCommandArgs]); + } + + /** + * cdk synth + */ + public async synth(options: SynthOptions = {}) { + const synthCommandArgs: string[] = [ + ...renderBooleanArg('validation', options.validation), + ...renderBooleanArg('quiet', options.quiet), + ...renderBooleanArg('exclusively', options.exclusively), + ...this.createDefaultArguments(options), + ]; + + await this.exec(['synth', ...synthCommandArgs]); + } + + /** + * cdk deploy + */ + public async deploy(options: DeployOptions = {}) { + const deployCommandArgs: string[] = [ + ...renderBooleanArg('ci', options.ci), + ...renderBooleanArg('execute', options.execute), + ...renderBooleanArg('exclusively', options.exclusively), + ...renderBooleanArg('force', options.force), + ...renderBooleanArg('previous-parameters', options.usePreviousParameters), + ...renderBooleanArg('rollback', options.rollback), + ...renderBooleanArg('staging', options.staging), + ...options.reuseAssets ? renderArrayArg('--reuse-assets', options.reuseAssets) : [], + ...options.notificationArns ? renderArrayArg('--notification-arns', options.notificationArns) : [], + ...options.parameters ? renderMapArrayArg('--parameters', options.parameters) : [], + ...options.outputsFile ? ['--outputs-file', options.outputsFile] : [], + ...options.requireApproval ? ['--require-approval', options.requireApproval] : [], + ...options.changeSetName ? ['--change-set-name', options.changeSetName] : [], + ...options.toolkitStackName ? ['--toolkit-stack-name', options.toolkitStackName] : [], + ...options.progress ? ['--progress', options.progress] : ['--progress', StackActivityProgress.EVENTS], + ...this.createDefaultArguments(options), + ]; + + await this.exec(['deploy', ...deployCommandArgs]); + } + + /** + * cdk destroy + */ + public async destroy(options: DestroyOptions = {}) { + const destroyCommandArgs: string[] = [ + ...options.requireApproval ? [] : ['--force'], + ...renderBooleanArg('exclusively', options.exclusively), + ...this.createDefaultArguments(options), + ]; + + await this.exec(['destroy', ...destroyCommandArgs]); + } + + /** + * Configure default arguments shared by all commands + */ + private createDefaultArguments(options: SharedOptions): string[] { + const stacks = options.stacks ?? ['--all']; + return [ + ...renderBooleanArg('strict', options.strict), + ...renderBooleanArg('trace', options.trace), + ...renderBooleanArg('lookups', options.lookups), + ...renderBooleanArg('ignore-errors', options.ignoreErrors), + ...renderBooleanArg('json', options.json), + ...renderBooleanArg('verbose', options.verbose), + ...renderBooleanArg('debug', options.debug), + ...renderBooleanArg('ec2creds', options.ec2Creds), + ...renderBooleanArg('version-reporting', options.versionReporting), + ...renderBooleanArg('path-metadata', options.pathMetadata), + ...renderBooleanArg('asset-metadata', options.assetMetadata), + ...renderBooleanArg('notices', options.notices), + ...renderBooleanArg('color', options.color ?? (process.env.NO_COLOR ? false : undefined)), + ...options.context ? renderMapArrayArg('--context', options.context) : [], + ...options.profile ? ['--profile', options.profile] : [], + ...options.proxy ? ['--proxy', options.proxy] : [], + ...options.caBundlePath ? ['--ca-bundle-path', options.caBundlePath] : [], + ...options.roleArn ? ['--role-arn', options.roleArn] : [], + ...stacks, + ]; + } +} + +function renderMapArrayArg(flag: string, parameters: { [name: string]: string | undefined }): string[] { + const params: string[] = []; + for (const [key, value] of Object.entries(parameters)) { + params.push(`${key}=${value}`); + } + return renderArrayArg(flag, params); +} + +function renderArrayArg(flag: string, values?: string[]): string[] { + let args: string[] = []; + for (const value of values ?? []) { + args.push(flag, value); + } + return args; +} + +function renderBooleanArg(arg: string, value?: boolean): string[] { + if (value) { + return [`--${arg}`]; + } else if (value === undefined) { + return []; + } else { + return [`--no-${arg}`]; + } +} + +/** + * Run code from a different working directory + */ +async function changeDir(block: () => Promise, workingDir?: string) { + const originalWorkingDir = process.cwd(); + try { + if (workingDir) { + process.chdir(workingDir); + } + + return await block(); + + } finally { + if (workingDir) { + process.chdir(originalWorkingDir); + } + } +} + +/** + * Run code with additional environment variables + */ +async function withEnv(block: () => Promise, env: Record = {}) { + const originalEnv = process.env; + try { + process.env = { + ...originalEnv, + ...env, + }; + + return await block(); + + } finally { + process.env = originalEnv; + } +} diff --git a/packages/@aws-cdk/cli-lib/lib/commands/common.ts b/packages/@aws-cdk/cli-lib/lib/commands/common.ts new file mode 100644 index 0000000000000..a89c535441a76 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/lib/commands/common.ts @@ -0,0 +1,173 @@ +/** + * In what scenarios should the CLI ask for approval + */ +export enum RequireApproval { + /** + * Never ask for approval + */ + NEVER = 'never', + + /** + * Prompt for approval for any type of change to the stack + */ + ANYCHANGE = 'any-change', + + /** + * Only prompt for approval if there are security related changes + */ + BROADENING = 'broadening' +} + +/** + * AWS CDK CLI options that apply to all commands + */ +export interface SharedOptions { + /** + * List of stacks to deploy + * + * @default - all stacks + */ + readonly stacks?: string[]; + + /** + * Role to pass to CloudFormation for deployment + * + * @default - use the bootstrap cfn-exec role + */ + readonly roleArn?: string; + + /** + * Additional context + * + * @default - no additional context + */ + readonly context?: { [name: string]: string }; + + /** + * Print trace for stack warnings + * + * @default false + */ + readonly trace?: boolean; + + /** + * Do not construct stacks with warnings + * + * @default false + */ + readonly strict?: boolean; + + /** + * Perform context lookups. + * + * Synthesis fails if this is disabled and context lookups need + * to be performed + * + * @default true + */ + readonly lookups?: boolean; + + /** + * Ignores synthesis errors, which will likely produce an invalid output + * + * @default false + */ + readonly ignoreErrors?: boolean; + + /** + * Use JSON output instead of YAML when templates are printed + * to STDOUT + * + * @default false + */ + readonly json?: boolean; + + /** + * show debug logs + * + * @default false + */ + readonly verbose?: boolean; + + /** + * enable emission of additional debugging information, such as creation stack + * traces of tokens + * + * @default false + */ + readonly debug?: boolean; + + /** + * Use the indicated AWS profile as the default environment + * + * @default - no profile is used + */ + readonly profile?: string; + + /** + * Use the indicated proxy. Will read from + * HTTPS_PROXY environment if specified + * + * @default - no proxy + */ + readonly proxy?: string; + + /** + * Path to CA certificate to use when validating HTTPS + * requests. + * + * @default - read from AWS_CA_BUNDLE environment variable + */ + readonly caBundlePath?: string; + + /** + * Force trying to fetch EC2 instance credentials + * + * @default - guess EC2 instance status + */ + readonly ec2Creds?: boolean; + + /** + * Include "AWS::CDK::Metadata" resource in synthesized templates + * + * @default true + */ + readonly versionReporting?: boolean; + + /** + * Include "aws:cdk:path" CloudFormation metadata for each resource + * + * @default true + */ + readonly pathMetadata?: boolean; + + /** + * Include "aws:asset:*" CloudFormation metadata for resources that use assets + * + * @default true + */ + readonly assetMetadata?: boolean; + + /** + * Copy assets to the output directory + * + * Needed for local debugging the source files with SAM CLI + * + * @default false + */ + readonly staging?: boolean; + + /** + * Show relevant notices + * + * @default true + */ + readonly notices?: boolean; + + /** + * Show colors and other style from console output + * + * @default - `true` unless the environment variable `NO_COLOR` is set + */ + readonly color?: boolean; +} diff --git a/packages/@aws-cdk/cli-lib/lib/commands/deploy.ts b/packages/@aws-cdk/cli-lib/lib/commands/deploy.ts new file mode 100644 index 0000000000000..4f98598735bb9 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/lib/commands/deploy.ts @@ -0,0 +1,123 @@ +import { SharedOptions, RequireApproval } from './common'; + +/** + * Options to use with cdk deploy + */ +export interface DeployOptions extends SharedOptions { + /** + * Only perform action on the given stack + * + * @default false + */ + readonly exclusively?: boolean; + + /** + * Name of the toolkit stack to use/deploy + * + * @default CDKToolkit + */ + readonly toolkitStackName?: string; + + /** + * Reuse the assets with the given asset IDs + * + * @default - do not reuse assets + */ + readonly reuseAssets?: string[]; + + /** + * Optional name to use for the CloudFormation change set. + * If not provided, a name will be generated automatically. + * + * @default - auto generate a name + */ + readonly changeSetName?: string; + + /** + * Always deploy, even if templates are identical. + * + * @default false + */ + readonly force?: boolean; + + /** + * Rollback failed deployments + * + * @default true + */ + readonly rollback?: boolean; + + /** + * ARNs of SNS topics that CloudFormation will notify with stack related events + * + * @default - no notifications + */ + readonly notificationArns?: string[]; + + /** + * What kind of security changes require approval + * + * @default RequireApproval.Never + */ + readonly requireApproval?: RequireApproval; + + /** + * Whether to execute the ChangeSet + * Not providing `execute` parameter will result in execution of ChangeSet + * @default true + */ + readonly execute?: boolean; + + /** + * Additional parameters for CloudFormation at deploy time + * @default {} + */ + readonly parameters?: { [name: string]: string }; + + /** + * Use previous values for unspecified parameters + * + * If not set, all parameters must be specified for every deployment. + * + * @default true + */ + readonly usePreviousParameters?: boolean; + + /** + * Path to file where stack outputs will be written after a successful deploy as JSON + * @default - Outputs are not written to any file + */ + readonly outputsFile?: string; + + /** + * Whether we are on a CI system + * + * @default - `false` unless the environment variable `CI` is set + */ + readonly ci?: boolean; + + /** + * Display mode for stack activity events + * + * The default in the CLI is StackActivityProgress.BAR. But since this is an API + * it makes more sense to set the default to StackActivityProgress.EVENTS + * + * @default StackActivityProgress.EVENTS + */ + readonly progress?: StackActivityProgress; +} + +/** + * Supported display modes for stack deployment activity + */ +export enum StackActivityProgress { + /** + * Displays a progress bar with only the events for the resource currently being deployed + */ + BAR = 'bar', + + /** + * Displays complete history with all CloudFormation stack events + */ + EVENTS = 'events', +} diff --git a/packages/@aws-cdk/cli-lib/lib/commands/destroy.ts b/packages/@aws-cdk/cli-lib/lib/commands/destroy.ts new file mode 100644 index 0000000000000..5879f1a899fb9 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/lib/commands/destroy.ts @@ -0,0 +1,20 @@ +import { SharedOptions } from './common'; + +/** + * Options to use with cdk destroy + */ +export interface DestroyOptions extends SharedOptions { + /** + * Should the script prompt for approval before destroying stacks + * + * @default false + */ + readonly requireApproval?: boolean; + + /** + * Only destroy the given stack + * + * @default false + */ + readonly exclusively?: boolean; +} diff --git a/packages/@aws-cdk/cli-lib/lib/commands/index.ts b/packages/@aws-cdk/cli-lib/lib/commands/index.ts new file mode 100644 index 0000000000000..67262acc1d480 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/lib/commands/index.ts @@ -0,0 +1,5 @@ +export * from './common'; +export * from './deploy'; +export * from './destroy'; +export * from './list'; +export * from './synth'; diff --git a/packages/@aws-cdk/cli-lib/lib/commands/list.ts b/packages/@aws-cdk/cli-lib/lib/commands/list.ts new file mode 100644 index 0000000000000..28755aa1d6053 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/lib/commands/list.ts @@ -0,0 +1,13 @@ +import { SharedOptions } from './common'; + +/** + * Options for cdk list + */ +export interface ListOptions extends SharedOptions { + /** + * Display environment information for each stack + * + * @default false + */ + readonly long?: boolean; +} diff --git a/packages/@aws-cdk/cli-lib/lib/commands/synth.ts b/packages/@aws-cdk/cli-lib/lib/commands/synth.ts new file mode 100644 index 0000000000000..6059435206699 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/lib/commands/synth.ts @@ -0,0 +1,28 @@ +import { SharedOptions } from './common'; + +/** + * Options to use with cdk synth + */ +export interface SynthOptions extends SharedOptions { + + /** + * After synthesis, validate stacks with the "validateOnSynth" + * attribute set (can also be controlled with CDK_VALIDATION) + * + * @default true; + */ + readonly validation?: boolean; + + /** + * Do not output CloudFormation Template to stdout + * @default false; + */ + readonly quiet?: boolean; + + /** + * Only synthesize the given stack + * + * @default false + */ + readonly exclusively?: boolean; +} diff --git a/packages/@aws-cdk/cli-lib/lib/index.ts b/packages/@aws-cdk/cli-lib/lib/index.ts new file mode 100644 index 0000000000000..6b4eafdae746a --- /dev/null +++ b/packages/@aws-cdk/cli-lib/lib/index.ts @@ -0,0 +1,2 @@ +export * from './cli'; +export * from './commands'; diff --git a/packages/@aws-cdk/cli-lib/package.json b/packages/@aws-cdk/cli-lib/package.json new file mode 100644 index 0000000000000..19fcfc134a9b8 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/package.json @@ -0,0 +1,117 @@ +{ + "name": "@aws-cdk/cli-lib", + "description": "AWS CDK Programmatic CLI library", + "version": "0.0.0", + "private": true, + "main": "lib/main.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.Cli.Lib", + "packageId": "Amazon.CDK.Cli.Lib", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.cli.lib", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "cdk-cli-lib" + } + }, + "python": { + "distName": "aws-cdk.cli-lib", + "module": "aws_cdk.cli_lib", + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 2" + ] + } + }, + "projectReferences": true, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "scripts": { + "attribute": "node-bundle validate --external=fsevents:optional --entrypoint=lib/index.js --fix --dont-attribute \"^@aws-cdk/|^cdk-assets$|^cdk-cli-wrapper$|^aws-cdk$\"", + "awslint": "cdk-awslint", + "build": "cdk-build", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test": "yarn build && yarn test", + "build+test+extract": "yarn build+test && yarn rosetta:extract", + "build+test+package": "yarn build+test && yarn package", + "bundle": "esbuild --bundle lib/index.ts --target=node14 --platform=node --external:fsevents --outfile=lib/main.js", + "compat": "cdk-compat", + "gen": "../../../packages/aws-cdk/generate.sh", + "lint": "cdk-lint", + "package": "cdk-package", + "pkglint": "pkglint -f", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "test": "cdk-test", + "watch": "cdk-watch" + }, + "awslint": { + "exclude": [ + "construct-ctor:@aws-cdk/cli-lib.AwsCdkCli" + ] + }, + "cdk-build": { + "post": [ + "yarn attribute", + "cp ../../../node_modules/vm2/lib/bridge.js ../../../node_modules/vm2/lib/setup-sandbox.js ./lib", + "yarn bundle" + ], + "env": { + "AWSLINT_BASE_CONSTRUCT": true + } + }, + "ubergen": { + "exclude": true + }, + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/core": "0.0.0", + "@aws-cdk/node-bundle": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@types/jest": "^27.5.2", + "@types/node": "^14.18.36", + "aws-cdk": "0.0.0", + "constructs": "^10.0.0", + "jest": "^27.5.1", + "ts-node": "^10.9.1" + }, + "repository": { + "url": "https://github.com/aws/aws-cdk.git", + "type": "git", + "directory": "packages/@aws-cdk/cli-lib" + }, + "keywords": [ + "aws", + "cdk" + ], + "homepage": "https://github.com/aws/aws-cdk", + "separate-module": true, + "engines": { + "node": ">= 14.15.0" + }, + "stability": "experimental", + "maturity": "experimental", + "publishConfig": { + "tag": "latest" + }, + "awscdkio": { + "announce": false + } +} diff --git a/packages/@aws-cdk/cli-lib/rosetta/default.ts-fixture b/packages/@aws-cdk/cli-lib/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e068db5d7f126 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/rosetta/default.ts-fixture @@ -0,0 +1,13 @@ +// Fixture with an AwsCdkCli set up +import * as cdk from '@aws-cdk/core'; +import { AwsCdkCli } from '@aws-cdk/cli-lib'; + +const cli = AwsCdkCli.fromCloudAssemblyDirectoryProducer({ + produce: async (context: Record) => { + const app = new cdk.App({ context }); + const stack = new cdk.Stack(app, 'MyTestStack'); + return app.synth().directory; + } +}); + +/// here diff --git a/packages/@aws-cdk/cli-lib/rosetta/imports.ts-fixture b/packages/@aws-cdk/cli-lib/rosetta/imports.ts-fixture new file mode 100644 index 0000000000000..0baefc25ac1c5 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/rosetta/imports.ts-fixture @@ -0,0 +1,5 @@ +// Fixture with imports, but nothing else +import * as cdk from '@aws-cdk/core'; +import { AwsCdkCli, ICloudAssemblyDirectoryProducer } from '@aws-cdk/cli-lib'; + +/// here diff --git a/packages/@aws-cdk/cli-lib/rosetta/producer.ts-fixture b/packages/@aws-cdk/cli-lib/rosetta/producer.ts-fixture new file mode 100644 index 0000000000000..01845e841ee6f --- /dev/null +++ b/packages/@aws-cdk/cli-lib/rosetta/producer.ts-fixture @@ -0,0 +1,13 @@ +// Fixture with imports, but nothing else +import * as cdk from '@aws-cdk/core'; +import { AwsCdkCli, ICloudAssemblyDirectoryProducer } from '@aws-cdk/cli-lib'; + +class MyProducer implements ICloudAssemblyDirectoryProducer { + async produce(context: Record) { + const app = new cdk.App({ context }); + const stack = new cdk.Stack(app); + return app.synth().directory; + } +} + +/// here diff --git a/packages/@aws-cdk/cli-lib/test/cli.test.ts b/packages/@aws-cdk/cli-lib/test/cli.test.ts new file mode 100644 index 0000000000000..48f33d712d789 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/test/cli.test.ts @@ -0,0 +1,109 @@ +import { join } from 'path'; +import * as core from '@aws-cdk/core'; +import * as cli from 'aws-cdk/lib'; +import { AwsCdkCli } from '../lib'; + +// These tests synthesize an actual CDK app and take a bit longer +jest.setTimeout(20_000); + +jest.mock('aws-cdk/lib', () => { + const original = jest.requireActual('aws-cdk/lib'); + return { + ...original, + exec: jest.fn(original.exec), + }; +}); +const stdoutMock = jest.spyOn(process.stdout, 'write').mockImplementation(() => { return true; }); + +beforeEach(() => { + stdoutMock.mockClear(); + jest.mocked(cli.exec).mockClear(); +}); + +describe('fromCloudAssemblyDirectoryProducer', () => { + const testEnv = jest.fn(); + const cdk = AwsCdkCli.fromCloudAssemblyDirectoryProducer({ + produce: async () => { + const app = new core.App(); + new core.Stack(app, 'Stack1'); + new core.Stack(app, 'Stack2'); + + testEnv(process.env); + + return app.synth().directory; + }, + }); + + beforeEach(() => { + testEnv.mockClear(); + }); + + test('can list all stacks in app', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--all'], + expect.anything(), + ); + expect(stdoutMock.mock.calls[0][0]).toContain('Stack1'); + expect(stdoutMock.mock.calls[1][0]).toContain('Stack2'); + }); + + test('does set CDK_DEBUG', async () => { + // WHEN + await cdk.list({ debug: true }); + + // THEN + expect(testEnv.mock.calls[0][0]).toHaveProperty('CDK_DEBUG', 'true'); + }); + + test('does not set CDK_DEBUG when ', async () => { + // WHEN + await cdk.list({ debug: false }); + + // THEN + expect(testEnv.mock.calls[0][0]).not.toHaveProperty('CDK_DEBUG'); + }); +}); + + +describe('fromDirectory', () => { + const cdk = AwsCdkCli.fromCdkAppDirectory(join(__dirname, 'test-app')); + + test('can list all stacks in cdk app', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--all'], + ); + expect(stdoutMock.mock.calls[0][0]).toContain('AppStack1'); + expect(stdoutMock.mock.calls[1][0]).toContain('AppStack2'); + }); +}); + +describe('fromDirectory with config', () => { + const cdk = AwsCdkCli.fromCdkAppDirectory(join(__dirname, 'test-app'), { + app: 'node -r ts-node/register app.ts', + output: 'cdk.out', + }); + + test('can list all stacks in cdk app', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'ls', '--all', + '--app', 'node -r ts-node/register app.ts', + '--output', 'cdk.out', + ], + ); + expect(stdoutMock.mock.calls[0][0]).toContain('AppStack1'); + expect(stdoutMock.mock.calls[1][0]).toContain('AppStack2'); + }); +}); diff --git a/packages/@aws-cdk/cli-lib/test/commands.test.ts b/packages/@aws-cdk/cli-lib/test/commands.test.ts new file mode 100644 index 0000000000000..d76c60f5bb156 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/test/commands.test.ts @@ -0,0 +1,300 @@ +import * as core from '@aws-cdk/core'; +import * as cli from 'aws-cdk/lib'; +import { AwsCdkCli } from '../lib'; +import { RequireApproval, StackActivityProgress } from '../lib/commands'; + +jest.mock('aws-cdk/lib'); +jest.mocked(cli.exec).mockResolvedValue(0); + +afterEach(() => { + jest.mocked(cli.exec).mockClear(); +}); + +const cdk = AwsCdkCli.fromCloudAssemblyDirectoryProducer({ + produce: async () => { + const app = new core.App(); + new core.Stack(app, 'Stack1'); + new core.Stack(app, 'Stack2'); + + return app.synth().directory; + }, +}); + +describe('deploy', () => { + test('default deploy', async () => { + // WHEN + await await cdk.deploy(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['deploy', '--progress', 'events', '--all'], + expect.anything(), + ); + }); + + + test('deploy with all arguments', async () => { + // WHEN + await await cdk.deploy({ + stacks: ['Stack1'], + ci: false, + json: true, + color: false, + debug: false, + force: true, + proxy: 'https://proxy', + trace: false, + strict: false, + execute: true, + lookups: false, + notices: true, + profile: 'my-profile', + roleArn: 'arn:aws:iam::1111111111:role/my-role', + staging: false, + verbose: true, + ec2Creds: true, + rollback: false, + exclusively: true, + outputsFile: 'outputs.json', + reuseAssets: [ + 'asset1234', + 'asset5678', + ], + caBundlePath: '/some/path', + ignoreErrors: false, + pathMetadata: false, + assetMetadata: true, + changeSetName: 'my-change-set', + requireApproval: RequireApproval.NEVER, + toolkitStackName: 'Toolkit', + versionReporting: true, + usePreviousParameters: true, + progress: StackActivityProgress.BAR, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + expect.arrayContaining([ + 'deploy', + '--no-ci', + '--execute', + '--exclusively', + '--force', + '--previous-parameters', + '--no-rollback', + '--no-staging', + '--reuse-assets', 'asset1234', + '--reuse-assets', 'asset5678', + '--outputs-file', 'outputs.json', + '--require-approval', 'never', + '--change-set-name', 'my-change-set', + '--toolkit-stack-name', 'Toolkit', + '--progress', 'bar', + '--no-strict', + '--no-trace', + '--no-lookups', + '--no-ignore-errors', + '--json', + '--verbose', + '--no-debug', + '--ec2creds', + '--version-reporting', + '--no-path-metadata', + '--asset-metadata', + '--notices', + '--no-color', + '--profile', 'my-profile', + '--proxy', 'https://proxy', + '--ca-bundle-path', '/some/path', + '--role-arn', 'arn:aws:iam::1111111111:role/my-role', + 'Stack1', + ]), + expect.anything(), + ); + }); + + + test('can parse boolean arguments', async () => { + // WHEN + await await cdk.deploy({ + stacks: ['Stack1'], + json: true, + color: false, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--progress', 'events', + '--json', + '--no-color', + 'Stack1', + ], + expect.anything(), + ); + }); + + test('can parse parameters', async() => { + // WHEN + await await cdk.deploy({ + stacks: ['Stack1'], + parameters: { + 'myparam': 'test', + 'Stack1:myotherparam': 'test', + }, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--parameters', 'myparam=test', + '--parameters', 'Stack1:myotherparam=test', + '--progress', 'events', + 'Stack1', + ], + expect.anything(), + ); + }); + + + test('can parse context', async () => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + context: { + 'myContext': 'value', + 'Stack1:OtherContext': 'otherValue', + }, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--progress', 'events', + '--context', 'myContext=value', + '--context', 'Stack1:OtherContext=otherValue', + 'Stack1', + ], + expect.anything(), + ); + }); + + test('can parse array arguments', async () => { + // WHEN + await cdk.deploy({ + stacks: ['Stack1'], + notificationArns: [ + 'arn:aws:us-east-1:1111111111:some:resource', + 'arn:aws:us-east-1:1111111111:some:other-resource', + ], + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + [ + 'deploy', + '--notification-arns', 'arn:aws:us-east-1:1111111111:some:resource', + '--notification-arns', 'arn:aws:us-east-1:1111111111:some:other-resource', + '--progress', 'events', + 'Stack1', + ], + expect.anything(), + ); + }); +}); + +describe('synth', () => { + test('default synth', async () => { + // WHEN + await cdk.synth(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['synth', '--all'], + expect.anything(), + ); + }); + + test('synth arguments', async () => { + // WHEN + await cdk.synth({ + stacks: ['Stack1'], + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['synth', 'Stack1'], + expect.anything(), + ); + }); +}); + +describe('destroy', () => { + test('default destroy', async () => { + // WHEN + await cdk.destroy(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['destroy', '--force', '--all'], + expect.anything(), + ); + }); + + test('destroy arguments', async () => { + // WHEN + await cdk.destroy({ + stacks: ['Stack1'], + requireApproval: true, + exclusively: false, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['destroy', '--no-exclusively', 'Stack1'], + expect.anything(), + ); + }); +}); + + +describe('list', () => { + test('default list', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--all'], + expect.anything(), + ); + }); + + test('list arguments', async () => { + // WHEN + await cdk.list({ + stacks: ['*'], + long: true, + }); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--long', '*'], + expect.anything(), + ); + }); + + test('list without options', async () => { + // WHEN + await cdk.list(); + + // THEN + expect(jest.mocked(cli.exec)).toHaveBeenCalledWith( + ['ls', '--all'], + expect.anything(), + ); + }); +}); diff --git a/packages/@aws-cdk/cli-lib/test/test-app/app.ts b/packages/@aws-cdk/cli-lib/test/test-app/app.ts new file mode 100644 index 0000000000000..340658c632472 --- /dev/null +++ b/packages/@aws-cdk/cli-lib/test/test-app/app.ts @@ -0,0 +1,7 @@ +import * as cdk from '@aws-cdk/core'; + +const app = new cdk.App(); +new cdk.Stack(app, 'AppStack1'); +new cdk.Stack(app, 'AppStack2'); + +app.synth(); diff --git a/packages/@aws-cdk/cli-lib/test/test-app/cdk.json b/packages/@aws-cdk/cli-lib/test/test-app/cdk.json new file mode 100644 index 0000000000000..7f138728ebb7d --- /dev/null +++ b/packages/@aws-cdk/cli-lib/test/test-app/cdk.json @@ -0,0 +1,3 @@ +{ + "app": "node app.js" +} diff --git a/packages/@aws-cdk/core/lib/app.ts b/packages/@aws-cdk/core/lib/app.ts index ea72e4be2ca6a..1ae43828c8c3e 100644 --- a/packages/@aws-cdk/core/lib/app.ts +++ b/packages/@aws-cdk/core/lib/app.ts @@ -1,7 +1,9 @@ import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import * as fs from 'fs-extra'; +import { PRIVATE_CONTEXT_DEFAULT_STACK_SYNTHESIZER } from './private/private-context'; import { addCustomSynthesis, ICustomSynthesis } from './private/synthesis'; +import { IReusableStackSynthesizer } from './stack-synthesizers'; import { Stage } from './stage'; const APP_SYMBOL = Symbol.for('@aws-cdk/core.App'); @@ -105,6 +107,17 @@ export interface AppProps { * @default true */ readonly treeMetadata?: boolean; + + /** + * The stack synthesizer to use by default for all Stacks in the App + * + * The Stack Synthesizer controls aspects of synthesis and deployment, + * like how assets are referenced and what IAM roles to use. For more + * information, see the README of the main CDK package. + * + * @default - A `DefaultStackSynthesizer` with default settings + */ + readonly defaultStackSynthesizer?: IReusableStackSynthesizer; } /** @@ -156,6 +169,10 @@ export class App extends Stage { this.node.setContext(cxapi.DISABLE_METADATA_STACK_TRACE, true); } + if (props.defaultStackSynthesizer) { + this.node.setContext(PRIVATE_CONTEXT_DEFAULT_STACK_SYNTHESIZER, props.defaultStackSynthesizer); + } + const analyticsReporting = props.analyticsReporting ?? props.runtimeInfo; if (analyticsReporting !== undefined) { diff --git a/packages/@aws-cdk/core/lib/environment.ts b/packages/@aws-cdk/core/lib/environment.ts index a43ec37f3472c..794aeeaaad200 100644 --- a/packages/@aws-cdk/core/lib/environment.ts +++ b/packages/@aws-cdk/core/lib/environment.ts @@ -9,7 +9,7 @@ export interface Environment { * indicates that account ID will only be determined during deployment (it * will resolve to the CloudFormation intrinsic `{"Ref":"AWS::AccountId"}`). * Note that certain features, such as cross-stack references and - * environmental context providers require concerete region information and + * environmental context providers require concrete region information and * will cause this stack to emit synthesis errors. * * @default Aws.ACCOUNT_ID which means that the stack will be account-agnostic. diff --git a/packages/@aws-cdk/core/lib/private/private-context.ts b/packages/@aws-cdk/core/lib/private/private-context.ts new file mode 100644 index 0000000000000..33af8a5561ea2 --- /dev/null +++ b/packages/@aws-cdk/core/lib/private/private-context.ts @@ -0,0 +1,10 @@ +/** + * Some construct-tree wide config we pass via context, because it's convenient. + * + * Users shouldn't touch these, and to make sure they don't we make sure the + * context keys have an unguessable prefix that is different on each execution. + */ + +const PREFIX = `aws-cdk-private:${Math.random()}:`; + +export const PRIVATE_CONTEXT_DEFAULT_STACK_SYNTHESIZER = `${PREFIX}core/defaultStackSynthesizer`; \ No newline at end of file diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/bootstrapless-synthesizer.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/bootstrapless-synthesizer.ts index 2f25e0a635228..c48f476fc0d22 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/bootstrapless-synthesizer.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/bootstrapless-synthesizer.ts @@ -33,6 +33,9 @@ export interface BootstraplessSynthesizerProps { * However, it will not assume asset buckets or repositories have been created, * and therefore does not support assets. * + * The name is poorly chosen -- it does still require bootstrapping, it just + * does not support assets. + * * Used by the CodePipeline construct for the support stacks needed for * cross-region replication S3 buckets. App builders do not need to use this * synthesizer directly. diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/cli-credentials-synthesizer.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/cli-credentials-synthesizer.ts index 66857c02b0b08..10dd38ea67a23 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/cli-credentials-synthesizer.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/cli-credentials-synthesizer.ts @@ -6,7 +6,7 @@ import { assertBound, StringSpecializer } from './_shared'; import { AssetManifestBuilder } from './asset-manifest-builder'; import { BOOTSTRAP_QUALIFIER_CONTEXT, DefaultStackSynthesizer } from './default-synthesizer'; import { StackSynthesizer } from './stack-synthesizer'; -import { ISynthesisSession } from './types'; +import { ISynthesisSession, IReusableStackSynthesizer, IBoundStackSynthesizer } from './types'; /** * Properties for the CliCredentialsStackSynthesizer @@ -86,7 +86,7 @@ export interface CliCredentialsStackSynthesizerProps { * of the Bootstrap Stack V2 (also known as "modern bootstrap stack"). You can override * the default names using the synthesizer's construction properties. */ -export class CliCredentialsStackSynthesizer extends StackSynthesizer { +export class CliCredentialsStackSynthesizer extends StackSynthesizer implements IReusableStackSynthesizer, IBoundStackSynthesizer { private qualifier?: string; private bucketName?: string; private repositoryName?: string; @@ -140,6 +140,18 @@ export class CliCredentialsStackSynthesizer extends StackSynthesizer { /* eslint-enable max-len */ } + /** + * Produce a bound Stack Synthesizer for the given stack. + * + * This method may be called more than once on the same object. + */ + public reusableBind(stack: Stack): IBoundStackSynthesizer { + // Create a copy of the current object and bind that + const copy = Object.create(this); + copy.bind(stack); + return copy; + } + public addFileAsset(asset: FileAssetSource): FileAssetLocation { assertBound(this.bucketName); diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts index 6d5aa60a3517f..8b44f970fe8c5 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts @@ -5,7 +5,7 @@ import { Token } from '../token'; import { assertBound, StringSpecializer } from './_shared'; import { AssetManifestBuilder } from './asset-manifest-builder'; import { StackSynthesizer } from './stack-synthesizer'; -import { ISynthesisSession } from './types'; +import { ISynthesisSession, IReusableStackSynthesizer, IBoundStackSynthesizer } from './types'; export const BOOTSTRAP_QUALIFIER_CONTEXT = '@aws-cdk/core:bootstrapQualifier'; @@ -227,7 +227,7 @@ export interface DefaultStackSynthesizerProps { * check to the template, to make sure the bootstrap stack is recent enough * to support all features expected by this synthesizer. */ -export class DefaultStackSynthesizer extends StackSynthesizer { +export class DefaultStackSynthesizer extends StackSynthesizer implements IReusableStackSynthesizer, IBoundStackSynthesizer { /** * Default ARN qualifier */ @@ -324,6 +324,18 @@ export class DefaultStackSynthesizer extends StackSynthesizer { } } + /** + * Produce a bound Stack Synthesizer for the given stack. + * + * This method may be called more than once on the same object. + */ + public reusableBind(stack: Stack): IBoundStackSynthesizer { + // Create a copy of the current object and bind that + const copy = Object.create(this); + copy.bind(stack); + return copy; + } + /** * The qualifier used to bootstrap this stack */ diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/legacy.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/legacy.ts index 3b2cc5d1a4f45..23d6af8ee5522 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/legacy.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/legacy.ts @@ -4,9 +4,10 @@ import { Construct } from 'constructs'; import { DockerImageAssetLocation, DockerImageAssetSource, FileAssetLocation, FileAssetSource } from '../assets'; import { Fn } from '../cfn-fn'; import { FileAssetParameters } from '../private/asset-parameters'; +import { Stack } from '../stack'; import { assertBound } from './_shared'; import { StackSynthesizer } from './stack-synthesizer'; -import { ISynthesisSession } from './types'; +import { ISynthesisSession, IReusableStackSynthesizer, IBoundStackSynthesizer } from './types'; /** * The well-known name for the docker image asset ECR repository. All docker @@ -44,7 +45,7 @@ const ASSETS_ECR_REPOSITORY_NAME_OVERRIDE_CONTEXT_KEY = 'assets-ecr-repository-n * This is the only StackSynthesizer that supports customizing asset behavior * by overriding `Stack.addFileAsset()` and `Stack.addDockerImageAsset()`. */ -export class LegacyStackSynthesizer extends StackSynthesizer { +export class LegacyStackSynthesizer extends StackSynthesizer implements IReusableStackSynthesizer, IBoundStackSynthesizer { private cycle = false; /** @@ -109,6 +110,18 @@ export class LegacyStackSynthesizer extends StackSynthesizer { this.emitArtifact(session); } + /** + * Produce a bound Stack Synthesizer for the given stack. + * + * This method may be called more than once on the same object. + */ + public reusableBind(stack: Stack): IBoundStackSynthesizer { + // Create a copy of the current object and bind that + const copy = Object.create(this); + copy.bind(stack); + return copy; + } + private doAddDockerImageAsset(asset: DockerImageAssetSource): DockerImageAssetLocation { // check if we have an override from context const repositoryNameOverride = this.boundStack.node.tryGetContext(ASSETS_ECR_REPOSITORY_NAME_OVERRIDE_CONTEXT_KEY); diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/types.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/types.ts index 18c437da224da..6fa04b14cbcb3 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/types.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/types.ts @@ -16,7 +16,7 @@ export interface IStackSynthesizer { /** * Bind to the stack this environment is going to be used on * - * Must be called before any of the other methods are called. + * Must be called before any of the other methods are called, and can only be called once. */ bind(stack: Stack): void; @@ -40,6 +40,33 @@ export interface IStackSynthesizer { synthesize(session: ISynthesisSession): void; } +/** + * Interface for Stack Synthesizers that can be used for more than one stack. + * + * Regular `IStackSynthesizer` instances can only be bound to a Stack once. + * `IReusableStackSynthesizer` instances. + * + * For backwards compatibility reasons, this class inherits from + * `IStackSynthesizer`, but if an object implements `IReusableStackSynthesizer`, + * no other methods than `reusableBind()` will be called. + */ +export interface IReusableStackSynthesizer extends IStackSynthesizer { + /** + * Produce a bound Stack Synthesizer for the given stack. + * + * This method may be called more than once on the same object. + */ + reusableBind(stack: Stack): IBoundStackSynthesizer; +} + +/** + * A Stack Synthesizer, obtained from `IReusableStackSynthesizer.` + * + * Just a type alias with a very concrete contract. + */ +export interface IBoundStackSynthesizer extends IStackSynthesizer { +} + /** * Represents a single session of synthesis. Passed into `Construct.synthesize()` methods. */ @@ -61,3 +88,10 @@ export interface ISynthesisSession { */ validateOnSynth?: boolean; } + +/** + * Whether the given Stack Synthesizer is reusable or not + */ +export function isReusableStackSynthesizer(x: IStackSynthesizer): x is IReusableStackSynthesizer { + return !!(x as any).reusableBind; +} \ No newline at end of file diff --git a/packages/@aws-cdk/core/lib/stack.ts b/packages/@aws-cdk/core/lib/stack.ts index 660f841aead19..8184b6a91abad 100644 --- a/packages/@aws-cdk/core/lib/stack.ts +++ b/packages/@aws-cdk/core/lib/stack.ts @@ -123,8 +123,17 @@ export interface StackProps { /** * Synthesis method to use while deploying this stack * - * @default - `DefaultStackSynthesizer` if the `@aws-cdk/core:newStyleStackSynthesis` feature flag - * is set, `LegacyStackSynthesizer` otherwise. + * The Stack Synthesizer controls aspects of synthesis and deployment, + * like how assets are referenced and what IAM roles to use. For more + * information, see the README of the main CDK package. + * + * If not specified, the `defaultStackSynthesizer` from `App` will be used. + * If that is not specified, `DefaultStackSynthesizer` is used if + * `@aws-cdk/core:newStyleStackSynthesis` is set to `true` or the CDK major + * version is v2. In CDK v1 `LegacyStackSynthesizer` is the default if no + * other synthesizer is specified. + * + * @default - The synthesizer specified on `App`, or `DefaultStackSynthesizer` otherwise. */ readonly synthesizer?: IStackSynthesizer; @@ -230,14 +239,14 @@ export class Stack extends Construct implements ITaggable { * This value is resolved according to the following rules: * * 1. The value provided to `env.region` when the stack is defined. This can - * either be a concerete region (e.g. `us-west-2`) or the `Aws.REGION` + * either be a concrete region (e.g. `us-west-2`) or the `Aws.REGION` * token. * 3. `Aws.REGION`, which is represents the CloudFormation intrinsic reference * `{ "Ref": "AWS::Region" }` encoded as a string token. * * Preferably, you should use the return value as an opaque string and not * attempt to parse it to implement your logic. If you do, you must first - * check that it is a concerete value an not an unresolved token. If this + * check that it is a concrete value an not an unresolved token. If this * value is an unresolved token (`Token.isUnresolved(stack.region)` returns * `true`), this implies that the user wishes that this stack will synthesize * into a **region-agnostic template**. In this case, your code should either @@ -259,7 +268,7 @@ export class Stack extends Construct implements ITaggable { * * Preferably, you should use the return value as an opaque string and not * attempt to parse it to implement your logic. If you do, you must first - * check that it is a concerete value an not an unresolved token. If this + * check that it is a concrete value an not an unresolved token. If this * value is an unresolved token (`Token.isUnresolved(stack.account)` returns * `true`), this implies that the user wishes that this stack will synthesize * into a **account-agnostic template**. In this case, your code should either @@ -427,10 +436,18 @@ export class Stack extends Construct implements ITaggable { this._versionReportingEnabled = (props.analyticsReporting ?? this.node.tryGetContext(cxapi.ANALYTICS_REPORTING_ENABLED_CONTEXT)) && !this.nestedStackParent; - this.synthesizer = props.synthesizer ?? (newStyleSynthesisContext - ? new DefaultStackSynthesizer() - : new LegacyStackSynthesizer()); - this.synthesizer.bind(this); + const synthesizer = (props.synthesizer + ?? this.node.tryGetContext(PRIVATE_CONTEXT_DEFAULT_STACK_SYNTHESIZER) + ?? (newStyleSynthesisContext ? new DefaultStackSynthesizer() : new LegacyStackSynthesizer())); + + if (isReusableStackSynthesizer(synthesizer)) { + // Produce a fresh instance for each stack (should have been the default behavior) + this.synthesizer = synthesizer.reusableBind(this); + } else { + // Bind the single instance in-place to the current stack (backwards compat) + this.synthesizer = synthesizer; + this.synthesizer.bind(this); + } props.permissionsBoundary?._bind(this); @@ -1691,7 +1708,7 @@ import { FileSystem } from './fs'; import { Names } from './names'; import { Reference } from './reference'; import { IResolvable } from './resolvable'; -import { DefaultStackSynthesizer, IStackSynthesizer, ISynthesisSession, LegacyStackSynthesizer, BOOTSTRAP_QUALIFIER_CONTEXT } from './stack-synthesizers'; +import { DefaultStackSynthesizer, IStackSynthesizer, ISynthesisSession, LegacyStackSynthesizer, BOOTSTRAP_QUALIFIER_CONTEXT, isReusableStackSynthesizer } from './stack-synthesizers'; import { StringSpecializer } from './stack-synthesizers/_shared'; import { Stage } from './stage'; import { ITaggable, TagManager } from './tag-manager'; @@ -1699,4 +1716,5 @@ import { Token, Tokenization } from './token'; import { getExportable } from './private/refs'; import { Fact, RegionInfo } from '@aws-cdk/region-info'; import { deployTimeLookup } from './private/region-lookup'; -import { makeUniqueResourceName } from './private/unique-resource-name'; +import { makeUniqueResourceName } from './private/unique-resource-name';import { PRIVATE_CONTEXT_DEFAULT_STACK_SYNTHESIZER } from './private/private-context'; + diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 9821ec4495478..705dfa5fb96da 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -126,6 +126,8 @@ "construct-interface-extends-iconstruct:@aws-cdk/core.ICustomResourceProvider", "props-physical-name:@aws-cdk/core.CustomResourceProps", "integ-return-type:@aws-cdk/core.IStackSynthesizer.bind", + "integ-return-type:@aws-cdk/core.IBoundStackSynthesizer.bind", + "integ-return-type:@aws-cdk/core.IReusableStackSynthesizer.bind", "props-no-any:@aws-cdk/core.CfnJsonProps.value" ] }, diff --git a/packages/@aws-cdk/core/test/stack-synthesis/clicreds-synthesis.test.ts b/packages/@aws-cdk/core/test/stack-synthesis/clicreds-synthesis.test.ts index 3fab5ef7e0b5f..84229aa34e7fd 100644 --- a/packages/@aws-cdk/core/test/stack-synthesis/clicreds-synthesis.test.ts +++ b/packages/@aws-cdk/core/test/stack-synthesis/clicreds-synthesis.test.ts @@ -207,16 +207,15 @@ describe('CLI creds synthesis', () => { expect(imageTag).toEqual('test-prefix-docker-asset-hash'); }); - test('cannot use same synthesizer for multiple stacks', () => { + test('can use same synthesizer for multiple stacks', () => { // GIVEN const synthesizer = new CliCredentialsStackSynthesizer(); // WHEN new Stack(app, 'Stack2', { synthesizer }); - expect(() => { - new Stack(app, 'Stack3', { synthesizer }); - }).toThrow(/A StackSynthesizer can only be used for one Stack/); + new Stack(app, 'Stack3', { synthesizer }); + app.synth(); }); }); diff --git a/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts b/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts index 0208d01e42bb9..2be3a7e008cd7 100644 --- a/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts +++ b/packages/@aws-cdk/core/test/stack-synthesis/new-style-synthesis.test.ts @@ -12,9 +12,10 @@ const CFN_CONTEXT = { 'AWS::URLSuffix': 'domain.aws', }; -let app: App; -let stack: Stack; describe('new style synthesis', () => { + let app: App; + let stack: Stack; + beforeEach(() => { app = new App({ context: { @@ -400,17 +401,64 @@ describe('new style synthesis', () => { expect(imageTag).toEqual('test-prefix-docker-asset-hash'); }); - test('cannot use same synthesizer for multiple stacks', () => { + test('can use same synthesizer for multiple stacks', () => { // GIVEN - const synthesizer = new DefaultStackSynthesizer(); + const synthesizer = new DefaultStackSynthesizer({ + bootstrapStackVersionSsmParameter: 'bleep', + }); // WHEN - new Stack(app, 'Stack2', { synthesizer }); - expect(() => { - new Stack(app, 'Stack3', { synthesizer }); - }).toThrow(/A StackSynthesizer can only be used for one Stack/); + const stack1 = new Stack(app, 'Stack1', { synthesizer }); + const stack2 = new Stack(app, 'Stack2', { synthesizer }); + // THEN + const asm = app.synth(); + for (const st of [stack1, stack2]) { + const tpl = asm.getStackByName(st.stackName).template; + expect(tpl).toEqual(expect.objectContaining({ + Parameters: expect.objectContaining({ + BootstrapVersion: expect.objectContaining({ + Default: 'bleep', // Assert that the settings have been applied + }), + }), + })); + } }); + + /** + * Evaluate a possibly string-containing value the same way CFN would do + * + * (Be invariant to the specific Fn::Sub or Fn::Join we would output) + */ + function evalCFN(value: any) { + return evaluateCFN(stack.resolve(value), CFN_CONTEXT); + } +}); + +test('can specify synthesizer at the app level', () => { + // GIVEN + const app = new App({ + defaultStackSynthesizer: new DefaultStackSynthesizer({ + bootstrapStackVersionSsmParameter: 'bleep', + }), + }); + + // WHEN + const stack1 = new Stack(app, 'Stack1'); + const stack2 = new Stack(app, 'Stack2'); + + // THEN + const asm = app.synth(); + for (const st of [stack1, stack2]) { + const tpl = asm.getStackByName(st.stackName).template; + expect(tpl).toEqual(expect.objectContaining({ + Parameters: expect.objectContaining({ + BootstrapVersion: expect.objectContaining({ + Default: 'bleep', // Assert that the settings have been applied + }), + }), + })); + } }); test('get an exception when using tokens for parameters', () => { @@ -422,15 +470,6 @@ test('get an exception when using tokens for parameters', () => { }).toThrow(/cannot contain tokens/); }); -/** - * Evaluate a possibly string-containing value the same way CFN would do - * - * (Be invariant to the specific Fn::Sub or Fn::Join we would output) - */ -function evalCFN(value: any) { - return evaluateCFN(stack.resolve(value), CFN_CONTEXT); -} - function isAssetManifest(x: cxapi.CloudArtifact): x is cxapi.AssetManifestArtifact { return x instanceof cxapi.AssetManifestArtifact; } diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 66032d2a2e4ea..3734c72025319 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -96,7 +96,7 @@ "aws-sdk": "^2.1211.0", "aws-sdk-mock": "5.6.0", "fs-extra": "^9.1.0", - "nock": "^13.2.9", + "nock": "^13.3.0", "sinon": "^9.2.4" }, "dependencies": { diff --git a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md index d13ecb366dbb9..cc3bb8b514a1c 100644 --- a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md +++ b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md @@ -17,6 +17,7 @@ Flags come in three types: | Flag | Summary | Since | Type | | ----- | ----- | ----- | ----- | +| [@aws-cdk/aws-route53-patters:useCertificate](#aws-cdkaws-route53-pattersusecertificate) | Use the official `Certificate` resource instead of `DnsValidatedCertificate` | V2·NEXT | (default) | | [@aws-cdk/core:newStyleStackSynthesis](#aws-cdkcorenewstylestacksynthesis) | Switch to new stack synthesis method which enables CI/CD | 2.0.0 | (fix) | | [@aws-cdk/core:stackRelativeExports](#aws-cdkcorestackrelativeexports) | Name exports based on the construct paths relative to the stack, rather than the global construct path | 2.0.0 | (fix) | | [@aws-cdk/aws-rds:lowercaseDbIdentifier](#aws-cdkaws-rdslowercasedbidentifier) | Force lowercasing of RDS Cluster names in CDK | 2.0.0 | (fix) | @@ -74,6 +75,7 @@ The following json shows the current recommended set of flags, as `cdk init` wou "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, "@aws-cdk/customresources:installLatestAwsSdkDefault": false } } @@ -304,6 +306,24 @@ Encryption can also be configured explicitly using the `encrypted` property. **Compatibility with old behavior:** Pass the `encrypted: false` property to the `FileSystem` construct to disable encryption. +### @aws-cdk/aws-route53-patters:useCertificate + +*Use the official `Certificate` resource instead of `DnsValidatedCertificate`* (default) + +Enable this feature flag to use the official CloudFormation supported `Certificate` resource instead +of the deprecated `DnsValidatedCertificate` construct. If this flag is enabled and you are creating +the stack in a region other than us-east-1 then you must also set `crossRegionReferences=true` on the +stack. + + +| Since | Default | Recommended | +| ----- | ----- | ----- | +| (not in v1) | | | +| V2·NEXT | `false` | `true` | + +**Compatibility with old behavior:** Define a `DnsValidatedCertificate` explicitly and pass in the `certificate` property + + ### @aws-cdk/core:newStyleStackSynthesis *Switch to new stack synthesis method which enables CI/CD* (fix) diff --git a/packages/@aws-cdk/cx-api/lib/features.ts b/packages/@aws-cdk/cx-api/lib/features.ts index 8219c5b80192f..49f529567c170 100644 --- a/packages/@aws-cdk/cx-api/lib/features.ts +++ b/packages/@aws-cdk/cx-api/lib/features.ts @@ -76,6 +76,7 @@ export const EVENTS_TARGET_QUEUE_SAME_ACCOUNT = '@aws-cdk/aws-events:eventsTarge export const IAM_STANDARDIZED_SERVICE_PRINCIPALS = '@aws-cdk/aws-iam:standardizedServicePrincipals'; export const ECS_DISABLE_EXPLICIT_DEPLOYMENT_CONTROLLER_FOR_CIRCUIT_BREAKER = '@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker'; export const S3_SERVER_ACCESS_LOGS_USE_BUCKET_POLICY = '@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy'; +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 FLAGS: Record = { @@ -595,6 +596,21 @@ export const FLAGS: Record = { recommendedValue: true, }, + ////////////////////////////////////////////////////////////////////// + [ROUTE53_PATTERNS_USE_CERTIFICATE]: { + type: FlagType.ApiDefault, + summary: 'Use the official `Certificate` resource instead of `DnsValidatedCertificate`', + detailsMd: ` + Enable this feature flag to use the official CloudFormation supported \`Certificate\` resource instead + of the deprecated \`DnsValidatedCertificate\` construct. If this flag is enabled and you are creating + the stack in a region other than us-east-1 then you must also set \`crossRegionReferences=true\` on the + stack. + `, + introducedIn: { v2: 'V2·NEXT' }, + recommendedValue: true, + compatibilityWithOldBehaviorMd: 'Define a `DnsValidatedCertificate` explicitly and pass in the `certificate` property', + }, + ////////////////////////////////////////////////////////////////////// [AWS_CUSTOM_RESOURCE_LATEST_SDK_DEFAULT]: { type: FlagType.ApiDefault, diff --git a/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES b/packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES index a19799bdb2e51..aece6c8f81736 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.1287.0 - https://www.npmjs.com/package/aws-sdk/v/2.1287.0 | Apache-2.0 +** aws-sdk@2.1292.0 - https://www.npmjs.com/package/aws-sdk/v/2.1292.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 015266d119190..de0f89ac0beb9 100644 --- a/packages/@aws-cdk/integ-tests/package.json +++ b/packages/@aws-cdk/integ-tests/package.json @@ -71,7 +71,7 @@ "aws-sdk": "^2.1211.0", "aws-sdk-mock": "5.6.0", "jest": "^27.5.1", - "nock": "^13.2.9", + "nock": "^13.3.0", "sinon": "^9.2.4" }, "dependencies": { diff --git a/packages/@aws-cdk/pipelines/README.md b/packages/@aws-cdk/pipelines/README.md index 05996b52c4ac2..91ec38e0f4184 100644 --- a/packages/@aws-cdk/pipelines/README.md +++ b/packages/@aws-cdk/pipelines/README.md @@ -525,12 +525,15 @@ pipeline. This will encrypt the artifact bucket(s), but incurs a cost for maintaining the KMS key. +You may also wish to enable automatic key rotation for the created KMS key. + Example: ```ts const pipeline = new pipelines.CodePipeline(this, 'Pipeline', { // Encrypt artifacts, required for cross-account deployments crossAccountKeys: true, + enableKeyRotation: true, // optional synth: new pipelines.ShellStep('Synth', { input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', { connectionArn: 'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41', // Created using the AWS console * });', diff --git a/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline.ts b/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline.ts index 6eac94489539f..5fae734d240df 100644 --- a/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline.ts +++ b/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline.ts @@ -225,6 +225,16 @@ export interface CodePipelineProps { * @default true */ readonly useChangeSets?: boolean; + + /** + * Enable KMS key rotation for the generated KMS keys. + * + * By default KMS key rotation is disabled, but will add + * additional costs when enabled. + * + * @default - false (key rotation is disabled) + */ + readonly enableKeyRotation?: boolean; } /** @@ -381,6 +391,9 @@ export class CodePipeline extends PipelineBase { if (this.props.crossAccountKeys !== undefined) { throw new Error('Cannot set \'crossAccountKeys\' if an existing CodePipeline is given using \'codePipeline\''); } + if (this.props.enableKeyRotation !== undefined) { + throw new Error('Cannot set \'enableKeyRotation\' if an existing CodePipeline is given using \'codePipeline\''); + } if (this.props.reuseCrossRegionSupportStacks !== undefined) { throw new Error('Cannot set \'reuseCrossRegionSupportStacks\' if an existing CodePipeline is given using \'codePipeline\''); } @@ -398,6 +411,7 @@ export class CodePipeline extends PipelineBase { // to happen only after the builds of the latest pipeline definition). restartExecutionOnUpdate: true, role: this.props.role, + enableKeyRotation: this.props.enableKeyRotation, }); } diff --git a/packages/@aws-cdk/pipelines/lib/helpers-internal/graph.ts b/packages/@aws-cdk/pipelines/lib/helpers-internal/graph.ts index 798cc207f0aeb..7ff5208a410ae 100644 --- a/packages/@aws-cdk/pipelines/lib/helpers-internal/graph.ts +++ b/packages/@aws-cdk/pipelines/lib/helpers-internal/graph.ts @@ -73,6 +73,14 @@ export class GraphNode { return x; } + public get rootGraph(): Graph { + const root = this.root; + if (!(root instanceof Graph)) { + throw new Error(`Expecting a graph as root, got: ${root}`); + } + return root; + } + public get parentGraph() { return this._parentGraph; } @@ -93,50 +101,103 @@ export class GraphNode { } /** - * A dependency set that can be constructed partially and later finished + * A dependency set that is constructed over time * * It doesn't matter in what order sources and targets for the dependency * relationship(s) get added. This class can serve as a synchronization * point if the order in which graph nodes get added to the graph is not * well-defined. * - * Useful utility during graph building. + * You can think of a DependencyBuilder as a vertex that doesn't actually exist in the tree: + * + * ┌────┐ ┌────┐ + * │ P1 │◀─┐ ┌──│ S1 │ + * └────┘ │ .─. │ └────┘ + * ├──( B )◀─┤ + * ┌────┐ │ `─' │ ┌────┐ + * │ P2 │◀─┘ └──│ S2 │ + * └────┘ └────┘ + * + * Ultimately leads to: { S1 -> P1, S1 -> P2, S2 -> P1, S2 -> P2 }. */ export class DependencyBuilder { - private readonly targets: GraphNode[] = []; - private readonly sources: GraphNode[] = []; + private readonly _producers: GraphNode[] = []; + private readonly _consumers: GraphNode[] = []; + /** + * Add a producer: make all nodes added by 'dependBy' depend on these + */ public dependOn(...targets: GraphNode[]) { for (const target of targets) { - for (const source of this.sources) { + for (const source of this._consumers) { source.dependOn(target); } - this.targets.push(target); + this._producers.push(target); } return this; } + /** + * Add a consumer: make these nodes depend on all nodes added by 'dependOn'. + */ public dependBy(...sources: GraphNode[]) { for (const source of sources) { - for (const target of this.targets) { + for (const target of this._producers) { source.dependOn(target); } - this.sources.push(source); + this._consumers.push(source); } return this; } + + /** + * Whether there are any consumers (nodes added by 'dependBy') but no producers (nodes added by 'dependOn') + */ + public get hasUnsatisfiedConsumers() { + return this._consumers.length > 0 && this._producers.length === 0; + } + + public get consumers(): ReadonlyArray> { + return this._consumers; + } + + public consumersAsString() { + return this.consumers.map(c => `${c}`).join(','); + } } -export class DependencyBuilders { +/** + * A set of dependency builders identified by a given key. + */ +export class DependencyBuilders { private readonly builders = new Map>(); - public get(key: K) { + public for(key: K) { const b = this.builders.get(key); if (b) { return b; } const ret = new DependencyBuilder(); this.builders.set(key, ret); return ret; } + + /** + * @deprecated Use 'for' + */ + public get(key: K) { + return this.for(key); + } + + public unsatisfiedBuilders() { + const ret = new Array<[K, DependencyBuilder]>(); + + for (const [k, builder] of this.builders.entries()) { + if (builder.hasUnsatisfiedConsumers) { + ret.push([k, builder]); + } + } + + return ret; + } } export interface GraphProps extends GraphNodeProps { @@ -304,12 +365,32 @@ export class GraphNodeCollection { this.nodes = Array.from(nodes); } + /** + * Add one or more dependencies to all nodes in the collection + */ public dependOn(...dependencies: Array | undefined>) { for (const node of this.nodes) { node.dependOn(...dependencies.filter(isDefined)); } } + /** + * Return the topographically first node in the collection + */ + public first() { + const nodes = new Set(this.nodes); + const sorted = this.nodes[0].rootGraph.sortedLeaves(); + for (const tranche of sorted) { + for (const node of tranche) { + if (nodes.has(node)) { + return node; + } + } + } + + throw new Error(`Could not calculate first node between ${this}`); + } + /** * Returns the graph node that's shared between these nodes */ @@ -351,6 +432,10 @@ export class GraphNodeCollection { return paths[0][0]; } + + public toString() { + return this.nodes.map(n => `${n}`).join(', '); + } } /** diff --git a/packages/@aws-cdk/pipelines/lib/helpers-internal/pipeline-graph.ts b/packages/@aws-cdk/pipelines/lib/helpers-internal/pipeline-graph.ts index a411a2dfc547a..cc245cd58e4d4 100644 --- a/packages/@aws-cdk/pipelines/lib/helpers-internal/pipeline-graph.ts +++ b/packages/@aws-cdk/pipelines/lib/helpers-internal/pipeline-graph.ts @@ -54,7 +54,9 @@ export class PipelineGraph { private readonly assetNodesByType = new Map(); private readonly synthNode?: AGraphNode; private readonly selfMutateNode?: AGraphNode; - private readonly stackOutputDependencies = new DependencyBuilders(); + private readonly stackOutputDependencies = new DependencyBuilders(); + /** Mapping steps to depbuilders, satisfied by the step itself */ + private readonly nodeDependencies = new DependencyBuilders(); private readonly publishTemplate: boolean; private readonly prepareStep: boolean; private readonly singlePublisher: boolean; @@ -102,8 +104,7 @@ export class PipelineGraph { waves[i].dependOn(waves[i - 1]); } - // Add additional dependencies between steps that depend on stack outputs and the stacks - // that produce them. + this.addMissingDependencyNodes(); } public isSynthNode(node: AGraphNode) { @@ -111,7 +112,7 @@ export class PipelineGraph { } private addBuildStep(step: Step) { - return this.addAndRecurse(step, this.topLevelGraph('Build')); + return this.addStepNode(step, this.topLevelGraph('Build')); } private addWave(wave: Wave): AGraph { @@ -174,7 +175,7 @@ export class PipelineGraph { const cloudAssembly = this.cloudAssemblyFileSet; - firstDeployNode.dependOn(this.addAndRecurse(cloudAssembly.producer, retGraph)); + firstDeployNode.dependOn(this.addStepNode(cloudAssembly.producer, retGraph)); // add the template asset if (this.publishTemplate) { @@ -195,7 +196,7 @@ export class PipelineGraph { // Add stack output synchronization point if (this.queries.stackOutputsReferenced(stack).length > 0) { - this.stackOutputDependencies.get(stack).dependOn(deployNode); + this.stackOutputDependencies.for(stack).dependOn(deployNode); } } @@ -220,7 +221,7 @@ export class PipelineGraph { private addChangeSetNode(changeSet: Step[], prepareNode: AGraphNode, deployNode: AGraphNode, graph: AGraph) { for (const c of changeSet) { - const changeSetNode = this.addAndRecurse(c, graph); + const changeSetNode = this.addStepNode(c, graph); changeSetNode?.dependOn(prepareNode); deployNode.dependOn(changeSetNode); } @@ -230,12 +231,12 @@ export class PipelineGraph { const currentNodes = new GraphNodeCollection(parent.nodes); const preNodes = new GraphNodeCollection(new Array()); for (const p of pre) { - const preNode = this.addAndRecurse(p, parent); + const preNode = this.addStepNode(p, parent); currentNodes.dependOn(preNode); preNodes.nodes.push(preNode!); } for (const p of post) { - const postNode = this.addAndRecurse(p, parent); + const postNode = this.addStepNode(p, parent); postNode?.dependOn(...currentNodes.nodes); } return preNodes; @@ -250,7 +251,12 @@ export class PipelineGraph { return ret as AGraph; } - private addAndRecurse(step: Step, parent: AGraph) { + /** + * Add a Node to a Graph for a given Step + * + * Adds all dependencies for that Node to the same Step as well. + */ + private addStepNode(step: Step, parent: AGraph) { if (step === PipelineGraph.NO_STEP) { return undefined; } const previous = this.added.get(step); @@ -267,21 +273,56 @@ export class PipelineGraph { parent.add(node); this.added.set(step, node); + // This used to recurse -- that's not safe, because it might create nodes in the + // wrong graph (it would create a dependency node, that might need to be created in + // a different graph, in the current one). Instead, use DependencyBuilders. for (const dep of step.dependencies) { - const producerNode = this.addAndRecurse(dep, parent); - node.dependOn(producerNode); + this.nodeDependencies.for(dep).dependBy(node); } + this.nodeDependencies.for(step).dependOn(node); // Add stack dependencies (by use of the dependency builder this also works // if we encounter the Step before the Stack has been properly added yet) for (const output of step.consumedStackOutputs) { const stack = this.queries.producingStack(output); - this.stackOutputDependencies.get(stack).dependBy(node); + this.stackOutputDependencies.for(stack).dependBy(node); } return node; } + /** + * Add dependencies that aren't in the pipeline yet + * + * Build steps reference as many sources (or other builds) as they want, which will be added + * automatically. Do that here. We couldn't do it earlier, because if there were dependencies + * between steps we didn't want to reparent those unnecessarily. + */ + private addMissingDependencyNodes() { + // May need to do this more than once to recursively add all missing producers + let attempts = 20; + while (attempts-- > 0) { + const unsatisfied = this.nodeDependencies.unsatisfiedBuilders().filter(([s]) => s !== PipelineGraph.NO_STEP); + if (unsatisfied.length === 0) { return; } + + for (const [step, builder] of unsatisfied) { + // Add a new node for this step to the parent of the "leftmost" consumer. + const leftMostConsumer = new GraphNodeCollection(builder.consumers).first(); + const parent = leftMostConsumer.parentGraph; + if (!parent) { + throw new Error(`Consumer doesn't have a parent graph: ${leftMostConsumer}`); + } + this.addStepNode(step, parent); + } + } + + const unsatisfied = this.nodeDependencies.unsatisfiedBuilders(); + throw new Error([ + 'Recursion depth too large while adding dependency nodes:', + unsatisfied.map(([step, builder]) => `${builder.consumersAsString()} awaiting ${step}.`), + ].join(' ')); + } + private publishAsset(stackAsset: StackAsset): AGraphNode { const assetsGraph = this.topLevelGraph('Assets'); diff --git a/packages/@aws-cdk/pipelines/test/blueprint/helpers-internal/pipeline-graph.test.ts b/packages/@aws-cdk/pipelines/test/blueprint/helpers-internal/pipeline-graph.test.ts index 747dcfcb91d77..f473d4e0cf001 100644 --- a/packages/@aws-cdk/pipelines/test/blueprint/helpers-internal/pipeline-graph.test.ts +++ b/packages/@aws-cdk/pipelines/test/blueprint/helpers-internal/pipeline-graph.test.ts @@ -340,8 +340,8 @@ describe('with app with output', () => { }); // WHEN - const graph = new PipelineGraph(blueprint).graph; expect(() => { + const graph = new PipelineGraph(blueprint).graph; assertGraph(nodeAt(graph, 'Alpha')).sortedLeaves(); }).toThrow(/Dependency cycle/); }); diff --git a/packages/@aws-cdk/pipelines/test/codepipeline/codepipeline.test.ts b/packages/@aws-cdk/pipelines/test/codepipeline/codepipeline.test.ts index b0ecae2286d1a..246c3173efc0f 100644 --- a/packages/@aws-cdk/pipelines/test/codepipeline/codepipeline.test.ts +++ b/packages/@aws-cdk/pipelines/test/codepipeline/codepipeline.test.ts @@ -8,7 +8,7 @@ import { Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import * as cdkp from '../../lib'; import { CodePipeline } from '../../lib'; -import { PIPELINE_ENV, TestApp, ModernTestGitHubNpmPipeline, FileAssetApp } from '../testhelpers'; +import { PIPELINE_ENV, TestApp, ModernTestGitHubNpmPipeline, FileAssetApp, TwoStackApp } from '../testhelpers'; let app: TestApp; @@ -81,6 +81,11 @@ describe('Providing codePipeline parameter and prop(s) of codePipeline parameter pipelineName: 'randomName', }).create()).toThrowError('Cannot set \'pipelineName\' if an existing CodePipeline is given using \'codePipeline\''); }); + test('Providing codePipeline parameter and enableKeyRotation parameter should throw error', () => { + expect(() => new CodePipelinePropsCheckTest(app, 'CodePipeline', { + enableKeyRotation: true, + }).create()).toThrowError('Cannot set \'enableKeyRotation\' if an existing CodePipeline is given using \'codePipeline\''); + }); test('Providing codePipeline parameter and crossAccountKeys parameter should throw error', () => { expect(() => new CodePipelinePropsCheckTest(app, 'CodePipeline', { crossAccountKeys: true, @@ -192,6 +197,60 @@ test('CodeBuild action role has the right AssumeRolePolicyDocument', () => { }); }); +test('CodePipeline throws when key rotation is enabled without enabling cross account keys', ()=>{ + const pipelineStack = new cdk.Stack(app, 'PipelineStack', { env: PIPELINE_ENV }); + const repo = new ccommit.Repository(pipelineStack, 'Repo', { + repositoryName: 'MyRepo', + }); + const cdkInput = cdkp.CodePipelineSource.codeCommit( + repo, + 'main', + ); + + expect(() => new CodePipeline(pipelineStack, 'Pipeline', { + enableKeyRotation: true, + synth: new cdkp.ShellStep('Synth', { + input: cdkInput, + installCommands: ['npm ci'], + commands: [ + 'npm run build', + 'npx cdk synth', + ], + }), + }).buildPipeline()).toThrowError('Setting \'enableKeyRotation\' to true also requires \'crossAccountKeys\' to be enabled'); +}); + + +test('CodePipeline enables key rotation on cross account keys', ()=>{ + const pipelineStack = new cdk.Stack(app, 'PipelineStack', { env: PIPELINE_ENV }); + const repo = new ccommit.Repository(pipelineStack, 'Repo', { + repositoryName: 'MyRepo', + }); + const cdkInput = cdkp.CodePipelineSource.codeCommit( + repo, + 'main', + ); + + new CodePipeline(pipelineStack, 'Pipeline', { + enableKeyRotation: true, + crossAccountKeys: true, // requirement of key rotation + synth: new cdkp.ShellStep('Synth', { + input: cdkInput, + installCommands: ['npm ci'], + commands: [ + 'npm run build', + 'npx cdk synth', + ], + }), + }); + + const template = Template.fromStack(pipelineStack); + + template.hasResourceProperties('AWS::KMS::Key', { + EnableKeyRotation: true, + }); +}); + test('CodePipeline supports use of existing role', () => { const pipelineStack = new cdk.Stack(app, 'PipelineStack', { env: PIPELINE_ENV }); const repo = new ccommit.Repository(pipelineStack, 'Repo', { @@ -298,6 +357,41 @@ describe('deployment of stack', () => { }); }); +test('action name is calculated properly if it has cross-stack dependencies', () => { + // GIVEN + const pipelineStack = new cdk.Stack(app, 'PipelineStack', { env: PIPELINE_ENV }); + const pipeline = new ModernTestGitHubNpmPipeline(pipelineStack, 'Cdk', { + crossAccountKeys: true, + }); + + // WHEN + const s1step = new cdkp.ManualApprovalStep('S1'); + const s2step = new cdkp.ManualApprovalStep('S2'); + s1step.addStepDependency(s2step); + + // The issue we were diagnosing only manifests if the stacks don't have + // a dependency on each other + const stage = new TwoStackApp(app, 'TheApp', { withDependency: false }); + pipeline.addStage(stage, { + stackSteps: [ + { stack: stage.stack1, post: [s1step] }, + { stack: stage.stack2, post: [s2step] }, + ], + }); + + // THEN + const template = Template.fromStack(pipelineStack); + template.hasResourceProperties('AWS::CodePipeline::Pipeline', { + Stages: Match.arrayWith([{ + Name: 'TheApp', + Actions: Match.arrayWith([ + Match.objectLike({ Name: 'Stack2.S2', RunOrder: 3 }), + Match.objectLike({ Name: 'Stack1.S1', RunOrder: 4 }), + ]), + }]), + }); +}); + interface ReuseCodePipelineStackProps extends cdk.StackProps { reuseCrossRegionSupportStacks?: boolean; } @@ -358,6 +452,7 @@ class ReuseStack extends cdk.Stack { interface CodePipelineStackProps extends cdk.StackProps { pipelineName?: string; crossAccountKeys?: boolean; + enableKeyRotation?: boolean; reuseCrossRegionSupportStacks?: boolean; role?: iam.IRole; } @@ -379,21 +474,28 @@ class CodePipelinePropsCheckTest extends cdk.Stack { if (this.cProps.crossAccountKeys !== undefined) { new cdkp.CodePipeline(this, 'CodePipeline2', { crossAccountKeys: this.cProps.crossAccountKeys, - codePipeline: new Pipeline(this, 'Pipline2'), + codePipeline: new Pipeline(this, 'Pipeline2'), synth: new cdkp.ShellStep('Synth', { commands: ['ls'] }), }).buildPipeline(); } - if (this.cProps.reuseCrossRegionSupportStacks !== undefined) { + if (this.cProps.enableKeyRotation !== undefined) { new cdkp.CodePipeline(this, 'CodePipeline3', { + enableKeyRotation: this.cProps.enableKeyRotation, + codePipeline: new Pipeline(this, 'Pipeline3'), + synth: new cdkp.ShellStep('Synth', { commands: ['ls'] }), + }).buildPipeline(); + } + if (this.cProps.reuseCrossRegionSupportStacks !== undefined) { + new cdkp.CodePipeline(this, 'CodePipeline4', { reuseCrossRegionSupportStacks: this.cProps.reuseCrossRegionSupportStacks, - codePipeline: new Pipeline(this, 'Pipline3'), + codePipeline: new Pipeline(this, 'Pipeline4'), synth: new cdkp.ShellStep('Synth', { commands: ['ls'] }), }).buildPipeline(); } if (this.cProps.role !== undefined) { - new cdkp.CodePipeline(this, 'CodePipeline4', { + new cdkp.CodePipeline(this, 'CodePipeline5', { role: this.cProps.role, - codePipeline: new Pipeline(this, 'Pipline4'), + codePipeline: new Pipeline(this, 'Pipeline5'), synth: new cdkp.ShellStep('Synth', { commands: ['ls'] }), }).buildPipeline(); } diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/LambdaTestDefaultTestDeployAssert1AF2B360.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/LambdaTestDefaultTestDeployAssert1AF2B360.assets.json new file mode 100644 index 0000000000000..94246814e0a48 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/LambdaTestDefaultTestDeployAssert1AF2B360.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "LambdaTestDefaultTestDeployAssert1AF2B360.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/LambdaTestDefaultTestDeployAssert1AF2B360.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/LambdaTestDefaultTestDeployAssert1AF2B360.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/LambdaTestDefaultTestDeployAssert1AF2B360.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/PipelineStack.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/PipelineStack.assets.json new file mode 100644 index 0000000000000..af32741f7bc44 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/PipelineStack.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "c1bda7e2c84e91a5658af0b194a4c8918dead52ad783e29acbc3701149e73f45": { + "source": { + "path": "PipelineStack.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "c1bda7e2c84e91a5658af0b194a4c8918dead52ad783e29acbc3701149e73f45.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/PipelineStack.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/PipelineStack.template.json new file mode 100644 index 0000000000000..855088e557cb5 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/PipelineStack.template.json @@ -0,0 +1,2546 @@ +{ + "Resources": { + "PipelineArtifactsBucketEncryptionKeyF5BF0670": { + "Type": "AWS::KMS::Key", + "Properties": { + "KeyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "EnableKeyRotation": true + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PipelineArtifactsBucketEncryptionKeyAlias94A07392": { + "Type": "AWS::KMS::Alias", + "Properties": { + "AliasName": "alias/codepipeline-pipelinestack-pipeline-e95eedaa", + "TargetKeyId": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PipelineArtifactsBucketAEA9A052": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "KMSMasterKeyID": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + }, + "SSEAlgorithm": "aws:kms" + } + } + ] + }, + "PublicAccessBlockConfiguration": { + "BlockPublicAcls": true, + "BlockPublicPolicy": true, + "IgnorePublicAcls": true, + "RestrictPublicBuckets": true + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "PipelineArtifactsBucketPolicyF53CCC52": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "PipelineArtifactsBucketAEA9A052" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineRoleB27FAA37": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineRoleDefaultPolicy7BDC1ABB": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineCodeBuildActionRole226DB0CB", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineRoleDefaultPolicy7BDC1ABB", + "Roles": [ + { + "Ref": "PipelineRoleB27FAA37" + } + ] + } + }, + "Pipeline9850B417": { + "Type": "AWS::CodePipeline::Pipeline", + "Properties": { + "RoleArn": { + "Fn::GetAtt": [ + "PipelineRoleB27FAA37", + "Arn" + ] + }, + "Stages": [ + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Source", + "Owner": "ThirdParty", + "Provider": "GitHub", + "Version": "1" + }, + "Configuration": { + "Owner": "tkglaser", + "Repo": "cdk-pipelines-demo", + "Branch": "main", + "OAuthToken": "{{resolve:secretsmanager:github-token:SecretString:::}}", + "PollForSourceChanges": false + }, + "Name": "tkglaser_cdk-pipelines-demo", + "OutputArtifacts": [ + { + "Name": "tkglaser_cdk_pipelines_demo_Source" + } + ], + "RunOrder": 1 + } + ], + "Name": "Source" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Build", + "Owner": "AWS", + "Provider": "CodeBuild", + "Version": "1" + }, + "Configuration": { + "ProjectName": { + "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" + }, + "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"00ebacfb32b1bde8d3638577308e7b7144dfa3b0a58a83bc6ff38a3b1f26951c\"}]" + }, + "InputArtifacts": [ + { + "Name": "tkglaser_cdk_pipelines_demo_Source" + } + ], + "Name": "Synth", + "OutputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "RoleArn": { + "Fn::GetAtt": [ + "PipelineCodeBuildActionRole226DB0CB", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "Build" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Build", + "Owner": "AWS", + "Provider": "CodeBuild", + "Version": "1" + }, + "Configuration": { + "ProjectName": { + "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" + }, + "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"c0779bd925c3a7f19be75a4973c668d10d00ce3552b882c7d2ba3fa3cee6d976\"}]" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "SelfMutate", + "RoleArn": { + "Fn::GetAtt": [ + "PipelineCodeBuildActionRole226DB0CB", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "UpdatePipeline" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Beta-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Stack1.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 1 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Beta-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Stack1.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 2 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Beta-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Beta/PipelineStackBetaStack2C79AD00A.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Stack2.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 3 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Beta-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Stack2.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 4 + } + ], + "Name": "Beta" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod1-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod1/PipelineStackProd1Stack14013D698.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod1.Stack1.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 1 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod2-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod2/PipelineStackProd2Stack1FD464162.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod2.Stack1.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 1 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod1-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod1.Stack1.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 2 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod2-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod2.Stack1.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 2 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod1-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod1/PipelineStackProd1Stack2F0681AFF.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod1.Stack2.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 3 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod2-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod2/PipelineStackProd2Stack2176123EB.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod2.Stack2.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 3 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod1-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod1.Stack2.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 4 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod2-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod2.Stack2.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 4 + } + ], + "Name": "Wave1" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod3-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod3/PipelineStackProd3Stack1795F3D43.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod3.Stack1.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 1 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod4-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod4/PipelineStackProd4Stack118F74ADB.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod4.Stack1.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 1 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod5-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod5/PipelineStackProd5Stack1E7E4E4C6.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod5.Stack1.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 1 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod6-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod6/PipelineStackProd6Stack1E7C34314.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod6.Stack1.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 1 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod3-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod3.Stack1.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 2 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod4-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod4.Stack1.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 2 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod5-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod5.Stack1.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 2 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod6-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod6.Stack1.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 2 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod3-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod3/PipelineStackProd3Stack2DFBBA0B2.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod3.Stack2.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 3 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod4-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod4/PipelineStackProd4Stack2E2CB4ED3.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod4.Stack2.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 3 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod5-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod5/PipelineStackProd5Stack2C39BEE5B.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod5.Stack2.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 3 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod6-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod6/PipelineStackProd6Stack2BED1BBCE.template.json" + }, + "InputArtifacts": [ + { + "Name": "Synth_Output" + } + ], + "Name": "Prod6.Stack2.Prepare", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 3 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod3-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod3.Stack2.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 4 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod4-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod4.Stack2.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 4 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod5-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod5.Stack2.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 4 + }, + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "CloudFormation", + "Version": "1" + }, + "Configuration": { + "StackName": "Prod6-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "Name": "Prod6.Stack2.Deploy", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "RunOrder": 4 + } + ], + "Name": "Wave2" + } + ], + "ArtifactStore": { + "EncryptionKey": { + "Id": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + }, + "Type": "KMS" + }, + "Location": { + "Ref": "PipelineArtifactsBucketAEA9A052" + }, + "Type": "S3" + }, + "RestartExecutionOnUpdate": true + }, + "DependsOn": [ + "PipelineRoleDefaultPolicy7BDC1ABB", + "PipelineRoleB27FAA37" + ] + }, + "PipelineSourcetkglasercdkpipelinesdemoWebhookResource54EE51BE": { + "Type": "AWS::CodePipeline::Webhook", + "Properties": { + "Authentication": "GITHUB_HMAC", + "AuthenticationConfiguration": { + "SecretToken": "{{resolve:secretsmanager:github-token:SecretString:::}}" + }, + "Filters": [ + { + "JsonPath": "$.ref", + "MatchEquals": "refs/heads/{Branch}" + } + ], + "TargetAction": "tkglaser_cdk-pipelines-demo", + "TargetPipeline": { + "Ref": "Pipeline9850B417" + }, + "TargetPipelineVersion": 1, + "RegisterWithThirdParty": true + } + }, + "PipelineBuildSynthCdkBuildProjectRole231EEA2A": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" + } + ] + ] + } + ] + }, + { + "Action": [ + "codebuild:BatchPutCodeCoverages", + "codebuild:BatchPutTestCases", + "codebuild:CreateReport", + "codebuild:CreateReportGroup", + "codebuild:UpdateReport" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codebuild:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":report-group/", + { + "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" + }, + "-*" + ] + ] + } + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C", + "Roles": [ + { + "Ref": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" + } + ] + } + }, + "PipelineBuildSynthCdkBuildProject6BEFA8E6": { + "Type": "AWS::CodeBuild::Project", + "Properties": { + "Artifacts": { + "Type": "CODEPIPELINE" + }, + "Environment": { + "ComputeType": "BUILD_GENERAL1_SMALL", + "Image": "aws/codebuild/standard:5.0", + "ImagePullCredentialsType": "CODEBUILD", + "PrivilegedMode": false, + "Type": "LINUX_CONTAINER" + }, + "ServiceRole": { + "Fn::GetAtt": [ + "PipelineBuildSynthCdkBuildProjectRole231EEA2A", + "Arn" + ] + }, + "Source": { + "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"npm ci\",\n \"npm run build\",\n \"npx cdk synth\"\n ]\n }\n },\n \"artifacts\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n }\n}", + "Type": "CODEPIPELINE" + }, + "Cache": { + "Type": "NO_CACHE" + }, + "Description": "Pipeline step PipelineStack/Pipeline/Build/Synth", + "EncryptionKey": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + }, + "PipelineCodeBuildActionRole226DB0CB": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Condition": { + "Bool": { + "aws:ViaAWSService": "codepipeline.amazonaws.com" + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineCodeBuildActionRoleDefaultPolicy1D62A6FE": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "codebuild:BatchGetBuilds", + "codebuild:StartBuild", + "codebuild:StopBuild" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBuildSynthCdkBuildProject6BEFA8E6", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "PipelineUpdatePipelineSelfMutationDAA41400", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineCodeBuildActionRoleDefaultPolicy1D62A6FE", + "Roles": [ + { + "Ref": "PipelineCodeBuildActionRole226DB0CB" + } + ] + } + }, + "PipelineUpdatePipelineSelfMutationRole57E559E8": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" + } + ] + ] + } + ] + }, + { + "Action": [ + "codebuild:BatchPutCodeCoverages", + "codebuild:BatchPutTestCases", + "codebuild:CreateReport", + "codebuild:CreateReportGroup", + "codebuild:UpdateReport" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codebuild:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":report-group/", + { + "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" + }, + "-*" + ] + ] + } + }, + { + "Action": "sts:AssumeRole", + "Condition": { + "ForAnyValue:StringEquals": { + "iam:ResourceTag/aws-cdk:bootstrap-role": [ + "image-publishing", + "file-publishing", + "deploy" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:*:iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/*" + ] + ] + } + }, + { + "Action": [ + "cloudformation:DescribeStacks", + "s3:ListBucket" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E", + "Roles": [ + { + "Ref": "PipelineUpdatePipelineSelfMutationRole57E559E8" + } + ] + } + }, + "PipelineUpdatePipelineSelfMutationDAA41400": { + "Type": "AWS::CodeBuild::Project", + "Properties": { + "Artifacts": { + "Type": "CODEPIPELINE" + }, + "Environment": { + "ComputeType": "BUILD_GENERAL1_SMALL", + "Image": "aws/codebuild/standard:5.0", + "ImagePullCredentialsType": "CODEBUILD", + "PrivilegedMode": false, + "Type": "LINUX_CONTAINER" + }, + "ServiceRole": { + "Fn::GetAtt": [ + "PipelineUpdatePipelineSelfMutationRole57E559E8", + "Arn" + ] + }, + "Source": { + "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g aws-cdk@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk -a . deploy PipelineStack --require-approval=never --verbose\"\n ]\n }\n }\n}", + "Type": "CODEPIPELINE" + }, + "Cache": { + "Type": "NO_CACHE" + }, + "Description": "Pipeline step PipelineStack/Pipeline/UpdatePipeline/SelfMutate", + "EncryptionKey": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json new file mode 100644 index 0000000000000..f199f50526e58 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "91031b26c04588c38a59e3481d308182b5244c5f5a3af3ee05566e2f4f70ce65": { + "source": { + "path": "PipelineStackBetaStack1E6541489.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "91031b26c04588c38a59e3481d308182b5244c5f5a3af3ee05566e2f4f70ce65.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.template.json new file mode 100644 index 0000000000000..c1339d0126ee2 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.template.json @@ -0,0 +1,56 @@ +{ + "Resources": { + "Queue4A7E3555": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E": { + "Value": { + "Fn::GetAtt": [ + "Queue4A7E3555", + "Arn" + ] + }, + "Export": { + "Name": "Beta-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack2C79AD00A.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack2C79AD00A.assets.json new file mode 100644 index 0000000000000..de61f2f0d61b8 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack2C79AD00A.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "e3aa38ca82b00b776ad3834e9ee862d2e529d91c0f0b12fad846884e1e600326": { + "source": { + "path": "PipelineStackBetaStack2C79AD00A.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "e3aa38ca82b00b776ad3834e9ee862d2e529d91c0f0b12fad846884e1e600326.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack2C79AD00A.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack2C79AD00A.template.json new file mode 100644 index 0000000000000..f7390e702aa6d --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack2C79AD00A.template.json @@ -0,0 +1,51 @@ +{ + "Resources": { + "OtherQueue60B686DC": { + "Type": "AWS::SQS::Queue", + "Properties": { + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Beta-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/cdk.out b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/cdk.out new file mode 100644 index 0000000000000..d8b441d447f8a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/cdk.out @@ -0,0 +1 @@ +{"version":"29.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/manifest.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/manifest.json new file mode 100644 index 0000000000000..44178c8276b5a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Beta/manifest.json @@ -0,0 +1,120 @@ +{ + "version": "29.0.0", + "artifacts": { + "PipelineStackBetaStack1E6541489.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackBetaStack1E6541489.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackBetaStack1E6541489": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackBetaStack1E6541489.template.json", + "validateOnSynth": true, + "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}/91031b26c04588c38a59e3481d308182b5244c5f5a3af3ee05566e2f4f70ce65.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackBetaStack1E6541489.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": "Beta-Stack1" + }, + "dependencies": [ + "PipelineStackBetaStack1E6541489.assets" + ], + "metadata": { + "/PipelineStack/Beta/Stack1/Queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Queue4A7E3555" + } + ], + "/PipelineStack/Beta/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + ], + "/PipelineStack/Beta/Stack1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Beta/Stack1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Beta/Stack1" + }, + "PipelineStackBetaStack2C79AD00A.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackBetaStack2C79AD00A.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackBetaStack2C79AD00A": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackBetaStack2C79AD00A.template.json", + "validateOnSynth": true, + "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}/e3aa38ca82b00b776ad3834e9ee862d2e529d91c0f0b12fad846884e1e600326.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackBetaStack2C79AD00A.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": "Beta-Stack2" + }, + "dependencies": [ + "PipelineStackBetaStack1E6541489", + "PipelineStackBetaStack2C79AD00A.assets" + ], + "metadata": { + "/PipelineStack/Beta/Stack2/OtherQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OtherQueue60B686DC" + } + ], + "/PipelineStack/Beta/Stack2/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Beta/Stack2/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Beta/Stack2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack14013D698.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack14013D698.assets.json new file mode 100644 index 0000000000000..b7ffa2a662eb3 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack14013D698.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "774f0c3cec814003a4da7d6cab73aec82952a0cb52a221b3f94fae483d9922a3": { + "source": { + "path": "PipelineStackProd1Stack14013D698.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "774f0c3cec814003a4da7d6cab73aec82952a0cb52a221b3f94fae483d9922a3.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack14013D698.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack14013D698.template.json new file mode 100644 index 0000000000000..b46a5cc4fbb7d --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack14013D698.template.json @@ -0,0 +1,56 @@ +{ + "Resources": { + "Queue4A7E3555": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E": { + "Value": { + "Fn::GetAtt": [ + "Queue4A7E3555", + "Arn" + ] + }, + "Export": { + "Name": "Prod1-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack2F0681AFF.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack2F0681AFF.assets.json new file mode 100644 index 0000000000000..7726d630cea66 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack2F0681AFF.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "c1cb4eebe68ea920a89e618efa29c36ecc1aa0c6f6ef6b65559efe9c0bba4059": { + "source": { + "path": "PipelineStackProd1Stack2F0681AFF.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "c1cb4eebe68ea920a89e618efa29c36ecc1aa0c6f6ef6b65559efe9c0bba4059.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack2F0681AFF.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack2F0681AFF.template.json new file mode 100644 index 0000000000000..fcabd32211080 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/PipelineStackProd1Stack2F0681AFF.template.json @@ -0,0 +1,51 @@ +{ + "Resources": { + "OtherQueue60B686DC": { + "Type": "AWS::SQS::Queue", + "Properties": { + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod1-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/cdk.out b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/cdk.out new file mode 100644 index 0000000000000..d8b441d447f8a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/cdk.out @@ -0,0 +1 @@ +{"version":"29.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/manifest.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/manifest.json new file mode 100644 index 0000000000000..84e886b05f023 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod1/manifest.json @@ -0,0 +1,120 @@ +{ + "version": "29.0.0", + "artifacts": { + "PipelineStackProd1Stack14013D698.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd1Stack14013D698.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd1Stack14013D698": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd1Stack14013D698.template.json", + "validateOnSynth": true, + "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}/774f0c3cec814003a4da7d6cab73aec82952a0cb52a221b3f94fae483d9922a3.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd1Stack14013D698.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": "Prod1-Stack1" + }, + "dependencies": [ + "PipelineStackProd1Stack14013D698.assets" + ], + "metadata": { + "/PipelineStack/Prod1/Stack1/Queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Queue4A7E3555" + } + ], + "/PipelineStack/Prod1/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + ], + "/PipelineStack/Prod1/Stack1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod1/Stack1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod1/Stack1" + }, + "PipelineStackProd1Stack2F0681AFF.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd1Stack2F0681AFF.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd1Stack2F0681AFF": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd1Stack2F0681AFF.template.json", + "validateOnSynth": true, + "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}/c1cb4eebe68ea920a89e618efa29c36ecc1aa0c6f6ef6b65559efe9c0bba4059.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd1Stack2F0681AFF.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": "Prod1-Stack2" + }, + "dependencies": [ + "PipelineStackProd1Stack14013D698", + "PipelineStackProd1Stack2F0681AFF.assets" + ], + "metadata": { + "/PipelineStack/Prod1/Stack2/OtherQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OtherQueue60B686DC" + } + ], + "/PipelineStack/Prod1/Stack2/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod1/Stack2/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod1/Stack2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack1FD464162.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack1FD464162.assets.json new file mode 100644 index 0000000000000..3c89b6ce514f5 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack1FD464162.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "a595899a57366f015e986ac46c3da09fac75670ea0f4719de8defc67d731fa68": { + "source": { + "path": "PipelineStackProd2Stack1FD464162.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "a595899a57366f015e986ac46c3da09fac75670ea0f4719de8defc67d731fa68.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack1FD464162.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack1FD464162.template.json new file mode 100644 index 0000000000000..302ccbd07207e --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack1FD464162.template.json @@ -0,0 +1,56 @@ +{ + "Resources": { + "Queue4A7E3555": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E": { + "Value": { + "Fn::GetAtt": [ + "Queue4A7E3555", + "Arn" + ] + }, + "Export": { + "Name": "Prod2-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack2176123EB.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack2176123EB.assets.json new file mode 100644 index 0000000000000..d53df689d7a91 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack2176123EB.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "364ee9a72c6c371a00c6e41438695af070848a2d625a4c953bfc4666e7ad5ae9": { + "source": { + "path": "PipelineStackProd2Stack2176123EB.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "364ee9a72c6c371a00c6e41438695af070848a2d625a4c953bfc4666e7ad5ae9.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack2176123EB.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack2176123EB.template.json new file mode 100644 index 0000000000000..933decc98d696 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/PipelineStackProd2Stack2176123EB.template.json @@ -0,0 +1,51 @@ +{ + "Resources": { + "OtherQueue60B686DC": { + "Type": "AWS::SQS::Queue", + "Properties": { + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod2-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/cdk.out b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/cdk.out new file mode 100644 index 0000000000000..d8b441d447f8a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/cdk.out @@ -0,0 +1 @@ +{"version":"29.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/manifest.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/manifest.json new file mode 100644 index 0000000000000..793401e5b7f4b --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod2/manifest.json @@ -0,0 +1,120 @@ +{ + "version": "29.0.0", + "artifacts": { + "PipelineStackProd2Stack1FD464162.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd2Stack1FD464162.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd2Stack1FD464162": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd2Stack1FD464162.template.json", + "validateOnSynth": true, + "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}/a595899a57366f015e986ac46c3da09fac75670ea0f4719de8defc67d731fa68.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd2Stack1FD464162.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": "Prod2-Stack1" + }, + "dependencies": [ + "PipelineStackProd2Stack1FD464162.assets" + ], + "metadata": { + "/PipelineStack/Prod2/Stack1/Queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Queue4A7E3555" + } + ], + "/PipelineStack/Prod2/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + ], + "/PipelineStack/Prod2/Stack1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod2/Stack1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod2/Stack1" + }, + "PipelineStackProd2Stack2176123EB.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd2Stack2176123EB.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd2Stack2176123EB": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd2Stack2176123EB.template.json", + "validateOnSynth": true, + "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}/364ee9a72c6c371a00c6e41438695af070848a2d625a4c953bfc4666e7ad5ae9.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd2Stack2176123EB.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": "Prod2-Stack2" + }, + "dependencies": [ + "PipelineStackProd2Stack1FD464162", + "PipelineStackProd2Stack2176123EB.assets" + ], + "metadata": { + "/PipelineStack/Prod2/Stack2/OtherQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OtherQueue60B686DC" + } + ], + "/PipelineStack/Prod2/Stack2/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod2/Stack2/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod2/Stack2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack1795F3D43.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack1795F3D43.assets.json new file mode 100644 index 0000000000000..c55b572802965 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack1795F3D43.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "e8c78794529aa32b354a78b7b979165b0cadd9d113a37f537d083f946c0e7bff": { + "source": { + "path": "PipelineStackProd3Stack1795F3D43.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "e8c78794529aa32b354a78b7b979165b0cadd9d113a37f537d083f946c0e7bff.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack1795F3D43.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack1795F3D43.template.json new file mode 100644 index 0000000000000..001e76f16f49a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack1795F3D43.template.json @@ -0,0 +1,56 @@ +{ + "Resources": { + "Queue4A7E3555": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E": { + "Value": { + "Fn::GetAtt": [ + "Queue4A7E3555", + "Arn" + ] + }, + "Export": { + "Name": "Prod3-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack2DFBBA0B2.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack2DFBBA0B2.assets.json new file mode 100644 index 0000000000000..d2499d3c6f9ef --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack2DFBBA0B2.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "9fee5ad34559e603d3fc184456935445ea09549b147d2cbc2acd8cf6b916dd99": { + "source": { + "path": "PipelineStackProd3Stack2DFBBA0B2.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "9fee5ad34559e603d3fc184456935445ea09549b147d2cbc2acd8cf6b916dd99.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack2DFBBA0B2.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack2DFBBA0B2.template.json new file mode 100644 index 0000000000000..dc2e4203973f5 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/PipelineStackProd3Stack2DFBBA0B2.template.json @@ -0,0 +1,51 @@ +{ + "Resources": { + "OtherQueue60B686DC": { + "Type": "AWS::SQS::Queue", + "Properties": { + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod3-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/cdk.out b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/cdk.out new file mode 100644 index 0000000000000..d8b441d447f8a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/cdk.out @@ -0,0 +1 @@ +{"version":"29.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/manifest.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/manifest.json new file mode 100644 index 0000000000000..dab78742ac8f3 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod3/manifest.json @@ -0,0 +1,120 @@ +{ + "version": "29.0.0", + "artifacts": { + "PipelineStackProd3Stack1795F3D43.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd3Stack1795F3D43.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd3Stack1795F3D43": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd3Stack1795F3D43.template.json", + "validateOnSynth": true, + "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}/e8c78794529aa32b354a78b7b979165b0cadd9d113a37f537d083f946c0e7bff.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd3Stack1795F3D43.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": "Prod3-Stack1" + }, + "dependencies": [ + "PipelineStackProd3Stack1795F3D43.assets" + ], + "metadata": { + "/PipelineStack/Prod3/Stack1/Queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Queue4A7E3555" + } + ], + "/PipelineStack/Prod3/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + ], + "/PipelineStack/Prod3/Stack1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod3/Stack1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod3/Stack1" + }, + "PipelineStackProd3Stack2DFBBA0B2.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd3Stack2DFBBA0B2.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd3Stack2DFBBA0B2": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd3Stack2DFBBA0B2.template.json", + "validateOnSynth": true, + "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}/9fee5ad34559e603d3fc184456935445ea09549b147d2cbc2acd8cf6b916dd99.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd3Stack2DFBBA0B2.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": "Prod3-Stack2" + }, + "dependencies": [ + "PipelineStackProd3Stack1795F3D43", + "PipelineStackProd3Stack2DFBBA0B2.assets" + ], + "metadata": { + "/PipelineStack/Prod3/Stack2/OtherQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OtherQueue60B686DC" + } + ], + "/PipelineStack/Prod3/Stack2/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod3/Stack2/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod3/Stack2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack118F74ADB.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack118F74ADB.assets.json new file mode 100644 index 0000000000000..450141f8baf32 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack118F74ADB.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "7e0ecf5ec563ed47798cfb17d4c3ce0e6c710c075fc53bf8cd15d8fb9a210f78": { + "source": { + "path": "PipelineStackProd4Stack118F74ADB.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "7e0ecf5ec563ed47798cfb17d4c3ce0e6c710c075fc53bf8cd15d8fb9a210f78.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack118F74ADB.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack118F74ADB.template.json new file mode 100644 index 0000000000000..2b548d4d93efd --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack118F74ADB.template.json @@ -0,0 +1,56 @@ +{ + "Resources": { + "Queue4A7E3555": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E": { + "Value": { + "Fn::GetAtt": [ + "Queue4A7E3555", + "Arn" + ] + }, + "Export": { + "Name": "Prod4-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack2E2CB4ED3.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack2E2CB4ED3.assets.json new file mode 100644 index 0000000000000..44abc221b7ad2 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack2E2CB4ED3.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "a9cddd81a8937cbadd9bf93c6fe07766501a7c137605bb09e6cfa322b2eb09fd": { + "source": { + "path": "PipelineStackProd4Stack2E2CB4ED3.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "a9cddd81a8937cbadd9bf93c6fe07766501a7c137605bb09e6cfa322b2eb09fd.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack2E2CB4ED3.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack2E2CB4ED3.template.json new file mode 100644 index 0000000000000..631819bed2136 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/PipelineStackProd4Stack2E2CB4ED3.template.json @@ -0,0 +1,51 @@ +{ + "Resources": { + "OtherQueue60B686DC": { + "Type": "AWS::SQS::Queue", + "Properties": { + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod4-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/cdk.out b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/cdk.out new file mode 100644 index 0000000000000..d8b441d447f8a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/cdk.out @@ -0,0 +1 @@ +{"version":"29.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/manifest.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/manifest.json new file mode 100644 index 0000000000000..9c756ab77fd23 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod4/manifest.json @@ -0,0 +1,120 @@ +{ + "version": "29.0.0", + "artifacts": { + "PipelineStackProd4Stack118F74ADB.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd4Stack118F74ADB.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd4Stack118F74ADB": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd4Stack118F74ADB.template.json", + "validateOnSynth": true, + "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}/7e0ecf5ec563ed47798cfb17d4c3ce0e6c710c075fc53bf8cd15d8fb9a210f78.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd4Stack118F74ADB.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": "Prod4-Stack1" + }, + "dependencies": [ + "PipelineStackProd4Stack118F74ADB.assets" + ], + "metadata": { + "/PipelineStack/Prod4/Stack1/Queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Queue4A7E3555" + } + ], + "/PipelineStack/Prod4/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + ], + "/PipelineStack/Prod4/Stack1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod4/Stack1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod4/Stack1" + }, + "PipelineStackProd4Stack2E2CB4ED3.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd4Stack2E2CB4ED3.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd4Stack2E2CB4ED3": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd4Stack2E2CB4ED3.template.json", + "validateOnSynth": true, + "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}/a9cddd81a8937cbadd9bf93c6fe07766501a7c137605bb09e6cfa322b2eb09fd.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd4Stack2E2CB4ED3.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": "Prod4-Stack2" + }, + "dependencies": [ + "PipelineStackProd4Stack118F74ADB", + "PipelineStackProd4Stack2E2CB4ED3.assets" + ], + "metadata": { + "/PipelineStack/Prod4/Stack2/OtherQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OtherQueue60B686DC" + } + ], + "/PipelineStack/Prod4/Stack2/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod4/Stack2/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod4/Stack2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack1E7E4E4C6.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack1E7E4E4C6.assets.json new file mode 100644 index 0000000000000..c44f6ea2b183b --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack1E7E4E4C6.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "1e0089d5c027ddec49745fce045925aff9342fbffdf989e4ae5263fd87ee50f7": { + "source": { + "path": "PipelineStackProd5Stack1E7E4E4C6.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1e0089d5c027ddec49745fce045925aff9342fbffdf989e4ae5263fd87ee50f7.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack1E7E4E4C6.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack1E7E4E4C6.template.json new file mode 100644 index 0000000000000..658620fcb843a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack1E7E4E4C6.template.json @@ -0,0 +1,56 @@ +{ + "Resources": { + "Queue4A7E3555": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E": { + "Value": { + "Fn::GetAtt": [ + "Queue4A7E3555", + "Arn" + ] + }, + "Export": { + "Name": "Prod5-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack2C39BEE5B.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack2C39BEE5B.assets.json new file mode 100644 index 0000000000000..158c0083e7147 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack2C39BEE5B.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "48a94145722a5a14816cb87dce62fadba53a03b2c18e0fdfb5107ffabd5d7cd8": { + "source": { + "path": "PipelineStackProd5Stack2C39BEE5B.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "48a94145722a5a14816cb87dce62fadba53a03b2c18e0fdfb5107ffabd5d7cd8.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack2C39BEE5B.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack2C39BEE5B.template.json new file mode 100644 index 0000000000000..67e0c24ee96fb --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/PipelineStackProd5Stack2C39BEE5B.template.json @@ -0,0 +1,51 @@ +{ + "Resources": { + "OtherQueue60B686DC": { + "Type": "AWS::SQS::Queue", + "Properties": { + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod5-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/cdk.out b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/cdk.out new file mode 100644 index 0000000000000..d8b441d447f8a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/cdk.out @@ -0,0 +1 @@ +{"version":"29.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/manifest.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/manifest.json new file mode 100644 index 0000000000000..fe561a6512340 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod5/manifest.json @@ -0,0 +1,120 @@ +{ + "version": "29.0.0", + "artifacts": { + "PipelineStackProd5Stack1E7E4E4C6.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd5Stack1E7E4E4C6.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd5Stack1E7E4E4C6": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd5Stack1E7E4E4C6.template.json", + "validateOnSynth": true, + "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}/1e0089d5c027ddec49745fce045925aff9342fbffdf989e4ae5263fd87ee50f7.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd5Stack1E7E4E4C6.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": "Prod5-Stack1" + }, + "dependencies": [ + "PipelineStackProd5Stack1E7E4E4C6.assets" + ], + "metadata": { + "/PipelineStack/Prod5/Stack1/Queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Queue4A7E3555" + } + ], + "/PipelineStack/Prod5/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + ], + "/PipelineStack/Prod5/Stack1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod5/Stack1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod5/Stack1" + }, + "PipelineStackProd5Stack2C39BEE5B.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd5Stack2C39BEE5B.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd5Stack2C39BEE5B": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd5Stack2C39BEE5B.template.json", + "validateOnSynth": true, + "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}/48a94145722a5a14816cb87dce62fadba53a03b2c18e0fdfb5107ffabd5d7cd8.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd5Stack2C39BEE5B.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": "Prod5-Stack2" + }, + "dependencies": [ + "PipelineStackProd5Stack1E7E4E4C6", + "PipelineStackProd5Stack2C39BEE5B.assets" + ], + "metadata": { + "/PipelineStack/Prod5/Stack2/OtherQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OtherQueue60B686DC" + } + ], + "/PipelineStack/Prod5/Stack2/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod5/Stack2/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod5/Stack2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack1E7C34314.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack1E7C34314.assets.json new file mode 100644 index 0000000000000..880e81b8852d1 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack1E7C34314.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "26d311d19506235a52c5d093cf5a8360110af6a2b713beda66b33ba3ee5bd813": { + "source": { + "path": "PipelineStackProd6Stack1E7C34314.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "26d311d19506235a52c5d093cf5a8360110af6a2b713beda66b33ba3ee5bd813.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack1E7C34314.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack1E7C34314.template.json new file mode 100644 index 0000000000000..7ac93ccb63c33 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack1E7C34314.template.json @@ -0,0 +1,56 @@ +{ + "Resources": { + "Queue4A7E3555": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E": { + "Value": { + "Fn::GetAtt": [ + "Queue4A7E3555", + "Arn" + ] + }, + "Export": { + "Name": "Prod6-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack2BED1BBCE.assets.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack2BED1BBCE.assets.json new file mode 100644 index 0000000000000..193e0ebce2115 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack2BED1BBCE.assets.json @@ -0,0 +1,19 @@ +{ + "version": "29.0.0", + "files": { + "8f3e16ae3f29a4a50d4ef13026a3bc879e039d80e9fffdefe19d40349ec6bb30": { + "source": { + "path": "PipelineStackProd6Stack2BED1BBCE.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "8f3e16ae3f29a4a50d4ef13026a3bc879e039d80e9fffdefe19d40349ec6bb30.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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack2BED1BBCE.template.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack2BED1BBCE.template.json new file mode 100644 index 0000000000000..dd780ed92f925 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/PipelineStackProd6Stack2BED1BBCE.template.json @@ -0,0 +1,51 @@ +{ + "Resources": { + "OtherQueue60B686DC": { + "Type": "AWS::SQS::Queue", + "Properties": { + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod6-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + }, + "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/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/cdk.out b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/cdk.out new file mode 100644 index 0000000000000..d8b441d447f8a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/cdk.out @@ -0,0 +1 @@ +{"version":"29.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/manifest.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/manifest.json new file mode 100644 index 0000000000000..cb703434ad45b --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/assembly-PipelineStack-Prod6/manifest.json @@ -0,0 +1,120 @@ +{ + "version": "29.0.0", + "artifacts": { + "PipelineStackProd6Stack1E7C34314.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd6Stack1E7C34314.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd6Stack1E7C34314": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd6Stack1E7C34314.template.json", + "validateOnSynth": true, + "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}/26d311d19506235a52c5d093cf5a8360110af6a2b713beda66b33ba3ee5bd813.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd6Stack1E7C34314.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": "Prod6-Stack1" + }, + "dependencies": [ + "PipelineStackProd6Stack1E7C34314.assets" + ], + "metadata": { + "/PipelineStack/Prod6/Stack1/Queue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Queue4A7E3555" + } + ], + "/PipelineStack/Prod6/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + } + ], + "/PipelineStack/Prod6/Stack1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod6/Stack1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod6/Stack1" + }, + "PipelineStackProd6Stack2BED1BBCE.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStackProd6Stack2BED1BBCE.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStackProd6Stack2BED1BBCE": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStackProd6Stack2BED1BBCE.template.json", + "validateOnSynth": true, + "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}/8f3e16ae3f29a4a50d4ef13026a3bc879e039d80e9fffdefe19d40349ec6bb30.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStackProd6Stack2BED1BBCE.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": "Prod6-Stack2" + }, + "dependencies": [ + "PipelineStackProd6Stack1E7C34314", + "PipelineStackProd6Stack2BED1BBCE.assets" + ], + "metadata": { + "/PipelineStack/Prod6/Stack2/OtherQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OtherQueue60B686DC" + } + ], + "/PipelineStack/Prod6/Stack2/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/Prod6/Stack2/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack/Prod6/Stack2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/cdk.out b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/cdk.out new file mode 100644 index 0000000000000..d8b441d447f8a --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"29.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/integ.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/integ.json new file mode 100644 index 0000000000000..9c049ebb503d9 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "29.0.0", + "testCases": { + "LambdaTest/DefaultTest": { + "stacks": [ + "PipelineStack" + ], + "assertionStack": "LambdaTest/DefaultTest/DeployAssert", + "assertionStackName": "LambdaTestDefaultTestDeployAssert1AF2B360" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/manifest.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/manifest.json new file mode 100644 index 0000000000000..ba995ae0a7667 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/manifest.json @@ -0,0 +1,250 @@ +{ + "version": "29.0.0", + "artifacts": { + "assembly-PipelineStack-Beta": { + "type": "cdk:cloud-assembly", + "properties": { + "directoryName": "assembly-PipelineStack-Beta", + "displayName": "PipelineStack/Beta" + } + }, + "assembly-PipelineStack-Prod1": { + "type": "cdk:cloud-assembly", + "properties": { + "directoryName": "assembly-PipelineStack-Prod1", + "displayName": "PipelineStack/Prod1" + } + }, + "assembly-PipelineStack-Prod2": { + "type": "cdk:cloud-assembly", + "properties": { + "directoryName": "assembly-PipelineStack-Prod2", + "displayName": "PipelineStack/Prod2" + } + }, + "assembly-PipelineStack-Prod3": { + "type": "cdk:cloud-assembly", + "properties": { + "directoryName": "assembly-PipelineStack-Prod3", + "displayName": "PipelineStack/Prod3" + } + }, + "assembly-PipelineStack-Prod4": { + "type": "cdk:cloud-assembly", + "properties": { + "directoryName": "assembly-PipelineStack-Prod4", + "displayName": "PipelineStack/Prod4" + } + }, + "assembly-PipelineStack-Prod5": { + "type": "cdk:cloud-assembly", + "properties": { + "directoryName": "assembly-PipelineStack-Prod5", + "displayName": "PipelineStack/Prod5" + } + }, + "assembly-PipelineStack-Prod6": { + "type": "cdk:cloud-assembly", + "properties": { + "directoryName": "assembly-PipelineStack-Prod6", + "displayName": "PipelineStack/Prod6" + } + }, + "PipelineStack.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "PipelineStack.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "PipelineStack": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "PipelineStack.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}/c1bda7e2c84e91a5658af0b194a4c8918dead52ad783e29acbc3701149e73f45.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "PipelineStack.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": [ + "PipelineStack.assets" + ], + "metadata": { + "/PipelineStack/Pipeline/Pipeline/ArtifactsBucketEncryptionKey/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineArtifactsBucketEncryptionKeyF5BF0670" + } + ], + "/PipelineStack/Pipeline/Pipeline/ArtifactsBucketEncryptionKeyAlias/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineArtifactsBucketEncryptionKeyAlias94A07392" + } + ], + "/PipelineStack/Pipeline/Pipeline/ArtifactsBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineArtifactsBucketAEA9A052" + } + ], + "/PipelineStack/Pipeline/Pipeline/ArtifactsBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineArtifactsBucketPolicyF53CCC52" + } + ], + "/PipelineStack/Pipeline/Pipeline/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineRoleB27FAA37" + } + ], + "/PipelineStack/Pipeline/Pipeline/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineRoleDefaultPolicy7BDC1ABB" + } + ], + "/PipelineStack/Pipeline/Pipeline/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Pipeline9850B417" + } + ], + "/PipelineStack/Pipeline/Pipeline/Source/tkglaser_cdk-pipelines-demo/WebhookResource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineSourcetkglasercdkpipelinesdemoWebhookResource54EE51BE" + } + ], + "/PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" + } + ], + "/PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C" + } + ], + "/PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineBuildSynthCdkBuildProject6BEFA8E6" + } + ], + "/PipelineStack/Pipeline/CodeBuildActionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineCodeBuildActionRole226DB0CB" + } + ], + "/PipelineStack/Pipeline/CodeBuildActionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineCodeBuildActionRoleDefaultPolicy1D62A6FE" + } + ], + "/PipelineStack/Pipeline/UpdatePipeline/SelfMutation/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineUpdatePipelineSelfMutationRole57E559E8" + } + ], + "/PipelineStack/Pipeline/UpdatePipeline/SelfMutation/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E" + } + ], + "/PipelineStack/Pipeline/UpdatePipeline/SelfMutation/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineUpdatePipelineSelfMutationDAA41400" + } + ], + "/PipelineStack/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/PipelineStack/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "PipelineStack" + }, + "LambdaTestDefaultTestDeployAssert1AF2B360.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "LambdaTestDefaultTestDeployAssert1AF2B360.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "LambdaTestDefaultTestDeployAssert1AF2B360": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "LambdaTestDefaultTestDeployAssert1AF2B360.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": [ + "LambdaTestDefaultTestDeployAssert1AF2B360.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": [ + "LambdaTestDefaultTestDeployAssert1AF2B360.assets" + ], + "metadata": { + "/LambdaTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/LambdaTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "LambdaTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/tree.json b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/tree.json new file mode 100644 index 0000000000000..9498fef8dfd27 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.js.snapshot/tree.json @@ -0,0 +1,4200 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "PipelineStack": { + "id": "PipelineStack", + "path": "PipelineStack", + "children": { + "Pipeline": { + "id": "Pipeline", + "path": "PipelineStack/Pipeline", + "children": { + "Pipeline": { + "id": "Pipeline", + "path": "PipelineStack/Pipeline/Pipeline", + "children": { + "ArtifactsBucketEncryptionKey": { + "id": "ArtifactsBucketEncryptionKey", + "path": "PipelineStack/Pipeline/Pipeline/ArtifactsBucketEncryptionKey", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/ArtifactsBucketEncryptionKey/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::KMS::Key", + "aws:cdk:cloudformation:props": { + "keyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "enableKeyRotation": true + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-kms.CfnKey", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-kms.Key", + "version": "0.0.0" + } + }, + "ArtifactsBucketEncryptionKeyAlias": { + "id": "ArtifactsBucketEncryptionKeyAlias", + "path": "PipelineStack/Pipeline/Pipeline/ArtifactsBucketEncryptionKeyAlias", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/ArtifactsBucketEncryptionKeyAlias/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::KMS::Alias", + "aws:cdk:cloudformation:props": { + "aliasName": "alias/codepipeline-pipelinestack-pipeline-e95eedaa", + "targetKeyId": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-kms.CfnAlias", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-kms.Alias", + "version": "0.0.0" + } + }, + "ArtifactsBucket": { + "id": "ArtifactsBucket", + "path": "PipelineStack/Pipeline/Pipeline/ArtifactsBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/ArtifactsBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "bucketEncryption": { + "serverSideEncryptionConfiguration": [ + { + "serverSideEncryptionByDefault": { + "sseAlgorithm": "aws:kms", + "kmsMasterKeyId": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + } + ] + }, + "publicAccessBlockConfiguration": { + "blockPublicAcls": true, + "blockPublicPolicy": true, + "ignorePublicAcls": true, + "restrictPublicBuckets": true + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "PipelineStack/Pipeline/Pipeline/ArtifactsBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/ArtifactsBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "PipelineArtifactsBucketAEA9A052" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "PipelineStack/Pipeline/Pipeline/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "PipelineStack/Pipeline/Pipeline/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "PipelineStack/Pipeline/Pipeline/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineCodeBuildActionRole226DB0CB", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineRoleDefaultPolicy7BDC1ABB", + "roles": [ + { + "Ref": "PipelineRoleB27FAA37" + } + ] + } + }, + "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" + } + }, + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodePipeline::Pipeline", + "aws:cdk:cloudformation:props": { + "roleArn": { + "Fn::GetAtt": [ + "PipelineRoleB27FAA37", + "Arn" + ] + }, + "stages": [ + { + "name": "Source", + "actions": [ + { + "name": "tkglaser_cdk-pipelines-demo", + "outputArtifacts": [ + { + "name": "tkglaser_cdk_pipelines_demo_Source" + } + ], + "actionTypeId": { + "category": "Source", + "version": "1", + "owner": "ThirdParty", + "provider": "GitHub" + }, + "configuration": { + "Owner": "tkglaser", + "Repo": "cdk-pipelines-demo", + "Branch": "main", + "OAuthToken": "{{resolve:secretsmanager:github-token:SecretString:::}}", + "PollForSourceChanges": false + }, + "runOrder": 1 + } + ] + }, + { + "name": "Build", + "actions": [ + { + "name": "Synth", + "inputArtifacts": [ + { + "name": "tkglaser_cdk_pipelines_demo_Source" + } + ], + "outputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Build", + "version": "1", + "owner": "AWS", + "provider": "CodeBuild" + }, + "configuration": { + "ProjectName": { + "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" + }, + "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"00ebacfb32b1bde8d3638577308e7b7144dfa3b0a58a83bc6ff38a3b1f26951c\"}]" + }, + "runOrder": 1, + "roleArn": { + "Fn::GetAtt": [ + "PipelineCodeBuildActionRole226DB0CB", + "Arn" + ] + } + } + ] + }, + { + "name": "UpdatePipeline", + "actions": [ + { + "name": "SelfMutate", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Build", + "version": "1", + "owner": "AWS", + "provider": "CodeBuild" + }, + "configuration": { + "ProjectName": { + "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" + }, + "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"c0779bd925c3a7f19be75a4973c668d10d00ce3552b882c7d2ba3fa3cee6d976\"}]" + }, + "runOrder": 1, + "roleArn": { + "Fn::GetAtt": [ + "PipelineCodeBuildActionRole226DB0CB", + "Arn" + ] + } + } + ] + }, + { + "name": "Beta", + "actions": [ + { + "name": "Stack1.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Beta-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.template.json" + }, + "runOrder": 1, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Stack1.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Beta-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 2, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Stack2.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Beta-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Beta/PipelineStackBetaStack2C79AD00A.template.json" + }, + "runOrder": 3, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Stack2.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Beta-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 4, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + } + ] + }, + { + "name": "Wave1", + "actions": [ + { + "name": "Prod1.Stack1.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod1-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod1/PipelineStackProd1Stack14013D698.template.json" + }, + "runOrder": 1, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod2.Stack1.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod2-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod2/PipelineStackProd2Stack1FD464162.template.json" + }, + "runOrder": 1, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod1.Stack1.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod1-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 2, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod2.Stack1.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod2-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 2, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod1.Stack2.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod1-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod1/PipelineStackProd1Stack2F0681AFF.template.json" + }, + "runOrder": 3, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod2.Stack2.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod2-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod2/PipelineStackProd2Stack2176123EB.template.json" + }, + "runOrder": 3, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod1.Stack2.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod1-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 4, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod2.Stack2.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod2-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 4, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + } + ] + }, + { + "name": "Wave2", + "actions": [ + { + "name": "Prod3.Stack1.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod3-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod3/PipelineStackProd3Stack1795F3D43.template.json" + }, + "runOrder": 1, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod4.Stack1.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod4-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod4/PipelineStackProd4Stack118F74ADB.template.json" + }, + "runOrder": 1, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod5.Stack1.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod5-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod5/PipelineStackProd5Stack1E7E4E4C6.template.json" + }, + "runOrder": 1, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod6.Stack1.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod6-Stack1", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod6/PipelineStackProd6Stack1E7C34314.template.json" + }, + "runOrder": 1, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod3.Stack1.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod3-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 2, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod4.Stack1.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod4-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 2, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod5.Stack1.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod5-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 2, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod6.Stack1.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod6-Stack1", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 2, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod3.Stack2.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod3-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod3/PipelineStackProd3Stack2DFBBA0B2.template.json" + }, + "runOrder": 3, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod4.Stack2.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod4-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod4/PipelineStackProd4Stack2E2CB4ED3.template.json" + }, + "runOrder": 3, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod5.Stack2.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod5-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod5/PipelineStackProd5Stack2C39BEE5B.template.json" + }, + "runOrder": 3, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod6.Stack2.Prepare", + "inputArtifacts": [ + { + "name": "Synth_Output" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod6-Stack2", + "Capabilities": "CAPABILITY_NAMED_IAM,CAPABILITY_AUTO_EXPAND", + "RoleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-cfn-exec-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + }, + "ActionMode": "CHANGE_SET_REPLACE", + "ChangeSetName": "PipelineChange", + "TemplatePath": "Synth_Output::assembly-PipelineStack-Prod6/PipelineStackProd6Stack2BED1BBCE.template.json" + }, + "runOrder": 3, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod3.Stack2.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod3-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 4, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod4.Stack2.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod4-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 4, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod5.Stack2.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod5-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 4, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + }, + { + "name": "Prod6.Stack2.Deploy", + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "CloudFormation" + }, + "configuration": { + "StackName": "Prod6-Stack2", + "ActionMode": "CHANGE_SET_EXECUTE", + "ChangeSetName": "PipelineChange" + }, + "runOrder": 4, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/cdk-hnb659fds-deploy-role-", + { + "Ref": "AWS::AccountId" + }, + "-", + { + "Ref": "AWS::Region" + } + ] + ] + } + } + ] + } + ], + "artifactStore": { + "type": "S3", + "location": { + "Ref": "PipelineArtifactsBucketAEA9A052" + }, + "encryptionKey": { + "type": "KMS", + "id": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + }, + "restartExecutionOnUpdate": true + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codepipeline.CfnPipeline", + "version": "0.0.0" + } + }, + "Source": { + "id": "Source", + "path": "PipelineStack/Pipeline/Pipeline/Source", + "children": { + "tkglaser_cdk-pipelines-demo": { + "id": "tkglaser_cdk-pipelines-demo", + "path": "PipelineStack/Pipeline/Pipeline/Source/tkglaser_cdk-pipelines-demo", + "children": { + "WebhookResource": { + "id": "WebhookResource", + "path": "PipelineStack/Pipeline/Pipeline/Source/tkglaser_cdk-pipelines-demo/WebhookResource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodePipeline::Webhook", + "aws:cdk:cloudformation:props": { + "authentication": "GITHUB_HMAC", + "authenticationConfiguration": { + "secretToken": "{{resolve:secretsmanager:github-token:SecretString:::}}" + }, + "filters": [ + { + "jsonPath": "$.ref", + "matchEquals": "refs/heads/{Branch}" + } + ], + "targetAction": "tkglaser_cdk-pipelines-demo", + "targetPipeline": { + "Ref": "Pipeline9850B417" + }, + "targetPipelineVersion": 1, + "registerWithThirdParty": true + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codepipeline.CfnWebhook", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Build": { + "id": "Build", + "path": "PipelineStack/Pipeline/Pipeline/Build", + "children": { + "Synth": { + "id": "Synth", + "path": "PipelineStack/Pipeline/Pipeline/Build/Synth", + "children": { + "CdkBuildProject": { + "id": "CdkBuildProject", + "path": "PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject", + "children": { + "Role": { + "id": "Role", + "path": "PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" + } + ] + ] + } + ] + }, + { + "Action": [ + "codebuild:BatchPutCodeCoverages", + "codebuild:BatchPutTestCases", + "codebuild:CreateReport", + "codebuild:CreateReportGroup", + "codebuild:UpdateReport" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codebuild:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":report-group/", + { + "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" + }, + "-*" + ] + ] + } + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineBuildSynthCdkBuildProjectRoleDefaultPolicyFB6C941C", + "roles": [ + { + "Ref": "PipelineBuildSynthCdkBuildProjectRole231EEA2A" + } + ] + } + }, + "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" + } + }, + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeBuild::Project", + "aws:cdk:cloudformation:props": { + "artifacts": { + "type": "CODEPIPELINE" + }, + "environment": { + "type": "LINUX_CONTAINER", + "image": "aws/codebuild/standard:5.0", + "imagePullCredentialsType": "CODEBUILD", + "privilegedMode": false, + "computeType": "BUILD_GENERAL1_SMALL" + }, + "serviceRole": { + "Fn::GetAtt": [ + "PipelineBuildSynthCdkBuildProjectRole231EEA2A", + "Arn" + ] + }, + "source": { + "type": "CODEPIPELINE", + "buildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"npm ci\",\n \"npm run build\",\n \"npx cdk synth\"\n ]\n }\n },\n \"artifacts\": {\n \"base-directory\": \"cdk.out\",\n \"files\": \"**/*\"\n }\n}" + }, + "cache": { + "type": "NO_CACHE" + }, + "description": "Pipeline step PipelineStack/Pipeline/Build/Synth", + "encryptionKey": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codebuild.CfnProject", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codebuild.PipelineProject", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "UpdatePipeline": { + "id": "UpdatePipeline", + "path": "PipelineStack/Pipeline/Pipeline/UpdatePipeline", + "children": { + "SelfMutate": { + "id": "SelfMutate", + "path": "PipelineStack/Pipeline/Pipeline/UpdatePipeline/SelfMutate", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Beta": { + "id": "Beta", + "path": "PipelineStack/Pipeline/Pipeline/Beta", + "children": { + "Stack1.Prepare": { + "id": "Stack1.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Beta/Stack1.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Stack1.Deploy": { + "id": "Stack1.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Beta/Stack1.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Stack2.Prepare": { + "id": "Stack2.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Beta/Stack2.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Stack2.Deploy": { + "id": "Stack2.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Beta/Stack2.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}": { + "id": "MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "path": "PipelineStack/Pipeline/Pipeline/MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}": { + "id": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "path": "PipelineStack/Pipeline/Pipeline/arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "children": { + "8389e75f-0810-4838-bf64-d6f85a95cf83": { + "id": "8389e75f-0810-4838-bf64-d6f85a95cf83", + "path": "PipelineStack/Pipeline/Pipeline/arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}/8389e75f-0810-4838-bf64-d6f85a95cf83", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}": { + "id": "MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "path": "PipelineStack/Pipeline/Pipeline/MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}": { + "id": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "path": "PipelineStack/Pipeline/Pipeline/arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Wave1": { + "id": "Wave1", + "path": "PipelineStack/Pipeline/Pipeline/Wave1", + "children": { + "Prod1.Stack1.Prepare": { + "id": "Prod1.Stack1.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave1/Prod1.Stack1.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod2.Stack1.Prepare": { + "id": "Prod2.Stack1.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave1/Prod2.Stack1.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod1.Stack1.Deploy": { + "id": "Prod1.Stack1.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave1/Prod1.Stack1.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod2.Stack1.Deploy": { + "id": "Prod2.Stack1.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave1/Prod2.Stack1.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod1.Stack2.Prepare": { + "id": "Prod1.Stack2.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave1/Prod1.Stack2.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod2.Stack2.Prepare": { + "id": "Prod2.Stack2.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave1/Prod2.Stack2.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod1.Stack2.Deploy": { + "id": "Prod1.Stack2.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave1/Prod1.Stack2.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod2.Stack2.Deploy": { + "id": "Prod2.Stack2.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave1/Prod2.Stack2.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Wave2": { + "id": "Wave2", + "path": "PipelineStack/Pipeline/Pipeline/Wave2", + "children": { + "Prod3.Stack1.Prepare": { + "id": "Prod3.Stack1.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod3.Stack1.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod4.Stack1.Prepare": { + "id": "Prod4.Stack1.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod4.Stack1.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod5.Stack1.Prepare": { + "id": "Prod5.Stack1.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod5.Stack1.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod6.Stack1.Prepare": { + "id": "Prod6.Stack1.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod6.Stack1.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod3.Stack1.Deploy": { + "id": "Prod3.Stack1.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod3.Stack1.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod4.Stack1.Deploy": { + "id": "Prod4.Stack1.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod4.Stack1.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod5.Stack1.Deploy": { + "id": "Prod5.Stack1.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod5.Stack1.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod6.Stack1.Deploy": { + "id": "Prod6.Stack1.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod6.Stack1.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod3.Stack2.Prepare": { + "id": "Prod3.Stack2.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod3.Stack2.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod4.Stack2.Prepare": { + "id": "Prod4.Stack2.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod4.Stack2.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod5.Stack2.Prepare": { + "id": "Prod5.Stack2.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod5.Stack2.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod6.Stack2.Prepare": { + "id": "Prod6.Stack2.Prepare", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod6.Stack2.Prepare", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod3.Stack2.Deploy": { + "id": "Prod3.Stack2.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod3.Stack2.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod4.Stack2.Deploy": { + "id": "Prod4.Stack2.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod4.Stack2.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod5.Stack2.Deploy": { + "id": "Prod5.Stack2.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod5.Stack2.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "Prod6.Stack2.Deploy": { + "id": "Prod6.Stack2.Deploy", + "path": "PipelineStack/Pipeline/Pipeline/Wave2/Prod6.Stack2.Deploy", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codepipeline.Pipeline", + "version": "0.0.0" + } + }, + "CodeBuildActionRole": { + "id": "CodeBuildActionRole", + "path": "PipelineStack/Pipeline/CodeBuildActionRole", + "children": { + "ImportCodeBuildActionRole": { + "id": "ImportCodeBuildActionRole", + "path": "PipelineStack/Pipeline/CodeBuildActionRole/ImportCodeBuildActionRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/CodeBuildActionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Condition": { + "Bool": { + "aws:ViaAWSService": "codepipeline.amazonaws.com" + } + }, + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "PipelineStack/Pipeline/CodeBuildActionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/CodeBuildActionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "codebuild:BatchGetBuilds", + "codebuild:StartBuild", + "codebuild:StopBuild" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBuildSynthCdkBuildProject6BEFA8E6", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "PipelineUpdatePipelineSelfMutationDAA41400", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineCodeBuildActionRoleDefaultPolicy1D62A6FE", + "roles": [ + { + "Ref": "PipelineCodeBuildActionRole226DB0CB" + } + ] + } + }, + "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" + } + }, + "UpdatePipeline": { + "id": "UpdatePipeline", + "path": "PipelineStack/Pipeline/UpdatePipeline", + "children": { + "SelfMutation": { + "id": "SelfMutation", + "path": "PipelineStack/Pipeline/UpdatePipeline/SelfMutation", + "children": { + "Role": { + "id": "Role", + "path": "PipelineStack/Pipeline/UpdatePipeline/SelfMutation/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "PipelineStack/Pipeline/UpdatePipeline/SelfMutation/Role/ImportRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/UpdatePipeline/SelfMutation/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "PipelineStack/Pipeline/UpdatePipeline/SelfMutation/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/UpdatePipeline/SelfMutation/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" + } + ] + ] + } + ] + }, + { + "Action": [ + "codebuild:BatchPutCodeCoverages", + "codebuild:BatchPutTestCases", + "codebuild:CreateReport", + "codebuild:CreateReportGroup", + "codebuild:UpdateReport" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codebuild:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":report-group/", + { + "Ref": "PipelineUpdatePipelineSelfMutationDAA41400" + }, + "-*" + ] + ] + } + }, + { + "Action": "sts:AssumeRole", + "Condition": { + "ForAnyValue:StringEquals": { + "iam:ResourceTag/aws-cdk:bootstrap-role": [ + "image-publishing", + "file-publishing", + "deploy" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:*:iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/*" + ] + ] + } + }, + { + "Action": [ + "cloudformation:DescribeStacks", + "s3:ListBucket" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineArtifactsBucketAEA9A052", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "kms:Decrypt", + "kms:DescribeKey", + "kms:Encrypt", + "kms:GenerateDataKey*", + "kms:ReEncrypt*" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineUpdatePipelineSelfMutationRoleDefaultPolicyA225DA4E", + "roles": [ + { + "Ref": "PipelineUpdatePipelineSelfMutationRole57E559E8" + } + ] + } + }, + "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" + } + }, + "Resource": { + "id": "Resource", + "path": "PipelineStack/Pipeline/UpdatePipeline/SelfMutation/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeBuild::Project", + "aws:cdk:cloudformation:props": { + "artifacts": { + "type": "CODEPIPELINE" + }, + "environment": { + "type": "LINUX_CONTAINER", + "image": "aws/codebuild/standard:5.0", + "imagePullCredentialsType": "CODEBUILD", + "privilegedMode": false, + "computeType": "BUILD_GENERAL1_SMALL" + }, + "serviceRole": { + "Fn::GetAtt": [ + "PipelineUpdatePipelineSelfMutationRole57E559E8", + "Arn" + ] + }, + "source": { + "type": "CODEPIPELINE", + "buildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g aws-cdk@1\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk -a . deploy PipelineStack --require-approval=never --verbose\"\n ]\n }\n }\n}" + }, + "cache": { + "type": "NO_CACHE" + }, + "description": "Pipeline step PipelineStack/Pipeline/UpdatePipeline/SelfMutate", + "encryptionKey": { + "Fn::GetAtt": [ + "PipelineArtifactsBucketEncryptionKeyF5BF0670", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codebuild.CfnProject", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codebuild.PipelineProject", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/pipelines.CodePipeline", + "version": "0.0.0" + } + }, + "Beta": { + "id": "Beta", + "path": "PipelineStack/Beta", + "children": { + "Stack1": { + "id": "Stack1", + "path": "PipelineStack/Beta/Stack1", + "children": { + "Queue": { + "id": "Queue", + "path": "PipelineStack/Beta/Stack1/Queue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Beta/Stack1/Queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "PipelineStack/Beta/Stack1/Exports", + "children": { + "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": { + "id": "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "path": "PipelineStack/Beta/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Beta/Stack1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Beta/Stack1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Stack2": { + "id": "Stack2", + "path": "PipelineStack/Beta/Stack2", + "children": { + "OtherQueue": { + "id": "OtherQueue", + "path": "PipelineStack/Beta/Stack2/OtherQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Beta/Stack2/OtherQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Beta-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Beta/Stack2/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Beta/Stack2/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/core.Stage", + "version": "0.0.0" + } + }, + "Prod1": { + "id": "Prod1", + "path": "PipelineStack/Prod1", + "children": { + "Stack1": { + "id": "Stack1", + "path": "PipelineStack/Prod1/Stack1", + "children": { + "Queue": { + "id": "Queue", + "path": "PipelineStack/Prod1/Stack1/Queue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod1/Stack1/Queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "PipelineStack/Prod1/Stack1/Exports", + "children": { + "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": { + "id": "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "path": "PipelineStack/Prod1/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod1/Stack1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod1/Stack1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Stack2": { + "id": "Stack2", + "path": "PipelineStack/Prod1/Stack2", + "children": { + "OtherQueue": { + "id": "OtherQueue", + "path": "PipelineStack/Prod1/Stack2/OtherQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod1/Stack2/OtherQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod1-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod1/Stack2/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod1/Stack2/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/core.Stage", + "version": "0.0.0" + } + }, + "Prod2": { + "id": "Prod2", + "path": "PipelineStack/Prod2", + "children": { + "Stack1": { + "id": "Stack1", + "path": "PipelineStack/Prod2/Stack1", + "children": { + "Queue": { + "id": "Queue", + "path": "PipelineStack/Prod2/Stack1/Queue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod2/Stack1/Queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "PipelineStack/Prod2/Stack1/Exports", + "children": { + "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": { + "id": "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "path": "PipelineStack/Prod2/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod2/Stack1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod2/Stack1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Stack2": { + "id": "Stack2", + "path": "PipelineStack/Prod2/Stack2", + "children": { + "OtherQueue": { + "id": "OtherQueue", + "path": "PipelineStack/Prod2/Stack2/OtherQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod2/Stack2/OtherQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod2-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod2/Stack2/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod2/Stack2/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/core.Stage", + "version": "0.0.0" + } + }, + "Prod3": { + "id": "Prod3", + "path": "PipelineStack/Prod3", + "children": { + "Stack1": { + "id": "Stack1", + "path": "PipelineStack/Prod3/Stack1", + "children": { + "Queue": { + "id": "Queue", + "path": "PipelineStack/Prod3/Stack1/Queue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod3/Stack1/Queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "PipelineStack/Prod3/Stack1/Exports", + "children": { + "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": { + "id": "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "path": "PipelineStack/Prod3/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod3/Stack1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod3/Stack1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Stack2": { + "id": "Stack2", + "path": "PipelineStack/Prod3/Stack2", + "children": { + "OtherQueue": { + "id": "OtherQueue", + "path": "PipelineStack/Prod3/Stack2/OtherQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod3/Stack2/OtherQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod3-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod3/Stack2/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod3/Stack2/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/core.Stage", + "version": "0.0.0" + } + }, + "Prod4": { + "id": "Prod4", + "path": "PipelineStack/Prod4", + "children": { + "Stack1": { + "id": "Stack1", + "path": "PipelineStack/Prod4/Stack1", + "children": { + "Queue": { + "id": "Queue", + "path": "PipelineStack/Prod4/Stack1/Queue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod4/Stack1/Queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "PipelineStack/Prod4/Stack1/Exports", + "children": { + "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": { + "id": "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "path": "PipelineStack/Prod4/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod4/Stack1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod4/Stack1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Stack2": { + "id": "Stack2", + "path": "PipelineStack/Prod4/Stack2", + "children": { + "OtherQueue": { + "id": "OtherQueue", + "path": "PipelineStack/Prod4/Stack2/OtherQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod4/Stack2/OtherQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod4-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod4/Stack2/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod4/Stack2/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/core.Stage", + "version": "0.0.0" + } + }, + "Prod5": { + "id": "Prod5", + "path": "PipelineStack/Prod5", + "children": { + "Stack1": { + "id": "Stack1", + "path": "PipelineStack/Prod5/Stack1", + "children": { + "Queue": { + "id": "Queue", + "path": "PipelineStack/Prod5/Stack1/Queue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod5/Stack1/Queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "PipelineStack/Prod5/Stack1/Exports", + "children": { + "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": { + "id": "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "path": "PipelineStack/Prod5/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod5/Stack1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod5/Stack1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Stack2": { + "id": "Stack2", + "path": "PipelineStack/Prod5/Stack2", + "children": { + "OtherQueue": { + "id": "OtherQueue", + "path": "PipelineStack/Prod5/Stack2/OtherQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod5/Stack2/OtherQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod5-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod5/Stack2/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod5/Stack2/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/core.Stage", + "version": "0.0.0" + } + }, + "Prod6": { + "id": "Prod6", + "path": "PipelineStack/Prod6", + "children": { + "Stack1": { + "id": "Stack1", + "path": "PipelineStack/Prod6/Stack1", + "children": { + "Queue": { + "id": "Queue", + "path": "PipelineStack/Prod6/Stack1/Queue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod6/Stack1/Queue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "PipelineStack/Prod6/Stack1/Exports", + "children": { + "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}": { + "id": "Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "path": "PipelineStack/Prod6/Stack1/Exports/Output{\"Fn::GetAtt\":[\"Queue4A7E3555\",\"Arn\"]}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod6/Stack1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod6/Stack1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Stack2": { + "id": "Stack2", + "path": "PipelineStack/Prod6/Stack2", + "children": { + "OtherQueue": { + "id": "OtherQueue", + "path": "PipelineStack/Prod6/Stack2/OtherQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "PipelineStack/Prod6/Stack2/OtherQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::ImportValue": "Prod6-Stack1:ExportsOutputFnGetAttQueue4A7E3555Arn15A7202E" + }, + "maxReceiveCount": 5 + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-sqs.Queue", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/Prod6/Stack2/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/Prod6/Stack2/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/core.Stage", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "PipelineStack/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "PipelineStack/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "LambdaTest": { + "id": "LambdaTest", + "path": "LambdaTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "LambdaTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "LambdaTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.189" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "LambdaTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "LambdaTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "LambdaTest/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.189" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.ts b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.ts new file mode 100644 index 0000000000000..de79adf2b5081 --- /dev/null +++ b/packages/@aws-cdk/pipelines/test/integ.newpipeline-with-cross-account-keys.ts @@ -0,0 +1,64 @@ +import * as sqs from '@aws-cdk/aws-sqs'; +import { App, Stack, StackProps, Stage, StageProps } from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; +import { Construct } from 'constructs'; + +import * as pipelines from '../lib'; + +class PipelineStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const pipeline = new pipelines.CodePipeline(this, 'Pipeline', { + crossAccountKeys: true, + enableKeyRotation: true, + synth: new pipelines.ShellStep('Synth', { + input: pipelines.CodePipelineSource.gitHub('tkglaser/cdk-pipelines-demo', 'main'), + commands: [ + 'npm ci', + 'npm run build', + 'npx cdk synth', + ], + }), + }); + + pipeline.addStage(new AppStage(this, 'Beta')); + + const group = pipeline.addWave('Wave1'); + group.addStage(new AppStage(this, 'Prod1')); + group.addStage(new AppStage(this, 'Prod2')); + + const group2 = pipeline.addWave('Wave2'); + group2.addStage(new AppStage(this, 'Prod3')); + group2.addStage(new AppStage(this, 'Prod4')); + group2.addStage(new AppStage(this, 'Prod5')); + group2.addStage(new AppStage(this, 'Prod6')); + } +} + +class AppStage extends Stage { + constructor(scope: Construct, id: string, props?: StageProps) { + super(scope, id, props); + + const stack1 = new Stack(this, 'Stack1'); + const queue1 = new sqs.Queue(stack1, 'Queue'); + + const stack2 = new Stack(this, 'Stack2'); + new sqs.Queue(stack2, 'OtherQueue', { + deadLetterQueue: { + queue: queue1, + maxReceiveCount: 5, + }, + }); + } +} + +const app = new App(); + +const stack = new PipelineStack(app, 'PipelineStack'); + +new integ.IntegTest(app, 'LambdaTest', { + testCases: [stack], +}); + +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/testhelpers/test-app.ts b/packages/@aws-cdk/pipelines/test/testhelpers/test-app.ts index fca2cd26f04d4..da35f1b979f4e 100644 --- a/packages/@aws-cdk/pipelines/test/testhelpers/test-app.ts +++ b/packages/@aws-cdk/pipelines/test/testhelpers/test-app.ts @@ -75,14 +75,28 @@ export class AppWithOutput extends Stage { } } +export interface TwoStackAppProps extends StageProps { + /** + * Create a dependency between the two stacks + * + * @default true + */ + readonly withDependency?: boolean; +} + export class TwoStackApp extends Stage { - constructor(scope: Construct, id: string, props?: StageProps) { + public readonly stack1: Stack; + public readonly stack2: Stack; + + constructor(scope: Construct, id: string, props?: TwoStackAppProps) { super(scope, id, props); - const stack2 = new BucketStack(this, 'Stack2'); - const stack1 = new BucketStack(this, 'Stack1'); + this.stack2 = new BucketStack(this, 'Stack2'); + this.stack1 = new BucketStack(this, 'Stack1'); - stack2.addDependency(stack1); + if (props?.withDependency ?? true) { + this.stack2.addDependency(this.stack1); + } } } 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 1eb700f733e1e..daac2ea673dd8 100644 --- a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts +++ b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts @@ -507,6 +507,44 @@ export const FIREHOSE_CIDR_BLOCKS: { [region: string]: string } = { }; const ADOT_LAMBDA_LAYER_JAVA_SDK_ARNS: { [version: string]: { [arch: string]: { [region: string]: string } } } = { + '1.21.0': { + x86_64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-21-0:1', + }, + arm64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-21-0:1', + }, + }, '1.19.0': { x86_64: { 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-19-0:1', @@ -550,6 +588,44 @@ const ADOT_LAMBDA_LAYER_JAVA_SDK_ARNS: { [version: string]: { [arch: string]: { const ADOT_LAMBDA_LAYER_JAVA_AUTO_INSTRUMENTATION_ARNS: { [version: string]: { [arch: string]: { [region: string]: string } }; } = { + '1.21.0': { + x86_64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-agent-amd64-ver-1-21-0:1', + }, + arm64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-agent-arm64-ver-1-21-0:1', + }, + }, '1.19.2': { x86_64: { 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-java-agent-amd64-ver-1-19-2:1', @@ -591,6 +667,44 @@ const ADOT_LAMBDA_LAYER_JAVA_AUTO_INSTRUMENTATION_ARNS: { }; const ADOT_LAMBDA_LAYER_JAVASCRIPT_SDK_ARNS: { [version: string]: { [arch: string]: { [region: string]: string } } } = { + '1.8.0': { + x86_64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-nodejs-amd64-ver-1-8-0:2', + }, + arm64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-8-0:2', + }, + }, '1.7.0': { x86_64: { 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-7-0:2', @@ -632,6 +746,44 @@ const ADOT_LAMBDA_LAYER_JAVASCRIPT_SDK_ARNS: { [version: string]: { [arch: strin }; const ADOT_LAMBDA_LAYER_PYTHON_SDK_ARNS: { [version: string]: { [arch: string]: { [region: string]: string } } } = { + '1.15.0': { + x86_64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-15-0:2', + }, + arm64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-arm64-ver-1-15-0:2', + }, + }, '1.13.0': { x86_64: { 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-python-amd64-ver-1-13-0:1', @@ -673,6 +825,44 @@ const ADOT_LAMBDA_LAYER_PYTHON_SDK_ARNS: { [version: string]: { [arch: string]: }; const ADOT_LAMBDA_LAYER_GENERIC_ARNS: { [version: string]: { [arch: string]: { [region: string]: string } } } = { + '0.68.0': { + x86_64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-collector-amd64-ver-0-68-0:1', + }, + arm64: { + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'ap-south-1': 'arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'ca-central-1': 'arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'eu-central-1': 'arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'eu-north-1': 'arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'eu-west-1': 'arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'eu-west-2': 'arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'eu-west-3': 'arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'sa-east-1': 'arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'us-east-1': 'arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'us-east-2': 'arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'us-west-1': 'arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + 'us-west-2': 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-collector-arm64-ver-0-68-0:1', + }, + }, '0.62.1': { x86_64: { 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-collector-amd64-ver-0-62-1:1', diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 056302b473589..4ea153b14f4d0 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -111,7 +111,7 @@ "ignore": "^5.2.4", "jsonschema": "^1.4.1", "minimatch": "^3.1.2", - "punycode": "^2.1.1", + "punycode": "^2.2.0", "semver": "^7.3.8", "yaml": "1.10.2", "@aws-cdk/asset-awscli-v1": "^2.2.49", @@ -379,7 +379,7 @@ "@types/fs-extra": "^8.1.2", "@types/node": "^14.18.36", "constructs": "^10.0.0", - "esbuild": "^0.16.13", + "esbuild": "^0.16.16", "fs-extra": "^9.1.0", "ts-node": "^9.1.1", "typescript": "~3.8.3" diff --git a/packages/aws-cdk/.npmignore b/packages/aws-cdk/.npmignore index 7c198b16e73f8..2a474fe68b670 100644 --- a/packages/aws-cdk/.npmignore +++ b/packages/aws-cdk/.npmignore @@ -11,9 +11,6 @@ dist .LAST_BUILD *.snk -!test/integ/cli/**/*.js -!test/integ/run-wrappers/dist - *.tsbuildinfo jest.config.js @@ -24,10 +21,7 @@ tsconfig.json !lib/init-templates/**/tsconfig.json !lib/init-templates/**/jest.config.js -!test/integ/cli/jest.config.js -!test/integ/uberpackage/jest.config.js -!test/integ/cli-regression-patches/**/* -!test/integ/cli/sam_cdk_integ_app/**/*.ts +!test/integ/**/* .DS_Store diff --git a/packages/aws-cdk/THIRD_PARTY_LICENSES b/packages/aws-cdk/THIRD_PARTY_LICENSES index e007b3b3013db..fbcf5fe07f1b5 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.72.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.72.0 | Apache-2.0 +** @jsii/check-node@1.73.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.73.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.1287.0 - https://www.npmjs.com/package/aws-sdk/v/2.1287.0 | Apache-2.0 +** aws-sdk@2.1292.0 - https://www.npmjs.com/package/aws-sdk/v/2.1292.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/aws-sdk-inifile.ts b/packages/aws-cdk/lib/api/aws-auth/aws-sdk-inifile.ts index 330ea62665c55..0ff4d3980c0c1 100644 --- a/packages/aws-cdk/lib/api/aws-auth/aws-sdk-inifile.ts +++ b/packages/aws-cdk/lib/api/aws-auth/aws-sdk-inifile.ts @@ -7,24 +7,13 @@ import * as AWS from 'aws-sdk'; * There are a number of issues in the upstream version of SharedIniFileCredentials * that need fixing: * - * 1. The upstream aws-sdk contains an incorrect instantiation of an `AWS.STS` - * client, which *should* have taken the region from the requested profile - * but doesn't. It will use the region from the default profile, which - * may not exist, defaulting to `us-east-1` (since we switched to - * AWS_STS_REGIONAL_ENDPOINTS=regional, that default is not even allowed anymore - * and the absence of a default region will lead to an error). + * 1. The upstream aws-sdk does not support the 'credential_source' option. Meaning credentials + * for assume-role cannot be fetched using EC2/ESC metadata. * - * 2. The simple fix is to get the region from the `config` file. profiles - * are made up of a combination of `credentials` and `config`, and the region is - * generally in `config` with the rest in `credentials`. However, a bug in - * `getProfilesFromSharedConfig` overwrites ALL `config` data with `credentials` - * data, so we also need to do extra work to fish the `region` out of the config. - * - * 3. The 'credential_source' option is not supported. Meaning credentials - * for assume-role cannot be fetched using EC2/ESC metadata. - * - * See https://github.com/aws/aws-sdk-js/issues/3418 for all the gory details. - * See https://github.com/aws/aws-sdk-js/issues/1916 for some more glory details. + * 2. The upstream aws-sdk does not support SSO profiles as the source of RoleProfiles, + * because it will always use the `SharedIniFileCredentials` provider to load + * source credentials, but in order to support SSO profiles you must use a + * separate class (`SsoCredentials). */ export class PatchedSharedIniFileCredentials extends AWS.SharedIniFileCredentials { declare private profile: string; @@ -60,21 +49,29 @@ export class PatchedSharedIniFileCredentials extends AWS.SharedIniFileCredential var sourceProfile = roleProfile.source_profile; var credentialSource = roleProfile.credential_source; - const credentialError = (AWS as any).util.error( - new Error(`When using 'role_arn' in profile ('${this.profile}'), you must also configure exactly one of 'source_profile' or 'credential_source'`), - { code: 'SharedIniFileCredentialsProviderFailure' }, - ); - - if (sourceProfile && credentialSource) { - throw credentialError; - } - - if (!sourceProfile && !credentialSource) { - throw credentialError; + if (!!sourceProfile === !!credentialSource) { + throw (AWS as any).util.error( + new Error(`When using 'role_arn' in profile ('${this.profile}'), you must also configure exactly one of 'source_profile' or 'credential_source'`), + { code: 'SharedIniFileCredentialsProviderFailure' }, + ); } - const profiles = loadProfilesProper(this.filename); - const region = profiles[this.profile]?.region ?? profiles.default?.region ?? 'us-east-1'; + // Confirmed this against AWS CLI behavior -- the region must be in the assumED profile, + // otherwise `us-east-1`. From the upstream comment in `aws-sdk-js`: + // -------- comment from aws-sdk-js ------------------- + // Experimentation shows that the AWS CLI (tested at version 1.18.136) + // ignores the following potential sources of a region for the purposes of + // this AssumeRole call: + // + // - The [default] profile + // - The AWS_REGION environment variable + // + // Ignoring the [default] profile for the purposes of AssumeRole is arguably + // a bug in the CLI since it does use the [default] region for service + // calls... but right now we're matching behavior of the other tool. + // ------------------------------------------------- + + const region = roleProfile?.region ?? 'us-east-1'; const stsCreds = sourceProfile ? this.sourceProfileCredentials(sourceProfile, creds) : this.credentialSourceCredentials(credentialSource); @@ -121,7 +118,6 @@ export class PatchedSharedIniFileCredentials extends AWS.SharedIniFileCredential } private sourceProfileCredentials(sourceProfile: string, profiles: Record>) { - var sourceProfileExistanceTest = profiles[sourceProfile]; if (typeof sourceProfileExistanceTest !== 'object') { @@ -132,11 +128,23 @@ export class PatchedSharedIniFileCredentials extends AWS.SharedIniFileCredential ); } - if (sourceProfileExistanceTest.sso_start_url) { + // We need to do a manual check here if the source profile (providing the + // credentials for the AssumeRole) is an SSO profile. That's because + // `SharedIniFileCredentials` itself doesn't support providing credentials from + // arbitrary profiles, only for StaticCredentials and AssumeRole type + // profiles; if it's an SSO profile you need to instantiate a special + // Credential Provider for that. + // + // --- + // + // An SSO profile can be configured in 2 ways (put all the info in the profile + // section, or put half of it in an `[sso-session]` block), but in both cases + // the primary profile block must have the `sso_account_id` key + if (sourceProfileExistanceTest.sso_account_id) { return new AWS.SsoCredentials({ profile: sourceProfile }); } - return new AWS.SharedIniFileCredentials( + return new PatchedSharedIniFileCredentials( (AWS as any).util.merge(this.options || {}, { profile: sourceProfile, preferStaticCredentials: true, @@ -148,7 +156,6 @@ export class PatchedSharedIniFileCredentials extends AWS.SharedIniFileCredential // the aws-sdk for js does not support 'credential_source' (https://github.com/aws/aws-sdk-js/issues/1916) // so unfortunately we need to implement this ourselves. private credentialSourceCredentials(sourceCredential: string) { - // see https://docs.aws.amazon.com/credref/latest/refdocs/setting-global-credential_source.html switch (sourceCredential) { case 'Environment': { @@ -166,36 +173,4 @@ export class PatchedSharedIniFileCredentials extends AWS.SharedIniFileCredential } } -} - -/** - * A function to load profiles from disk that MERGES credentials and config instead of overwriting - * - * @see https://github.com/aws/aws-sdk-js/blob/5ae5a7d7d24d1000dbc089cc15f8ed2c7b06c542/lib/util.js#L956 - */ -function loadProfilesProper(filename: string) { - const util = (AWS as any).util; // Does exists even though there aren't any typings for it - const iniLoader = util.iniLoader; - const profiles: Record> = {}; - let profilesFromConfig: Record> = {}; - if (process.env[util.configOptInEnv]) { - profilesFromConfig = iniLoader.loadFrom({ - isConfig: true, - filename: process.env[util.sharedConfigFileEnv], - }); - } - var profilesFromCreds: Record> = iniLoader.loadFrom({ - filename: filename || - (process.env[util.configOptInEnv] && process.env[util.sharedCredentialsFileEnv]), - }); - for (const [name, profile] of Object.entries(profilesFromConfig)) { - profiles[name] = profile; - } - for (const [name, profile] of Object.entries(profilesFromCreds)) { - profiles[name] = { - ...profiles[name], - ...profile, - }; - } - return profiles; -} +} \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts b/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts index 31ceac08d298b..9d8a84494bda6 100644 --- a/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts +++ b/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts @@ -11,7 +11,7 @@ import { CloudAssembly } from './cloud-assembly'; /** * @returns output directory */ -type Synthesizer = (aws: SdkProvider, config: Configuration) => Promise; +export type Synthesizer = (aws: SdkProvider, config: Configuration) => Promise; /** * The Cloud Assembly schema version where the framework started to generate analytics itself diff --git a/packages/aws-cdk/lib/api/cxapp/exec.ts b/packages/aws-cdk/lib/api/cxapp/exec.ts index d4bb217135d59..b01b42cef30e3 100644 --- a/packages/aws-cdk/lib/api/cxapp/exec.ts +++ b/packages/aws-cdk/lib/api/cxapp/exec.ts @@ -11,43 +11,17 @@ import { loadTree, some } from '../../tree'; import { splitBySize } from '../../util/objects'; import { versionNumber } from '../../version'; import { SdkProvider } from '../aws-auth'; +import { RWLock, ILock } from '../util/rwlock'; -/** Invokes the cloud executable and returns JSON output */ -export async function execProgram(aws: SdkProvider, config: Configuration): Promise { - const env: { [key: string]: string } = { }; - - const context = config.context.all; - await populateDefaultEnvironmentIfNeeded(aws, env); - - const debugMode: boolean = config.settings.get(['debug']) ?? true; - if (debugMode) { - env.CDK_DEBUG = 'true'; - } - - const pathMetadata: boolean = config.settings.get(['pathMetadata']) ?? true; - if (pathMetadata) { - context[cxapi.PATH_METADATA_ENABLE_CONTEXT] = true; - } - - const assetMetadata: boolean = config.settings.get(['assetMetadata']) ?? true; - if (assetMetadata) { - context[cxapi.ASSET_RESOURCE_METADATA_ENABLED_CONTEXT] = true; - } - - const versionReporting: boolean = config.settings.get(['versionReporting']) ?? true; - if (versionReporting) { context[cxapi.ANALYTICS_REPORTING_ENABLED_CONTEXT] = true; } - // We need to keep on doing this for framework version from before this flag was deprecated. - if (!versionReporting) { context['aws:cdk:disable-version-reporting'] = true; } - - const stagingEnabled = config.settings.get(['staging']) ?? true; - if (!stagingEnabled) { - context[cxapi.DISABLE_ASSET_STAGING_CONTEXT] = true; - } - - const bundlingStacks = config.settings.get(['bundlingStacks']) ?? ['**']; - context[cxapi.BUNDLING_STACKS] = bundlingStacks; +export interface ExecProgramResult { + readonly assembly: cxapi.CloudAssembly; + readonly lock: ILock; +} - debug('context:', context); +/** Invokes the cloud executable and returns JSON output */ +export async function execProgram(aws: SdkProvider, config: Configuration): Promise { + const env = await prepareDefaultEnvironment(aws); + const context = await prepareContext(config, env); const build = config.settings.get(['build']); if (build) { @@ -62,7 +36,11 @@ export async function execProgram(aws: SdkProvider, config: Configuration): Prom // bypass "synth" if app points to a cloud assembly if (await fs.pathExists(app) && (await fs.stat(app)).isDirectory()) { debug('--app points to a cloud assembly, so we bypass synth'); - return createAssembly(app); + + // Acquire a read lock on this directory + const lock = await new RWLock(app).acquireRead(); + + return { assembly: createAssembly(app), lock }; } const commandLine = await guessExecutable(appToArray(app)); @@ -80,6 +58,9 @@ export async function execProgram(aws: SdkProvider, config: Configuration): Prom debug('outdir:', outdir); env[cxapi.OUTDIR_ENV] = outdir; + // Acquire a read lock on the output directory + const writerLock = await new RWLock(outdir).acquireWrite(); + // Send version information env[cxapi.CLI_ASM_VERSION_ENV] = cxschema.Manifest.version(); env[cxapi.CLI_VERSION_ENV] = versionNumber(); @@ -107,20 +88,7 @@ export async function execProgram(aws: SdkProvider, config: Configuration): Prom contextOverflowCleanup(contextOverflowLocation, assembly); - return assembly; - - function createAssembly(appDir: string) { - try { - return new cxapi.CloudAssembly(appDir); - } catch (error) { - if (error.message.includes(cxschema.VERSION_MISMATCH)) { - // this means the CLI version is too old. - // we instruct the user to upgrade. - throw new Error(`This CDK CLI is not compatible with the CDK library used by your application. Please upgrade the CLI to the latest version.\n(${error.message})`); - } - throw error; - } - } + return { assembly, lock: await writerLock.convertToReaderLock() }; async function exec(commandAndArgs: string) { return new Promise((ok, fail) => { @@ -157,6 +125,22 @@ export async function execProgram(aws: SdkProvider, config: Configuration): Prom } } +/** + * Creates an assembly with error handling + */ +export function createAssembly(appDir: string) { + try { + return new cxapi.CloudAssembly(appDir); + } catch (error) { + if (error.message.includes(cxschema.VERSION_MISMATCH)) { + // this means the CLI version is too old. + // we instruct the user to upgrade. + throw new Error(`This CDK CLI is not compatible with the CDK library used by your application. Please upgrade the CLI to the latest version.\n(${error.message})`); + } + throw error; + } +} + /** * If we don't have region/account defined in context, we fall back to the default SDK behavior * where region is retrieved from ~/.aws/config and account is based on default credentials provider @@ -169,7 +153,9 @@ export async function execProgram(aws: SdkProvider, config: Configuration): Prom * * @param context The context key/value bash. */ -async function populateDefaultEnvironmentIfNeeded(aws: SdkProvider, env: { [key: string]: string | undefined}) { +export async function prepareDefaultEnvironment(aws: SdkProvider): Promise<{ [key: string]: string }> { + const env: { [key: string]: string } = { }; + env[cxapi.DEFAULT_REGION_ENV] = aws.defaultRegion; debug(`Setting "${cxapi.DEFAULT_REGION_ENV}" environment variable to`, env[cxapi.DEFAULT_REGION_ENV]); @@ -178,6 +164,49 @@ async function populateDefaultEnvironmentIfNeeded(aws: SdkProvider, env: { [key: env[cxapi.DEFAULT_ACCOUNT_ENV] = accountId; debug(`Setting "${cxapi.DEFAULT_ACCOUNT_ENV}" environment variable to`, env[cxapi.DEFAULT_ACCOUNT_ENV]); } + + return env; +} + +/** + * Settings related to synthesis are read from context. + * The merging of various configuration sources like cli args or cdk.json has already happened. + * We now need to set the final values to the context. + */ +export async function prepareContext(config: Configuration, env: { [key: string]: string | undefined}) { + const context = config.context.all; + + const debugMode: boolean = config.settings.get(['debug']) ?? true; + if (debugMode) { + env.CDK_DEBUG = 'true'; + } + + const pathMetadata: boolean = config.settings.get(['pathMetadata']) ?? true; + if (pathMetadata) { + context[cxapi.PATH_METADATA_ENABLE_CONTEXT] = true; + } + + const assetMetadata: boolean = config.settings.get(['assetMetadata']) ?? true; + if (assetMetadata) { + context[cxapi.ASSET_RESOURCE_METADATA_ENABLED_CONTEXT] = true; + } + + const versionReporting: boolean = config.settings.get(['versionReporting']) ?? true; + if (versionReporting) { context[cxapi.ANALYTICS_REPORTING_ENABLED_CONTEXT] = true; } + // We need to keep on doing this for framework version from before this flag was deprecated. + if (!versionReporting) { context['aws:cdk:disable-version-reporting'] = true; } + + const stagingEnabled = config.settings.get(['staging']) ?? true; + if (!stagingEnabled) { + context[cxapi.DISABLE_ASSET_STAGING_CONTEXT] = true; + } + + const bundlingStacks = config.settings.get(['bundlingStacks']) ?? ['**']; + context[cxapi.BUNDLING_STACKS] = bundlingStacks; + + debug('context:', context); + + return context; } /** diff --git a/packages/aws-cdk/lib/api/util/rwlock.ts b/packages/aws-cdk/lib/api/util/rwlock.ts new file mode 100644 index 0000000000000..6667bd17afe06 --- /dev/null +++ b/packages/aws-cdk/lib/api/util/rwlock.ts @@ -0,0 +1,184 @@ +import { promises as fs } from 'fs'; +import * as path from 'path'; + +/** + * A single-writer/multi-reader lock on a directory + * + * It uses marker files with PIDs in them as a locking marker; the PIDs will be + * checked for liveness, so that if the process exits without cleaning up the + * files the lock is implicitly released. + * + * This class is not 100% race safe, but in practice it should be a lot + * better than the 0 protection we have today. + */ +export class RWLock { + private readonly pidString: string; + private readonly writerFile: string; + private readonly readerFile: string; + + constructor(public readonly directory: string) { + this.pidString = `${process.pid}`; + + this.writerFile = path.join(this.directory, 'synth.lock'); + this.readerFile = path.join(this.directory, `read.${this.pidString}.lock`); + } + + /** + * Acquire a writer lock. + * + * No other readers or writers must exist for the given directory. + */ + public async acquireWrite(): Promise { + await this.assertNoOtherWriters(); + + const readers = await this.currentReaders(); + if (readers.length > 0) { + throw new Error(`Other CLIs (PID=${readers}) are currently reading from ${this.directory}. Invoke the CLI in sequence, or use '--output' to synth into different directories.`); + } + + await writeFileAtomic(this.writerFile, this.pidString); + + return { + release: async () => { + await deleteFile(this.writerFile); + }, + convertToReaderLock: async () => { + // Acquire the read lock before releasing the write lock. Slightly less + // chance of racing! + const ret = await this.doAcquireRead(); + await deleteFile(this.writerFile); + return ret; + }, + }; + } + + /** + * Acquire a read lock + * + * Will fail if there are any writers. + */ + public async acquireRead(): Promise { + await this.assertNoOtherWriters(); + return this.doAcquireRead(); + } + + /** + * Do the actual acquiring of a read lock. + */ + private async doAcquireRead(): Promise { + await writeFileAtomic(this.readerFile, this.pidString); + return { + release: async () => { + await deleteFile(this.readerFile); + }, + }; + } + + private async assertNoOtherWriters() { + const writer = await this.currentWriter(); + if (writer) { + throw new Error(`Another CLI (PID=${writer}) is currently synthing to ${this.directory}. Invoke the CLI in sequence, or use '--output' to synth into different directories.`); + } + } + + /** + * Check the current writer (if any) + */ + private async currentWriter(): Promise { + const contents = await readFileIfExists(this.writerFile); + if (!contents) { return undefined; } + + const pid = parseInt(contents, 10); + if (!processExists(pid)) { + // Do cleanup of a stray file now + await deleteFile(this.writerFile); + return undefined; + } + + return pid; + } + + /** + * Check the current readers (if any) + */ + private async currentReaders(): Promise { + const re = /^read\.([^.]+)\.lock$/; + const ret = new Array(); + + let children; + try { + children = await fs.readdir(this.directory, { encoding: 'utf-8' }); + } catch (e) { + // Can't be locked if the directory doesn't exist + if (e.code === 'ENOENT') { return []; } + throw e; + } + + for (const fname of children) { + const m = fname.match(re); + if (m) { + const pid = parseInt(m[1], 10); + if (processExists(pid)) { + ret.push(pid); + } else { + // Do cleanup of a stray file now + await deleteFile(path.join(this.directory, fname)); + } + } + } + return ret; + } +} + +/** + * An acquired lock + */ +export interface ILock { + release(): Promise; +} + +/** + * An acquired writer lock + */ +export interface IWriterLock extends ILock { + /** + * Convert the writer lock to a reader lock + */ + convertToReaderLock(): Promise; +} + +async function readFileIfExists(filename: string): Promise { + try { + return await fs.readFile(filename, { encoding: 'utf-8' }); + } catch (e) { + if (e.code === 'ENOENT') { return undefined; } + throw e; + } +} + +async function writeFileAtomic(filename: string, contents: string): Promise { + await fs.mkdir(path.dirname(filename), { recursive: true }); + const tmpFile = `${filename}.${process.pid}`; + await fs.writeFile(tmpFile, contents, { encoding: 'utf-8' }); + await fs.rename(tmpFile, filename); +} + +async function deleteFile(filename: string) { + try { + await fs.unlink(filename); + } catch (e) { + if (e.code === 'ENOENT') { + return; + } + throw e; + } +} + +function processExists(pid: number) { + try { + process.kill(pid, 0); + return true; + } catch (e) { + return false; + } +} \ No newline at end of file diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index 32dfb3e0dc32f..371e36b9e8168 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -8,7 +8,7 @@ import { SdkProvider } from '../lib/api/aws-auth'; import { BootstrapSource, Bootstrapper } from '../lib/api/bootstrap'; import { CloudFormationDeployments } from '../lib/api/cloudformation-deployments'; import { StackSelector } from '../lib/api/cxapp/cloud-assembly'; -import { CloudExecutable } from '../lib/api/cxapp/cloud-executable'; +import { CloudExecutable, Synthesizer } from '../lib/api/cxapp/cloud-executable'; import { execProgram } from '../lib/api/cxapp/exec'; import { PluginHost } from '../lib/api/plugin'; import { ToolkitInfo } from '../lib/api/toolkit-info'; @@ -24,8 +24,9 @@ import { displayNotices, refreshNotices } from '../lib/notices'; import { Command, Configuration, Settings } from '../lib/settings'; import * as version from '../lib/version'; import { DeploymentMethod } from './api'; -import { enableTracing } from './util/tracing'; +import { ILock } from './api/util/rwlock'; import { checkForPlatformWarnings } from './platform-warnings'; +import { enableTracing } from './util/tracing'; // https://github.com/yargs/yargs/issues/1929 // https://github.com/evanw/esbuild/issues/1492 @@ -35,7 +36,7 @@ const yargs = require('yargs'); /* eslint-disable max-len */ /* eslint-disable @typescript-eslint/no-shadow */ // yargs -async function parseCommandLineArguments() { +async function parseCommandLineArguments(args: string[]) { // Use the following configuration for array arguments: // // { type: 'array', default: [], nargs: 1, requiresArg: true } @@ -274,7 +275,7 @@ async function parseCommandLineArguments() { 'If your app has a single stack, there is no need to specify the stack name', 'If one of cdk.json or ~/.cdk.json exists, options specified there will be used as defaults. Settings in cdk.json take precedence.', ].join('\n\n')) - .argv; + .parse(args); } if (!process.stdout.isTTY) { @@ -282,8 +283,8 @@ if (!process.stdout.isTTY) { process.env.FORCE_COLOR = '0'; } -async function initCommandLine() { - const argv = await parseCommandLineArguments(); +export async function exec(args: string[], synthesizer?: Synthesizer): Promise { + const argv = await parseCommandLineArguments(args); if (argv.verbose) { setLogLevel(argv.verbose); @@ -329,10 +330,19 @@ async function initCommandLine() { const cloudFormation = new CloudFormationDeployments({ sdkProvider }); + let outDirLock: ILock | undefined; const cloudExecutable = new CloudExecutable({ configuration, sdkProvider, - synthesizer: execProgram, + synthesizer: synthesizer ?? (async (aws, config) => { + // Invoke 'execProgram', and copy the lock for the directory in the global + // variable here. It will be released when the CLI exits. Locks are not re-entrant + // so release it if we have to synthesize more than once (because of context lookups). + await outDirLock?.release(); + const { assembly, lock } = await execProgram(aws, config); + outDirLock = lock; + return assembly; + }), }); /** Function to load plug-ins, using configurations additively. */ @@ -373,6 +383,10 @@ async function initCommandLine() { try { return await main(cmd, argv); } finally { + // If we locked the 'cdk.out' directory, release it here. + await outDirLock?.release(); + + // Do PSAs here await version.displayVersionMessage(); if (shouldDisplayNotices()) { @@ -686,8 +700,8 @@ function yargsNegativeAlias { if (typeof value === 'number') { process.exitCode = value; diff --git a/packages/aws-cdk/lib/index.ts b/packages/aws-cdk/lib/index.ts index 57502a1035caf..a76f253b80ca6 100644 --- a/packages/aws-cdk/lib/index.ts +++ b/packages/aws-cdk/lib/index.ts @@ -1,2 +1,2 @@ export * from './api'; -export { cli } from './cli'; +export { cli, exec } from './cli'; diff --git a/packages/aws-cdk/lib/init.ts b/packages/aws-cdk/lib/init.ts index 822178308437f..548a6f3d2604c 100644 --- a/packages/aws-cdk/lib/init.ts +++ b/packages/aws-cdk/lib/init.ts @@ -197,13 +197,17 @@ interface ProjectInfo { export async function availableInitTemplates(): Promise { return new Promise(async resolve => { - const templatesDir = path.join(rootDir(), 'lib', 'init-templates'); - const templateNames = await listDirectory(templatesDir); - const templates = new Array(); - for (const templateName of templateNames) { - templates.push(await InitTemplate.fromName(templatesDir, templateName)); + try { + const templatesDir = path.join(rootDir(), 'lib', 'init-templates'); + const templateNames = await listDirectory(templatesDir); + const templates = new Array(); + for (const templateName of templateNames) { + templates.push(await InitTemplate.fromName(templatesDir, templateName)); + } + resolve(templates); + } catch { + resolve([]); } - resolve(templates); }); } export async function availableInitLanguages(): Promise { diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 50ddf96ceff00..48d89a3f26837 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -82,7 +82,7 @@ "constructs": "^10.0.0", "make-runnable": "^1.4.1", "mockery": "^2.1.0", - "nock": "^13.2.9", + "nock": "^13.3.0", "@aws-cdk/pkglint": "0.0.0", "sinon": "^9.2.4", "ts-jest": "^27.1.5", @@ -96,7 +96,7 @@ "@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.72.0", + "@jsii/check-node": "1.73.0", "archiver": "^5.3.1", "aws-sdk": "^2.1211.0", "camelcase": "^6.3.0", diff --git a/packages/aws-cdk/test/api/exec.test.ts b/packages/aws-cdk/test/api/exec.test.ts index b9c5637acce1a..e52b4485da2cd 100644 --- a/packages/aws-cdk/test/api/exec.test.ts +++ b/packages/aws-cdk/test/api/exec.test.ts @@ -90,7 +90,8 @@ test('cli does not throw when manifest version = schema version', async () => { config.settings.set(['app'], 'cdk.out'); - await execProgram(sdkProvider, config); + const { lock } = await execProgram(sdkProvider, config); + await lock.release(); }, TEN_SECOND_TIMEOUT); @@ -107,7 +108,8 @@ test('cli does not throw when manifest version < schema version', async () => { // greater that the version created in the manifest, which is what we are testing for. const mockVersionNumber = ImportMock.mockFunction(cxschema.Manifest, 'version', semver.inc(currentSchemaVersion, 'major')); try { - await execProgram(sdkProvider, config); + const { lock } = await execProgram(sdkProvider, config); + await lock.release(); } finally { mockVersionNumber.restore(); } @@ -128,9 +130,11 @@ test('bypasses synth when app points to a cloud assembly', async () => { writeOutputAssembly(); // WHEN - const cloudAssembly = await execProgram(sdkProvider, config); + const { assembly: cloudAssembly, lock } = await execProgram(sdkProvider, config); expect(cloudAssembly.artifacts).toEqual([]); expect(cloudAssembly.directory).toEqual('cdk.out'); + + await lock.release(); }); test('the application set in --app is executed', async () => { @@ -142,7 +146,8 @@ test('the application set in --app is executed', async () => { }); // WHEN - await execProgram(sdkProvider, config); + const { lock } = await execProgram(sdkProvider, config); + await lock.release(); }); test('the application set in --app is executed as-is if it contains a filename that does not exist', async () => { @@ -154,7 +159,8 @@ test('the application set in --app is executed as-is if it contains a filename t }); // WHEN - await execProgram(sdkProvider, config); + const { lock } = await execProgram(sdkProvider, config); + await lock.release(); }); test('the application set in --app is executed with arguments', async () => { @@ -166,7 +172,8 @@ test('the application set in --app is executed with arguments', async () => { }); // WHEN - await execProgram(sdkProvider, config); + const { lock } = await execProgram(sdkProvider, config); + await lock.release(); }); test('application set in --app as `*.js` always uses handler on windows', async () => { @@ -179,7 +186,8 @@ test('application set in --app as `*.js` always uses handler on windows', async }); // WHEN - await execProgram(sdkProvider, config); + const { lock } = await execProgram(sdkProvider, config); + await lock.release(); }); test('application set in --app is `*.js` and executable', async () => { @@ -191,7 +199,8 @@ test('application set in --app is `*.js` and executable', async () => { }); // WHEN - await execProgram(sdkProvider, config); + const { lock } = await execProgram(sdkProvider, config); + await lock.release(); }); test('cli throws when the `build` script fails', async () => { @@ -220,7 +229,8 @@ test('cli does not throw when the `build` script succeeds', async () => { }); // WHEN - await execProgram(sdkProvider, config); + const { lock } = await execProgram(sdkProvider, config); + await lock.release(); }, TEN_SECOND_TIMEOUT); diff --git a/packages/aws-cdk/test/api/logs/logs-monitor.test.ts b/packages/aws-cdk/test/api/logs/logs-monitor.test.ts index eed3cf2683540..7f5e54a89b300 100644 --- a/packages/aws-cdk/test/api/logs/logs-monitor.test.ts +++ b/packages/aws-cdk/test/api/logs/logs-monitor.test.ts @@ -1,6 +1,6 @@ import { blue, yellow } from 'chalk'; import { CloudWatchLogEventMonitor } from '../../../lib/api/logs/logs-monitor'; -import { sleep } from '../../integ/helpers/aws'; +import { sleep } from '../../util'; import { MockSdk } from '../../util/mock-sdk'; let sdk: MockSdk; diff --git a/packages/aws-cdk/test/integ/cli-regression-patches/README.md b/packages/aws-cdk/test/integ/cli-regression-patches/README.md deleted file mode 100644 index c930255e85809..0000000000000 --- a/packages/aws-cdk/test/integ/cli-regression-patches/README.md +++ /dev/null @@ -1,54 +0,0 @@ -Regression Test Patches -======================== - -The regression test suite will use the test suite of an OLD version -of the CLI when testing a NEW version of the CLI, to make sure the -old tests still pass. - -Sometimes though, the old tests won't pass. This can happen when we -introduce breaking changes to the framework or CLI (for something serious, -such as security reasons), or maybe because we had a bug in an old -version that happened to pass, but now the test needs to be updated -in order to pass a bugfix. - -## Mechanism - -The files in this directory will be copied over the test directory -so that you can exclude tests from running, or patch up test running -scripts. - -Files will be copied like so: - -``` -aws-cdk/test/integ/cli-regression-patches/vX.Y.Z/* - -# will be copied into - -aws-cdk/test/integ/cli -``` - -For example, to skip a certain integration test during regression -testing, create the following file: - -``` -cli-regression-patches/vX.Y.Z/skip-tests.txt -``` - -If you need to replace source files, it's probably best to stick -compiled `.js` files in here. `.ts` source files wouldn't compile -because they'd be missing `imports`. - -## Versioning - -The patch sets are versioned, so that they will only be applied for -a certain version of the tests and will automatically age out when -we proceed past that release. - -The version in the directory name needs to be named after the -version that contains the *tests* we're running, that need to be -patched. - -So for example, if we are running regression tests for release -candidate `1.45.0`, we would use the tests from released version -`1.44.0`, and so you would call the patch directory `v1.44.0`. - diff --git a/packages/aws-cdk/test/integ/cli/jest.config.js b/packages/aws-cdk/test/integ/cli/jest.config.js deleted file mode 100644 index 1e3fe3d13f96b..0000000000000 --- a/packages/aws-cdk/test/integ/cli/jest.config.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - moduleFileExtensions: [ - "js", - ], - testMatch: [ - "**/*.integtest.js", - ], - testEnvironment: "node", - bail: 1, - verbose: true, - reporters: [ - "default", - [ "jest-junit", { suiteName: "jest tests", outputDirectory: "coverage" } ] - ] -}; diff --git a/packages/aws-cdk/test/integ/cli/test.sh b/packages/aws-cdk/test/integ/cli/test.sh index bf0ec0a7c5c68..1d33ee1502bbd 100755 --- a/packages/aws-cdk/test/integ/cli/test.sh +++ b/packages/aws-cdk/test/integ/cli/test.sh @@ -1,12 +1,6 @@ #!/bin/bash -set -euo pipefail -scriptdir=$(cd $(dirname $0) && pwd) +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. -echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' -echo 'CLI Integration Tests' -echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' - -cd $scriptdir - -source ../common/jest-test.bash -invokeJest "$@" +exec ${INTEG_TOOLS}/bin/run-suite --use-cli-release=$VERSION cli-integ-tests diff --git a/packages/aws-cdk/test/integ/common/jest-test.bash b/packages/aws-cdk/test/integ/common/jest-test.bash deleted file mode 100755 index 7a96a9f845155..0000000000000 --- a/packages/aws-cdk/test/integ/common/jest-test.bash +++ /dev/null @@ -1,18 +0,0 @@ -function invokeJest() { - # Install these dependencies that the tests (written in Jest) need. - # Only if we're not running from the repo, because if we are the - # dependencies have already been installed by the containing 'aws-cdk' package's - # package.json. - if ! npx --no-install jest --version; then - echo 'Looks like we need to install jest first. Hold on.' >& 2 - npm install --prefix .. jest@^27 jest-junit@^14 aws-sdk@^2 axios@^0.27.2 - fi - - # This must --runInBand because parallelism is arranged for inside the tests - # themselves and they must run in the same process in order to coordinate to - # make sure no 2 tests use the same region at the same time. - # - # Jest is run in a weird way because npx started (NPM 8?) to change directory - # into 'package.json' root, which we don't want here. - $(npx which jest) --runInBand --verbose "$@" -} diff --git a/packages/aws-cdk/test/integ/github-helpers.ts b/packages/aws-cdk/test/integ/github-helpers.ts deleted file mode 100644 index d5a9b6cb41df7..0000000000000 --- a/packages/aws-cdk/test/integ/github-helpers.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Octokit } from '@octokit/rest'; -import * as semver from 'semver'; - -module.exports.fetchPreviousVersion = async function(base: string) { - const token = process.env.GITHUB_TOKEN; - if (!token) { - throw new Error('GITHUB_TOKEN must be set'); - } - - const github = new Octokit({ auth: token }); - const releases = await github.repos.listReleases({ - owner: 'aws', - repo: 'aws-cdk', - }); - - // this returns a list in descending order, newest releases first - // opts for same major version where possible, falling back otherwise - // to previous major versions. - let previousMVRelease = undefined; - for (const release of releases.data) { - const version = release.name?.replace('v', ''); - if (version && semver.lt(version, base)) { - if (semver.major(version) === semver.major(base)) { - return version; - } else if (!previousMVRelease) { - previousMVRelease = version; - } - } - } - if (previousMVRelease) { return previousMVRelease; } - - throw new Error(`Unable to find previous version of ${base}`); -}; - -// eslint-disable-next-line @typescript-eslint/no-require-imports -require('make-runnable/custom')({ - printOutputFrame: false, -}); diff --git a/packages/aws-cdk/test/integ/helpers/resource-pool.test.ts b/packages/aws-cdk/test/integ/helpers/resource-pool.test.ts deleted file mode 100644 index edae1a1ed170a..0000000000000 --- a/packages/aws-cdk/test/integ/helpers/resource-pool.test.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { ResourcePool } from './resource-pool'; - -test('take and dispose', async () => { - const pool = new ResourcePool(['a']); - - const take1 = pool.take(); - const take2 = pool.take(); - - let released = false; - - const lease1 = await take1; - // awaiting 'take2' would now block but we add an async - // handler to it to flip a boolean to see when it gets activated. - void(take2.then(() => released = true)); - - expect(lease1.value).toEqual('a'); - await waitTick(); - expect(released).toEqual(false); - - lease1.dispose(); - await waitTick(); // This works because setImmediate is scheduled in LIFO order - expect(released).toEqual(true); -}); - -test('double dispose throws', async () => { - const pool = new ResourcePool(['a']); - const lease = await pool.take(); - - lease.dispose(); - expect(() => lease.dispose()).toThrow(); -}); - -test('more consumers than values', async () => { - const pool = new ResourcePool(['a', 'b']); - - const values = await Promise.all([ - pool.using(x => x), - pool.using(x => x), - pool.using(x => x), - ]); - - expect(values).toEqual(['a', 'b', 'a']); -}); - -function waitTick() { - return new Promise(setImmediate); -} \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/helpers/resource-pool.ts b/packages/aws-cdk/test/integ/helpers/resource-pool.ts deleted file mode 100644 index 444a0bc193edd..0000000000000 --- a/packages/aws-cdk/test/integ/helpers/resource-pool.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** - * A class that holds a pool of resources and gives them out and returns them on-demand - * - * The resources will be given out front to back, when they are returned - * the most recently returned version will be given out again (for best - * cache coherency). - * - * If there are multiple consumers waiting for a resource, consumers are serviced - * in FIFO order for most fairness. - */ -export class ResourcePool { - private readonly resources: A[]; - private readonly waiters: Array<(x: A) => void> = []; - - constructor(resources: A[]) { - if (resources.length === 0) { - throw new Error('Must have at least one resource in the pool'); - } - this.resources = [...resources]; - } - - /** - * Take one value from the resource pool - * - * If no such value is currently available, wait until it is. - */ - public take(): Promise> { - const next = this.resources.shift(); - if (next !== undefined) { - return Promise.resolve(this.makeLease(next)); - } else { - return new Promise(ok => { - this.waiters.push((resource) => ok(this.makeLease(resource))); - }); - } - } - - /** - * Execute a block using a single resource from the pool - */ - public async using(block: (x: A) => B | Promise): Promise { - const lease = await this.take(); - try { - return await block(lease.value); - } finally { - lease.dispose(); - } - } - - private makeLease(value: A): ILease { - let disposed = false; - return { - value, - dispose: () => { - if (disposed) { - throw new Error('Calling dispose() on an already-disposed lease.'); - } - disposed = true; - this.returnValue(value); - }, - }; - } - - /** - * When a value is returned: - * - * - If someone's waiting for it, give it to them - * - Otherwise put it back into the pool - */ - private returnValue(value: A) { - const nextWaiter = this.waiters.shift(); - if (nextWaiter !== undefined) { - // Execute in the next tick, otherwise the call stack is going to get very - // confusing. - setImmediate(() => nextWaiter(value)); - } else { - this.resources.unshift(value); - } - } -} - -/** - * A single value taken from the pool - */ -export interface ILease { - /** - * The value obtained by the lease - */ - readonly value: A; - - /** - * Return the leased value to the pool - */ - dispose(): void; -} \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/init/common.bash b/packages/aws-cdk/test/integ/init/common.bash deleted file mode 100644 index f41f02b5215e8..0000000000000 --- a/packages/aws-cdk/test/integ/init/common.bash +++ /dev/null @@ -1,25 +0,0 @@ -set -eu -init_test_dir="${init_test_dir:=/tmp/cdk-init-test}" - -function setup() { - rm -rf $init_test_dir - mkdir -p $init_test_dir - cd $init_test_dir -} - -function log() { - echo >&2 "| $@" -} - -function header() { - log - log "============================================================================================" - log $@ - log "============================================================================================" -} - -function assert_no_hook_files() { - compgen "\*.hook.\*" || return 0 - echo "'cdk init' left hook files in the template directory!" >&2 - exit 1 -} diff --git a/packages/aws-cdk/test/integ/init/test-all.sh b/packages/aws-cdk/test/integ/init/test-all.sh deleted file mode 100755 index f191d37bf4296..0000000000000 --- a/packages/aws-cdk/test/integ/init/test-all.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eu -scriptdir=$(cd $(dirname $0) && pwd) -$scriptdir/test-csharp.sh -$scriptdir/test-fsharp.sh -$scriptdir/test-java.sh -$scriptdir/test-javascript.sh -$scriptdir/test-python.sh -$scriptdir/test-typescript.sh -$scriptdir/test-go.sh - -echo "SUCCESS" diff --git a/packages/aws-cdk/test/integ/init/test-csharp-app.sh b/packages/aws-cdk/test/integ/init/test-csharp-app.sh index 19bd5c91e4ef9..c32d86b7ffbd8 100755 --- a/packages/aws-cdk/test/integ/init/test-csharp-app.sh +++ b/packages/aws-cdk/test/integ/init/test-csharp-app.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Naming shim for backwards compatibility with legacy -# tests and canaries. set -eu -scriptdir=$(cd $(dirname $0) && pwd) -exec $scriptdir/test-csharp.sh +# 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-csharp diff --git a/packages/aws-cdk/test/integ/init/test-csharp.sh b/packages/aws-cdk/test/integ/init/test-csharp.sh deleted file mode 100755 index ea82e3b63f38c..0000000000000 --- a/packages/aws-cdk/test/integ/init/test-csharp.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------ -# setup -#------------------------------------------------------------------ -set -e -scriptdir=$(cd $(dirname $0) && pwd) -source ${scriptdir}/common.bash - -header C# - -#------------------------------------------------------------------ - -if [[ "${1:-}" == "" ]]; then - templates="app sample-app" -else - templates="$@" -fi - -for template in $templates; do - echo "Trying C# template $template" - - setup - - cdk init -l csharp $template - cdk synth -done diff --git a/packages/aws-cdk/test/integ/init/test-fsharp.sh b/packages/aws-cdk/test/integ/init/test-fsharp.sh index f8ad463703672..7ea578e300c8d 100755 --- a/packages/aws-cdk/test/integ/init/test-fsharp.sh +++ b/packages/aws-cdk/test/integ/init/test-fsharp.sh @@ -1,26 +1,6 @@ #!/bin/bash -#------------------------------------------------------------------ -# setup -#------------------------------------------------------------------ -set -e -scriptdir=$(cd $(dirname $0) && pwd) -source ${scriptdir}/common.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. -header F# - -#------------------------------------------------------------------ - -if [[ "${1:-}" == "" ]]; then - templates="app sample-app" -else - templates="$@" -fi - -for template in $templates; do - echo "Trying F# template $template" - - setup - - cdk init -l fsharp $template - cdk synth -done +exec ${INTEG_TOOLS}/bin/run-suite --use-cli-release=$VERSION init-fsharp diff --git a/packages/aws-cdk/test/integ/init/test-generate-only.sh b/packages/aws-cdk/test/integ/init/test-generate-only.sh deleted file mode 100755 index f09ab29fcf537..0000000000000 --- a/packages/aws-cdk/test/integ/init/test-generate-only.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------ -# setup -#------------------------------------------------------------------ -set -e -scriptdir=$(cd $(dirname $0) && pwd) -source ${scriptdir}/common.bash - -header "--generate-only" - -#------------------------------------------------------------------ - -echo "Trying --generate-only" - -setup - -cdk init -l javascript --generate-only - -if [ -d .git ] -then - fail "git shouldn't have been initialized" -fi diff --git a/packages/aws-cdk/test/integ/init/test-go.sh b/packages/aws-cdk/test/integ/init/test-go.sh deleted file mode 100755 index 58959855073f0..0000000000000 --- a/packages/aws-cdk/test/integ/init/test-go.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------ -# setup -#------------------------------------------------------------------ -set -eu -scriptdir=$(cd $(dirname $0) && pwd) -source ${scriptdir}/common.bash -dist_root=$(cd ${DIST_ROOT:-.} && pwd) - -header Go - -#------------------------------------------------------------------ - -if [[ "${1:-}" == "" ]]; then - templates="app sample-app" -else - templates="$@" -fi - -for template in $templates; do - echo "Trying Go template $template" - - setup - - cdk init -l go $template - go mod edit -replace github.com/aws/aws-cdk-go/awscdk=$dist_root/go/awscdk - go mod tidy - go test - cdk synth -done diff --git a/packages/aws-cdk/test/integ/init/test-java.sh b/packages/aws-cdk/test/integ/init/test-java.sh index d2c95984fb178..404256230b64f 100755 --- a/packages/aws-cdk/test/integ/init/test-java.sh +++ b/packages/aws-cdk/test/integ/init/test-java.sh @@ -1,27 +1,6 @@ #!/bin/bash -#------------------------------------------------------------------ -# setup -#------------------------------------------------------------------ -set -e -scriptdir=$(cd $(dirname $0) && pwd) -source ${scriptdir}/common.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. -header Java - -#------------------------------------------------------------------ - -if [[ "${1:-}" == "" ]]; then - templates="app sample-app" -else - templates="$@" -fi - -for template in $templates; do - echo "Trying Java template $template" - - setup - - cdk init -l java $template - mvn package - cdk synth -done +exec ${INTEG_TOOLS}/bin/run-suite --use-cli-release=$VERSION init-java diff --git a/packages/aws-cdk/test/integ/init/test-javascript.sh b/packages/aws-cdk/test/integ/init/test-javascript.sh index 511403e19efcd..8a544ff669ace 100755 --- a/packages/aws-cdk/test/integ/init/test-javascript.sh +++ b/packages/aws-cdk/test/integ/init/test-javascript.sh @@ -1,27 +1,6 @@ #!/bin/bash -#------------------------------------------------------------------ -# setup -#------------------------------------------------------------------ -set -e -scriptdir=$(cd $(dirname $0) && pwd) -source ${scriptdir}/common.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. -header Javascript - -#------------------------------------------------------------------ - -if [[ "${1:-}" == "" ]]; then - templates="app sample-app" -else - templates="$@" -fi - -for template in $templates; do - echo "Trying Javascript template $template" - - setup - - cdk init -l javascript $template - npm run test - cdk synth -done +exec ${INTEG_TOOLS}/bin/run-suite --use-cli-release=$VERSION init-javascript diff --git a/packages/aws-cdk/test/integ/init/test-python-app.sh b/packages/aws-cdk/test/integ/init/test-python-app.sh index 3f130fcb24aaa..a6cb2be1f3af8 100755 --- a/packages/aws-cdk/test/integ/init/test-python-app.sh +++ b/packages/aws-cdk/test/integ/init/test-python-app.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Naming shim for backwards compatibility with legacy -# tests and canaries. set -eu -scriptdir=$(cd $(dirname $0) && pwd) -exec $scriptdir/test-python.sh +# 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-python diff --git a/packages/aws-cdk/test/integ/init/test-python-stackname.sh b/packages/aws-cdk/test/integ/init/test-python-stackname.sh deleted file mode 100755 index 415c9bdb25cf2..0000000000000 --- a/packages/aws-cdk/test/integ/init/test-python-stackname.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# Naming shim for backwards compatibility with legacy -# tests and canaries. -set -eu -scriptdir=$(cd $(dirname $0) && pwd) -init_test_dir=/tmp/cdkInitTest -source $scriptdir/test-python.sh diff --git a/packages/aws-cdk/test/integ/init/test-python.sh b/packages/aws-cdk/test/integ/init/test-python.sh deleted file mode 100755 index d40d94d4534ca..0000000000000 --- a/packages/aws-cdk/test/integ/init/test-python.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------ -# setup -#------------------------------------------------------------------ -set -eu -scriptdir=$(cd $(dirname $0) && pwd) -source ${scriptdir}/common.bash - -header Python - -#------------------------------------------------------------------ - -if [[ "${1:-}" == "" ]]; then - templates="app sample-app" -else - templates="$@" -fi - -for template in $templates; do - echo "Trying Python template $template" - - setup - - cdk init -l python $template - - source .venv/bin/activate - type -p pip - pip install -r requirements.txt - ./.venv/bin/pip install -r requirements-dev.txt - pytest - - cdk synth -done diff --git a/packages/aws-cdk/test/integ/init/test-typescript-app.sh b/packages/aws-cdk/test/integ/init/test-typescript-app.sh index 7db05ee7e5dad..68ff7bc6f5b2c 100755 --- a/packages/aws-cdk/test/integ/init/test-typescript-app.sh +++ b/packages/aws-cdk/test/integ/init/test-typescript-app.sh @@ -1,7 +1,6 @@ #!/bin/bash -# Naming shim for backwards compatibility with legacy -# tests and canaries. set -eu -scriptdir=$(cd $(dirname $0) && pwd) -# Run both app templates -exec $scriptdir/test-typescript.sh app sample-app +# 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-typescript-app diff --git a/packages/aws-cdk/test/integ/init/test-typescript-lib.sh b/packages/aws-cdk/test/integ/init/test-typescript-lib.sh index 514f6bf9fb800..7bae427df1e66 100755 --- a/packages/aws-cdk/test/integ/init/test-typescript-lib.sh +++ b/packages/aws-cdk/test/integ/init/test-typescript-lib.sh @@ -1,7 +1,6 @@ #!/bin/bash -# Naming shim for backwards compatibility with legacy -# tests and canaries. set -eu -scriptdir=$(cd $(dirname $0) && pwd) -# Run only lib template -exec $scriptdir/test-typescript.sh lib +# 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-typescript-lib diff --git a/packages/aws-cdk/test/integ/init/test-typescript-versions.sh b/packages/aws-cdk/test/integ/init/test-typescript-versions.sh index da5793661a97e..33b52b062070b 100755 --- a/packages/aws-cdk/test/integ/init/test-typescript-versions.sh +++ b/packages/aws-cdk/test/integ/init/test-typescript-versions.sh @@ -3,34 +3,7 @@ # setup #------------------------------------------------------------------ set -eu -scriptdir=$(cd $(dirname $0) && pwd) -integdir=$(dirname $scriptdir) -source ${scriptdir}/common.bash -header TypeScript Versions - -#------------------------------------------------------------------ - -MIN_SUPPORTED_TS_VERSION=${1:-"3.9"} -SUPPORTED_TS_VERSIONS=$(node ${integdir}/typescript-versions.js ${MIN_SUPPORTED_TS_VERSION}) - -for version in $SUPPORTED_TS_VERSIONS; do - header TypeScript v$version - - setup - - set -x - node --version - npm --version - - cdk init -l typescript sample-app --generate-only - sed '/\"devDependencies\"/,/}/ d; /^$/d' package.json > package.json.new && rm package.json && mv package.json.new package.json - npm install --save-dev typescript@$version - npm install # Older versions of npm require this to be a separate step from the one above - npm prune && npm ls - rm test/* - npm run build - cdk synth - - set +x -done +# This is a backwards compatibility script. All logic has moved to '@aws-cdk-testing/cli-integ', +# and in fact has been integrated into the regular TypeScript tests. +exit 0 \ No newline at end of file diff --git a/packages/aws-cdk/test/integ/init/test-typescript.sh b/packages/aws-cdk/test/integ/init/test-typescript.sh deleted file mode 100755 index 14fa77d4463dd..0000000000000 --- a/packages/aws-cdk/test/integ/init/test-typescript.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------ -# setup -#------------------------------------------------------------------ -set -eu -scriptdir=$(cd $(dirname $0) && pwd) -source ${scriptdir}/common.bash - -header TypeScript - -#------------------------------------------------------------------ - -if [[ "${1:-}" == "" ]]; then - templates="app sample-app lib" -else - templates="$@" -fi - -for template in $templates; do - echo "Trying TypeScript template $template" - - setup - - cdk init -l typescript $template - npm prune && npm ls # this will fail if we have unmet peer dependencies - npm run build - npm run test - - # Can't run `cdk synth` on libraries - if [[ $template != "lib" ]]; then - cdk synth - fi -done diff --git a/packages/aws-cdk/test/integ/run-against-dist b/packages/aws-cdk/test/integ/run-against-dist index c7ade80dbb1f3..5fb4abea341eb 100755 --- a/packages/aws-cdk/test/integ/run-against-dist +++ b/packages/aws-cdk/test/integ/run-against-dist @@ -1,48 +1,19 @@ #!/bin/bash -# Run a given test against the packages found in the CDK distribution. -# -# - Set up verdaccio and publish all NPM tarballs found in the given directory to it. -# - Install the CLI from that Verdaccio fixture somewhere and put it -# on the PATH. -# - Prepare the various package managers to take their packages from dist/ as well. -# -# Parameter: DIST_ROOT, if different than the current directory. set -eu -scriptdir=$(cd $(dirname $0) && pwd) -source $scriptdir/run-against-dist.bash +# This is a backwards compatibility script. All logic has moved to '@aws-cdk-testing/cli-integ' +# and should be called from there directly. -# If DIST_ROOT is not given, guess at a sane location. -if [[ "${DIST_ROOT:-}" == "" && -f $scriptdir/../../../dist/build.json ]]; then - DIST_ROOT=$scriptdir/../../../dist -fi +export VERSION=$(node -pe "require('./build.json').version") -dist_root=$(cd ${DIST_ROOT:-.} && pwd) +# The package MUST be 'npm install'ed from the package repository (`npm install --production` +# will not work because that will resolve devDependencies even though it will not install them), +# but it may not live in a 'node_modules' directory because Jest 27 does not support that. Do contortions. +export INTEG_TOOLS=cli_integ +rm -rf $INTEG_TOOLS && mkdir $INTEG_TOOLS +npm install --prefix $INTEG_TOOLS --no-save ./js/aws-cdk-testing-cli-integ-*.tgz +mv $($INTEG_TOOLS/node_modules/.bin/test-root)/* $INTEG_TOOLS -if [[ ! -f $dist_root/build.json ]]; then - echo "$dist_root does not seem to be a built CDK distribution (change directory or use DIST_ROOT)" >&2 - exit 1 -fi +# Do a breakpoint for testing +codebuild-breakpoint -export CANDIDATE_VERSION=$(node -p "require('${dist_root}/build.json').version") - -# FRAMEWORK_VERSION is the version that will be 'npm install'ed by the tests -if [[ "${FRAMEWORK_VERSION:-}" = "" ]]; then - export FRAMEWORK_VERSION=${CANDIDATE_VERSION} -fi -export TEST_RUNNER=dist - -serve_npm_packages -install_cli - -prepare_java_packages -prepare_nuget_packages -prepare_python_packages - -# Install additional tool wrappers before running the target script -export PATH="$scriptdir/run-wrappers/dist:$PATH" -hash -r - -# Run target script -# NOTE: no 'exec' because we need to shutdown verdaccio only AFTER we've -# run the subscript. -"$@" +CONCURRENCY=5 exec ${INTEG_TOOLS}/bin/stage-distribution run . "$@" diff --git a/packages/aws-cdk/test/integ/run-against-dist.bash b/packages/aws-cdk/test/integ/run-against-dist.bash deleted file mode 100644 index 84162031f5068..0000000000000 --- a/packages/aws-cdk/test/integ/run-against-dist.bash +++ /dev/null @@ -1,147 +0,0 @@ -# Helper functions to go with 'run-against-dist' -# NPM Workspace. Will have CDK CLI and verdaccio installed into it. -npmws=/tmp/cdk-rundist -rm -rf $npmws -mkdir -p $npmws - -set -x - -# This script must create 1 or 2 traps, and the 'trap' command will replace -# the previous trap, so get some 'dynamic traps' mechanism in place -TRAPS=() - -function run_traps() { - for cmd in "${TRAPS[@]}"; do - echo "cleanup: $cmd" >&2 - eval "$cmd" - done -} - -trap run_traps EXIT - -function log() { - echo >&2 "| $@" -} - -function header() { - log - log "============================================================================================" - log $@ - log "============================================================================================" -} - -function serve_npm_packages() { - if [ -n "${SERVE_NPM_TARBALLS_PID:-}" ]; then - log >&2 "Verdaccio is already running" - return 1 - fi - - #------------------------------------------------------------------------------ - # Start a mock npm repository from the given tarballs - #------------------------------------------------------------------------------ - header "Starting local NPM Repository (Serving version ${CANDIDATE_VERSION})" - - tarballs_glob="$dist_root/js/*.tgz" - - if [[ -f package.json ]]; then - echo "Do not run this script in a directory with a package.json! It will most likely break!" >&2 - # Cowardly not running 'exit 1' because I'm not sure I won't mess up the build/canaries by doing so - fi - - # When using '--daemon', 'npm install' first so the files are permanent, or - # 'npx' will remove them too soon. - npm install serve-npm-tarballs - eval $(npx serve-npm-tarballs --glob "${tarballs_glob}" --daemon) - TRAPS+=("kill $SERVE_NPM_TARBALLS_PID") -} - -function install_cli() { - echo "Installing CLI aws-cdk@${CANDIDATE_VERSION}" - (cd ${npmws} && npm install --prefix $npmws aws-cdk@${CANDIDATE_VERSION}) - export PATH=$npmws/node_modules/.bin:$PATH -} - -function prepare_java_packages() { - log "Preparing Maven packages..." - - # copy the maven staging repo to the maven local repo and set as M2 home - # this ensures that the canary builds against the build artifacts, not maven central - if [ ! -d $dist_root/java ]; then - echo "Maven packages missing at $dist_root/java" >&2 - exit 1 - fi - - # Rename all maven-metadata.xml* files to maven-metadata-local.xml* - # This is necessary for Maven to find them correctly after we've rsync'ed - # them into place: - # https://github.com/sonatype/sonatype-aether/blob/master/aether-impl/src/main/java/org/sonatype/aether/impl/internal/SimpleLocalRepositoryManager.java#L114 - for f in $(find $dist_root/java -name maven-metadata.xml\*); do - mv "$f" "$(echo "$f" | sed s/metadata\.xml/metadata-local.xml/)" - done - - export MAVEN_CONFIG=${MAVEN_CONFIG:-$HOME/.m2} - rsync -a $dist_root/java/ ${MAVEN_CONFIG}/repository -} - -function prepare_nuget_packages() { - # For NuGet, we wrap the "dotnet" CLI command to use local packages. - log "Writing new NuGet configuration..." - - local NUGET_SOURCE=$dist_root/dotnet - - if [ ! -d "$NUGET_SOURCE" ]; then - echo "NuGet packages missing at $NUGET_SOURCE" >&2 - exit 1 - fi - - mkdir -p $HOME/.nuget/NuGet - if [ -f $HOME/.nuget/NuGet/NuGet.Config ]; then - echo "⚠️ Saving previous NuGet.Config to $HOME/.nuget/NuGet/NuGet.Config.bak" - mv $HOME/.nuget/NuGet/NuGet.Config $HOME/.nuget/NuGet/NuGet.Config.bak - fi - - TRAPS+=('clean_up_nuget_config') - - cat > $HOME/.nuget/NuGet/NuGet.Config < - - - - - - -EOF -} - -function clean_up_nuget_config() { - log "Restoring NuGet configuration" - if [ -f $HOME/.nuget/NuGet/NuGet.Config.bak ]; then - log "-> Restoring $HOME/.nuget/NuGet/NuGet.Config from $HOME/.nuget/NuGet/NuGet.Config.bak" - mv -f $HOME/.nuget/NuGet/NuGet.Config.bak $HOME/.nuget/NuGet/NuGet.Config - else - log "-> Removing $HOME/.nuget/NuGet/NuGet.Config" - rm -f $HOME/.nuget/NuGet/NuGet.Config - fi -} - -# pip_install REQUIREMENTS_FILE -function prepare_python_packages() { - log "Hijacking 'pip install' command..." - - # We can't use a $PATH hijack, because we'll be creating a venv - # later which will re-hijack ours with a 'pip' binary. Use a function instead, - # the real logic will reside in "pip_" - - export PYTHON_WHEELS=$dist_root/python - - if [ ! -d "$PYTHON_WHEELS" ]; then - echo "Python build artifacts missing at $PYTHON_WHEELS" >&2 - exit 1 - fi - - export -f pip -} - -function pip() { - pip_ "$@" -} diff --git a/packages/aws-cdk/test/integ/run-against-release b/packages/aws-cdk/test/integ/run-against-release index 5bfcbbfae7e4f..3602333135990 100755 --- a/packages/aws-cdk/test/integ/run-against-release +++ b/packages/aws-cdk/test/integ/run-against-release @@ -1,37 +1,18 @@ #!/bin/bash -# Run a given test against the publicly released packages -# -# - Install the latest CLI somewhere and put it on the PATH. -# - Run the script set -eu -scriptdir=$(cd $(dirname $0) && pwd) -CLI_INSTALLER="${CLI_INSTALLER:=npm}" +# This is a backwards compatibility script. All logic has moved to '@aws-cdk-testing/cli-integ' +# and should be called from there directly in the future. -if [ ${CLI_INSTALLER} = "npm" ]; then - install_command="install" -elif [ ${CLI_INSTALLER} = "yarn" ]; then - install_command="add" -else - echo "CLI_INSTALLER can only be set to either npm or yarn (got ${CLI_INSTALLER})" - exit 1 -fi +# The package MUST be 'npm install'ed from the package repository (`npm install --production` +# will not work because that will resolve devDependencies even though it will not install them), +# but it may not live in a 'node_modules' directory because Jest 27 does not support that. Do contortions. +export INTEG_TOOLS=cli_integ +rm -rf $INTEG_TOOLS && mkdir $INTEG_TOOLS +npm install --prefix $INTEG_TOOLS --no-save @aws-cdk-testing/cli-integ@${RELEASE_TAG:-latest} +mv $($INTEG_TOOLS/node_modules/.bin/test-root)/* $INTEG_TOOLS -# NPM Workspace. Will have CDK CLI installed into it. -npmws=/tmp/cdk-runrelease -rm -rf $npmws -mkdir -p $npmws +# Find the latest CLI version in this tag +npm view aws-cdk@${RELEASE_TAG:-latest} --json > release.json +export VERSION=$(node -pe "require('./release.json').version") -# Install the CLI and put it on the PATH -(cd $npmws && ${CLI_INSTALLER} ${install_command} aws-cdk@${RELEASE_TAG:-latest}) - -# FRAMEWORK_VERSION is the version that will be 'npm install'ed by the tests -if [[ "${FRAMEWORK_VERSION:-}" = "" ]]; then - cli_version=$(cd $npmws && node -p "require('aws-cdk/package.json').version") - export FRAMEWORK_VERSION=${cli_version} -fi - -export PATH=$npmws/node_modules/.bin:$PATH -export TEST_RUNNER=release - -# Run the inner script exec "$@" diff --git a/packages/aws-cdk/test/integ/run-against-repo b/packages/aws-cdk/test/integ/run-against-repo deleted file mode 100755 index 420850f2cd951..0000000000000 --- a/packages/aws-cdk/test/integ/run-against-repo +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# Script to run a given test against the monorepo. -# -# Set up paths so that `cdk` binary is on the path, and make it -# so that `npm install` symlinks from the monorepo package directories. -set -eu - -cli_dir=$(cd $(dirname $0)/../.. && pwd) -repo_root=$(cd $cli_dir/../.. && pwd) - -if [[ ! -f $repo_root/package.json ]]; then - echo "$repo_root does not seem to be the root of the aws-cdk repository." >&2 - exit 1 -fi - -export REPO_ROOT="$repo_root" -export ORIGINAL_NPM="$(type -p npm)" -export TEST_RUNNER=repo - -export PATH="$cli_dir/bin:$cli_dir/test/integ/run-wrappers/repo:$PATH" -hash -r -exec "$@" diff --git a/packages/aws-cdk/test/integ/run-wrappers/dist/pip_ b/packages/aws-cdk/test/integ/run-wrappers/dist/pip_ deleted file mode 100755 index ce580ea30a5f7..0000000000000 --- a/packages/aws-cdk/test/integ/run-wrappers/dist/pip_ +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -eu -if [[ "${1:-}" == "install" ]]; then - # We will receive `pip install -r requirements.txt` and need to - # install the packages from the local dist. We previously just - # installed everything under $PYTHON_WHEELS ($PYTHON_WHEELS/*.whl). - # However, there is a bug that arises on v2 when we install everything, - # including both `aws-cdk-lib` and `cx-api`, because the latter is also - # packaged in the former and causes conflicts. This can lead to errors like: - # "Unknown type: aws-cdk-lib.cx_api.CloudAssembly" - # Since we only need aws-cdk-lib anyway (for now), just install it alone. - exec pip install ${PYTHON_WHEELS}/aws_cdk_lib*.whl -fi - -exec pip "$@" diff --git a/packages/aws-cdk/test/integ/run-wrappers/repo/dotnet b/packages/aws-cdk/test/integ/run-wrappers/repo/dotnet deleted file mode 100755 index 7ab610a0e7afd..0000000000000 --- a/packages/aws-cdk/test/integ/run-wrappers/repo/dotnet +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "$0: cannot build this kind of project against the repo. Only pure NPM projects are supported. Use 'run-against-dist' instead." >&2 -exit 1 diff --git a/packages/aws-cdk/test/integ/run-wrappers/repo/mvn b/packages/aws-cdk/test/integ/run-wrappers/repo/mvn deleted file mode 100755 index 7ab610a0e7afd..0000000000000 --- a/packages/aws-cdk/test/integ/run-wrappers/repo/mvn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "$0: cannot build this kind of project against the repo. Only pure NPM projects are supported. Use 'run-against-dist' instead." >&2 -exit 1 diff --git a/packages/aws-cdk/test/integ/run-wrappers/repo/pip_ b/packages/aws-cdk/test/integ/run-wrappers/repo/pip_ deleted file mode 100755 index 9553f9cefe2d9..0000000000000 --- a/packages/aws-cdk/test/integ/run-wrappers/repo/pip_ +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -echo "$0: cannot build this kind of project against the repo. Only pure NPM projects are supported. Use 'run-against-dist' instead." >&2 -exit 1 - diff --git a/packages/aws-cdk/test/integ/test-cli-regression-against-current-code.sh b/packages/aws-cdk/test/integ/test-cli-regression-against-current-code.sh index ff50aa5f69a2b..c735580c9fd58 100755 --- a/packages/aws-cdk/test/integ/test-cli-regression-against-current-code.sh +++ b/packages/aws-cdk/test/integ/test-cli-regression-against-current-code.sh @@ -1,11 +1,12 @@ #!/bin/bash -# -# Run our integration tests in regression mode against the -# candidate version of the framework, which is the one we just packed. -# -set -euo pipefail -integdir=$(cd $(dirname $0) && pwd) +set -eu +set -x +# This is a backwards compatibilty script. All logic has moved to '@aws-cdk-testing/cli-integ' +# and should be called from there directly. -source ${integdir}/test-cli-regression.bash +# Contract: '@aws-cdk-testing/cli-integ' package is installed in ${INTEG_TOOLS} +previous=$(${INTEG_TOOLS}/bin/query-github last-release --token $GITHUB_TOKEN --prior-to $VERSION) +echo "Previous version is: $previous" -run_regression_against_framework_version CANDIDATE_VERSION +# Old tests, new CLI, new framework +exec $INTEG_TOOLS/bin/download-and-run-old-tests "$previous" --use-cli-release=$VERSION cli-integ-tests diff --git a/packages/aws-cdk/test/integ/test-cli-regression-against-latest-release.sh b/packages/aws-cdk/test/integ/test-cli-regression-against-latest-release.sh index 8b670eb7b793d..8c828fb2138ce 100755 --- a/packages/aws-cdk/test/integ/test-cli-regression-against-latest-release.sh +++ b/packages/aws-cdk/test/integ/test-cli-regression-against-latest-release.sh @@ -1,11 +1,11 @@ #!/bin/bash -# -# Run our integration tests in regression mode against the -# previous version of the framework, relative to the version being packed now. -# -set -euo pipefail -integdir=$(cd $(dirname $0) && pwd) +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. -source ${integdir}/test-cli-regression.bash +# Contract: '@aws-cdk-testing/cli-integ' package is installed in ${INTEG_TOOLS} +previous=$(${INTEG_TOOLS}/bin/query-github last-release --token $GITHUB_TOKEN --prior-to $VERSION) +echo "Previous version is: $previous" -run_regression_against_framework_version PREVIOUS_VERSION +# Old tests, new CLI, old framework +exec $INTEG_TOOLS/bin/download-and-run-old-tests "$previous" --use-cli-release=$VERSION --framework-version=$previous cli-integ-tests diff --git a/packages/aws-cdk/test/integ/typescript-versions.ts b/packages/aws-cdk/test/integ/typescript-versions.ts deleted file mode 100644 index cf86653b99793..0000000000000 --- a/packages/aws-cdk/test/integ/typescript-versions.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { spawnSync } from 'child_process'; - -const minSupportedVersion = process.argv.slice(2, 3); - -const { stdout } = spawnSync('npm', ['--silent', 'view', `typescript@>=${minSupportedVersion}`, 'version', '--json']); - -const versions: string[] = JSON.parse(stdout); -const minorVersions = Array.from(new Set(versions.map(v => v.split('.').slice(0, 2).join('.')))); - -process.stdout.write(minorVersions.join(' ')); diff --git a/packages/aws-cdk/test/integ/uberpackage/jest.config.js b/packages/aws-cdk/test/integ/uberpackage/jest.config.js deleted file mode 100644 index 1e3fe3d13f96b..0000000000000 --- a/packages/aws-cdk/test/integ/uberpackage/jest.config.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = { - moduleFileExtensions: [ - "js", - ], - testMatch: [ - "**/*.integtest.js", - ], - testEnvironment: "node", - bail: 1, - verbose: true, - reporters: [ - "default", - [ "jest-junit", { suiteName: "jest tests", outputDirectory: "coverage" } ] - ] -}; diff --git a/packages/aws-cdk/test/integ/uberpackage/test.sh b/packages/aws-cdk/test/integ/uberpackage/test.sh index 41761b349580e..005ad2ffe1544 100755 --- a/packages/aws-cdk/test/integ/uberpackage/test.sh +++ b/packages/aws-cdk/test/integ/uberpackage/test.sh @@ -1,14 +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. -set -euo pipefail - -scriptdir=$(cd $(dirname $0) && pwd) - -echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' -echo 'UberCDK Integration Tests' -echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' - -cd $scriptdir - -source ../common/jest-test.bash -invokeJest "$@" +exec ${INTEG_TOOLS}/bin/run-suite --use-cli-release=$VERSION uberpackage diff --git a/packages/aws-cdk/test/rwlock.test.ts b/packages/aws-cdk/test/rwlock.test.ts new file mode 100644 index 0000000000000..d241eaaf96844 --- /dev/null +++ b/packages/aws-cdk/test/rwlock.test.ts @@ -0,0 +1,52 @@ +import * as os from 'os'; +import * as path from 'path'; +import { RWLock } from '../lib/api/util/rwlock'; + +function testDir() { + return path.join(os.tmpdir(), 'rwlock-tests'); +} + +test('writer lock excludes other locks', async () => { + // GIVEN + const lock = new RWLock(testDir()); + const w = await lock.acquireWrite(); + + // WHEN + try { + await expect(lock.acquireWrite()).rejects.toThrow(/currently synthing/); + await expect(lock.acquireRead()).rejects.toThrow(/currently synthing/); + } finally { + await w.release(); + } +}); + +test('reader lock allows other readers but not writers', async () => { + // GIVEN + const lock = new RWLock(testDir()); + const r = await lock.acquireRead(); + + // WHEN + try { + await expect(lock.acquireWrite()).rejects.toThrow(/currently reading/); + + const r2 = await lock.acquireRead(); + await r2.release(); + } finally { + await r.release(); + } +}); + +test('can convert writer to reader lock', async () => { + // GIVEN + const lock = new RWLock(testDir()); + const w = await lock.acquireWrite(); + + // WHEN + const r = await w.convertToReaderLock(); + try { + const r2 = await lock.acquireRead(); + await r2.release(); + } finally { + await r.release(); + } +}); \ No newline at end of file diff --git a/packages/aws-cdk/test/util.ts b/packages/aws-cdk/test/util.ts index 751c1c1ad6bba..97d7e519e9be2 100644 --- a/packages/aws-cdk/test/util.ts +++ b/packages/aws-cdk/test/util.ts @@ -239,3 +239,7 @@ export function withMocked(obj: A, key: function isPromise(object: any): object is Promise { return Promise.resolve(object) === object; } + +export async function sleep(ms: number) { + return new Promise(ok => setTimeout(ok, ms)); +} diff --git a/packages/aws-cdk/test/util/stack-monitor.test.ts b/packages/aws-cdk/test/util/stack-monitor.test.ts index 7e2644b481b9f..12bc5ac80007e 100644 --- a/packages/aws-cdk/test/util/stack-monitor.test.ts +++ b/packages/aws-cdk/test/util/stack-monitor.test.ts @@ -1,5 +1,5 @@ import { StackActivityMonitor, IActivityPrinter, StackActivity } from '../../lib/api/util/cloudformation/stack-activity-monitor'; -import { sleep } from '../integ/helpers/aws'; +import { sleep } from '../util'; import { MockSdk } from './mock-sdk'; let sdk: MockSdk; diff --git a/packages/awslint/package.json b/packages/awslint/package.json index a526d1db56716..59f8d4f5724c1 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -18,11 +18,11 @@ "awslint": "bin/awslint" }, "dependencies": { - "@jsii/spec": "1.72.0", + "@jsii/spec": "1.73.0", "camelcase": "^6.3.0", "chalk": "^4", "fs-extra": "^9.1.0", - "jsii-reflect": "1.72.0", + "jsii-reflect": "1.73.0", "yargs": "^16.2.0" }, "devDependencies": { diff --git a/packages/cdk-assets/lib/private/archive.ts b/packages/cdk-assets/lib/private/archive.ts index a3922d4d59dba..b54de7590f67b 100644 --- a/packages/cdk-assets/lib/private/archive.ts +++ b/packages/cdk-assets/lib/private/archive.ts @@ -1,3 +1,4 @@ +import { randomUUID } from 'crypto'; import { createWriteStream, promises as fs } from 'fs'; import * as path from 'path'; import * as glob from 'glob'; @@ -11,7 +12,7 @@ type Logger = (x: string) => void; export async function zipDirectory(directory: string, outputFile: string, logger: Logger): Promise { // We write to a temporary file and rename at the last moment. This is so that if we are // interrupted during this process, we don't leave a half-finished file in the target location. - const temporaryOutputFile = `${outputFile}._tmp`; + const temporaryOutputFile = `${outputFile}.${randomUUID()}._tmp`; await writeZipFile(directory, temporaryOutputFile); await moveIntoPlace(temporaryOutputFile, outputFile, logger); } @@ -96,4 +97,4 @@ async function pathExists(x: string) { } throw e; } -} \ No newline at end of file +} diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 859409ad946c8..7c237f58d46fd 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -30,7 +30,7 @@ }, "license": "Apache-2.0", "dependencies": { - "codemaker": "1.72.0", + "codemaker": "1.73.0", "yaml": "1.10.2" }, "devDependencies": { diff --git a/tools/@aws-cdk/cdk-build-tools/package.json b/tools/@aws-cdk/cdk-build-tools/package.json index 80bde56c853c5..70b7bf4d13eb1 100644 --- a/tools/@aws-cdk/cdk-build-tools/package.json +++ b/tools/@aws-cdk/cdk-build-tools/package.json @@ -57,10 +57,10 @@ "fs-extra": "^9.1.0", "jest": "^27.5.1", "jest-junit": "^13.2.0", - "jsii": "1.72.0", - "jsii-pacmak": "1.72.0", - "jsii-reflect": "1.72.0", - "markdownlint-cli": "^0.32.2", + "jsii": "1.73.0", + "jsii-pacmak": "1.73.0", + "jsii-reflect": "1.73.0", + "markdownlint-cli": "^0.33.0", "nyc": "^15.1.0", "semver": "^7.3.8", "ts-jest": "^27.1.5", diff --git a/tools/@aws-cdk/cdk-release/lib/lifecycles/bump.ts b/tools/@aws-cdk/cdk-release/lib/lifecycles/bump.ts index 0a6417cb080d6..055c6bdee3cb9 100644 --- a/tools/@aws-cdk/cdk-release/lib/lifecycles/bump.ts +++ b/tools/@aws-cdk/cdk-release/lib/lifecycles/bump.ts @@ -28,7 +28,7 @@ export async function bump(args: BumpOptions, currentVersion: Versions): Promise const newVersion: Versions = { stableVersion: newStableVersion, - alphaVersion: bumpAlphaReleaseVersion(currentVersion, releaseType), + alphaVersion: bumpAlphaReleaseVersion(currentVersion, newStableVersion, releaseType), }; notify(args, @@ -108,19 +108,43 @@ function getTypePriority(type: string): number { /** * https://github.com/aws/aws-cdk/issues/15581 * We version any alpha modules in one of two ways, depending on the main/stable release. - * If the main release is itself a prerelease (e.g., 2.0.0-rc.17), - * we will increment the current alpha release. + * + * If the main release is itself a prerelease (e.g., 2.0.0-rc.17): + * - if the current alpha version has the same major.minor.patch version as the current stable, + * we probably have a long-running RC candidate that we are actually releasing. Increment the + * current alpha release. + * - if not, then we are probably coming up with a testing RC version for the pipeline. We must + * come up with an alpha version that can never be released publicly, because our version numbers + * must never be the same as any publicly released package. Use '2.0.0-alpha.999' for those. + * * If the main release is not a prerelease, we use the main release version, but with an alpha tag. + * + * This logic is mirrored in the integ tests. */ -function bumpAlphaReleaseVersion(currentVersion: Versions, releaseType: semver.ReleaseType): string | undefined { - if (!currentVersion.alphaVersion) { return undefined; } +function bumpAlphaReleaseVersion(previousVersions: Versions, currentStable: string, releaseType: semver.ReleaseType): string | undefined { + if (!previousVersions.alphaVersion) { return undefined; } + + let newAlphaVersion; + if (releaseType.startsWith('pre')) { + // Prerelease, either long-running or just a unique one to test + const stableV = semver.parse(currentStable); + const alphaV = semver.parse(previousVersions.alphaVersion); + if (!stableV || !alphaV) { + throw new Error(`Could not parse either ${currentStable} or ${previousVersions.alphaVersion} as a version`); + } - const newAlphaVersion = releaseType.startsWith('pre') - ? semver.inc(currentVersion.alphaVersion, releaseType, 'alpha') - : semver.inc(currentVersion.stableVersion, 'pre' + releaseType as semver.ReleaseType, 'alpha'); + if (stableV?.compareMain(alphaV) === 0) { + newAlphaVersion = semver.inc(previousVersions.alphaVersion, releaseType, 'alpha'); + } else { + newAlphaVersion = semver.inc(previousVersions.stableVersion, releaseType as semver.ReleaseType, 'alpha')?.replace(/0$/, '999'); + } + } else { + // Stable release, add `-alpha.0` to the end of the stable release version + newAlphaVersion = semver.inc(previousVersions.stableVersion, 'pre' + releaseType as semver.ReleaseType, 'alpha'); + } if (!newAlphaVersion) { - throw new Error('Could not increment alpha version: ' + currentVersion.alphaVersion); + throw new Error('Could not increment alpha version: ' + previousVersions.alphaVersion); } return newAlphaVersion; } diff --git a/tools/@aws-cdk/cdk-release/test/bump.test.ts b/tools/@aws-cdk/cdk-release/test/bump.test.ts index df0d08eaae828..234b8d0c6fdfd 100644 --- a/tools/@aws-cdk/cdk-release/test/bump.test.ts +++ b/tools/@aws-cdk/cdk-release/test/bump.test.ts @@ -45,7 +45,7 @@ describe('stable versions', () => { describe('alpha versions', () => { - test('for prerelease, bumps existing alpha counter as a prerelease', async () => { + test('long-running prerelease: bumps existing alpha counter as a prerelease', async () => { const currentVersion = { stableVersion: '1.2.0-rc.4', alphaVersion: '1.2.0-alpha.0' }; const bumpedVersion = await bump({ releaseAs: 'minor', versionFile: 'version.json', prerelease: 'rc' }, currentVersion); @@ -55,8 +55,18 @@ describe('alpha versions', () => { }); }); - test('for normal releases, bumps alpha as a prerelease of stable release', async () => { - const currentVersion = { stableVersion: '1.2.0', alphaVersion: '1.1.0-alpha.0' }; + test('one-off prerelease: alpha is a prerelease of stable release with crazy alpha tag', async () => { + const currentVersion = { stableVersion: '1.2.0', alphaVersion: '1.2.0-alpha.0' }; + const bumpedVersion = await bump({ releaseAs: 'minor', versionFile: 'version.json', prerelease: 'rc' }, currentVersion); + + expect(bumpedVersion).toEqual({ + stableVersion: '1.3.0-rc.0', + alphaVersion: '1.3.0-alpha.999', + }); + }); + + test('normal release: alpha is a prerelease of stable release with realistic alpha tag', async () => { + const currentVersion = { stableVersion: '1.2.0', alphaVersion: '1.2.0-alpha.0' }; const bumpedVersion = await bump({ releaseAs: 'minor', versionFile: 'version.json' }, currentVersion); expect(bumpedVersion).toEqual({ diff --git a/tools/@aws-cdk/cfn2ts/package.json b/tools/@aws-cdk/cfn2ts/package.json index 6f366ced37d15..4e8a562d3018f 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.72.0", + "codemaker": "1.73.0", "fast-json-patch": "^3.1.1", "fs-extra": "^9.1.0", "yargs": "^16.2.0" diff --git a/tools/@aws-cdk/individual-pkg-gen/transform-packages.ts b/tools/@aws-cdk/individual-pkg-gen/transform-packages.ts index e553c21ab3229..fcaa82a94bda6 100644 --- a/tools/@aws-cdk/individual-pkg-gen/transform-packages.ts +++ b/tools/@aws-cdk/individual-pkg-gen/transform-packages.ts @@ -259,6 +259,11 @@ function transformPackageJsonDependencies(packageJson: any, pkg: any, alphaPacka const devDependencies: { [dep: string]: string; } = {}; for (const v1DevDependency of Object.keys(packageJson.devDependencies || {})) { switch (v1DevDependency) { + // @core corresponds to aws-cdk-lib + // this is needed for packages that only have a dev dependency on @core + case '@aws-cdk/core': + devDependencies['aws-cdk-lib'] = pkg.version; + break; case '@aws-cdk/assert-internal': case '@aws-cdk/assert': devDependencies['@aws-cdk/assert'] = packageJson.devDependencies[v1DevDependency]; diff --git a/tools/@aws-cdk/node-bundle/package.json b/tools/@aws-cdk/node-bundle/package.json index 7bbda2db06274..b59c0cf36be17 100644 --- a/tools/@aws-cdk/node-bundle/package.json +++ b/tools/@aws-cdk/node-bundle/package.json @@ -40,13 +40,13 @@ "jest-junit": "^13", "json-schema": "^0.4.0", "npm-check-updates": "^12", - "projen": "^0.66.0", + "projen": "^0.66.11", "standard-version": "^9", "ts-jest": "^27", "typescript": "^4.5.5" }, "dependencies": { - "esbuild": "^0.16.13", + "esbuild": "^0.16.16", "fs-extra": "^10.1.0", "license-checker": "^25.0.1", "madge": "^5.0.1", diff --git a/tools/@aws-cdk/pkglint/lib/rules.ts b/tools/@aws-cdk/pkglint/lib/rules.ts index 9f257954fcabc..0351e1e4a7a47 100644 --- a/tools/@aws-cdk/pkglint/lib/rules.ts +++ b/tools/@aws-cdk/pkglint/lib/rules.ts @@ -1676,6 +1676,7 @@ export class UbergenPackageVisibility extends ValidationRule { 'cdk', 'cdk-assets', '@aws-cdk/integ-runner', + '@aws-cdk-testing/cli-integ', ]; public validate(pkg: PackageJson): void { diff --git a/tools/@aws-cdk/prlint/lint.ts b/tools/@aws-cdk/prlint/lint.ts index aaf1c8f0389c1..53e1d877f8fb9 100644 --- a/tools/@aws-cdk/prlint/lint.ts +++ b/tools/@aws-cdk/prlint/lint.ts @@ -306,6 +306,9 @@ export class PullRequestLinter { validationCollector.validateRuleSet({ testRuleSet: [ { test: validateTitlePrefix } ] }); + validationCollector.validateRuleSet({ + testRuleSet: [ { test: validateTitleScope } ] + }) validationCollector.validateRuleSet({ exemption: shouldExemptBreakingChange, @@ -446,6 +449,29 @@ function hasLabel(pr: GitHubPr, labelName: string): boolean { return result; }; +/** + * Check that the PR title uses the typical convention for package names. + * + * For example, "fix(s3)" is preferred over "fix(aws-s3)". + */ +function validateTitleScope(pr: GitHubPr): TestResult { + const result = new TestResult(); + // Specific commit types are handled by `validateTitlePrefix`. This just checks whether + // the scope includes an `aws-` prefix or not. + // Group 1: Scope with parens - "(aws-)" + // Group 2: Scope name - "aws-" + // Group 3: Preferred scope name - "" + const titleRe = /^\w+(\((aws-([\w_-]+))\))?: /; + const m = titleRe.exec(pr.title); + if (m) { + result.assessFailure( + !!(m[2] && m[3]), + `The title of the pull request should omit 'aws-' from the name of modified packages. Use '${m[3]}' instead of '${m[2]}'.`, + ); + } + return result; +} + function assertStability(pr: GitHubPr, _files: GitHubFile[]): TestResult { const title = pr.title; const body = pr.body; diff --git a/tools/@aws-cdk/prlint/test/lint.test.ts b/tools/@aws-cdk/prlint/test/lint.test.ts index ca417917af878..d498f857d54a0 100644 --- a/tools/@aws-cdk/prlint/test/lint.test.ts +++ b/tools/@aws-cdk/prlint/test/lint.test.ts @@ -58,6 +58,63 @@ describe('breaking changes format', () => { }); }); +describe('commit message format', () => { + test('valid scope', async () => { + const issue = { + number: 1, + title: 'chore(s3): some title', + body: '', + labels: [], + }; + const prLinter = configureMock(issue, undefined); + expect(await prLinter.validate()).resolves; + }); + + test('invalid scope with aws- prefix', async () => { + const issue = { + number: 1, + title: 'fix(aws-s3): some title', + body: '', + labels: [{ name: 'pr-linter/exempt-test' }, { name: 'pr-linter/exempt-integ-test' }], + }; + const prLinter = configureMock(issue, undefined); + await expect(prLinter.validate()).rejects.toThrow(/The title of the pull request should omit 'aws-' from the name of modified packages. Use 's3' instead of 'aws-s3'./); + }); + + test('valid scope with aws- in summary and body', async () => { + const issue = { + number: 1, + title: 'docs(s3): something aws-s3', + body: 'something aws-s3', + labels: [], + }; + const prLinter = configureMock(issue, undefined); + expect(await prLinter.validate()).resolves; + }); + + test('valid with missing scope', async () => { + const issue = { + number: 1, + title: 'docs: something aws-s3', + body: '', + labels: [], + }; + const prLinter = configureMock(issue, undefined); + expect(await prLinter.validate()).resolves; + }); + + test.each(['core', 'prlint', 'awslint'])('valid scope for packages that dont use aws- prefix', async (scope) => { + const issue = { + number: 1, + title: `chore(${scope}): some title`, + body: '', + labels: [] + }; + const prLinter = configureMock(issue, undefined); + expect(await prLinter.validate()).resolves; + }) +}); + describe('ban breaking changes in stable modules', () => { test('breaking change in stable module', async () => { const issue = { diff --git a/version.v2.json b/version.v2.json index ae01a4f8a4fd9..5049a91705e57 100644 --- a/version.v2.json +++ b/version.v2.json @@ -1,4 +1,4 @@ { - "version": "2.60.0", - "alphaVersion": "2.60.0-alpha.0" + "version": "2.61.0", + "alphaVersion": "2.61.0-alpha.0" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index ac9b8471893a3..c985a894dc266 100644 --- a/yarn.lock +++ b/yarn.lock @@ -75,24 +75,24 @@ integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg== "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.7.5", "@babel/core@^7.8.0": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.20.7.tgz#37072f951bd4d28315445f66e0ec9f6ae0c8c35f" - integrity sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw== + version "7.20.12" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz#7930db57443c6714ad216953d1356dac0eb8496d" + integrity sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" "@babel/generator" "^7.20.7" "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.20.7" + "@babel/helper-module-transforms" "^7.20.11" "@babel/helpers" "^7.20.7" "@babel/parser" "^7.20.7" "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" + "@babel/traverse" "^7.20.12" "@babel/types" "^7.20.7" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.1" + json5 "^2.2.2" semver "^6.3.0" "@babel/generator@^7.20.7", "@babel/generator@^7.7.2": @@ -142,7 +142,7 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.20.7": +"@babel/helper-module-transforms@^7.20.11": version "7.20.11" resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz#df4c7af713c557938c50ea3ad0117a7944b2f1b0" integrity sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg== @@ -313,10 +313,10 @@ "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" -"@babel/traverse@^7.20.10", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.2": - version "7.20.10" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz#2bf98239597fcec12f842756f186a9dde6d09230" - integrity sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg== +"@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.2": + version "7.20.12" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.12.tgz#7f0f787b3a67ca4475adef1f56cb94f6abd4a4b5" + integrity sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ== dependencies: "@babel/code-frame" "^7.18.6" "@babel/generator" "^7.20.7" @@ -348,6 +348,11 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" @@ -355,115 +360,115 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@esbuild/android-arm64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.13.tgz#1fc9bfbff0bac558008b2ad7242db1c8024d8cfd" - integrity sha512-r4xetsd1ez1NF9/9R2f9Q6AlxqiZLwUqo7ICOcvEVwopVkXUcspIjEbJk0EVTgT6Cp5+ymzGPT6YNV0ievx4yA== - -"@esbuild/android-arm@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.13.tgz#df3317286eed68c727daf39c2d585625f9c2f170" - integrity sha512-JmtqThupn9Yf+FzANE+GG73ASUkssnPwOsndUElhp23685QzRK+MO1UompOlBaXV9D5FTuYcPnw7p4mCq2YbZQ== - -"@esbuild/android-x64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.13.tgz#c34826c4bdc57c60cbfb8d5bbd2306a89225626a" - integrity sha512-hKt1bFht/Vtp0xJ0ZVzFMnPy1y1ycmM3KNnp3zsyZfQmw7nhs2WLO4vxdR5YG+6RsHKCb2zbZ3VwlC0Tij0qyA== - -"@esbuild/darwin-arm64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.13.tgz#0b80c8580c262ccfb1203053201cf19c6f7b4cdb" - integrity sha512-ogrVuNi2URocrr3Ps20f075EMm9V7IeenOi9FRj4qdbT6mQlwLuP4l90PW2iBrKERx0oRkcZprEUNsz/3xd7ww== - -"@esbuild/darwin-x64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.13.tgz#f1a6c9ea67d4eaaf4944e1cbceb800eabc6e7e74" - integrity sha512-Agajik9SBGiKD7FPXE+ExW6x3MgA/dUdpZnXa9y1tyfE4lKQx+eQiknSdrBnWPeqa9wL0AOvkhghmYhpVkyqkA== - -"@esbuild/freebsd-arm64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.13.tgz#d1a45ac5c4a1be566c4eefbadbe5a967288ad338" - integrity sha512-KxMO3/XihBcHM+xQUM6nQZO1SgQuOsd1DCnKF1a4SIf/i5VD45vrqN3k8ePgFrEbMi7m5JeGmvNqwJXinF0a4Q== - -"@esbuild/freebsd-x64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.13.tgz#ec64a31cabb08343bb4520a221324b40509dffc8" - integrity sha512-Ez15oqV1vwvZ30cVLeBW14BsWq/fdWNQGMOxxqaSJVQVLqHhvgfQ7gxGDiN9tpJdeQhqJO+Q0r02/Tce5+USNg== - -"@esbuild/linux-arm64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.13.tgz#e8db3c3751b32ecf801751424eae43f6863a2ee7" - integrity sha512-qi5n7KwcGViyJeZeQnu8fB6dC3Mlm5PGaqSv2HhQDDx/MPvVfQGNMcv7zcBL4qk3FkuWhGVwXkjQ76x7R0PWlA== - -"@esbuild/linux-arm@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.13.tgz#ac0c8e9f3db8d418f588ae250e9c66ffdcf3cd82" - integrity sha512-18dLd2L3mda+iFj6sswyBMSh2UwniamD9M4DwPv8VM+9apRFlQ5IGKxBdumnTuOI4NvwwAernmUseWhYQ9k+rg== - -"@esbuild/linux-ia32@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.13.tgz#41ee9bd3b7161ab681fab6cb3990a3f5c08a9940" - integrity sha512-2489Xad9sr+6GD7nB913fUqpCsSwVwgskkQTq4Or2mZntSPYPebyJm8l1YruHo7oqYMTGV6RiwGE4gRo3H+EPQ== - -"@esbuild/linux-loong64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.13.tgz#e4a832708e0b47078b91413edcfdb6af88c854a3" - integrity sha512-x8KplRu9Y43Px8I9YS+sPBwQ+fw44Mvp2BPVADopKDWz+h3fcj1BvRU58kxb89WObmwKX9sWdtYzepL4Fmx03A== - -"@esbuild/linux-mips64el@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.13.tgz#30d8571b71e0b8bf25fc5ef11422221ed23cdacc" - integrity sha512-qhhdWph9FLwD9rVVC/nUf7k2U4NZIA6/mGx0B7+O6PFV0GjmPA2E3zDQ4NUjq9P26E0DeAZy9akH9dYcUBRU7A== - -"@esbuild/linux-ppc64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.13.tgz#32a3855d4b79ba1d2b63dab592cb9f0d4a9ba485" - integrity sha512-cVWAPKsrRVxI1jCeJHnYSbE3BrEU+pZTZK2gfao9HRxuc+3m4+RLfs3EVEpGLmMKEcWfVCB9wZ3yNxnknutGKQ== - -"@esbuild/linux-riscv64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.13.tgz#6139202858da8202724d7079102614c269524f34" - integrity sha512-Agb7dbRyZWnmPn5Vvf0eyqaEUqSsaIUwwyInu2EoFTaIDRp093QU2M5alUyOooMLkRbD1WvqQNwx08Z/g+SAcQ== - -"@esbuild/linux-s390x@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.13.tgz#df3550a51e4155cde31486e01d8121f078e959ae" - integrity sha512-AqRBIrc/+kl08ahliNG+EyU+j41wIzQfwBTKpi80cCDiYvYFPuXjvzZsD9muiu58Isj0RVni9VgC4xK/AnSW4g== - -"@esbuild/linux-x64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.13.tgz#deb7951829ea5930e0d88440aeb5df0756ebb2d0" - integrity sha512-S4wn2BimuhPcoArRtVrdHUKIymCCZcYAXQE47kUiX4yrUrEX2/ifn5eKNbZ5c1jJKUlh1gC2ESIN+iw3wQax3g== - -"@esbuild/netbsd-x64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.13.tgz#8cba08074263862138cc5c63ad7f9640fe3faa69" - integrity sha512-2c8JWgfUMlQHTdaR5X3xNMwqOyad8kgeCupuVkdm3QkUOzGREjlTETQsK6oHifocYzDCo9FeKcUwsK356SdR+g== - -"@esbuild/openbsd-x64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.13.tgz#4ae19ac63c665424d248ba5c577618dd7bbcebd5" - integrity sha512-Bwh+PmKD/LK+xBjqIpnYnKYj0fIyQJ0YpRxsn0F+WfzvQ2OA+GKDlf8AHosiCns26Q4Dje388jQVwfOBZ1GaFw== - -"@esbuild/sunos-x64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.13.tgz#592caacab6b2c7669cd869b51f66dc354da03fc2" - integrity sha512-8wwk6f9XGnhrF94/DBdFM4Xm1JeCyGTCj67r516VS9yvBVQf3Rar54L+XPVDs/oZOokwH+XsktrgkuTMAmjntg== - -"@esbuild/win32-arm64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.13.tgz#965ebbe889e4221962250c55facaa1e48130c162" - integrity sha512-Jmwbp/5ArLCiRAHC33ODfcrlIcbP/exXkOEUVkADNJC4e/so2jm+i8IQFvVX/lA2GWvK3GdgcN0VFfp9YITAbg== - -"@esbuild/win32-ia32@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.13.tgz#1b04965bcf340ba4879b452ac32df63216d4c87e" - integrity sha512-AX6WjntGjhJHzrPSVvjMD7grxt41koHfAOx6lxLorrpDwwIKKPaGDASPZgvFIZHTbwhOtILW6vAXxYPDsKpDJA== - -"@esbuild/win32-x64@0.16.13": - version "0.16.13" - resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.13.tgz#0b0989cf0e7887cb0f3124e705cee68a694b96dd" - integrity sha512-A+U4gM6OOkPS03UgVU08GTpAAAxPsP/8Z4FmneGo4TaVSD99bK9gVJXlqUEPMO/htFXEAht2O6pX4ErtLY5tVg== +"@esbuild/android-arm64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.16.tgz#833184b8a0a96f9c85105c53d0a67e6d3c5c3f07" + integrity sha512-hFHVAzUKp9Tf8psGq+bDVv+6hTy1bAOoV/jJMUWwhUnIHsh6WbFMhw0ZTkqDuh7TdpffFoHOiIOIxmHc7oYRBQ== + +"@esbuild/android-arm@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.16.tgz#23761b2fd1dfa4806161dbfc9e0824f04061cb95" + integrity sha512-BUuWMlt4WSXod1HSl7aGK8fJOsi+Tab/M0IDK1V1/GstzoOpqc/v3DqmN8MkuapPKQ9Br1WtLAN4uEgWR8x64A== + +"@esbuild/android-x64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.16.tgz#ffa09f04c0ffea5b594ab7655fc9ca1220365e9b" + integrity sha512-9WhxJpeb6XumlfivldxqmkJepEcELekmSw3NkGrs+Edq6sS5KRxtUBQuKYDD7KqP59dDkxVbaoPIQFKWQG0KLg== + +"@esbuild/darwin-arm64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.16.tgz#62ed2b4bfab594b9e5e708580361f1d059b53b26" + integrity sha512-8Z+wld+vr/prHPi2O0X7o1zQOfMbXWGAw9hT0jEyU/l/Yrg+0Z3FO9pjPho72dVkZs4ewZk0bDOFLdZHm8jEfw== + +"@esbuild/darwin-x64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.16.tgz#e9756d34cd9b3737a5354e89ca0fdca32d8df64c" + integrity sha512-CYkxVvkZzGCqFrt7EgjFxQKhlUPyDkuR9P0Y5wEcmJqVI8ncerOIY5Kej52MhZyzOBXkYrJgZeVZC9xXXoEg9A== + +"@esbuild/freebsd-arm64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.16.tgz#db7bce444d372e5a213a3f359c42aee3acc0dd45" + integrity sha512-fxrw4BYqQ39z/3Ja9xj/a1gMsVq0xEjhSyI4a9MjfvDDD8fUV8IYliac96i7tzZc3+VytyXX+XNsnpEk5sw5Wg== + +"@esbuild/freebsd-x64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.16.tgz#02e8a81b7e56040b5eb883896de445a6cd3501f0" + integrity sha512-8p3v1D+du2jiDvSoNVimHhj7leSfST9YlKsAEO7etBfuqjaBMndo0fmjNLp0JCMld+XIx9L80tooOkyUv1a1PQ== + +"@esbuild/linux-arm64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.16.tgz#ea8c3df172644fa6437f0083c2a38b50f89e5b98" + integrity sha512-N3u6BBbCVY3xeP2D8Db7QY8I+nZ+2AgOopUIqk+5yCoLnsWkcVxD2ay5E9iIdvApFi1Vg1lZiiwaVp8bOpAc4A== + +"@esbuild/linux-arm@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.16.tgz#c1c2e97e67bb7247e6f60e2644de057bfedb8cbb" + integrity sha512-bYaocE1/PTMRmkgSckZ0D0Xn2nox8v2qlk+MVVqm+VECNKDdZvghVZtH41dNtBbwADSvA6qkCHGYeWm9LrNCBw== + +"@esbuild/linux-ia32@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.16.tgz#9a0b0e926926f891a3e7f7c50bb38e3db49c2c9a" + integrity sha512-dxjqLKUW8GqGemoRT9v8IgHk+T4tRm1rn1gUcArsp26W9EkK/27VSjBVUXhEG5NInHZ92JaQ3SSMdTwv/r9a2A== + +"@esbuild/linux-loong64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.16.tgz#c5a50ff5981d457ed45f42c3f06a60086759c79b" + integrity sha512-MdUFggHjRiCCwNE9+1AibewoNq6wf94GLB9Q9aXwl+a75UlRmbRK3h6WJyrSGA6ZstDJgaD2wiTSP7tQNUYxwA== + +"@esbuild/linux-mips64el@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.16.tgz#e85b7e3c25000be2ae373e5208e55e282a9763e0" + integrity sha512-CO3YmO7jYMlGqGoeFeKzdwx/bx8Vtq/SZaMAi+ZLDUnDUdfC7GmGwXzIwDJ70Sg+P9pAemjJyJ1icKJ9R3q/Fg== + +"@esbuild/linux-ppc64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.16.tgz#24a0013bf727830df44fece571172ebe31b5c5e6" + integrity sha512-DSl5Czh5hCy/7azX0Wl9IdzPHX2H8clC6G87tBnZnzUpNgRxPFhfmArbaHoAysu4JfqCqbB/33u/GL9dUgCBAw== + +"@esbuild/linux-riscv64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.16.tgz#b080998d8d0480e8235f1384c585ae505e98a19d" + integrity sha512-sSVVMEXsqf1fQu0j7kkhXMViroixU5XoaJXl1u/u+jbXvvhhCt9YvA/B6VM3aM/77HuRQ94neS5bcisijGnKFQ== + +"@esbuild/linux-s390x@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.16.tgz#5042de05b9b653dfd134f05e1b37b61704c14c42" + integrity sha512-jRqBCre9gZGoCdCN/UWCCMwCMsOg65IpY9Pyj56mKCF5zXy9d60kkNRdDN6YXGjr3rzcC4DXnS/kQVCGcC4yPQ== + +"@esbuild/linux-x64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.16.tgz#b7c0750f2276c9dcf41f0f2229adca46ef22f698" + integrity sha512-G1+09TopOzo59/55lk5Q0UokghYLyHTKKzD5lXsAOOlGDbieGEFJpJBr3BLDbf7cz89KX04sBeExAR/pL/26sA== + +"@esbuild/netbsd-x64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.16.tgz#e2a0ee181fbbe834174d26e24ce1b258232bb3eb" + integrity sha512-xwjGJB5wwDEujLaJIrSMRqWkbigALpBNcsF9SqszoNKc+wY4kPTdKrSxiY5ik3IatojePP+WV108MvF6q6np4w== + +"@esbuild/openbsd-x64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.16.tgz#87a84c1932e00f52ab3380c31facf0e48086ffb9" + integrity sha512-yeERkoxG2nR2oxO5n+Ms7MsCeNk23zrby2GXCqnfCpPp7KNc0vxaaacIxb21wPMfXXRhGBrNP4YLIupUBrWdlg== + +"@esbuild/sunos-x64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.16.tgz#996bcd2603cd345733c3aa5f52bfd5b8fa7d1d36" + integrity sha512-nHfbEym0IObXPhtX6Va3H5GaKBty2kdhlAhKmyCj9u255ktAj0b1YACUs9j5H88NRn9cJCthD1Ik/k9wn8YKVg== + +"@esbuild/win32-arm64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.16.tgz#404a9411d12533d0f2ce0a85df6ddb32e851ef04" + integrity sha512-pdD+M1ZOFy4hE15ZyPX09fd5g4DqbbL1wXGY90YmleVS6Y5YlraW4BvHjim/X/4yuCpTsAFvsT4Nca2lbyDH/A== + +"@esbuild/win32-ia32@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.16.tgz#bb5655a48f5f87fee870061883411f5149bc5e44" + integrity sha512-IPEMfU9p0c3Vb8PqxaPX6BM9rYwlTZGYOf9u+kMdhoILZkVKEjq6PKZO0lB+isojWwAnAqh4ZxshD96njTXajg== + +"@esbuild/win32-x64@0.16.16": + version "0.16.16" + resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.16.tgz#ee22fed0b2e0c00ce895cdfae9d32ef069a12e04" + integrity sha512-1YYpoJ39WV/2bnShPwgdzJklc+XS0bysN6Tpnt1cWPdeoKOG4RMEY1g7i534QxXX/rPvNx/NLJQTTCeORYzipg== "@eslint/eslintrc@^0.4.3": version "0.4.3" @@ -538,6 +543,11 @@ resolved "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== +"@isaacs/string-locale-compare@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz#291c227e93fd407a96ecd59879a35809120e432b" + integrity sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -782,18 +792,18 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@jsii/check-node@1.72.0": - version "1.72.0" - resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.72.0.tgz#fde581956fb006489606ed09ef475cf2f05c2f91" - integrity sha512-OmXpp+Ipt6vhZVdVvaNCrGFgQg/FPh3wATz9WeLooMYtNPiaAmIkq29hZS1WzM4CGxJKc7T1i2e8lYPU3vGp0w== +"@jsii/check-node@1.73.0": + version "1.73.0" + resolved "https://registry.npmjs.org/@jsii/check-node/-/check-node-1.73.0.tgz#6f9cff84ac6762a30c642c85d2d56603c299a89d" + integrity sha512-oneDKgjplUw2Ivk78iAb9lCsAasxkuQ6Ii15qzXsw16CPSRCqQlE78lUVV7pr+rxx/vQDWBAa8ycRbuVghC6TQ== dependencies: chalk "^4.1.2" semver "^7.3.8" -"@jsii/spec@1.72.0", "@jsii/spec@^1.72.0": - version "1.72.0" - resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.72.0.tgz#ce9d76ec221ed39b9f602477378bf1b957c63d8f" - integrity sha512-zlKTRU8Pu8gIFTMl7ctj+f0l5YPEjAitUfOnSSNv6rZUY20p/zPjkBBw75Nt/4wfkz4UVagWJKuangxfkpsMuw== +"@jsii/spec@1.73.0", "@jsii/spec@^1.73.0": + version "1.73.0" + resolved "https://registry.npmjs.org/@jsii/spec/-/spec-1.73.0.tgz#7ab1d42947b4cb4099f084119657c39409bc7dc8" + integrity sha512-h0BeA6WQfxvYl5BaacmlvB5bAIdhlgf9SInJljxtERn2eYN+VjgMyU/1iv0Ww4Lp71xMGL96bmfXpdlFgRQFEg== dependencies: ajv "^8.11.2" @@ -1489,11 +1499,80 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@npmcli/arborist@^5.0.4", "@npmcli/arborist@^5.6.3": + version "5.6.3" + resolved "https://registry.npmjs.org/@npmcli/arborist/-/arborist-5.6.3.tgz#40810080272e097b4a7a4f56108f4a31638a9874" + integrity sha512-/7hbqEM6YuRjwTcQXkK1+xKslEblY5kFQe0tZ7jKyMlIR6x4iOmhLErIkBBGtTKvYxRKdpcxnFXjCobg3UqmsA== + dependencies: + "@isaacs/string-locale-compare" "^1.1.0" + "@npmcli/installed-package-contents" "^1.0.7" + "@npmcli/map-workspaces" "^2.0.3" + "@npmcli/metavuln-calculator" "^3.0.1" + "@npmcli/move-file" "^2.0.0" + "@npmcli/name-from-folder" "^1.0.1" + "@npmcli/node-gyp" "^2.0.0" + "@npmcli/package-json" "^2.0.0" + "@npmcli/query" "^1.2.0" + "@npmcli/run-script" "^4.1.3" + bin-links "^3.0.3" + cacache "^16.1.3" + common-ancestor-path "^1.0.1" + hosted-git-info "^5.2.1" + json-parse-even-better-errors "^2.3.1" + json-stringify-nice "^1.1.4" + minimatch "^5.1.0" + mkdirp "^1.0.4" + mkdirp-infer-owner "^2.0.0" + nopt "^6.0.0" + npm-install-checks "^5.0.0" + npm-package-arg "^9.0.0" + npm-pick-manifest "^7.0.2" + npm-registry-fetch "^13.0.0" + npmlog "^6.0.2" + pacote "^13.6.1" + parse-conflict-json "^2.0.1" + proc-log "^2.0.0" + promise-all-reject-late "^1.0.0" + promise-call-limit "^1.0.1" + read-package-json-fast "^2.0.2" + readdir-scoped-modules "^1.1.0" + rimraf "^3.0.2" + semver "^7.3.7" + ssri "^9.0.0" + treeverse "^2.0.0" + walk-up-path "^1.0.0" + "@npmcli/ci-detect@^1.0.0": version "1.4.0" resolved "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-1.4.0.tgz#18478bbaa900c37bfbd8a2006a6262c62e8b0fe1" integrity sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q== +"@npmcli/ci-detect@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-2.0.0.tgz#e63c91bcd4185ac1e85720a34fc48e164ece5b89" + integrity sha512-8yQtQ9ArHh/TzdUDKQwEvwCgpDuhSWTDAbiKMl3854PcT+Dk4UmWaiawuFTLy9n5twzXOBXVflWe+90/ffXQrA== + +"@npmcli/config@^4.1.0": + version "4.2.2" + resolved "https://registry.npmjs.org/@npmcli/config/-/config-4.2.2.tgz#2e3334dda84f48d059309c53d152e66b05ca24b7" + integrity sha512-5GNcLd+0c4bYBnFop53+26CO5GQP0R9YcxlernohpHDWdIgzUg9I0+GEMk3sNHnLntATVU39d283A4OO+W402w== + dependencies: + "@npmcli/map-workspaces" "^2.0.2" + ini "^3.0.0" + mkdirp-infer-owner "^2.0.0" + nopt "^6.0.0" + proc-log "^2.0.0" + read-package-json-fast "^2.0.3" + semver "^7.3.5" + walk-up-path "^1.0.0" + +"@npmcli/disparity-colors@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@npmcli/disparity-colors/-/disparity-colors-2.0.0.tgz#cb518166ee21573b96241a3613fef70acb2a60ba" + integrity sha512-FFXGrIjhvd2qSZ8iS0yDvbI7nbjdyT2VNO7wotosjYZM2p2r8PN3B7Om3M5NO9KqW/OVzfzLB3L0V5Vo5QXC7A== + dependencies: + ansi-styles "^4.3.0" + "@npmcli/fs@^1.0.0": version "1.1.1" resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz#72f719fe935e687c56a4faecf3c03d06ba593257" @@ -1502,7 +1581,7 @@ "@gar/promisify" "^1.0.1" semver "^7.3.5" -"@npmcli/fs@^2.1.0": +"@npmcli/fs@^2.1.0", "@npmcli/fs@^2.1.1": version "2.1.2" resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz#a9e2541a4a2fec2e69c29b35e6060973da79b865" integrity sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ== @@ -1547,6 +1626,26 @@ npm-bundled "^1.1.1" npm-normalize-package-bin "^1.0.1" +"@npmcli/map-workspaces@^2.0.2", "@npmcli/map-workspaces@^2.0.3": + version "2.0.4" + resolved "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.4.tgz#9e5e8ab655215a262aefabf139782b894e0504fc" + integrity sha512-bMo0aAfwhVwqoVM5UzX1DJnlvVvzDCHae821jv48L1EsrYwfOZChlqWYXEtto/+BkBXetPbEWgau++/brh4oVg== + dependencies: + "@npmcli/name-from-folder" "^1.0.1" + glob "^8.0.1" + minimatch "^5.0.1" + read-package-json-fast "^2.0.3" + +"@npmcli/metavuln-calculator@^3.0.1": + version "3.1.1" + resolved "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-3.1.1.tgz#9359bd72b400f8353f6a28a25c8457b562602622" + integrity sha512-n69ygIaqAedecLeVH3KnO39M6ZHiJ2dEv5A7DGvcqCB8q17BGUgW8QaanIkbWUo2aYGZqJaOORTLAlIvKjNDKA== + dependencies: + cacache "^16.0.0" + json-parse-even-better-errors "^2.3.1" + pacote "^13.0.3" + semver "^7.3.5" + "@npmcli/move-file@^1.0.1": version "1.1.2" resolved "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" @@ -1563,6 +1662,11 @@ mkdirp "^1.0.4" rimraf "^3.0.2" +"@npmcli/name-from-folder@^1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-1.0.1.tgz#77ecd0a4fcb772ba6fe927e2e2e155fbec2e6b1a" + integrity sha512-qq3oEfcLFwNfEYOQ8HLimRGKlD8WSeGEdtUa7hmzpR8Sa7haL1KVQrvgO6wqMjhWFFVjgtrh1gIxDz+P8sjUaA== + "@npmcli/node-gyp@^1.0.2": version "1.0.3" resolved "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz#a912e637418ffc5f2db375e93b85837691a43a33" @@ -1573,6 +1677,13 @@ resolved "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz#8c20e53e34e9078d18815c1d2dda6f2420d75e35" integrity sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A== +"@npmcli/package-json@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@npmcli/package-json/-/package-json-2.0.0.tgz#3bbcf4677e21055adbe673d9f08c9f9cde942e4a" + integrity sha512-42jnZ6yl16GzjWSH7vtrmWyJDGVa/LXPdpN2rcUWolFjc9ON2N3uz0qdBbQACfmhuJZ2lbKYtmK5qx68ZPLHMA== + dependencies: + json-parse-even-better-errors "^2.3.1" + "@npmcli/promise-spawn@^1.2.0", "@npmcli/promise-spawn@^1.3.2": version "1.3.2" resolved "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz#42d4e56a8e9274fba180dabc0aea6e38f29274f5" @@ -1587,6 +1698,15 @@ dependencies: infer-owner "^1.0.4" +"@npmcli/query@^1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@npmcli/query/-/query-1.2.0.tgz#46468d583cf013aa92102970700f9555314aabe4" + integrity sha512-uWglsUM3PjBLgTSmZ3/vygeGdvWEIZ3wTUnzGFbprC/RtvQSaT+GAXu1DXmSFj2bD3oOZdcRm1xdzsV2z1YWdw== + dependencies: + npm-package-arg "^9.1.0" + postcss-selector-parser "^6.0.10" + semver "^7.3.7" + "@npmcli/run-script@^1.8.2": version "1.8.6" resolved "https://registry.npmjs.org/@npmcli/run-script/-/run-script-1.8.6.tgz#18314802a6660b0d4baa4c3afe7f1ad39d8c28b7" @@ -1597,7 +1717,17 @@ node-gyp "^7.1.0" read-package-json-fast "^2.0.1" -"@npmcli/run-script@^4.1.0": +"@npmcli/run-script@^3.0.1": + version "3.0.3" + resolved "https://registry.npmjs.org/@npmcli/run-script/-/run-script-3.0.3.tgz#66afa6e0c4c3484056195f295fa6c1d1a45ddf58" + integrity sha512-ZXL6qgC5NjwfZJ2nET+ZSLEz/PJgJ/5CU90C2S66dZY4Jw73DasS4ZCXuy/KHWYP0imjJ4VtA+Gebb5BxxKp9Q== + dependencies: + "@npmcli/node-gyp" "^2.0.0" + "@npmcli/promise-spawn" "^3.0.0" + node-gyp "^8.4.1" + read-package-json-fast "^2.0.3" + +"@npmcli/run-script@^4.1.0", "@npmcli/run-script@^4.1.3", "@npmcli/run-script@^4.2.0": version "4.2.1" resolved "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.2.1.tgz#c07c5c71bc1c70a5f2a06b0d4da976641609b946" integrity sha512-7dqywvVudPSrRCW5nTHpHgeWnbBtz8cFkOuKrecm6ih+oO9ciydhWt6OF7HlqupRRmB8Q/gECVdB9LMfToJbRg== @@ -1920,7 +2050,7 @@ dependencies: "@types/node" "*" -"@types/fs-extra@^9.0.13": +"@types/fs-extra@^9.0.0", "@types/fs-extra@^9.0.13": version "9.0.13" resolved "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" integrity sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA== @@ -1944,9 +2074,9 @@ "@types/node" "*" "@types/graceful-fs@^4.1.2": - version "4.1.5" - resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== + version "4.1.6" + resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" + integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== dependencies: "@types/node" "*" @@ -2054,6 +2184,11 @@ resolved "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f" integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== +"@types/node@^14.18.31": + version "14.18.35" + resolved "https://registry.npmjs.org/@types/node/-/node-14.18.35.tgz#879c4659cb7b3fe515844f029c75079c941bb65c" + integrity sha512-2ATO8pfhG1kDvw4Lc4C0GXIMSQFFJBCo/R1fSgTwmUlq5oy95LXyjDQinsRVgQY6gp6ghh3H91wk9ES5/5C+Tw== + "@types/node@^14.18.36": version "14.18.36" resolved "https://registry.npmjs.org/@types/node/-/node-14.18.36.tgz#c414052cb9d43fab67d679d5f3c641be911f5835" @@ -2069,6 +2204,13 @@ resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== +"@types/npm@^7.19.0": + version "7.19.0" + resolved "https://registry.npmjs.org/@types/npm/-/npm-7.19.0.tgz#a62382cea8ca8ef8452553e3d5daa68a331cda70" + integrity sha512-K/w+k8SnDjdQoK2fkUl9fHLAiVVmdFgdZ2/iGFuaaQC+wwaNdDQRTFaoCEYYrfCMbuVkhL3Lgqbi+p5d5I1lSg== + dependencies: + "@types/node" "*" + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -2187,6 +2329,13 @@ dependencies: "@types/yargs-parser" "*" +"@types/yargs@^17.0.13": + version "17.0.13" + resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76" + integrity sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg== + dependencies: + "@types/yargs-parser" "*" + "@types/yarnpkg__lockfile@^1.1.5": version "1.1.5" resolved "https://registry.npmjs.org/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.5.tgz#9639020e1fb65120a2f4387db8f1e8b63efdf229" @@ -2207,13 +2356,13 @@ tsutils "^3.21.0" "@typescript-eslint/eslint-plugin@^5": - version "5.48.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.0.tgz#54f8368d080eb384a455f60c2ee044e948a8ce67" - integrity sha512-SVLafp0NXpoJY7ut6VFVUU9I+YeFsDzeQwtK0WZ+xbRN3mtxJ08je+6Oi2N89qDn087COdO0u3blKZNv9VetRQ== + version "5.48.1" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.1.tgz#deee67e399f2cb6b4608c935777110e509d8018c" + integrity sha512-9nY5K1Rp2ppmpb9s9S2aBiF3xo5uExCehMDmYmmFqqyxgenbHJ3qbarcLt4ITgaD6r/2ypdlcFRdcuVPnks+fQ== dependencies: - "@typescript-eslint/scope-manager" "5.48.0" - "@typescript-eslint/type-utils" "5.48.0" - "@typescript-eslint/utils" "5.48.0" + "@typescript-eslint/scope-manager" "5.48.1" + "@typescript-eslint/type-utils" "5.48.1" + "@typescript-eslint/utils" "5.48.1" debug "^4.3.4" ignore "^5.2.0" natural-compare-lite "^1.4.0" @@ -2244,13 +2393,13 @@ debug "^4.3.1" "@typescript-eslint/parser@^5": - version "5.48.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.48.0.tgz#02803355b23884a83e543755349809a50b7ed9ba" - integrity sha512-1mxNA8qfgxX8kBvRDIHEzrRGrKHQfQlbW6iHyfHYS0Q4X1af+S6mkLNtgCOsGVl8+/LUPrqdHMssAemkrQ01qg== + version "5.48.1" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.48.1.tgz#d0125792dab7e232035434ab8ef0658154db2f10" + integrity sha512-4yg+FJR/V1M9Xoq56SF9Iygqm+r5LMXvheo6DQ7/yUWynQ4YfCRnsKuRgqH4EQ5Ya76rVwlEpw4Xu+TgWQUcdA== dependencies: - "@typescript-eslint/scope-manager" "5.48.0" - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/typescript-estree" "5.48.0" + "@typescript-eslint/scope-manager" "5.48.1" + "@typescript-eslint/types" "5.48.1" + "@typescript-eslint/typescript-estree" "5.48.1" debug "^4.3.4" "@typescript-eslint/scope-manager@4.33.0": @@ -2261,21 +2410,21 @@ "@typescript-eslint/types" "4.33.0" "@typescript-eslint/visitor-keys" "4.33.0" -"@typescript-eslint/scope-manager@5.48.0": - version "5.48.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.48.0.tgz#607731cb0957fbc52fd754fd79507d1b6659cecf" - integrity sha512-0AA4LviDtVtZqlyUQnZMVHydDATpD9SAX/RC5qh6cBd3xmyWvmXYF+WT1oOmxkeMnWDlUVTwdODeucUnjz3gow== +"@typescript-eslint/scope-manager@5.48.1": + version "5.48.1" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.48.1.tgz#39c71e4de639f5fe08b988005beaaf6d79f9d64d" + integrity sha512-S035ueRrbxRMKvSTv9vJKIWgr86BD8s3RqoRZmsSh/s8HhIs90g6UlK8ZabUSjUZQkhVxt7nmZ63VJ9dcZhtDQ== dependencies: - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/visitor-keys" "5.48.0" + "@typescript-eslint/types" "5.48.1" + "@typescript-eslint/visitor-keys" "5.48.1" -"@typescript-eslint/type-utils@5.48.0": - version "5.48.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.48.0.tgz#40496dccfdc2daa14a565f8be80ad1ae3882d6d6" - integrity sha512-vbtPO5sJyFjtHkGlGK4Sthmta0Bbls4Onv0bEqOGm7hP9h8UpRsHJwsrCiWtCUndTRNQO/qe6Ijz9rnT/DB+7g== +"@typescript-eslint/type-utils@5.48.1": + version "5.48.1" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.48.1.tgz#5d94ac0c269a81a91ad77c03407cea2caf481412" + integrity sha512-Hyr8HU8Alcuva1ppmqSYtM/Gp0q4JOp1F+/JH5D1IZm/bUBrV0edoewQZiEc1r6I8L4JL21broddxK8HAcZiqQ== dependencies: - "@typescript-eslint/typescript-estree" "5.48.0" - "@typescript-eslint/utils" "5.48.0" + "@typescript-eslint/typescript-estree" "5.48.1" + "@typescript-eslint/utils" "5.48.1" debug "^4.3.4" tsutils "^3.21.0" @@ -2284,10 +2433,10 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== -"@typescript-eslint/types@5.48.0": - version "5.48.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.48.0.tgz#d725da8dfcff320aab2ac6f65c97b0df30058449" - integrity sha512-UTe67B0Ypius0fnEE518NB2N8gGutIlTojeTg4nt0GQvikReVkurqxd2LvYa9q9M5MQ6rtpNyWTBxdscw40Xhw== +"@typescript-eslint/types@5.48.1": + version "5.48.1" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.48.1.tgz#efd1913a9aaf67caf8a6e6779fd53e14e8587e14" + integrity sha512-xHyDLU6MSuEEdIlzrrAerCGS3T7AA/L8Hggd0RCYBi0w3JMvGYxlLlXHeg50JI9Tfg5MrtsfuNxbS/3zF1/ATg== "@typescript-eslint/typescript-estree@4.33.0", "@typescript-eslint/typescript-estree@^4.33.0": version "4.33.0" @@ -2302,29 +2451,29 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.48.0": - version "5.48.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.0.tgz#a7f04bccb001003405bb5452d43953a382c2fac2" - integrity sha512-7pjd94vvIjI1zTz6aq/5wwE/YrfIyEPLtGJmRfyNR9NYIW+rOvzzUv3Cmq2hRKpvt6e9vpvPUQ7puzX7VSmsEw== +"@typescript-eslint/typescript-estree@5.48.1": + version "5.48.1" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.1.tgz#9efa8ee2aa471c6ab62e649f6e64d8d121bc2056" + integrity sha512-Hut+Osk5FYr+sgFh8J/FHjqX6HFcDzTlWLrFqGoK5kVUN3VBHF/QzZmAsIXCQ8T/W9nQNBTqalxi1P3LSqWnRA== dependencies: - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/visitor-keys" "5.48.0" + "@typescript-eslint/types" "5.48.1" + "@typescript-eslint/visitor-keys" "5.48.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.48.0": - version "5.48.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.0.tgz#eee926af2733f7156ad8d15e51791e42ce300273" - integrity sha512-x2jrMcPaMfsHRRIkL+x96++xdzvrdBCnYRd5QiW5Wgo1OB4kDYPbC1XjWP/TNqlfK93K/lUL92erq5zPLgFScQ== +"@typescript-eslint/utils@5.48.1": + version "5.48.1" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.1.tgz#20f2f4e88e9e2a0961cbebcb47a1f0f7da7ba7f9" + integrity sha512-SmQuSrCGUOdmGMwivW14Z0Lj8dxG1mOFZ7soeJ0TQZEJcs3n5Ndgkg0A4bcMFzBELqLJ6GTHnEU+iIoaD6hFGA== dependencies: "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.48.0" - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/typescript-estree" "5.48.0" + "@typescript-eslint/scope-manager" "5.48.1" + "@typescript-eslint/types" "5.48.1" + "@typescript-eslint/typescript-estree" "5.48.1" eslint-scope "^5.1.1" eslint-utils "^3.0.0" semver "^7.3.7" @@ -2337,12 +2486,12 @@ "@typescript-eslint/types" "4.33.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@5.48.0": - version "5.48.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.0.tgz#4446d5e7f6cadde7140390c0e284c8702d944904" - integrity sha512-5motVPz5EgxQ0bHjut3chzBkJ3Z3sheYVcSwS5BpHZpLqSptSmELNtGixmgj65+rIfhvtQTz5i9OP2vtzdDH7Q== +"@typescript-eslint/visitor-keys@5.48.1": + version "5.48.1" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.1.tgz#79fd4fb9996023ef86849bf6f904f33eb6c8fccb" + integrity sha512-Ns0XBwmfuX7ZknznfXozgnydyR8F6ev/KEGePP4i74uL3ArsKbEhJ7raeKr1JSa997DBDwol/4a0Y+At82c9dA== dependencies: - "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/types" "5.48.1" eslint-visitor-keys "^3.3.0" "@xmldom/xmldom@^0.8.6": @@ -2368,7 +2517,7 @@ abab@^2.0.3, abab@^2.0.5: resolved "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== -abbrev@1, abbrev@^1.0.0: +abbrev@1, abbrev@^1.0.0, abbrev@~1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -2491,7 +2640,7 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -2567,7 +2716,7 @@ archiver@^5.3.1: tar-stream "^2.2.0" zip-stream "^4.1.0" -archy@^1.0.0: +archy@^1.0.0, archy@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== @@ -2756,9 +2905,9 @@ aws-sdk-mock@5.6.0: traverse "^0.6.6" aws-sdk@^2.1211.0, aws-sdk@^2.596.0, aws-sdk@^2.928.0: - version "2.1287.0" - resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1287.0.tgz#40296aadf34e7550e058f73f3363130d65ffb1c0" - integrity sha512-mtfDstUdFNn8FnBaXs2KAaQ0cgDIiwlqwC2UptUKWWrugjZHAoRacfD/6bnah1Kwhu43F9CDEe5QLHnQtymNkw== + version "2.1292.0" + resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1292.0.tgz#bff92d794b8bbb71628c2f7b9d799c34ef2f27b4" + integrity sha512-GqN75aYmaZrirMCJI5CwvYW/bQRyBs59t/tDYBuwb9RMppL8vv9cEwGu3H74yxeoz89LyrbQtoOB8ZgHxNDNmA== dependencies: buffer "4.9.2" events "1.1.1" @@ -2777,9 +2926,9 @@ aws-sign2@~0.7.0: integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" - integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + version "1.12.0" + resolved "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" + integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== axios@^0.27.2: version "0.27.2" @@ -2872,7 +3021,19 @@ before-after-hook@^2.2.0: resolved "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== -binary-extensions@^2.0.0: +bin-links@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/bin-links/-/bin-links-3.0.3.tgz#3842711ef3db2cd9f16a5f404a996a12db355a6e" + integrity sha512-zKdnMPWEdh4F5INR07/eBrodC7QrF5JKvqskjz/ZZRXg5YSAZIbn8zGhbhUrElzHBZ2fvEQdOU59RHcTG3GiwA== + dependencies: + cmd-shim "^5.0.0" + mkdirp-infer-owner "^2.0.0" + npm-normalize-package-bin "^2.0.0" + read-cmd-shim "^3.0.0" + rimraf "^3.0.0" + write-file-atomic "^4.0.0" + +binary-extensions@^2.0.0, binary-extensions@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== @@ -3034,7 +3195,7 @@ cacache@^15.0.5, cacache@^15.2.0: tar "^6.0.2" unique-filename "^1.1.1" -cacache@^16.0.0, cacache@^16.1.0: +cacache@^16.0.0, cacache@^16.1.0, cacache@^16.1.3: version "16.1.3" resolved "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz#a02b9f34ecfaf9a78c9f4bc16fceb94d5d67a38e" integrity sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ== @@ -3114,9 +3275,9 @@ camelcase@^6.2.0, camelcase@^6.3.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001400: - version "1.0.30001441" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz#987437b266260b640a23cd18fbddb509d7f69f3e" - integrity sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg== + version "1.0.30001442" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001442.tgz#40337f1cf3be7c637b061e2f78582dc1daec0614" + integrity sha512-239m03Pqy0hwxYPYR5JwOIxRJfLTWtle9FV8zosfV5pHg+/51uD4nxcUlM8+mWWGfwKtt8lJNHnD3cWw9VZ6ow== case@1.6.3, case@^1.6.3: version "1.6.3" @@ -3128,29 +3289,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.112: - version "0.1.112" - resolved "https://registry.npmjs.org/cdk-generate-synthetic-examples/-/cdk-generate-synthetic-examples-0.1.112.tgz#99bde4de8626e72f8c3b797b80e83e696a8832cb" - integrity sha512-MhZa0hFnfxJQnDDvxYZOG+oTGq5K8hp/OGtSiP90cL7rZbZmVdK/yq6Y1Z3y71gBoqDVPWYNZsCZa+VakeNZ7w== +cdk-generate-synthetic-examples@^0.1.119: + version "0.1.119" + resolved "https://registry.npmjs.org/cdk-generate-synthetic-examples/-/cdk-generate-synthetic-examples-0.1.119.tgz#dfbd95ab5b5e05268a27e5835ad54876b220bb4c" + integrity sha512-dRlv1VUGTUegYPxLlshA/MrEEPNuWzG+G81jEEe8Aa4Jtb2oHZfE9f69YbnryiklrAEXocOKeva+RwsPMf9fbQ== dependencies: - "@jsii/spec" "^1.72.0" + "@jsii/spec" "^1.73.0" fs-extra "^10.1.0" - jsii "^1.72.0" - jsii-reflect "^1.72.0" - jsii-rosetta "^1.72.0" + jsii "^1.73.0" + jsii-reflect "^1.73.0" + jsii-rosetta "^1.73.0" yargs "^17.6.2" -cdk8s-plus-24@2.3.13: - version "2.3.13" - resolved "https://registry.npmjs.org/cdk8s-plus-24/-/cdk8s-plus-24-2.3.13.tgz#3400be0e6dfe0e674e58d7ceee3b81530218b184" - integrity sha512-w8FgeJIMIEvSXC5zb6uallid9QcyQbLtKsNld96Z5SNxNtwE6Jv5R6KJpe+cgyplCpaIvTiQJo4thxZ6oGkPLA== +cdk8s-plus-24@2.3.20: + version "2.3.20" + resolved "https://registry.npmjs.org/cdk8s-plus-24/-/cdk8s-plus-24-2.3.20.tgz#528a0df4a432e4d5bd526a96a015fc12dd058e47" + integrity sha512-eUHIKDQzf/Qpv23+7BuU5RJvY3vqKXdYhPutYveAtaLbrkhVmA4JU9aGG5VrqiJFETTm068XOmZBWFOB3V9+0w== dependencies: minimatch "^3.1.2" -cdk8s@^2.6.8: - version "2.6.8" - resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-2.6.8.tgz#f7f279f4422ea5760558ee716fe916f3ac84d471" - integrity sha512-TLrcdA79rfyd5oN+zHIC1bK+e8fSyfLuZX8uPR+yEp/IKHjqKfKVWOjJhuvCK+t6z4RhkLE7Skd7SMBziy80OA== +cdk8s@^2.6.15: + version "2.6.15" + resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-2.6.15.tgz#75391eded62ab4df7105b1cba017911a67163572" + integrity sha512-Q46EEpqoQa2AfPqv9gIQkr+w1AYoR9jeyDUZhN58yBm0BIfKkl6j0cN+9mLM+HrHZaGwaMPdS60KL5dwQ9xIxA== dependencies: fast-json-patch "^3.1.1" follow-redirects "^1.15.2" @@ -3231,6 +3392,13 @@ ci-info@^3.2.0: resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.7.1.tgz#708a6cdae38915d597afdf3b145f2f8e1ff55f3f" integrity sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w== +cidr-regex@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/cidr-regex/-/cidr-regex-3.1.1.tgz#ba1972c57c66f61875f18fd7dd487469770b571d" + integrity sha512-RBqYd32aDwbCMFJRL6wHOlDNYJsPNTt8vC82ErHF5vKt8QQzxm1FrkW8s/R5pVrXMf17sba09Uoy91PKiddAsw== + dependencies: + ip-regex "^4.1.0" + cint@^8.2.1: version "8.2.1" resolved "https://registry.npmjs.org/cint/-/cint-8.2.1.tgz#70386b1b48e2773d0d63166a55aff94ef4456a12" @@ -3262,6 +3430,14 @@ cli-color@^2.0.0: memoizee "^0.4.15" timers-ext "^0.1.7" +cli-columns@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/cli-columns/-/cli-columns-4.0.0.tgz#9fe4d65975238d55218c41bd2ed296a7fa555646" + integrity sha512-XW2Vg+w+L9on9wtwKpyzluIPCWXjaBahI7mTcYjx+BVIYD9c3yqcv/yKC7CmdCZat4rq2yiE1UMSJC5ivKfMtQ== + dependencies: + string-width "^4.2.3" + strip-ansi "^6.0.1" + cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -3274,6 +3450,15 @@ cli-spinners@^2.5.0: resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== +cli-table3@^0.6.2: + version "0.6.3" + resolved "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" + integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg== + dependencies: + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" + cli-table@^0.3.11: version "0.3.11" resolved "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz#ac69cdecbe81dccdba4889b9a18b7da312a9d3ee" @@ -3346,15 +3531,22 @@ cmd-shim@^4.1.0: dependencies: mkdirp-infer-owner "^2.0.0" +cmd-shim@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/cmd-shim/-/cmd-shim-5.0.0.tgz#8d0aaa1a6b0708630694c4dbde070ed94c707724" + integrity sha512-qkCtZ59BidfEwHltnJwkyVZn+XQojdAySM1D1gSeh11Z4pW1Kpolkyo53L5noc0nrxmIvyFwTmJRo4xs7FFLPw== + dependencies: + mkdirp-infer-owner "^2.0.0" + co@^4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== -codemaker@1.72.0, codemaker@^1.72.0: - version "1.72.0" - resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.72.0.tgz#ceef1aff84cb5d534f5be1226d5fc48103ccb50a" - integrity sha512-U4TM++FGA+vnWHTSMA8juU+C9iXn1TDauMFmn44gz9pKrbLtjGUiMjfC4vX5HachkNQgitRj6bc/g7PA4j0C3Q== +codemaker@1.73.0, codemaker@^1.73.0: + version "1.73.0" + resolved "https://registry.npmjs.org/codemaker/-/codemaker-1.73.0.tgz#5b3b280759a31ee259bbcdc50ba9bd46e115b787" + integrity sha512-pgVFCAbR0Yw/qTrV/W8R7cXWJouhONMRf8sNCjmAGJyV3MFaLN4sUPdUkzYUu7LCkuHPh0nvYRlExWzrkhm7vw== dependencies: camelcase "^6.3.0" decamelize "^5.0.1" @@ -3399,7 +3591,7 @@ colors@1.0.3, colors@1.4.0: resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -columnify@^1.5.4: +columnify@^1.5.4, columnify@^1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz#6989531713c9008bb29735e61e37acf5bd553cf3" integrity sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q== @@ -3424,7 +3616,12 @@ commander@^7.2.0: resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@^9.1.0, commander@~9.4.0: +commander@^9.1.0: + version "9.5.0" + resolved "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + +commander@~9.4.1: version "9.4.1" resolved "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== @@ -3440,6 +3637,11 @@ comment-json@4.2.2: has-own-prop "^2.0.0" repeat-string "^1.6.1" +common-ancestor-path@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7" + integrity sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -3514,9 +3716,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.209" - resolved "https://registry.npmjs.org/constructs/-/constructs-10.1.209.tgz#0e2a525fdc8471f8553d20e2182c0ee7dc0ed25f" - integrity sha512-BLvvM9bsKg4AGgeHWzT2elFh4UCFgmF4JyRjFcUMmHPJzgmErSwzUen/jVP4kI28nahakJXouiff6KZt0ey+3Q== + version "10.1.216" + resolved "https://registry.npmjs.org/constructs/-/constructs-10.1.216.tgz#5e4268d27a4b8d0e510990e916c62f758c85c05a" + integrity sha512-Nx/Pzuyy46Bc5LFu3XPSmTKNcjN4ChQ/R3syOb7bJLfQ5VhJn+o0aCKBVwnbuF1av0YCG6IaDz8fdtWhjefJjA== conventional-changelog-angular@^5.0.12: version "5.0.13" @@ -3782,6 +3984,11 @@ crypto-random-string@^2.0.0: resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + cssom@^0.4.4: version "0.4.4" resolved "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" @@ -4303,26 +4510,32 @@ error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.20.5" - resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.5.tgz#e6dc99177be37cacda5988e692c3fa8b218e95d2" - integrity sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ== + version "1.21.1" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6" + integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg== dependencies: + available-typed-arrays "^1.0.5" call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" es-to-primitive "^1.2.1" function-bind "^1.1.1" function.prototype.name "^1.1.5" get-intrinsic "^1.1.3" get-symbol-description "^1.0.0" + globalthis "^1.0.3" gopd "^1.0.1" has "^1.0.3" has-property-descriptors "^1.0.0" + has-proto "^1.0.1" has-symbols "^1.0.3" - internal-slot "^1.0.3" + internal-slot "^1.0.4" + is-array-buffer "^3.0.1" is-callable "^1.2.7" is-negative-zero "^2.0.2" is-regex "^1.1.4" is-shared-array-buffer "^1.0.2" is-string "^1.0.7" + is-typed-array "^1.1.10" is-weakref "^1.0.2" object-inspect "^1.12.2" object-keys "^1.1.1" @@ -4331,13 +4544,24 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: safe-regex-test "^1.0.0" string.prototype.trimend "^1.0.6" string.prototype.trimstart "^1.0.6" + typed-array-length "^1.0.4" unbox-primitive "^1.0.2" + which-typed-array "^1.1.9" es-array-method-boxes-properly@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" @@ -4395,33 +4619,33 @@ es6-weak-map@^2.0.3: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -esbuild@^0.16.13: - version "0.16.13" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.16.13.tgz#83cd347c28221268bbfa0425db532d7d05f85b48" - integrity sha512-oYwFdSEIoKM1oYzyem1osgKJAvg5447XF+05ava21fOtilyb2HeQQh26/74K4WeAk5dZmj/Mx10zUqUnI14jhA== +esbuild@^0.16.16: + version "0.16.16" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.16.16.tgz#e8a27820a30cc1449066f9bbe8916b145dbc9046" + integrity sha512-24JyKq10KXM5EBIgPotYIJ2fInNWVVqflv3gicIyQqfmUqi4HvDW1VR790cBgLJHCl96Syy7lhoz7tLFcmuRmg== optionalDependencies: - "@esbuild/android-arm" "0.16.13" - "@esbuild/android-arm64" "0.16.13" - "@esbuild/android-x64" "0.16.13" - "@esbuild/darwin-arm64" "0.16.13" - "@esbuild/darwin-x64" "0.16.13" - "@esbuild/freebsd-arm64" "0.16.13" - "@esbuild/freebsd-x64" "0.16.13" - "@esbuild/linux-arm" "0.16.13" - "@esbuild/linux-arm64" "0.16.13" - "@esbuild/linux-ia32" "0.16.13" - "@esbuild/linux-loong64" "0.16.13" - "@esbuild/linux-mips64el" "0.16.13" - "@esbuild/linux-ppc64" "0.16.13" - "@esbuild/linux-riscv64" "0.16.13" - "@esbuild/linux-s390x" "0.16.13" - "@esbuild/linux-x64" "0.16.13" - "@esbuild/netbsd-x64" "0.16.13" - "@esbuild/openbsd-x64" "0.16.13" - "@esbuild/sunos-x64" "0.16.13" - "@esbuild/win32-arm64" "0.16.13" - "@esbuild/win32-ia32" "0.16.13" - "@esbuild/win32-x64" "0.16.13" + "@esbuild/android-arm" "0.16.16" + "@esbuild/android-arm64" "0.16.16" + "@esbuild/android-x64" "0.16.16" + "@esbuild/darwin-arm64" "0.16.16" + "@esbuild/darwin-x64" "0.16.16" + "@esbuild/freebsd-arm64" "0.16.16" + "@esbuild/freebsd-x64" "0.16.16" + "@esbuild/linux-arm" "0.16.16" + "@esbuild/linux-arm64" "0.16.16" + "@esbuild/linux-ia32" "0.16.16" + "@esbuild/linux-loong64" "0.16.16" + "@esbuild/linux-mips64el" "0.16.16" + "@esbuild/linux-ppc64" "0.16.16" + "@esbuild/linux-riscv64" "0.16.16" + "@esbuild/linux-s390x" "0.16.16" + "@esbuild/linux-x64" "0.16.16" + "@esbuild/netbsd-x64" "0.16.16" + "@esbuild/openbsd-x64" "0.16.16" + "@esbuild/sunos-x64" "0.16.16" + "@esbuild/win32-arm64" "0.16.16" + "@esbuild/win32-ia32" "0.16.16" + "@esbuild/win32-x64" "0.16.16" escalade@^3.1.1: version "3.1.1" @@ -4554,11 +4778,6 @@ eslint-plugin-promise@^4.3.1: resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz#61485df2a359e03149fdafc0a68b0e030ad2ac45" integrity sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ== -eslint-plugin-rulesdir@0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.2.1.tgz#e246bb9657e68eb0a30680c60775f40aa829ec0b" - integrity sha512-t7rQvEyfE4JZJu6dPl4/uVr6Fr0fxopBhzVbtq3isfOHMKdlIe9xW/5CtIaWZI0E1U+wzAk0lEnZC8laCD5YLA== - eslint-plugin-standard@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" @@ -4874,6 +5093,11 @@ fast-memoize@^2.5.2: resolved "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz#79e3bb6a4ec867ea40ba0e7146816f6cdce9b57e" integrity sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw== +fastest-levenshtein@^1.0.12: + version "1.0.16" + resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + fastq@^1.6.0: version "1.15.0" resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -5408,6 +5632,13 @@ globals@^13.19.0, globals@^13.6.0, globals@^13.9.0: dependencies: type-fest "^0.20.2" +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + globby@^11.0.2, globby@^11.0.3, globby@^11.0.4, globby@^11.1.0: version "11.1.0" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -5525,6 +5756,11 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -5579,7 +5815,7 @@ hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" -hosted-git-info@^5.0.0: +hosted-git-info@^5.0.0, hosted-git-info@^5.2.1: version "5.2.1" resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz#0ba1c97178ef91f3ab30842ae63d6a272341156f" integrity sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw== @@ -5704,7 +5940,7 @@ ignore@^4.0.6: resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.8, ignore@^5.2.0, ignore@^5.2.4, ignore@~5.2.0: +ignore@^5.1.1, ignore@^5.1.8, ignore@^5.2.0, ignore@^5.2.4, ignore@~5.2.4: version "5.2.4" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -5778,7 +6014,7 @@ ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -ini@~3.0.0: +ini@^3.0.0, ini@~3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz#c76ec81007875bc44d544ff7a11a55d12294102d" integrity sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ== @@ -5796,6 +6032,19 @@ init-package-json@^2.0.2: validate-npm-package-license "^3.0.4" validate-npm-package-name "^3.0.0" +init-package-json@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/init-package-json/-/init-package-json-3.0.2.tgz#f5bc9bac93f2bdc005778bc2271be642fecfcd69" + integrity sha512-YhlQPEjNFqlGdzrBfDNRLhvoSgX7iQRgSxgsNknRQ9ITXFT7UMfVMWhBTOh2Y+25lRnGrv5Xz8yZwQ3ACR6T3A== + dependencies: + npm-package-arg "^9.0.1" + promzard "^0.3.0" + read "^1.0.7" + read-package-json "^5.0.0" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" + validate-npm-package-name "^4.0.0" + inquirer@^7.3.3: version "7.3.3" resolved "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" @@ -5815,7 +6064,7 @@ inquirer@^7.3.3: strip-ansi "^6.0.0" through "^2.3.6" -internal-slot@^1.0.3: +internal-slot@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz#8551e7baf74a7a6ba5f749cfb16aa60722f0d6f3" integrity sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ== @@ -5829,6 +6078,11 @@ interpret@^1.0.0: resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== +ip-regex@^4.1.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" + integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== + ip@^1.1.5: version "1.1.8" resolved "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" @@ -5847,6 +6101,15 @@ is-arguments@^1.0.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-array-buffer@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz#deb1db4fcae48308d54ef2442706c0393997052a" + integrity sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-typed-array "^1.1.10" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -5891,6 +6154,13 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-cidr@^4.0.2: + version "4.0.2" + resolved "https://registry.npmjs.org/is-cidr/-/is-cidr-4.0.2.tgz#94c7585e4c6c77ceabf920f8cde51b8c0fda8814" + integrity sha512-z4a1ENUajDbEl/Q6/pVBpTR1nBjjEE1X7qb7bmWYanNnPoKAvUCPFKeXV6Fe4mgTkWKBqiHIcwsI3SndiO5FeA== + dependencies: + cidr-regex "^3.1.1" + is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" @@ -6089,7 +6359,7 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" -is-typed-array@^1.1.10, is-typed-array@^1.1.3: +is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: version "1.1.10" resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== @@ -6448,6 +6718,16 @@ jest-junit@^13, jest-junit@^13.2.0: uuid "^8.3.2" xml "^1.0.1" +jest-junit@^14.0.0: + version "14.0.1" + resolved "https://registry.npmjs.org/jest-junit/-/jest-junit-14.0.1.tgz#5b357d6f5d333459585d628a24cd48b5bbc92ba2" + integrity sha512-h7/wwzPbllgpQhhVcRzRC76/cc89GlazThoV1fDxcALkf26IIlRsu/AcTG64f4nR2WPE3Cbd+i/sVf+NCUHrWQ== + dependencies: + mkdirp "^1.0.4" + strip-ansi "^6.0.1" + uuid "^8.3.2" + xml "^1.0.1" + jest-leak-detector@^27.5.1: version "27.5.1" resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz#6ec9d54c3579dd6e3e66d70e3498adf80fde3fb8" @@ -6756,73 +7036,73 @@ jsesc@^2.5.1: resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -jsii-diff@1.72.0: - version "1.72.0" - resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.72.0.tgz#a8689bba2886451ff1ad5da7e7383c60bc99cf3d" - integrity sha512-+rGhNuX2+pEXrGco6R36tgqtr7eg2ysLyILpCK6Rv4seiWZ8EUge/6Ifk6KzwgHmQ/v0Mk9Q2lmu8W22zWJNtQ== +jsii-diff@1.73.0: + version "1.73.0" + resolved "https://registry.npmjs.org/jsii-diff/-/jsii-diff-1.73.0.tgz#378432f9b2b4c87790d1a530bf60596b8a712aee" + integrity sha512-pbMxeP1wFJwpA9Kki+IoFzVz/I81dHIW0yXyKOwTX7SrmoJ8LRlGJDb3Ks5H2MDdf2YL/6QVl0sgU6sC9/Ssvw== dependencies: - "@jsii/check-node" "1.72.0" - "@jsii/spec" "^1.72.0" + "@jsii/check-node" "1.73.0" + "@jsii/spec" "^1.73.0" fs-extra "^10.1.0" - jsii-reflect "^1.72.0" + jsii-reflect "^1.73.0" log4js "^6.7.1" yargs "^16.2.0" -jsii-pacmak@1.72.0: - version "1.72.0" - resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.72.0.tgz#3a981463d9fb5de0a3adf5dd297f32b1f251d523" - integrity sha512-yOrWXmtDA0CVZ21396pN0J9i9/Vh2F6EhKP9ZE/6N0G50gpTaoXDsAF4tIGe1XUMgtUcOLZUuOnMrpFk5l690A== +jsii-pacmak@1.73.0: + version "1.73.0" + resolved "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-1.73.0.tgz#d31cdcfa5f9021f1b0a77c688201b826d2000090" + integrity sha512-zz3z+AoKXciKxBcmFt4PHPQPhbkjRUgN0hkrC6XhqugbpGprICtLNimU4qAQywHA+T0024TX8fnCCuymQ1sJPg== dependencies: - "@jsii/check-node" "1.72.0" - "@jsii/spec" "^1.72.0" + "@jsii/check-node" "1.73.0" + "@jsii/spec" "^1.73.0" clone "^2.1.2" - codemaker "^1.72.0" + codemaker "^1.73.0" commonmark "^0.30.0" escape-string-regexp "^4.0.0" fs-extra "^10.1.0" - jsii-reflect "^1.72.0" - jsii-rosetta "^1.72.0" + jsii-reflect "^1.73.0" + jsii-rosetta "^1.73.0" semver "^7.3.8" spdx-license-list "^6.6.0" xmlbuilder "^15.1.1" yargs "^16.2.0" -jsii-reflect@1.72.0, jsii-reflect@^1.72.0: - version "1.72.0" - resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.72.0.tgz#33ac2529f81ff8482c01770fd66cbd31822b86b6" - integrity sha512-gEsL1QO8EY3OAjCkVt7Vnm0LeflTTXJkEYRCHdATjdXLMP3laSUWHcNuE+6KNBsVUMJr2zJgVQyi7moqRSonzw== +jsii-reflect@1.73.0, jsii-reflect@^1.73.0: + version "1.73.0" + resolved "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-1.73.0.tgz#df6f57d6e8065aa836b6340465f08cfd7d388253" + integrity sha512-RNnejItM5DUvTpMNBhL095Yt87a6mLWTse9rYZmR+XglJ8WdyNW8mmDftz8gq58TKr5mDVUtq5vpRApCEm0Viw== dependencies: - "@jsii/check-node" "1.72.0" - "@jsii/spec" "^1.72.0" + "@jsii/check-node" "1.73.0" + "@jsii/spec" "^1.73.0" chalk "^4" fs-extra "^10.1.0" - oo-ascii-tree "^1.72.0" + oo-ascii-tree "^1.73.0" yargs "^16.2.0" -jsii-rosetta@1.72.0, jsii-rosetta@^1.72.0: - version "1.72.0" - resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.72.0.tgz#4866b0149bcd3a7c333984c31fee835e7f3589d5" - integrity sha512-4B9jCfWTPU9s1FsDv7aq7C1kw/eS4WaC7uHujPr+UmALpkfRNu82paylZ5zG1vaUqcBLoQHLydvMRlUzc9xeZw== +jsii-rosetta@1.73.0, jsii-rosetta@^1.73.0: + version "1.73.0" + resolved "https://registry.npmjs.org/jsii-rosetta/-/jsii-rosetta-1.73.0.tgz#7e281e77a2bbbd3b9170aff4355eaf8a0209f3e1" + integrity sha512-UrXBaM/7jJldrlDN2aV/vaIurIZJM4ikJtcE/ugSoAuJUW42Hpi0Qd5k9MiSaE/k+KNxRpihS+skRa2TETT3Cg== dependencies: - "@jsii/check-node" "1.72.0" - "@jsii/spec" "1.72.0" + "@jsii/check-node" "1.73.0" + "@jsii/spec" "1.73.0" "@xmldom/xmldom" "^0.8.6" commonmark "^0.30.0" fast-glob "^3.2.12" - jsii "1.72.0" + jsii "1.73.0" semver "^7.3.8" semver-intersect "^1.4.0" typescript "~3.9.10" workerpool "^6.3.1" yargs "^16.2.0" -jsii@1.72.0, jsii@^1.72.0: - version "1.72.0" - resolved "https://registry.npmjs.org/jsii/-/jsii-1.72.0.tgz#fbed64c9cec3461a47dc9bc16a97df9fae82694a" - integrity sha512-dwMHlO5SXuwAhchGg8emAuKjQRKGEiuR+GV5SxdhzhylxbPUexSBnsxGYqVIHaXwmXBIH3cOfoiqilQ5Xm2pMg== +jsii@1.73.0, jsii@^1.73.0: + version "1.73.0" + resolved "https://registry.npmjs.org/jsii/-/jsii-1.73.0.tgz#b341845061f145a550a8052ecc7769b1c9ed8d95" + integrity sha512-6GLXJv+XDPNPw4JRAMr6NicWgLorFcKmAZB6x+gqCnrkA6FqZlgDPohFdcqAkxE5Px9K3oAFIsnEH/xV3HuGrg== dependencies: - "@jsii/check-node" "1.72.0" - "@jsii/spec" "^1.72.0" + "@jsii/check-node" "1.73.0" + "@jsii/spec" "^1.73.0" case "^1.6.3" chalk "^4" fast-deep-equal "^3.1.3" @@ -6886,12 +7166,17 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json-stringify-nice@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz#2c937962b80181d3f317dd39aa323e14f5a60a67" + integrity sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw== + json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@2.x, json5@^2.2.1, json5@^2.2.2: +json5@2.x, json5@^2.2.2: version "2.2.3" resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -6903,10 +7188,10 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -jsonc-parser@~3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d" - integrity sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg== +jsonc-parser@~3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== jsonfile@^4.0.0: version "4.0.0" @@ -6959,6 +7244,16 @@ jszip@^3.10.1: readable-stream "~2.3.6" setimmediate "^1.0.5" +just-diff-apply@^5.2.0: + version "5.5.0" + resolved "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz#771c2ca9fa69f3d2b54e7c3f5c1dfcbcc47f9f0f" + integrity sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw== + +just-diff@^5.0.1: + version "5.2.0" + resolved "https://registry.npmjs.org/just-diff/-/just-diff-5.2.0.tgz#60dca55891cf24cd4a094e33504660692348a241" + integrity sha512-6ufhP9SHjb7jibNFrNxyFZ6od3g+An6Ai9mhGRvcYe8UJlH0prseN64M+6ZBBUoKYHZsitDP42gAJ8+eVWr3lw== + just-extend@^4.0.2: version "4.2.1" resolved "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744" @@ -7075,6 +7370,16 @@ libnpmaccess@^4.0.1: npm-package-arg "^8.1.2" npm-registry-fetch "^11.0.0" +libnpmaccess@^6.0.2: + version "6.0.4" + resolved "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-6.0.4.tgz#2dd158bd8a071817e2207d3b201d37cf1ad6ae6b" + integrity sha512-qZ3wcfIyUoW0+qSFkMBovcTrSGJ3ZeyvpR7d5N9pEYv/kXs8sHP2wiqEIXBKLFrZlmM0kR0RJD7mtfLngtlLag== + dependencies: + aproba "^2.0.0" + minipass "^3.1.1" + npm-package-arg "^9.0.1" + npm-registry-fetch "^13.0.0" + libnpmconfig@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/libnpmconfig/-/libnpmconfig-1.2.1.tgz#c0c2f793a74e67d4825e5039e7a02a0044dfcbc0" @@ -7084,6 +7389,72 @@ libnpmconfig@^1.2.1: find-up "^3.0.0" ini "^1.3.5" +libnpmdiff@^4.0.2: + version "4.0.5" + resolved "https://registry.npmjs.org/libnpmdiff/-/libnpmdiff-4.0.5.tgz#ffaf93fa9440ea759444b8830fdb5c661b09a7c0" + integrity sha512-9fICQIzmH892UwHHPmb+Seup50UIBWcMIK2FdxvlXm9b4kc1nSH0b/BuY1mORJQtB6ydPMnn+BLzOTmd/SKJmw== + dependencies: + "@npmcli/disparity-colors" "^2.0.0" + "@npmcli/installed-package-contents" "^1.0.7" + binary-extensions "^2.2.0" + diff "^5.1.0" + minimatch "^5.0.1" + npm-package-arg "^9.0.1" + pacote "^13.6.1" + tar "^6.1.0" + +libnpmexec@^4.0.2: + version "4.0.14" + resolved "https://registry.npmjs.org/libnpmexec/-/libnpmexec-4.0.14.tgz#9ad44232434b374e477eb2c2e4548baaf698f773" + integrity sha512-dwmzv2K29SdoAHBOa7QR6CfQbFG/PiZDRF6HZrlI6C4DLt2hNgOHTFaUGOpqE2C+YGu0ZwYTDywxRe0eOnf0ZA== + dependencies: + "@npmcli/arborist" "^5.6.3" + "@npmcli/ci-detect" "^2.0.0" + "@npmcli/fs" "^2.1.1" + "@npmcli/run-script" "^4.2.0" + chalk "^4.1.0" + mkdirp-infer-owner "^2.0.0" + npm-package-arg "^9.0.1" + npmlog "^6.0.2" + pacote "^13.6.1" + proc-log "^2.0.0" + read "^1.0.7" + read-package-json-fast "^2.0.2" + semver "^7.3.7" + walk-up-path "^1.0.0" + +libnpmfund@^3.0.1: + version "3.0.5" + resolved "https://registry.npmjs.org/libnpmfund/-/libnpmfund-3.0.5.tgz#817f9e2120889beb483d9ba8eda142bb84293e4e" + integrity sha512-KdeRoG/dem8H3PcEU2/0SKi3ip7AWwczgS72y/3PE+PBrz/s/G52FNIA9jeLnBirkLC0sOyQHfeM3b7e24ZM+g== + dependencies: + "@npmcli/arborist" "^5.6.3" + +libnpmhook@^8.0.2: + version "8.0.4" + resolved "https://registry.npmjs.org/libnpmhook/-/libnpmhook-8.0.4.tgz#6c58e5fe763ff5d600ae9c20457ea9a69d1f7d87" + integrity sha512-nuD6e+Nx0OprjEi0wOeqASMl6QIH235th/Du2/8upK3evByFhzIgdfOeP1OhstavW4xtsl0hk5Vw4fAWWuSUgA== + dependencies: + aproba "^2.0.0" + npm-registry-fetch "^13.0.0" + +libnpmorg@^4.0.2: + version "4.0.4" + resolved "https://registry.npmjs.org/libnpmorg/-/libnpmorg-4.0.4.tgz#2a01d49372cf0df90d79a61e69bddaf2ed704311" + integrity sha512-1bTpD7iub1rDCsgiBguhJhiDufLQuc8DEti20euqsXz9O0ncXVpCYqf2SMmHR4GEdmAvAj2r7FMiyA9zGdaTpA== + dependencies: + aproba "^2.0.0" + npm-registry-fetch "^13.0.0" + +libnpmpack@^4.0.2: + version "4.1.3" + resolved "https://registry.npmjs.org/libnpmpack/-/libnpmpack-4.1.3.tgz#025cfe39829acd8260662bf259e3a9331fc1e4b2" + integrity sha512-rYP4X++ME3ZiFO+2iN3YnXJ4LB4Gsd0z5cgszWJZxaEpDN4lRIXirSyynGNsN/hn4taqnlxD+3DPlFDShvRM8w== + dependencies: + "@npmcli/run-script" "^4.1.3" + npm-package-arg "^9.0.1" + pacote "^13.6.1" + libnpmpublish@^4.0.0: version "4.0.2" resolved "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-4.0.2.tgz#be77e8bf5956131bcb45e3caa6b96a842dec0794" @@ -7095,6 +7466,43 @@ libnpmpublish@^4.0.0: semver "^7.1.3" ssri "^8.0.1" +libnpmpublish@^6.0.2: + version "6.0.5" + resolved "https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-6.0.5.tgz#5a894f3de2e267d62f86be2a508e362599b5a4b1" + integrity sha512-LUR08JKSviZiqrYTDfywvtnsnxr+tOvBU0BF8H+9frt7HMvc6Qn6F8Ubm72g5hDTHbq8qupKfDvDAln2TVPvFg== + dependencies: + normalize-package-data "^4.0.0" + npm-package-arg "^9.0.1" + npm-registry-fetch "^13.0.0" + semver "^7.3.7" + ssri "^9.0.0" + +libnpmsearch@^5.0.2: + version "5.0.4" + resolved "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-5.0.4.tgz#b32aa2b23051c00cdcc0912274d0d416e6655d81" + integrity sha512-XHDmsvpN5+pufvGnfLRqpy218gcGGbbbXR6wPrDJyd1em6agKdYByzU5ccskDHH9iVm2UeLydpDsW1ksYuU0cg== + dependencies: + npm-registry-fetch "^13.0.0" + +libnpmteam@^4.0.2: + version "4.0.4" + resolved "https://registry.npmjs.org/libnpmteam/-/libnpmteam-4.0.4.tgz#ac26068808d93b1051d926457db14e4b3ff669ef" + integrity sha512-rzKSwi6MLzwwevbM/vl+BBQTErgn24tCfgPUdzBlszrw3j5necOu7WnTzgvZMDv6maGUwec6Ut1rxszOgH0l+Q== + dependencies: + aproba "^2.0.0" + npm-registry-fetch "^13.0.0" + +libnpmversion@^3.0.1: + version "3.0.7" + resolved "https://registry.npmjs.org/libnpmversion/-/libnpmversion-3.0.7.tgz#e4c6c07ee28cf351ce1e2293a5ac9922b09ea94d" + integrity sha512-O0L4eNMUIMQ+effi1HsZPKp2N6wecwqGqB8PvkvmLPWN7EsdabdzAVG48nv0p/OjlbIai5KQg/L+qMMfCA4ZjA== + dependencies: + "@npmcli/git" "^3.0.0" + "@npmcli/run-script" "^4.1.3" + json-parse-even-better-errors "^2.3.1" + proc-log "^2.0.0" + semver "^7.3.7" + license-checker@^25.0.1: version "25.0.1" resolved "https://registry.npmjs.org/license-checker/-/license-checker-25.0.1.tgz#4d14504478a5240a857bb3c21cd0491a00d761fa" @@ -7368,7 +7776,7 @@ make-error@1.x, make-error@^1.1.1: resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^10.0.3, make-fetch-happen@^10.0.6: +make-fetch-happen@^10.0.3, make-fetch-happen@^10.0.6, make-fetch-happen@^10.1.5: version "10.2.1" resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164" integrity sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w== @@ -7411,7 +7819,7 @@ make-fetch-happen@^8.0.9: socks-proxy-agent "^5.0.0" ssri "^8.0.0" -make-fetch-happen@^9.0.1: +make-fetch-happen@^9.0.1, make-fetch-happen@^9.1.0: version "9.1.0" resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== @@ -7469,31 +7877,25 @@ markdown-it@13.0.1, markdown-it@^12.3.2: mdurl "^1.0.1" uc.micro "^1.0.5" -markdownlint-cli@^0.32.2: - version "0.32.2" - resolved "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.32.2.tgz#b7b5c5808039aef4022aef603efaa607caf8e0de" - integrity sha512-xmJT1rGueUgT4yGNwk6D0oqQr90UJ7nMyakXtqjgswAkEhYYqjHew9RY8wDbOmh2R270IWjuKSeZzHDEGPAUkQ== +markdownlint-cli@^0.33.0: + version "0.33.0" + resolved "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.33.0.tgz#703af1234c32c309ab52fcd0e8bc797a34e2b096" + integrity sha512-zMK1oHpjYkhjO+94+ngARiBBrRDEUMzooDHBAHtmEIJ9oYddd9l3chCReY2mPlecwH7gflQp1ApilTo+o0zopQ== dependencies: - commander "~9.4.0" + commander "~9.4.1" get-stdin "~9.0.0" glob "~8.0.3" - ignore "~5.2.0" + ignore "~5.2.4" js-yaml "^4.1.0" - jsonc-parser "~3.1.0" - markdownlint "~0.26.2" - markdownlint-rule-helpers "~0.17.2" - minimatch "~5.1.0" + jsonc-parser "~3.2.0" + markdownlint "~0.27.0" + minimatch "~5.1.2" run-con "~1.2.11" -markdownlint-rule-helpers@~0.17.2: - version "0.17.2" - resolved "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.17.2.tgz#64d6e8c66e497e631b0e40cf1cef7ca622a0b654" - integrity sha512-XaeoW2NYSlWxMCZM2B3H7YTG6nlaLfkEZWMBhr4hSPlq9MuY2sy83+Xr89jXOqZMZYjvi5nBCGoFh7hHoPKZmA== - -markdownlint@~0.26.2: - version "0.26.2" - resolved "https://registry.npmjs.org/markdownlint/-/markdownlint-0.26.2.tgz#11d3d03e7f0dd3c2e239753ee8fd064a861d9237" - integrity sha512-2Am42YX2Ex5SQhRq35HxYWDfz1NLEOZWWN25nqd2h3AHRKsGRE+Qg1gt1++exW792eXTrR4jCNHfShfWk9Nz8w== +markdownlint@~0.27.0: + version "0.27.0" + resolved "https://registry.npmjs.org/markdownlint/-/markdownlint-0.27.0.tgz#9dabf7710a4999e2835e3c68317f1acd0bc89049" + integrity sha512-HtfVr/hzJJmE0C198F99JLaeada+646B5SaG2pVoEakLFI6iRGsvMqrnnrflq8hm1zQgwskEgqSnhDW11JBp0w== dependencies: markdown-it "13.0.1" @@ -7597,7 +7999,7 @@ min-indent@^1.0.0: resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -minimatch@>=3.1, minimatch@^5.0.1, minimatch@^5.1.0, minimatch@~5.1.0: +minimatch@>=3.1, minimatch@^5.0.1, minimatch@^5.1.0, minimatch@~5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz#0939d7d6f0898acbd1508abe534d1929368a8fff" integrity sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg== @@ -7790,7 +8192,7 @@ ms@2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.0.0, ms@^2.1.1: +ms@^2.0.0, ms@^2.1.1, ms@^2.1.2: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -7873,10 +8275,10 @@ nise@^5.1.0: just-extend "^4.0.2" path-to-regexp "^1.7.0" -nock@^13.2.9: - version "13.2.9" - resolved "https://registry.npmjs.org/nock/-/nock-13.2.9.tgz#4faf6c28175d36044da4cfa68e33e5a15086ad4c" - integrity sha512-1+XfJNYF1cjGB+TKMWi29eZ0b82QOvQs2YoLNzbpWGqFMtRQHTa57osqdGj4FrFPgkO4D4AZinzUJR9VvW3QUA== +nock@^13.3.0: + version "13.3.0" + resolved "https://registry.npmjs.org/nock/-/nock-13.3.0.tgz#b13069c1a03f1ad63120f994b04bfd2556925768" + integrity sha512-HHqYQ6mBeiMc+N038w8LkMpDCRquCHWeNmN3v6645P3NhN2+qXOBqvPqo7Rt1VyCMzKhJ733wZqw5B7cQVFNPg== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" @@ -7923,6 +8325,22 @@ node-gyp@^7.1.0: tar "^6.0.2" which "^2.0.2" +node-gyp@^8.4.1: + version "8.4.1" + resolved "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" + integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.6" + make-fetch-happen "^9.1.0" + nopt "^5.0.0" + npmlog "^6.0.0" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.2" + which "^2.0.2" + node-gyp@^9.0.0: version "9.3.1" resolved "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz#1e19f5f290afcc9c46973d68700cbd21a96192e4" @@ -8030,6 +8448,13 @@ normalize-url@^6.1.0: resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== +npm-audit-report@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-3.0.0.tgz#1bf3e531208b5f77347c8d00c3d9badf5be30cd6" + integrity sha512-tWQzfbwz1sc4244Bx2BVELw0EmZlCsCF0X93RDcmmwhonCsPMoEviYsi+32R+mdRvOWXolPce9zo64n2xgPESw== + dependencies: + chalk "^4.0.0" + npm-bundled@^1.1.1, npm-bundled@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" @@ -8126,7 +8551,7 @@ npm-package-arg@^8.0.0, npm-package-arg@^8.0.1, npm-package-arg@^8.1.0, npm-pack semver "^7.3.4" validate-npm-package-name "^3.0.0" -npm-package-arg@^9.0.0, npm-package-arg@^9.0.1: +npm-package-arg@^9.0.0, npm-package-arg@^9.0.1, npm-package-arg@^9.0.2, npm-package-arg@^9.1.0: version "9.1.2" resolved "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz#fc8acecb00235f42270dda446f36926ddd9ac2bc" integrity sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg== @@ -8166,7 +8591,7 @@ npm-pick-manifest@^6.0.0, npm-pick-manifest@^6.1.1: npm-package-arg "^8.1.2" semver "^7.3.4" -npm-pick-manifest@^7.0.0: +npm-pick-manifest@^7.0.0, npm-pick-manifest@^7.0.1, npm-pick-manifest@^7.0.2: version "7.0.2" resolved "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.2.tgz#1d372b4e7ea7c6712316c0e99388a73ed3496e84" integrity sha512-gk37SyRmlIjvTfcYl6RzDbSmS9Y4TOBXfsPnoYqTHARNgWbyDiCSMLUpmALDj4jjcTZpURiEfsSHJj9k7EV4Rw== @@ -8176,6 +8601,14 @@ npm-pick-manifest@^7.0.0: npm-package-arg "^9.0.0" semver "^7.3.5" +npm-profile@^6.0.3: + version "6.2.1" + resolved "https://registry.npmjs.org/npm-profile/-/npm-profile-6.2.1.tgz#975c31ec75a6ae029ab5b8820ffdcbae3a1e3d5e" + integrity sha512-Tlu13duByHyDd4Xy0PgroxzxnBYWbGGL5aZifNp8cx2DxUrHSoETXtPKg38aRPsBWMRfDtvcvVfJNasj7oImQQ== + dependencies: + npm-registry-fetch "^13.0.1" + proc-log "^2.0.0" + npm-registry-fetch@^11.0.0: version "11.0.0" resolved "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-11.0.0.tgz#68c1bb810c46542760d62a6a965f85a702d43a76" @@ -8188,7 +8621,7 @@ npm-registry-fetch@^11.0.0: minizlib "^2.0.0" npm-package-arg "^8.0.0" -npm-registry-fetch@^13.0.1: +npm-registry-fetch@^13.0.0, npm-registry-fetch@^13.0.1, npm-registry-fetch@^13.1.1: version "13.3.1" resolved "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.3.1.tgz#bb078b5fa6c52774116ae501ba1af2a33166af7e" integrity sha512-eukJPi++DKRTjSBRcDZSDDsGqRK3ehbxfFUcgaRd0Yp6kRwOwh2WVn0r+8rMB4nnuzvAk6rQVzl6K5CkYOmnvw== @@ -8222,6 +8655,87 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-user-validate@^1.0.1: + version "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.11.0: + version "8.11.0" + resolved "https://registry.npmjs.org/npm/-/npm-8.11.0.tgz#224fbca389252e43dd2a277249df3320a7f91189" + integrity sha512-4qmtwHa28J4SPmwCNoQI07KIF/ljmBhhuqG+xNXsIIRpwdKB5OXkMIGfH6KlThR6kzusxlkgR7t1haFDB88dcQ== + dependencies: + "@isaacs/string-locale-compare" "^1.1.0" + "@npmcli/arborist" "^5.0.4" + "@npmcli/ci-detect" "^2.0.0" + "@npmcli/config" "^4.1.0" + "@npmcli/fs" "^2.1.0" + "@npmcli/map-workspaces" "^2.0.3" + "@npmcli/package-json" "^2.0.0" + "@npmcli/run-script" "^3.0.1" + abbrev "~1.1.1" + archy "~1.0.0" + cacache "^16.1.0" + chalk "^4.1.2" + chownr "^2.0.0" + cli-columns "^4.0.0" + cli-table3 "^0.6.2" + columnify "^1.6.0" + fastest-levenshtein "^1.0.12" + glob "^8.0.1" + graceful-fs "^4.2.10" + hosted-git-info "^5.0.0" + ini "^3.0.0" + init-package-json "^3.0.2" + is-cidr "^4.0.2" + json-parse-even-better-errors "^2.3.1" + libnpmaccess "^6.0.2" + libnpmdiff "^4.0.2" + libnpmexec "^4.0.2" + libnpmfund "^3.0.1" + libnpmhook "^8.0.2" + libnpmorg "^4.0.2" + libnpmpack "^4.0.2" + libnpmpublish "^6.0.2" + libnpmsearch "^5.0.2" + libnpmteam "^4.0.2" + libnpmversion "^3.0.1" + make-fetch-happen "^10.1.5" + minipass "^3.1.6" + minipass-pipeline "^1.2.4" + mkdirp "^1.0.4" + mkdirp-infer-owner "^2.0.0" + ms "^2.1.2" + node-gyp "^9.0.0" + nopt "^5.0.0" + npm-audit-report "^3.0.0" + npm-install-checks "^5.0.0" + npm-package-arg "^9.0.2" + npm-pick-manifest "^7.0.1" + npm-profile "^6.0.3" + npm-registry-fetch "^13.1.1" + npm-user-validate "^1.0.1" + npmlog "^6.0.2" + opener "^1.5.2" + pacote "^13.4.1" + parse-conflict-json "^2.0.2" + proc-log "^2.0.1" + qrcode-terminal "^0.12.0" + read "~1.0.7" + read-package-json "^5.0.1" + read-package-json-fast "^2.0.3" + readdir-scoped-modules "^1.1.0" + rimraf "^3.0.2" + semver "^7.3.7" + ssri "^9.0.1" + tar "^6.1.11" + text-table "~0.2.0" + tiny-relative-date "^1.3.0" + treeverse "^2.0.0" + validate-npm-package-name "^4.0.0" + which "^2.0.2" + write-file-atomic "^4.0.1" + npmlog@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -8232,7 +8746,7 @@ npmlog@^4.1.2: gauge "~2.7.3" set-blocking "~2.0.0" -npmlog@^6.0.0: +npmlog@^6.0.0, npmlog@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== @@ -8343,10 +8857,10 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -oo-ascii-tree@^1.72.0: - version "1.72.0" - resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.72.0.tgz#189a02f43a855d097cd2b13b11fe3643124a262b" - integrity sha512-MDsUvkANZaO6V62LMLSqxOROpMqmgEqC9KxPv1VDo9dwIQ5jTAHugkMEaaN9G/l2HHuzrZUgnZtmuRr8ZzXpHA== +oo-ascii-tree@^1.73.0: + version "1.73.0" + resolved "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-1.73.0.tgz#124c32155395f901296d801a1461e2713696cace" + integrity sha512-bGx23QLCltdo+jrUcvnxf+2Ob7Ntsr8n7UzHPVoz0pWABSjzIzxOh2GRQa/2GebYNTqIHLnERY5Ubs/V7RVPWg== open@^7.4.2: version "7.4.2" @@ -8356,6 +8870,11 @@ open@^7.4.2: is-docker "^2.0.0" is-wsl "^2.1.1" +opener@^1.5.2: + version "1.5.2" + resolved "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" + integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== + optionator@^0.8.1: version "0.8.3" resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -8602,7 +9121,7 @@ pacote@^11.2.6: ssri "^8.0.1" tar "^6.1.0" -pacote@^13.0.5: +pacote@^13.0.3, pacote@^13.0.5, pacote@^13.4.1, pacote@^13.6.1: version "13.6.2" resolved "https://registry.npmjs.org/pacote/-/pacote-13.6.2.tgz#0d444ba3618ab3e5cd330b451c22967bbd0ca48a" integrity sha512-Gu8fU3GsvOPkak2CkbojR7vjs3k3P9cA6uazKTHdsdV0gpCEQq2opelnEv30KRQWgVzP5Vd/5umjcedma3MKtg== @@ -8641,6 +9160,15 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-conflict-json@^2.0.1, parse-conflict-json@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-2.0.2.tgz#3d05bc8ffe07d39600dc6436c6aefe382033d323" + integrity sha512-jDbRGb00TAPFsKWCpZZOT93SxVP9nONOSgES3AevqRq/CHvavEBvKAjxX9p5Y5F0RZLxH9Ufd9+RwtCsa+lFDA== + dependencies: + json-parse-even-better-errors "^2.3.1" + just-diff "^5.0.1" + just-diff-apply "^5.2.0" + parse-github-url@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" @@ -8820,6 +9348,14 @@ pluralize@^8.0.0: resolved "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== +postcss-selector-parser@^6.0.10: + version "6.0.11" + resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc" + integrity sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + postcss-values-parser@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz#da8b472d901da1e205b47bdc98637b9e9e550e5f" @@ -8839,9 +9375,9 @@ postcss-values-parser@^5.0.0: quote-unquote "^1.0.0" postcss@^8.1.7, postcss@^8.4.6: - version "8.4.20" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz#64c52f509644cecad8567e949f4081d98349dc56" - integrity sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g== + version "8.4.21" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" + integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== dependencies: nanoid "^3.3.4" picocolors "^1.0.0" @@ -8929,10 +9465,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.66.0: - version "0.66.1" - resolved "https://registry.npmjs.org/projen/-/projen-0.66.1.tgz#35731bb33e94335029facf07366652f160a073b5" - integrity sha512-xlssuvyGV1OWAFZkn08zLb5mwzcz5oVPA+6GZe9iHnM7OqmVIcPiFHge6p1UOdp0mEM3Nq0+Q1LcbNsay4h4+w== +projen@^0.66.11: + version "0.66.11" + resolved "https://registry.npmjs.org/projen/-/projen-0.66.11.tgz#3174d97912ee9398063cc2695bc020bc47746c21" + integrity sha512-U0i6Gw5KIPhHVpycHbmVPB0GseFslF1oUzOww12WmAIwSBA3hAmDDzl2+PF/CQQBKQ5OvCqKPfg18RayRfr+UA== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3" @@ -8950,6 +9486,16 @@ projen@^0.66.0: yargs "^16.2.0" zlib "^1.0.5" +promise-all-reject-late@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz#f8ebf13483e5ca91ad809ccc2fcf25f26f8643c2" + integrity sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw== + +promise-call-limit@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-1.0.1.tgz#4bdee03aeb85674385ca934da7114e9bcd3c6e24" + integrity sha512-3+hgaa19jzCGLuSCbieeRsu5C2joKfYn8pY6JAuXFRVfF4IO+L7UPpFWNTeWT9pM7uhskvbPPd/oEOktCn317Q== + promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" @@ -9051,10 +9597,10 @@ punycode@1.3.2: resolved "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +punycode@^2.1.0, punycode@^2.1.1, punycode@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.2.0.tgz#2092cc57cd2582c38e4e7e8bb869dc8d3148bc74" + integrity sha512-LN6QV1IJ9ZhxWTNdktaPClrNfp8xdSAYS0Zk2ddX7XsXZAxckMHPCBcHRo0cTcEIgYPRiGEkmji3Idkh2yFtYw== pupa@^2.1.1: version "2.1.1" @@ -9073,6 +9619,11 @@ q@^1.5.1: resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== +qrcode-terminal@^0.12.0: + version "0.12.0" + resolved "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" + integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== + qs@^6.9.4: version "6.11.0" resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -9160,6 +9711,11 @@ read-cmd-shim@^2.0.0: resolved "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz#4a50a71d6f0965364938e9038476f7eede3928d9" integrity sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw== +read-cmd-shim@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-3.0.1.tgz#868c235ec59d1de2db69e11aec885bc095aea087" + integrity sha512-kEmDUoYf/CDy8yZbLTmhB1X9kkjf9Q80PCNsDMb7ufrGd6zZSQA1+UyjrO+pZm5K/S4OXCWJeiIt1JA8kAsa6g== + read-installed@~4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz#ff9b8b67f187d1e4c29b9feb31f6b223acd19067" @@ -9174,7 +9730,7 @@ read-installed@~4.0.3: optionalDependencies: graceful-fs "^4.1.2" -read-package-json-fast@^2.0.1, read-package-json-fast@^2.0.3: +read-package-json-fast@^2.0.1, read-package-json-fast@^2.0.2, read-package-json-fast@^2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz#323ca529630da82cb34b36cc0b996693c98c2b83" integrity sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ== @@ -9212,7 +9768,7 @@ read-package-json@^4.1.1: normalize-package-data "^3.0.0" npm-normalize-package-bin "^1.0.0" -read-package-json@^5.0.0: +read-package-json@^5.0.0, read-package-json@^5.0.1: version "5.0.2" resolved "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.2.tgz#b8779ccfd169f523b67208a89cc912e3f663f3fa" integrity sha512-BSzugrt4kQ/Z0krro8zhTwV1Kd79ue25IhNN/VtHFy1mG/6Tluyi+msc0UpwaoQzxSHa28mntAjIZY6kEgfR9Q== @@ -9267,7 +9823,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -read@1, read@^1.0.4, read@~1.0.1: +read@1, read@^1.0.4, read@^1.0.7, read@~1.0.1, read@~1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" integrity sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ== @@ -9313,7 +9869,7 @@ readdir-glob@^1.0.0: dependencies: minimatch "^5.1.0" -readdir-scoped-modules@^1.0.0: +readdir-scoped-modules@^1.0.0, readdir-scoped-modules@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== @@ -9990,7 +10546,7 @@ ssri@^8.0.0, ssri@^8.0.1: dependencies: minipass "^3.1.1" -ssri@^9.0.0: +ssri@^9.0.0, ssri@^9.0.1: version "9.0.1" resolved "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== @@ -10326,7 +10882,7 @@ text-extensions@^1.0.0: resolved "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== -text-table@^0.2.0: +text-table@^0.2.0, text-table@~0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== @@ -10364,6 +10920,11 @@ timers-ext@^0.1.7: es5-ext "~0.10.46" next-tick "1" +tiny-relative-date@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07" + integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -10438,6 +10999,11 @@ treeify@^1.1.0: resolved "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8" integrity sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A== +treeverse@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/treeverse/-/treeverse-2.0.0.tgz#036dcef04bc3fd79a9b79a68d4da03e882d8a9ca" + integrity sha512-N5gJCkLu1aXccpOTtqV6ddSEi6ZmGkh3hjmbu1IjcavJK4qyOVQmi0myQKM7z5jVGmD68SJoliaVrMmVObhj6A== + trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" @@ -10596,6 +11162,15 @@ type@^2.7.2: resolved "https://registry.npmjs.org/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -10800,7 +11375,7 @@ url@0.10.3: punycode "1.3.2" querystring "0.2.0" -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== @@ -10920,6 +11495,11 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" +walk-up-path@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz#d4745e893dd5fd0dbb58dd0a4c6a33d9c9fec53e" + integrity sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg== + walkdir@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/walkdir/-/walkdir-0.4.1.tgz#dc119f83f4421df52e3061e514228a2db20afa39" @@ -10999,7 +11579,7 @@ which-module@^2.0.0: resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== -which-typed-array@^1.1.2: +which-typed-array@^1.1.2, which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== @@ -11096,6 +11676,14 @@ write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" +write-file-atomic@^4.0.0, write-file-atomic@^4.0.1: + version "4.0.2" + resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + write-json-file@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" @@ -11258,7 +11846,7 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^21.1.1: +yargs-parser@^21.0.0, yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== @@ -11306,6 +11894,19 @@ yargs@^17.1.1, yargs@^17.6.2: y18n "^5.0.5" yargs-parser "^21.1.1" +yargs@^17.5.0: + version "17.6.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz#e134900fc1f218bc230192bdec06a0a5f973e46c" + integrity sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.0.0" + yn@3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"