From 8757e60c2a0b1037b41c3d70cfa4358a110d5a96 Mon Sep 17 00:00:00 2001 From: Warrenn Enslin Date: Mon, 28 Oct 2024 15:25:22 +0200 Subject: [PATCH 01/15] added data landing zone client to ease access of ssm parameters --- .projen/deps.json | 4 + .projen/tasks.json | 4 +- .projenrc.ts | 2 +- .../ssm-parameters-glossary.md | 2 + package-lock.json | 1582 ++++++++++++++--- package.json | 4 +- src/data-landing-zone-client.ts | 100 ++ test/__snapshots__/build.test.ts.snap | 2 +- 8 files changed, 1483 insertions(+), 217 deletions(-) create mode 100644 src/data-landing-zone-client.ts diff --git a/.projen/deps.json b/.projen/deps.json index 2e056c0..32f73e2 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -110,6 +110,10 @@ "name": "@aws-sdk/client-identitystore", "type": "bundled" }, + { + "name": "@aws-sdk/client-ssm", + "type": "bundled" + }, { "name": "@aws-sdk/client-sso-admin", "type": "bundled" diff --git a/.projen/tasks.json b/.projen/tasks.json index b7981a0..7cd43c6 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -322,13 +322,13 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@types/aws-lambda,@types/aws-sdk,@types/jest,esbuild,eslint-import-resolver-typescript,eslint-plugin-import,husky,jest,jsii-diff,jsii-pacmak,projen,ts-jest,ts-node,@aws-sdk/client-cost-explorer,@aws-sdk/client-identitystore,@aws-sdk/client-sso-admin,@aws-sdk/client-sts,@aws-sdk/credential-providers,aws-lambda,table" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@types/aws-lambda,@types/aws-sdk,@types/jest,esbuild,eslint-import-resolver-typescript,eslint-plugin-import,husky,jest,jsii-diff,jsii-pacmak,projen,ts-jest,ts-node,@aws-sdk/client-cost-explorer,@aws-sdk/client-identitystore,@aws-sdk/client-ssm,@aws-sdk/client-sso-admin,@aws-sdk/client-sts,@aws-sdk/credential-providers,aws-lambda,table" }, { "exec": "npm install" }, { - "exec": "npm update @types/aws-lambda @types/aws-sdk @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser commit-and-tag-version esbuild eslint-import-resolver-typescript eslint-plugin-import eslint husky jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii projen ts-jest ts-node typescript @aws-sdk/client-cost-explorer @aws-sdk/client-identitystore @aws-sdk/client-sso-admin @aws-sdk/client-sts @aws-sdk/credential-providers aws-lambda execa table aws-cdk-lib constructs" + "exec": "npm update @types/aws-lambda @types/aws-sdk @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser commit-and-tag-version esbuild eslint-import-resolver-typescript eslint-plugin-import eslint husky jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii projen ts-jest ts-node typescript @aws-sdk/client-cost-explorer @aws-sdk/client-identitystore @aws-sdk/client-ssm @aws-sdk/client-sso-admin @aws-sdk/client-sts @aws-sdk/credential-providers aws-lambda execa table aws-cdk-lib constructs" }, { "exec": "npx projen" diff --git a/.projenrc.ts b/.projenrc.ts index 894aaab..edbe296 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -49,7 +49,7 @@ const project = new awscdk.AwsCdkConstructLibrary({ /* Runtime dependencies of this module that are jsii-enabled. */ // deps: [ ], /* Runtime dependencies of this module that are NOT jsii-enabled. */ - bundledDeps: ['execa@5.1.1', '@aws-sdk/client-sts', '@aws-sdk/credential-providers', '@aws-sdk/client-cost-explorer', 'table', 'aws-lambda', '@aws-sdk/client-identitystore', '@aws-sdk/client-sso-admin'], + bundledDeps: ['execa@5.1.1', '@aws-sdk/client-sts', '@aws-sdk/credential-providers', '@aws-sdk/client-cost-explorer', 'table', 'aws-lambda', '@aws-sdk/client-identitystore', '@aws-sdk/client-sso-admin', '@aws-sdk/client-ssm', '@aws-sdk/client-sts'], // description: undefined, /* Build dependencies for this repo/module. */ devDeps: ['husky', '@types/aws-lambda', '@types/aws-sdk', '@types/node'], diff --git a/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md b/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md index 1f78c54..29f7f9b 100644 --- a/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md +++ b/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md @@ -6,6 +6,8 @@ The security group ID of the bastion host [link](../bastion-hosts/bastion-hosts. - **bastion.name** - The name of the bastion host. Property is optional, but if not provided, it will default to `default`. +### Scope: Internal + --- ## `/dlz/networking-entity/vpc/${vpcAddress}/id` diff --git a/package-lock.json b/package-lock.json index 4b17bf1..ade0f1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "bundleDependencies": [ "@aws-sdk/client-cost-explorer", "@aws-sdk/client-identitystore", + "@aws-sdk/client-ssm", "@aws-sdk/client-sso-admin", "@aws-sdk/client-sts", "@aws-sdk/credential-providers", @@ -21,8 +22,9 @@ "dependencies": { "@aws-sdk/client-cost-explorer": "^3.650.0", "@aws-sdk/client-identitystore": "^3.654.0", + "@aws-sdk/client-ssm": "^3.679.0", "@aws-sdk/client-sso-admin": "^3.654.0", - "@aws-sdk/client-sts": "^3.650.0", + "@aws-sdk/client-sts": "^3.679.0", "@aws-sdk/credential-providers": "^3.650.0", "aws-lambda": "^1.0.7", "execa": "5.1.1", @@ -282,6 +284,58 @@ "node": ">=16.0.0" } }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/client-sts": { + "version": "3.650.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.650.0.tgz", + "integrity": "sha512-ISK0ZQYA7O5/WYgslpWy956lUBudGC9d7eL0FFbiL0j50N80Gx3RUv22ezvZgxJWE0W3DqNr4CE19sPYn4Lw8g==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.650.0", + "@aws-sdk/core": "3.649.0", + "@aws-sdk/credential-provider-node": "3.650.0", + "@aws-sdk/middleware-host-header": "3.649.0", + "@aws-sdk/middleware-logger": "3.649.0", + "@aws-sdk/middleware-recursion-detection": "3.649.0", + "@aws-sdk/middleware-user-agent": "3.649.0", + "@aws-sdk/region-config-resolver": "3.649.0", + "@aws-sdk/types": "3.649.0", + "@aws-sdk/util-endpoints": "3.649.0", + "@aws-sdk/util-user-agent-browser": "3.649.0", + "@aws-sdk/util-user-agent-node": "3.649.0", + "@smithy/config-resolver": "^3.0.6", + "@smithy/core": "^2.4.1", + "@smithy/fetch-http-handler": "^3.2.5", + "@smithy/hash-node": "^3.0.4", + "@smithy/invalid-dependency": "^3.0.4", + "@smithy/middleware-content-length": "^3.0.6", + "@smithy/middleware-endpoint": "^3.1.1", + "@smithy/middleware-retry": "^3.0.16", + "@smithy/middleware-serde": "^3.0.4", + "@smithy/middleware-stack": "^3.0.4", + "@smithy/node-config-provider": "^3.1.5", + "@smithy/node-http-handler": "^3.2.0", + "@smithy/protocol-http": "^4.1.1", + "@smithy/smithy-client": "^3.3.0", + "@smithy/types": "^3.4.0", + "@smithy/url-parser": "^3.0.4", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.16", + "@smithy/util-defaults-mode-node": "^3.0.16", + "@smithy/util-endpoints": "^2.1.0", + "@smithy/util-middleware": "^3.0.4", + "@smithy/util-retry": "^3.0.4", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@aws-sdk/client-cost-explorer": { "version": "3.650.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-cost-explorer/-/client-cost-explorer-3.650.0.tgz", @@ -335,6 +389,58 @@ "node": ">=16.0.0" } }, + "node_modules/@aws-sdk/client-cost-explorer/node_modules/@aws-sdk/client-sts": { + "version": "3.650.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.650.0.tgz", + "integrity": "sha512-ISK0ZQYA7O5/WYgslpWy956lUBudGC9d7eL0FFbiL0j50N80Gx3RUv22ezvZgxJWE0W3DqNr4CE19sPYn4Lw8g==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.650.0", + "@aws-sdk/core": "3.649.0", + "@aws-sdk/credential-provider-node": "3.650.0", + "@aws-sdk/middleware-host-header": "3.649.0", + "@aws-sdk/middleware-logger": "3.649.0", + "@aws-sdk/middleware-recursion-detection": "3.649.0", + "@aws-sdk/middleware-user-agent": "3.649.0", + "@aws-sdk/region-config-resolver": "3.649.0", + "@aws-sdk/types": "3.649.0", + "@aws-sdk/util-endpoints": "3.649.0", + "@aws-sdk/util-user-agent-browser": "3.649.0", + "@aws-sdk/util-user-agent-node": "3.649.0", + "@smithy/config-resolver": "^3.0.6", + "@smithy/core": "^2.4.1", + "@smithy/fetch-http-handler": "^3.2.5", + "@smithy/hash-node": "^3.0.4", + "@smithy/invalid-dependency": "^3.0.4", + "@smithy/middleware-content-length": "^3.0.6", + "@smithy/middleware-endpoint": "^3.1.1", + "@smithy/middleware-retry": "^3.0.16", + "@smithy/middleware-serde": "^3.0.4", + "@smithy/middleware-stack": "^3.0.4", + "@smithy/node-config-provider": "^3.1.5", + "@smithy/node-http-handler": "^3.2.0", + "@smithy/protocol-http": "^4.1.1", + "@smithy/smithy-client": "^3.3.0", + "@smithy/types": "^3.4.0", + "@smithy/url-parser": "^3.0.4", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.16", + "@smithy/util-defaults-mode-node": "^3.0.16", + "@smithy/util-endpoints": "^2.1.0", + "@smithy/util-middleware": "^3.0.4", + "@smithy/util-retry": "^3.0.4", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@aws-sdk/client-identitystore": { "version": "3.654.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-identitystore/-/client-identitystore-3.654.0.tgz", @@ -877,6 +983,523 @@ } } }, + "node_modules/@aws-sdk/client-ssm": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.679.0.tgz", + "integrity": "sha512-wmKpnb1iIfa/c/8EaYtQg/inPMEZ3Y67/RFQsm2nenFuq2UkCUj/kS4l0F84cBHfZALNIw9d1SVIqOjEfrIC8A==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.679.0", + "@aws-sdk/client-sts": "3.679.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/credential-provider-node": "3.679.0", + "@aws-sdk/middleware-host-header": "3.679.0", + "@aws-sdk/middleware-logger": "3.679.0", + "@aws-sdk/middleware-recursion-detection": "3.679.0", + "@aws-sdk/middleware-user-agent": "3.679.0", + "@aws-sdk/region-config-resolver": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@aws-sdk/util-user-agent-browser": "3.679.0", + "@aws-sdk/util-user-agent-node": "3.679.0", + "@smithy/config-resolver": "^3.0.9", + "@smithy/core": "^2.4.8", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/hash-node": "^3.0.7", + "@smithy/invalid-dependency": "^3.0.7", + "@smithy/middleware-content-length": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-retry": "^3.0.23", + "@smithy/middleware-serde": "^3.0.7", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/url-parser": "^3.0.7", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.23", + "@smithy/util-defaults-mode-node": "^3.0.23", + "@smithy/util-endpoints": "^2.1.3", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-retry": "^3.0.7", + "@smithy/util-utf8": "^3.0.0", + "@smithy/util-waiter": "^3.1.6", + "@types/uuid": "^9.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/client-sso": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.679.0.tgz", + "integrity": "sha512-/0cAvYnpOZTo/Y961F1kx2fhDDLUYZ0SQQ5/75gh3xVImLj7Zw+vp74ieqFbqWLYGMaq8z1Arr9A8zG95mbLdg==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/middleware-host-header": "3.679.0", + "@aws-sdk/middleware-logger": "3.679.0", + "@aws-sdk/middleware-recursion-detection": "3.679.0", + "@aws-sdk/middleware-user-agent": "3.679.0", + "@aws-sdk/region-config-resolver": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@aws-sdk/util-user-agent-browser": "3.679.0", + "@aws-sdk/util-user-agent-node": "3.679.0", + "@smithy/config-resolver": "^3.0.9", + "@smithy/core": "^2.4.8", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/hash-node": "^3.0.7", + "@smithy/invalid-dependency": "^3.0.7", + "@smithy/middleware-content-length": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-retry": "^3.0.23", + "@smithy/middleware-serde": "^3.0.7", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/url-parser": "^3.0.7", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.23", + "@smithy/util-defaults-mode-node": "^3.0.23", + "@smithy/util-endpoints": "^2.1.3", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-retry": "^3.0.7", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.679.0.tgz", + "integrity": "sha512-/dBYWcCwbA/id4sFCIVZvf0UsvzHCC68SryxeNQk/PDkY9N4n5yRcMUkZDaEyQCjowc3kY4JOXp2AdUP037nhA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/credential-provider-node": "3.679.0", + "@aws-sdk/middleware-host-header": "3.679.0", + "@aws-sdk/middleware-logger": "3.679.0", + "@aws-sdk/middleware-recursion-detection": "3.679.0", + "@aws-sdk/middleware-user-agent": "3.679.0", + "@aws-sdk/region-config-resolver": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@aws-sdk/util-user-agent-browser": "3.679.0", + "@aws-sdk/util-user-agent-node": "3.679.0", + "@smithy/config-resolver": "^3.0.9", + "@smithy/core": "^2.4.8", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/hash-node": "^3.0.7", + "@smithy/invalid-dependency": "^3.0.7", + "@smithy/middleware-content-length": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-retry": "^3.0.23", + "@smithy/middleware-serde": "^3.0.7", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/url-parser": "^3.0.7", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.23", + "@smithy/util-defaults-mode-node": "^3.0.23", + "@smithy/util-endpoints": "^2.1.3", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-retry": "^3.0.7", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.679.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/core": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.679.0.tgz", + "integrity": "sha512-CS6PWGX8l4v/xyvX8RtXnBisdCa5+URzKd0L6GvHChype9qKUVxO/Gg6N/y43Hvg7MNWJt9FBPNWIxUB+byJwg==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/core": "^2.4.8", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/property-provider": "^3.1.7", + "@smithy/protocol-http": "^4.1.4", + "@smithy/signature-v4": "^4.2.0", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/util-middleware": "^3.0.7", + "fast-xml-parser": "4.4.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.679.0.tgz", + "integrity": "sha512-EdlTYbzMm3G7VUNAMxr9S1nC1qUNqhKlAxFU8E7cKsAe8Bp29CD5HAs3POc56AVo9GC4yRIS+/mtlZSmrckzUA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-http": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.679.0.tgz", + "integrity": "sha512-ZoKLubW5DqqV1/2a3TSn+9sSKg0T8SsYMt1JeirnuLJF0mCoYFUaWMyvxxKuxPoqvUsaycxKru4GkpJ10ltNBw==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/property-provider": "^3.1.7", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/util-stream": "^3.1.9", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.679.0.tgz", + "integrity": "sha512-Rg7t8RwUzKcumpipG4neZqaeJ6DF+Bco1+FHn5BZB68jpvwvjBjcQUuWkxj18B6ctYHr1fkunnzeKEn/+vy7+w==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/credential-provider-env": "3.679.0", + "@aws-sdk/credential-provider-http": "3.679.0", + "@aws-sdk/credential-provider-process": "3.679.0", + "@aws-sdk/credential-provider-sso": "3.679.0", + "@aws-sdk/credential-provider-web-identity": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/credential-provider-imds": "^3.2.4", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.679.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.679.0.tgz", + "integrity": "sha512-E3lBtaqCte8tWs6Rkssc8sLzvGoJ10TLGvpkijOlz43wPd6xCRh1YLwg6zolf9fVFtEyUs/GsgymiASOyxhFtw==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.679.0", + "@aws-sdk/credential-provider-http": "3.679.0", + "@aws-sdk/credential-provider-ini": "3.679.0", + "@aws-sdk/credential-provider-process": "3.679.0", + "@aws-sdk/credential-provider-sso": "3.679.0", + "@aws-sdk/credential-provider-web-identity": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/credential-provider-imds": "^3.2.4", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.679.0.tgz", + "integrity": "sha512-u/p4TV8kQ0zJWDdZD4+vdQFTMhkDEJFws040Gm113VHa/Xo1SYOjbpvqeuFoz6VmM0bLvoOWjxB9MxnSQbwKpQ==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.679.0.tgz", + "integrity": "sha512-SAtWonhi9asxn0ukEbcE81jkyanKgqpsrtskvYPpO9Z9KOednM4Cqt6h1bfcS9zaHjN2zu815Gv8O7WiV+F/DQ==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sso": "3.679.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/token-providers": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.679.0.tgz", + "integrity": "sha512-a74tLccVznXCaBefWPSysUcLXYJiSkeUmQGtalNgJ1vGkE36W5l/8czFiiowdWdKWz7+x6xf0w+Kjkjlj42Ung==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.679.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.679.0.tgz", + "integrity": "sha512-y176HuQ8JRY3hGX8rQzHDSbCl9P5Ny9l16z4xmaiLo+Qfte7ee4Yr3yaAKd7GFoJ3/Mhud2XZ37fR015MfYl2w==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/middleware-logger": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.679.0.tgz", + "integrity": "sha512-0vet8InEj7nvIvGKk+ch7bEF5SyZ7Us9U7YTEgXPrBNStKeRUsgwRm0ijPWWd0a3oz2okaEwXsFl7G/vI0XiEA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.679.0.tgz", + "integrity": "sha512-sQoAZFsQiW/LL3DfKMYwBoGjYDEnMbA9WslWN8xneCmBAwKo6IcSksvYs23PP8XMIoBGe2I2J9BSr654XWygTQ==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.679.0.tgz", + "integrity": "sha512-4hdeXhPDURPqQLPd9jCpUEo9fQITXl3NM3W1MwcJpE0gdUM36uXkQOYsTPeeU/IRCLVjK8Htlh2oCaM9iJrLCA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@smithy/core": "^2.4.8", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.679.0.tgz", + "integrity": "sha512-Ybx54P8Tg6KKq5ck7uwdjiKif7n/8g1x+V0V9uTjBjRWqaIgiqzXwKWoPj6NCNkE7tJNtqI4JrNxp/3S3HvmRw==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/types": "^3.5.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.7", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/token-providers": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.679.0.tgz", + "integrity": "sha512-1/+Zso/x2jqgutKixYFQEGli0FELTgah6bm7aB+m2FAWH4Hz7+iMUsazg6nSWm714sG9G3h5u42Dmpvi9X6/hA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sso-oidc": "^3.679.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.679.0.tgz", + "integrity": "sha512-NwVq8YvInxQdJ47+zz4fH3BRRLC6lL+WLkvr242PVBbUOLRyK/lkwHlfiKUoeVIMyK5NF+up6TRg71t/8Bny6Q==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/util-endpoints": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.679.0.tgz", + "integrity": "sha512-YL6s4Y/1zC45OvddvgE139fjeWSKKPgLlnfrvhVL7alNyY9n7beR4uhoDpNrt5mI6sn9qiBF17790o+xLAXjjg==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/types": "^3.5.0", + "@smithy/util-endpoints": "^2.1.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.679.0.tgz", + "integrity": "sha512-CusSm2bTBG1kFypcsqU8COhnYc6zltobsqs3nRrvYqYaOqtMnuE46K4XTWpnzKgwDejgZGOE+WYyprtAxrPvmQ==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/types": "^3.5.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.679.0.tgz", + "integrity": "sha512-Bw4uXZ+NU5ed6TNfo4tBbhBSW+2eQxXYjYBGl5gLUNUpg2pDFToQAP6rXBFiwcG52V2ny5oLGiD82SoYuYkAVg==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/middleware-user-agent": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/client-ssm/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "inBundle": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@aws-sdk/client-sso": { "version": "3.650.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.650.0.tgz", @@ -1535,59 +2158,506 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sts": "^3.650.0" + "@aws-sdk/client-sts": "^3.650.0" + } + }, + "node_modules/@aws-sdk/client-sts": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.679.0.tgz", + "integrity": "sha512-3CvrT8w1RjFu1g8vKA5Azfr5V83r2/b68Ock43WE003Bq/5Y38mwmYX7vk0fPHzC3qejt4YMAWk/C3fSKOy25g==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.679.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/credential-provider-node": "3.679.0", + "@aws-sdk/middleware-host-header": "3.679.0", + "@aws-sdk/middleware-logger": "3.679.0", + "@aws-sdk/middleware-recursion-detection": "3.679.0", + "@aws-sdk/middleware-user-agent": "3.679.0", + "@aws-sdk/region-config-resolver": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@aws-sdk/util-user-agent-browser": "3.679.0", + "@aws-sdk/util-user-agent-node": "3.679.0", + "@smithy/config-resolver": "^3.0.9", + "@smithy/core": "^2.4.8", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/hash-node": "^3.0.7", + "@smithy/invalid-dependency": "^3.0.7", + "@smithy/middleware-content-length": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-retry": "^3.0.23", + "@smithy/middleware-serde": "^3.0.7", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/url-parser": "^3.0.7", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.23", + "@smithy/util-defaults-mode-node": "^3.0.23", + "@smithy/util-endpoints": "^2.1.3", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-retry": "^3.0.7", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/client-sso": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.679.0.tgz", + "integrity": "sha512-/0cAvYnpOZTo/Y961F1kx2fhDDLUYZ0SQQ5/75gh3xVImLj7Zw+vp74ieqFbqWLYGMaq8z1Arr9A8zG95mbLdg==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/middleware-host-header": "3.679.0", + "@aws-sdk/middleware-logger": "3.679.0", + "@aws-sdk/middleware-recursion-detection": "3.679.0", + "@aws-sdk/middleware-user-agent": "3.679.0", + "@aws-sdk/region-config-resolver": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@aws-sdk/util-user-agent-browser": "3.679.0", + "@aws-sdk/util-user-agent-node": "3.679.0", + "@smithy/config-resolver": "^3.0.9", + "@smithy/core": "^2.4.8", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/hash-node": "^3.0.7", + "@smithy/invalid-dependency": "^3.0.7", + "@smithy/middleware-content-length": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-retry": "^3.0.23", + "@smithy/middleware-serde": "^3.0.7", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/url-parser": "^3.0.7", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.23", + "@smithy/util-defaults-mode-node": "^3.0.23", + "@smithy/util-endpoints": "^2.1.3", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-retry": "^3.0.7", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.679.0.tgz", + "integrity": "sha512-/dBYWcCwbA/id4sFCIVZvf0UsvzHCC68SryxeNQk/PDkY9N4n5yRcMUkZDaEyQCjowc3kY4JOXp2AdUP037nhA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/credential-provider-node": "3.679.0", + "@aws-sdk/middleware-host-header": "3.679.0", + "@aws-sdk/middleware-logger": "3.679.0", + "@aws-sdk/middleware-recursion-detection": "3.679.0", + "@aws-sdk/middleware-user-agent": "3.679.0", + "@aws-sdk/region-config-resolver": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@aws-sdk/util-user-agent-browser": "3.679.0", + "@aws-sdk/util-user-agent-node": "3.679.0", + "@smithy/config-resolver": "^3.0.9", + "@smithy/core": "^2.4.8", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/hash-node": "^3.0.7", + "@smithy/invalid-dependency": "^3.0.7", + "@smithy/middleware-content-length": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-retry": "^3.0.23", + "@smithy/middleware-serde": "^3.0.7", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/url-parser": "^3.0.7", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.23", + "@smithy/util-defaults-mode-node": "^3.0.23", + "@smithy/util-endpoints": "^2.1.3", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-retry": "^3.0.7", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.679.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/core": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.679.0.tgz", + "integrity": "sha512-CS6PWGX8l4v/xyvX8RtXnBisdCa5+URzKd0L6GvHChype9qKUVxO/Gg6N/y43Hvg7MNWJt9FBPNWIxUB+byJwg==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/core": "^2.4.8", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/property-provider": "^3.1.7", + "@smithy/protocol-http": "^4.1.4", + "@smithy/signature-v4": "^4.2.0", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/util-middleware": "^3.0.7", + "fast-xml-parser": "4.4.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.679.0.tgz", + "integrity": "sha512-EdlTYbzMm3G7VUNAMxr9S1nC1qUNqhKlAxFU8E7cKsAe8Bp29CD5HAs3POc56AVo9GC4yRIS+/mtlZSmrckzUA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/credential-provider-http": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.679.0.tgz", + "integrity": "sha512-ZoKLubW5DqqV1/2a3TSn+9sSKg0T8SsYMt1JeirnuLJF0mCoYFUaWMyvxxKuxPoqvUsaycxKru4GkpJ10ltNBw==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/property-provider": "^3.1.7", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/util-stream": "^3.1.9", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.679.0.tgz", + "integrity": "sha512-Rg7t8RwUzKcumpipG4neZqaeJ6DF+Bco1+FHn5BZB68jpvwvjBjcQUuWkxj18B6ctYHr1fkunnzeKEn/+vy7+w==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/credential-provider-env": "3.679.0", + "@aws-sdk/credential-provider-http": "3.679.0", + "@aws-sdk/credential-provider-process": "3.679.0", + "@aws-sdk/credential-provider-sso": "3.679.0", + "@aws-sdk/credential-provider-web-identity": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/credential-provider-imds": "^3.2.4", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.679.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.679.0.tgz", + "integrity": "sha512-E3lBtaqCte8tWs6Rkssc8sLzvGoJ10TLGvpkijOlz43wPd6xCRh1YLwg6zolf9fVFtEyUs/GsgymiASOyxhFtw==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.679.0", + "@aws-sdk/credential-provider-http": "3.679.0", + "@aws-sdk/credential-provider-ini": "3.679.0", + "@aws-sdk/credential-provider-process": "3.679.0", + "@aws-sdk/credential-provider-sso": "3.679.0", + "@aws-sdk/credential-provider-web-identity": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/credential-provider-imds": "^3.2.4", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.679.0.tgz", + "integrity": "sha512-u/p4TV8kQ0zJWDdZD4+vdQFTMhkDEJFws040Gm113VHa/Xo1SYOjbpvqeuFoz6VmM0bLvoOWjxB9MxnSQbwKpQ==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.679.0.tgz", + "integrity": "sha512-SAtWonhi9asxn0ukEbcE81jkyanKgqpsrtskvYPpO9Z9KOednM4Cqt6h1bfcS9zaHjN2zu815Gv8O7WiV+F/DQ==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sso": "3.679.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/token-providers": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.679.0.tgz", + "integrity": "sha512-a74tLccVznXCaBefWPSysUcLXYJiSkeUmQGtalNgJ1vGkE36W5l/8czFiiowdWdKWz7+x6xf0w+Kjkjlj42Ung==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.679.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.679.0.tgz", + "integrity": "sha512-y176HuQ8JRY3hGX8rQzHDSbCl9P5Ny9l16z4xmaiLo+Qfte7ee4Yr3yaAKd7GFoJ3/Mhud2XZ37fR015MfYl2w==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/middleware-logger": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.679.0.tgz", + "integrity": "sha512-0vet8InEj7nvIvGKk+ch7bEF5SyZ7Us9U7YTEgXPrBNStKeRUsgwRm0ijPWWd0a3oz2okaEwXsFl7G/vI0XiEA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.679.0.tgz", + "integrity": "sha512-sQoAZFsQiW/LL3DfKMYwBoGjYDEnMbA9WslWN8xneCmBAwKo6IcSksvYs23PP8XMIoBGe2I2J9BSr654XWygTQ==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.679.0.tgz", + "integrity": "sha512-4hdeXhPDURPqQLPd9jCpUEo9fQITXl3NM3W1MwcJpE0gdUM36uXkQOYsTPeeU/IRCLVjK8Htlh2oCaM9iJrLCA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@smithy/core": "^2.4.8", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.679.0.tgz", + "integrity": "sha512-Ybx54P8Tg6KKq5ck7uwdjiKif7n/8g1x+V0V9uTjBjRWqaIgiqzXwKWoPj6NCNkE7tJNtqI4JrNxp/3S3HvmRw==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/types": "^3.5.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.7", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/token-providers": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.679.0.tgz", + "integrity": "sha512-1/+Zso/x2jqgutKixYFQEGli0FELTgah6bm7aB+m2FAWH4Hz7+iMUsazg6nSWm714sG9G3h5u42Dmpvi9X6/hA==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/property-provider": "^3.1.7", + "@smithy/shared-ini-file-loader": "^3.1.8", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sso-oidc": "^3.679.0" } }, - "node_modules/@aws-sdk/client-sts": { - "version": "3.650.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.650.0.tgz", - "integrity": "sha512-ISK0ZQYA7O5/WYgslpWy956lUBudGC9d7eL0FFbiL0j50N80Gx3RUv22ezvZgxJWE0W3DqNr4CE19sPYn4Lw8g==", + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/types": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.679.0.tgz", + "integrity": "sha512-NwVq8YvInxQdJ47+zz4fH3BRRLC6lL+WLkvr242PVBbUOLRyK/lkwHlfiKUoeVIMyK5NF+up6TRg71t/8Bny6Q==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/client-sso-oidc": "3.650.0", - "@aws-sdk/core": "3.649.0", - "@aws-sdk/credential-provider-node": "3.650.0", - "@aws-sdk/middleware-host-header": "3.649.0", - "@aws-sdk/middleware-logger": "3.649.0", - "@aws-sdk/middleware-recursion-detection": "3.649.0", - "@aws-sdk/middleware-user-agent": "3.649.0", - "@aws-sdk/region-config-resolver": "3.649.0", - "@aws-sdk/types": "3.649.0", - "@aws-sdk/util-endpoints": "3.649.0", - "@aws-sdk/util-user-agent-browser": "3.649.0", - "@aws-sdk/util-user-agent-node": "3.649.0", - "@smithy/config-resolver": "^3.0.6", - "@smithy/core": "^2.4.1", - "@smithy/fetch-http-handler": "^3.2.5", - "@smithy/hash-node": "^3.0.4", - "@smithy/invalid-dependency": "^3.0.4", - "@smithy/middleware-content-length": "^3.0.6", - "@smithy/middleware-endpoint": "^3.1.1", - "@smithy/middleware-retry": "^3.0.16", - "@smithy/middleware-serde": "^3.0.4", - "@smithy/middleware-stack": "^3.0.4", - "@smithy/node-config-provider": "^3.1.5", - "@smithy/node-http-handler": "^3.2.0", - "@smithy/protocol-http": "^4.1.1", - "@smithy/smithy-client": "^3.3.0", - "@smithy/types": "^3.4.0", - "@smithy/url-parser": "^3.0.4", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.16", - "@smithy/util-defaults-mode-node": "^3.0.16", - "@smithy/util-endpoints": "^2.1.0", - "@smithy/util-middleware": "^3.0.4", - "@smithy/util-retry": "^3.0.4", - "@smithy/util-utf8": "^3.0.0", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/util-endpoints": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.679.0.tgz", + "integrity": "sha512-YL6s4Y/1zC45OvddvgE139fjeWSKKPgLlnfrvhVL7alNyY9n7beR4uhoDpNrt5mI6sn9qiBF17790o+xLAXjjg==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/types": "^3.5.0", + "@smithy/util-endpoints": "^2.1.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.679.0.tgz", + "integrity": "sha512-CusSm2bTBG1kFypcsqU8COhnYc6zltobsqs3nRrvYqYaOqtMnuE46K4XTWpnzKgwDejgZGOE+WYyprtAxrPvmQ==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/types": "^3.5.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.679.0.tgz", + "integrity": "sha512-Bw4uXZ+NU5ed6TNfo4tBbhBSW+2eQxXYjYBGl5gLUNUpg2pDFToQAP6rXBFiwcG52V2ny5oLGiD82SoYuYkAVg==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/middleware-user-agent": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/types": "^3.5.0", "tslib": "^2.6.2" }, "engines": { "node": ">=16.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } } }, "node_modules/@aws-sdk/core": { @@ -1799,6 +2869,58 @@ "node": ">=16.0.0" } }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/client-sts": { + "version": "3.650.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.650.0.tgz", + "integrity": "sha512-ISK0ZQYA7O5/WYgslpWy956lUBudGC9d7eL0FFbiL0j50N80Gx3RUv22ezvZgxJWE0W3DqNr4CE19sPYn4Lw8g==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.650.0", + "@aws-sdk/core": "3.649.0", + "@aws-sdk/credential-provider-node": "3.650.0", + "@aws-sdk/middleware-host-header": "3.649.0", + "@aws-sdk/middleware-logger": "3.649.0", + "@aws-sdk/middleware-recursion-detection": "3.649.0", + "@aws-sdk/middleware-user-agent": "3.649.0", + "@aws-sdk/region-config-resolver": "3.649.0", + "@aws-sdk/types": "3.649.0", + "@aws-sdk/util-endpoints": "3.649.0", + "@aws-sdk/util-user-agent-browser": "3.649.0", + "@aws-sdk/util-user-agent-node": "3.649.0", + "@smithy/config-resolver": "^3.0.6", + "@smithy/core": "^2.4.1", + "@smithy/fetch-http-handler": "^3.2.5", + "@smithy/hash-node": "^3.0.4", + "@smithy/invalid-dependency": "^3.0.4", + "@smithy/middleware-content-length": "^3.0.6", + "@smithy/middleware-endpoint": "^3.1.1", + "@smithy/middleware-retry": "^3.0.16", + "@smithy/middleware-serde": "^3.0.4", + "@smithy/middleware-stack": "^3.0.4", + "@smithy/node-config-provider": "^3.1.5", + "@smithy/node-http-handler": "^3.2.0", + "@smithy/protocol-http": "^4.1.1", + "@smithy/smithy-client": "^3.3.0", + "@smithy/types": "^3.4.0", + "@smithy/url-parser": "^3.0.4", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.16", + "@smithy/util-defaults-mode-node": "^3.0.16", + "@smithy/util-endpoints": "^2.1.0", + "@smithy/util-middleware": "^3.0.4", + "@smithy/util-retry": "^3.0.4", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@aws-sdk/middleware-host-header": { "version": "3.649.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.649.0.tgz", @@ -3693,13 +4815,13 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.4.tgz", - "integrity": "sha512-VupaALAQlXViW3/enTf/f5l5JZYSAxoJL7f0nanhNNKnww6DGCg1oYIuNP78KDugnkwthBO6iEcym16HhWV8RQ==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.6.tgz", + "integrity": "sha512-0XuhuHQlEqbNQZp7QxxrFTdVWdwxch4vjxYgfInF91hZFkPxf9QDrdQka0KfxFMPqLNzSw0b95uGTrLliQUavQ==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3707,16 +4829,16 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.8.tgz", - "integrity": "sha512-Tv1obAC18XOd2OnDAjSWmmthzx6Pdeh63FbLin8MlPiuJ2ATpKkq0NcNOJFr0dO+JmZXnwu8FQxKJ3TKJ3Hulw==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.10.tgz", + "integrity": "sha512-Uh0Sz9gdUuz538nvkPiyv1DZRX9+D15EKDtnQP5rYVAzM/dnYk3P8cg73jcxyOitPgT3mE3OVj7ky7sibzHWkw==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^3.1.7", - "@smithy/types": "^3.4.2", + "@smithy/node-config-provider": "^3.1.9", + "@smithy/types": "^3.6.0", "@smithy/util-config-provider": "^3.0.0", - "@smithy/util-middleware": "^3.0.6", + "@smithy/util-middleware": "^3.0.8", "tslib": "^2.6.2" }, "engines": { @@ -3724,20 +4846,18 @@ } }, "node_modules/@smithy/core": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.4.5.tgz", - "integrity": "sha512-Z0qlPXgZ0pouYgnu/cZTEYeRAvniiKZmVl4wIbZHX/nEMHkMDV9ao6KFArsU9KndE0TuhL149xcRx45wfw1YCA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.5.1.tgz", + "integrity": "sha512-DujtuDA7BGEKExJ05W5OdxCoyekcKT3Rhg1ZGeiUWaz2BJIWXjZmsG/DIP4W48GHno7AQwRsaCb8NcBgH3QZpg==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-endpoint": "^3.1.3", - "@smithy/middleware-retry": "^3.0.20", - "@smithy/middleware-serde": "^3.0.6", - "@smithy/protocol-http": "^4.1.3", - "@smithy/smithy-client": "^3.3.4", - "@smithy/types": "^3.4.2", + "@smithy/middleware-serde": "^3.0.8", + "@smithy/protocol-http": "^4.1.5", + "@smithy/types": "^3.6.0", "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-middleware": "^3.0.6", + "@smithy/util-middleware": "^3.0.8", + "@smithy/util-stream": "^3.2.1", "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" }, @@ -3746,16 +4866,16 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.3.tgz", - "integrity": "sha512-VoxMzSzdvkkjMJNE38yQgx4CfnmT+Z+5EUXkg4x7yag93eQkVQgZvN3XBSHC/ylfBbLbAtdu7flTCChX9I+mVg==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.5.tgz", + "integrity": "sha512-4FTQGAsuwqTzVMmiRVTn0RR9GrbRfkP0wfu/tXWVHd2LgNpTY0uglQpIScXK4NaEyXbB3JmZt8gfVqO50lP8wg==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^3.1.7", - "@smithy/property-provider": "^3.1.6", - "@smithy/types": "^3.4.2", - "@smithy/url-parser": "^3.0.6", + "@smithy/node-config-provider": "^3.1.9", + "@smithy/property-provider": "^3.1.8", + "@smithy/types": "^3.6.0", + "@smithy/url-parser": "^3.0.8", "tslib": "^2.6.2" }, "engines": { @@ -3763,27 +4883,27 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.8.tgz", - "integrity": "sha512-Lqe0B8F5RM7zkw//6avq1SJ8AfaRd3ubFUS1eVp5WszV7p6Ne5hQ4dSuMHDpNRPhgTvj4va9Kd/pcVigHEHRow==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.9.tgz", + "integrity": "sha512-hYNVQOqhFQ6vOpenifFME546f0GfJn2OiQ3M0FDmuUu8V/Uiwy2wej7ZXxFBNqdx0R5DZAqWM1l6VRhGz8oE6A==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^4.1.3", - "@smithy/querystring-builder": "^3.0.6", - "@smithy/types": "^3.4.2", + "@smithy/protocol-http": "^4.1.4", + "@smithy/querystring-builder": "^3.0.7", + "@smithy/types": "^3.5.0", "@smithy/util-base64": "^3.0.0", "tslib": "^2.6.2" } }, "node_modules/@smithy/hash-node": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.6.tgz", - "integrity": "sha512-c/FHEdKK/7DU2z6ZE91L36ahyXWayR3B+FzELjnYq7wH5YqIseM24V+pWCS9kFn1Ln8OFGTf+pyYPiHZuX0s/Q==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.8.tgz", + "integrity": "sha512-tlNQYbfpWXHimHqrvgo14DrMAgUBua/cNoz9fMYcDmYej7MAmUcjav/QKQbFc3NrcPxeJ7QClER4tWZmfwoPng==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" @@ -3793,13 +4913,13 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.6.tgz", - "integrity": "sha512-czM7Ioq3s8pIXht7oD+vmgy4Wfb4XavU/k/irO8NdXFFOx7YAlsCCcKOh/lJD1mJSYQqiR7NmpZ9JviryD/7AQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.8.tgz", + "integrity": "sha512-7Qynk6NWtTQhnGTTZwks++nJhQ1O54Mzi7fz4PqZOiYXb4Z1Flpb2yRvdALoggTS8xjtohWUM+RygOtB30YL3Q==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" } }, @@ -3816,14 +4936,14 @@ } }, "node_modules/@smithy/middleware-content-length": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.8.tgz", - "integrity": "sha512-VuyszlSO49WKh3H9/kIO2kf07VUwGV80QRiaDxUfP8P8UKlokz381ETJvwLhwuypBYhLymCYyNhB3fLAGBX2og==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.10.tgz", + "integrity": "sha512-T4dIdCs1d/+/qMpwhJ1DzOhxCZjZHbHazEPJWdB4GDi2HjIZllVzeBEcdJUN0fomV8DURsgOyrbEUzg3vzTaOg==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^4.1.3", - "@smithy/types": "^3.4.2", + "@smithy/protocol-http": "^4.1.5", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3831,18 +4951,19 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.3.tgz", - "integrity": "sha512-KeM/OrK8MVFUsoJsmCN0MZMVPjKKLudn13xpgwIMpGTYpA8QZB2Xq5tJ+RE6iu3A6NhOI4VajDTwBsm8pwwrhg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.2.1.tgz", + "integrity": "sha512-wWO3xYmFm6WRW8VsEJ5oU6h7aosFXfszlz3Dj176pTij6o21oZnzkCLzShfmRaaCHDkBXWBdO0c4sQAvLFP6zA==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-serde": "^3.0.6", - "@smithy/node-config-provider": "^3.1.7", - "@smithy/shared-ini-file-loader": "^3.1.7", - "@smithy/types": "^3.4.2", - "@smithy/url-parser": "^3.0.6", - "@smithy/util-middleware": "^3.0.6", + "@smithy/core": "^2.5.1", + "@smithy/middleware-serde": "^3.0.8", + "@smithy/node-config-provider": "^3.1.9", + "@smithy/shared-ini-file-loader": "^3.1.9", + "@smithy/types": "^3.6.0", + "@smithy/url-parser": "^3.0.8", + "@smithy/util-middleware": "^3.0.8", "tslib": "^2.6.2" }, "engines": { @@ -3850,19 +4971,19 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.20.tgz", - "integrity": "sha512-HELCOVwYw5hFDBm69d+LmmGjBCjWnwp/t7SJiHmp+c4u9vgfIaCjdSeIdnlOsLrr5ic5jGTJXvJFUQnd987b/g==", + "version": "3.0.25", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.25.tgz", + "integrity": "sha512-m1F70cPaMBML4HiTgCw5I+jFNtjgz5z5UdGnUbG37vw6kh4UvizFYjqJGHvicfgKMkDL6mXwyPp5mhZg02g5sg==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^3.1.7", - "@smithy/protocol-http": "^4.1.3", - "@smithy/service-error-classification": "^3.0.6", - "@smithy/smithy-client": "^3.3.4", - "@smithy/types": "^3.4.2", - "@smithy/util-middleware": "^3.0.6", - "@smithy/util-retry": "^3.0.6", + "@smithy/node-config-provider": "^3.1.9", + "@smithy/protocol-http": "^4.1.5", + "@smithy/service-error-classification": "^3.0.8", + "@smithy/smithy-client": "^3.4.2", + "@smithy/types": "^3.6.0", + "@smithy/util-middleware": "^3.0.8", + "@smithy/util-retry": "^3.0.8", "tslib": "^2.6.2", "uuid": "^9.0.1" }, @@ -3885,13 +5006,13 @@ } }, "node_modules/@smithy/middleware-serde": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.6.tgz", - "integrity": "sha512-KKTUSl1MzOM0MAjGbudeaVNtIDo+PpekTBkCNwvfZlKndodrnvRo+00USatiyLOc0ujjO9UydMRu3O9dYML7ag==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.8.tgz", + "integrity": "sha512-Xg2jK9Wc/1g/MBMP/EUn2DLspN8LNt+GMe7cgF+Ty3vl+Zvu+VeZU5nmhveU+H8pxyTsjrAkci8NqY6OuvZnjA==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3899,13 +5020,13 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.6.tgz", - "integrity": "sha512-2c0eSYhTQ8xQqHMcRxLMpadFbTXg6Zla5l0mwNftFCZMQmuhI7EbAJMx6R5eqfuV3YbJ3QGyS3d5uSmrHV8Khg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.8.tgz", + "integrity": "sha512-d7ZuwvYgp1+3682Nx0MD3D/HtkmZd49N3JUndYWQXfRZrYEnCWYc8BHcNmVsPAp9gKvlurdg/mubE6b/rPS9MA==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3913,15 +5034,15 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.7.tgz", - "integrity": "sha512-g3mfnC3Oo8pOI0dYuPXLtdW1WGVb3bR2tkV21GNkm0ZvQjLTtamXAwCWt/FCb0HGvKt3gHHmF1XerG0ICfalOg==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.9.tgz", + "integrity": "sha512-qRHoah49QJ71eemjuS/WhUXB+mpNtwHRWQr77J/m40ewBVVwvo52kYAmb7iuaECgGTTcYxHS4Wmewfwy++ueew==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^3.1.6", - "@smithy/shared-ini-file-loader": "^3.1.7", - "@smithy/types": "^3.4.2", + "@smithy/property-provider": "^3.1.8", + "@smithy/shared-ini-file-loader": "^3.1.9", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3929,16 +5050,16 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.2.3.tgz", - "integrity": "sha512-/gcm5DJ3k1b1zEInzBGAZC8ntJ+jwrz1NcSIu+9dSXd1FfG0G6QgkDI40tt8/WYUbHtLyo8fEqtm2v29koWo/w==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.2.5.tgz", + "integrity": "sha512-PkOwPNeKdvX/jCpn0A8n9/TyoxjGZB8WVoJmm9YzsnAgggTj4CrjpRHlTQw7dlLZ320n1mY1y+nTRUDViKi/3w==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/abort-controller": "^3.1.4", - "@smithy/protocol-http": "^4.1.3", - "@smithy/querystring-builder": "^3.0.6", - "@smithy/types": "^3.4.2", + "@smithy/abort-controller": "^3.1.6", + "@smithy/protocol-http": "^4.1.5", + "@smithy/querystring-builder": "^3.0.8", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3946,13 +5067,13 @@ } }, "node_modules/@smithy/property-provider": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.6.tgz", - "integrity": "sha512-NK3y/T7Q/Bw+Z8vsVs9MYIQ5v7gOX7clyrXcwhhIBQhbPgRl6JDrZbusO9qWDhcEus75Tg+VCxtIRfo3H76fpw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.8.tgz", + "integrity": "sha512-ukNUyo6rHmusG64lmkjFeXemwYuKge1BJ8CtpVKmrxQxc6rhUX0vebcptFA9MmrGsnLhwnnqeH83VTU9hwOpjA==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3960,13 +5081,13 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.3.tgz", - "integrity": "sha512-GcbMmOYpH9iRqtC05RbRnc/0FssxSTHlmaNhYBTgSgNCYpdR3Kt88u5GAZTBmouzv+Zlj/VRv92J9ruuDeJuEw==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.5.tgz", + "integrity": "sha512-hsjtwpIemmCkm3ZV5fd/T0bPIugW1gJXwZ/hpuVubt2hEUApIoUTrf6qIdh9MAWlw0vjMrA1ztJLAwtNaZogvg==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3974,13 +5095,13 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.6.tgz", - "integrity": "sha512-sQe08RunoObe+Usujn9+R2zrLuQERi3CWvRO3BvnoWSYUaIrLKuAIeY7cMeDax6xGyfIP3x/yFWbEKSXvOnvVg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.8.tgz", + "integrity": "sha512-btYxGVqFUARbUrN6VhL9c3dnSviIwBYD9Rz1jHuN1hgh28Fpv2xjU1HeCeDJX68xctz7r4l1PBnFhGg1WBBPuA==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "@smithy/util-uri-escape": "^3.0.0", "tslib": "^2.6.2" }, @@ -3989,13 +5110,13 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.6.tgz", - "integrity": "sha512-UJKw4LlEkytzz2Wq+uIdHf6qOtFfee/o7ruH0jF5I6UAuU+19r9QV7nU3P/uI0l6+oElRHmG/5cBBcGJrD7Ozg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.8.tgz", + "integrity": "sha512-BtEk3FG7Ks64GAbt+JnKqwuobJNX8VmFLBsKIwWr1D60T426fGrV2L3YS5siOcUhhp6/Y6yhBw1PSPxA5p7qGg==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -4003,26 +5124,26 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.6.tgz", - "integrity": "sha512-53SpchU3+DUZrN7J6sBx9tBiCVGzsib2e4sc512Q7K9fpC5zkJKs6Z9s+qbMxSYrkEkle6hnMtrts7XNkMJJMg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.8.tgz", + "integrity": "sha512-uEC/kCCFto83bz5ZzapcrgGqHOh/0r69sZ2ZuHlgoD5kYgXJEThCoTuw/y1Ub3cE7aaKdznb+jD9xRPIfIwD7g==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2" + "@smithy/types": "^3.6.0" }, "engines": { "node": ">=16.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.7.tgz", - "integrity": "sha512-IA4K2qTJYXkF5OfVN4vsY1hfnUZjaslEE8Fsr/gGFza4TAC2A9NfnZuSY2srQIbt9bwtjHiAayrRVgKse4Q7fA==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.9.tgz", + "integrity": "sha512-/+OsJRNtoRbtsX0UpSgWVxFZLsJHo/4sTr+kBg/J78sr7iC+tHeOvOJrS5hCpVQ6sWBbhWLp1UNiuMyZhE6pmA==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -4030,17 +5151,17 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.1.4.tgz", - "integrity": "sha512-72MiK7xYukNsnLJI9NqvUHqTu0ziEsfMsYNlWpiJfuGQnCTFKpckThlEatirvcA/LmT1h7rRO+pJD06PYsPu9Q==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.2.1.tgz", + "integrity": "sha512-NsV1jF4EvmO5wqmaSzlnTVetemBS3FZHdyc5CExbDljcyJCEEkJr8ANu2JvtNbVg/9MvKAWV44kTrGS+Pi4INg==", "inBundle": true, "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^3.0.0", - "@smithy/protocol-http": "^4.1.3", - "@smithy/types": "^3.4.2", + "@smithy/protocol-http": "^4.1.5", + "@smithy/types": "^3.6.0", "@smithy/util-hex-encoding": "^3.0.0", - "@smithy/util-middleware": "^3.0.6", + "@smithy/util-middleware": "^3.0.8", "@smithy/util-uri-escape": "^3.0.0", "@smithy/util-utf8": "^3.0.0", "tslib": "^2.6.2" @@ -4050,17 +5171,18 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.3.4.tgz", - "integrity": "sha512-NKw/2XxOW/Rg3rzB90HxsmGok5oS6vRzJgMh/JN4BHaOQQ4q5OuX999GmOGxEp730wbpIXIowfKZmIMXkG4v0Q==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.4.2.tgz", + "integrity": "sha512-dxw1BDxJiY9/zI3cBqfVrInij6ShjpV4fmGHesGZZUiP9OSE/EVfdwdRz0PgvkEvrZHpsj2htRaHJfftE8giBA==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-endpoint": "^3.1.3", - "@smithy/middleware-stack": "^3.0.6", - "@smithy/protocol-http": "^4.1.3", - "@smithy/types": "^3.4.2", - "@smithy/util-stream": "^3.1.8", + "@smithy/core": "^2.5.1", + "@smithy/middleware-endpoint": "^3.2.1", + "@smithy/middleware-stack": "^3.0.8", + "@smithy/protocol-http": "^4.1.5", + "@smithy/types": "^3.6.0", + "@smithy/util-stream": "^3.2.1", "tslib": "^2.6.2" }, "engines": { @@ -4068,9 +5190,9 @@ } }, "node_modules/@smithy/types": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.4.2.tgz", - "integrity": "sha512-tHiFcfcVedVBHpmHUEUHOCCih8iZbIAYn9NvPsNzaPm/237I3imdDdZoOC8c87H5HBAVEa06tTgb+OcSWV9g5w==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.6.0.tgz", + "integrity": "sha512-8VXK/KzOHefoC65yRgCn5vG1cysPJjHnOVt9d0ybFQSmJgQj152vMn4EkYhGuaOmnnZvCPav/KnYyE6/KsNZ2w==", "inBundle": true, "license": "Apache-2.0", "dependencies": { @@ -4081,14 +5203,14 @@ } }, "node_modules/@smithy/url-parser": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.6.tgz", - "integrity": "sha512-47Op/NU8Opt49KyGpHtVdnmmJMsp2hEwBdyjuFB9M2V5QVOwA7pBhhxKN5z6ztKGrMw76gd8MlbPuzzvaAncuQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.8.tgz", + "integrity": "sha512-4FdOhwpTW7jtSFWm7SpfLGKIBC9ZaTKG5nBF0wK24aoQKQyDIKUw3+KFWCQ9maMzrgTJIuOvOnsV2lLGW5XjTg==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/querystring-parser": "^3.0.6", - "@smithy/types": "^3.4.2", + "@smithy/querystring-parser": "^3.0.8", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" } }, @@ -4154,15 +5276,15 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.20.tgz", - "integrity": "sha512-HpYmCpEThQJpCKzwzrGrklhdegRfuXI9keHRrHidbyEMliCdgic6t38MikJeZEkdIcEMhO1g95HIYMzjUzB+xg==", + "version": "3.0.25", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.25.tgz", + "integrity": "sha512-fRw7zymjIDt6XxIsLwfJfYUfbGoO9CmCJk6rjJ/X5cd20+d2Is7xjU5Kt/AiDt6hX8DAf5dztmfP5O82gR9emA==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^3.1.6", - "@smithy/smithy-client": "^3.3.4", - "@smithy/types": "^3.4.2", + "@smithy/property-provider": "^3.1.8", + "@smithy/smithy-client": "^3.4.2", + "@smithy/types": "^3.6.0", "bowser": "^2.11.0", "tslib": "^2.6.2" }, @@ -4171,18 +5293,18 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.20.tgz", - "integrity": "sha512-atdsHNtAX0rwTvRRGsrONU0C0XzapH6tI8T1y/OReOvWN7uBwXqqWRft6m8egU2DgeReU0xqT3PHdGCe5VRaaQ==", + "version": "3.0.25", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.25.tgz", + "integrity": "sha512-H3BSZdBDiVZGzt8TG51Pd2FvFO0PAx/A0mJ0EH8a13KJ6iUCdYnw/Dk/MdC1kTd0eUuUGisDFaxXVXo4HHFL1g==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/config-resolver": "^3.0.8", - "@smithy/credential-provider-imds": "^3.2.3", - "@smithy/node-config-provider": "^3.1.7", - "@smithy/property-provider": "^3.1.6", - "@smithy/smithy-client": "^3.3.4", - "@smithy/types": "^3.4.2", + "@smithy/config-resolver": "^3.0.10", + "@smithy/credential-provider-imds": "^3.2.5", + "@smithy/node-config-provider": "^3.1.9", + "@smithy/property-provider": "^3.1.8", + "@smithy/smithy-client": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -4190,14 +5312,14 @@ } }, "node_modules/@smithy/util-endpoints": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.1.2.tgz", - "integrity": "sha512-FEISzffb4H8DLzGq1g4MuDpcv6CIG15fXoQzDH9SjpRJv6h7J++1STFWWinilG0tQh9H1v2UKWG19Jjr2B16zQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.1.4.tgz", + "integrity": "sha512-kPt8j4emm7rdMWQyL0F89o92q10gvCUa6sBkBtDJ7nV2+P7wpXczzOfoDJ49CKXe5CCqb8dc1W+ZdLlrKzSAnQ==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^3.1.7", - "@smithy/types": "^3.4.2", + "@smithy/node-config-provider": "^3.1.9", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -4218,13 +5340,13 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.6.tgz", - "integrity": "sha512-BxbX4aBhI1O9p87/xM+zWy0GzT3CEVcXFPBRDoHAM+pV0eSW156pR+PSYEz0DQHDMYDsYAflC2bQNz2uaDBUZQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.8.tgz", + "integrity": "sha512-p7iYAPaQjoeM+AKABpYWeDdtwQNxasr4aXQEA/OmbOaug9V0odRVDy3Wx4ci8soljE/JXQo+abV0qZpW8NX0yA==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.4.2", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -4232,14 +5354,14 @@ } }, "node_modules/@smithy/util-retry": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.6.tgz", - "integrity": "sha512-BRZiuF7IwDntAbevqMco67an0Sr9oLQJqqRCsSPZZHYRnehS0LHDAkJk/pSmI7Z8c/1Vet294H7fY2fWUgB+Rg==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.8.tgz", + "integrity": "sha512-TCEhLnY581YJ+g1x0hapPz13JFqzmh/pMWL2KEFASC51qCfw3+Y47MrTmea4bUE5vsdxQ4F6/KFbUeSz22Q1ow==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/service-error-classification": "^3.0.6", - "@smithy/types": "^3.4.2", + "@smithy/service-error-classification": "^3.0.8", + "@smithy/types": "^3.6.0", "tslib": "^2.6.2" }, "engines": { @@ -4247,15 +5369,15 @@ } }, "node_modules/@smithy/util-stream": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.8.tgz", - "integrity": "sha512-hoKOqSmb8FD3WLObuB5hwbM7bNIWgcnvkThokTvVq7J5PKjlLUK5qQQcB9zWLHIoSaIlf3VIv2OxZY2wtQjcRQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.2.1.tgz", + "integrity": "sha512-R3ufuzJRxSJbE58K9AEnL/uSZyVdHzud9wLS8tIbXclxKzoe09CRohj2xV8wpx5tj7ZbiJaKYcutMm1eYgz/0A==", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^3.2.8", - "@smithy/node-http-handler": "^3.2.3", - "@smithy/types": "^3.4.2", + "@smithy/fetch-http-handler": "^4.0.0", + "@smithy/node-http-handler": "^3.2.5", + "@smithy/types": "^3.6.0", "@smithy/util-base64": "^3.0.0", "@smithy/util-buffer-from": "^3.0.0", "@smithy/util-hex-encoding": "^3.0.0", @@ -4266,6 +5388,20 @@ "node": ">=16.0.0" } }, + "node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-4.0.0.tgz", + "integrity": "sha512-MLb1f5tbBO2X6K4lMEKJvxeLooyg7guq48C2zKr4qM7F2Gpkz4dc+hdSgu77pCJ76jVqFBjZczHYAs6dp15N+g==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^4.1.5", + "@smithy/querystring-builder": "^3.0.8", + "@smithy/types": "^3.6.0", + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" + } + }, "node_modules/@smithy/util-uri-escape": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", @@ -4292,6 +5428,21 @@ "node": ">=16.0.0" } }, + "node_modules/@smithy/util-waiter": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-3.1.7.tgz", + "integrity": "sha512-d5yGlQtmN/z5eoTtIYgkvOw27US2Ous4VycnXatyoImIF9tzlcpnKqQ/V7qhvJmb2p6xZne1NopCLakdTnkBBQ==", + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^3.1.6", + "@smithy/types": "^3.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.10.tgz", @@ -4451,6 +5602,13 @@ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "inBundle": true, + "license": "MIT" + }, "node_modules/@types/yargs": { "version": "17.0.32", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", diff --git a/package.json b/package.json index 87dc6eb..654c229 100644 --- a/package.json +++ b/package.json @@ -73,8 +73,9 @@ "dependencies": { "@aws-sdk/client-cost-explorer": "^3.650.0", "@aws-sdk/client-identitystore": "^3.654.0", + "@aws-sdk/client-ssm": "^3.679.0", "@aws-sdk/client-sso-admin": "^3.654.0", - "@aws-sdk/client-sts": "^3.650.0", + "@aws-sdk/client-sts": "^3.679.0", "@aws-sdk/credential-providers": "^3.650.0", "aws-lambda": "^1.0.7", "execa": "5.1.1", @@ -83,6 +84,7 @@ "bundledDependencies": [ "@aws-sdk/client-cost-explorer", "@aws-sdk/client-identitystore", + "@aws-sdk/client-ssm", "@aws-sdk/client-sso-admin", "@aws-sdk/client-sts", "@aws-sdk/credential-providers", diff --git a/src/data-landing-zone-client.ts b/src/data-landing-zone-client.ts new file mode 100644 index 0000000..3d781a7 --- /dev/null +++ b/src/data-landing-zone-client.ts @@ -0,0 +1,100 @@ +import { SSMClient, GetParameterCommand } from '@aws-sdk/client-ssm'; +import { AssumeRoleCommand, STSClient, Credentials } from '@aws-sdk/client-sts'; +import { NetworkAddress } from './constructs/dlz-vpc/network-address'; +import { DynamicConstants, SSM_PARAMETERS_DLZ, SSM_PARAMETER_DLZ_PREFIX } from './stacks/organization/constants'; + +export class DataLandingZoneClient { + + constructor(private accountId: string, private accountName: string, private region: string) { + } + + private async assumeRole(roleArn: string): Promise { + try { + const stsClient = new STSClient({ region: this.region }); + const command = new AssumeRoleCommand({ + RoleArn: roleArn, + RoleSessionName: 'AssumeRoleSession', + }); + + const response = await stsClient.send(command); + return response.Credentials; + } catch (error) { + console.error('Error assuming role:', error); + return undefined; + } + } + + private async getSSMParameter(parameterName: string, roleArn: string): Promise { + const credentials = await this.assumeRole(roleArn); + if (!credentials) { + console.error('Failed to assume role.'); + return undefined; + } + + const ssmClient = new SSMClient({ + region: this.region, + credentials: { + accessKeyId: credentials.AccessKeyId!, + secretAccessKey: credentials.SecretAccessKey!, + sessionToken: credentials.SessionToken!, + }, + }); + + try { + const command = new GetParameterCommand({ + Name: parameterName, + WithDecryption: true, + }); + + const response = await ssmClient.send(command); + return response.Parameter?.Value; + } catch (error) { + console.error('Error fetching parameter:', error); + return undefined; + } + } + + private async getParameter(parameterName: string, errorMessage: string): Promise { + const dynamicProps = new DynamicConstants(); + const assumeRoleArn = dynamicProps.getSsmAssumeCrossAccountRoleArn(this.accountId); + const value = await this.getSSMParameter(parameterName, assumeRoleArn) as string; + if (!value) { + throw new Error(errorMessage); + } + return value; + } + + public async getBastionSecurityGroupId(bastionName?: string): Promise { + bastionName = bastionName ?? 'default'; + + return this.getParameter( + `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}bastion/${bastionName}/security-group/id`, + `Failed to get bastion security group id for ${bastionName}`); + } + + public async getVpcId(vpcName: string): Promise { + const vpcAddress = new NetworkAddress(this.accountName, this.region, vpcName); + return this.getParameter( + `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${vpcAddress}/id`, + `Failed to get vpc id for ${vpcAddress}`); + } + + public async routeTableId(vpcName: string, segment: string): Promise { + const routeTableAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment); + return this.getParameter( + `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${routeTableAddress}/id`, + `Failed to get route table id for ${routeTableAddress}`); + } + + public async notificationTopicArn(): Promise { + return this.getParameter( + `${SSM_PARAMETER_DLZ_PREFIX}/sns/default-notification/arn`, + 'Failed to get ARN for default notification topic'); + } + + public async permissionsBoundaryArn(): Promise { + return this.getParameter( + `${SSM_PARAMETER_DLZ_PREFIX}/iam/permission-boundary-policy/arn`, + 'Failed to get ARN for IAM permission boundary policy'); + } +} \ No newline at end of file diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 5e5eb6f..443390f 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "71a9e3e3823d5561f789457818c3528724716e1f1ffd9c0ea663b6167788f869.zip", + "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From 6ee9c3351b352f399be36c25888d78c64532ff5f Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 28 Oct 2024 13:30:23 +0000 Subject: [PATCH 02/15] chore: self mutation Signed-off-by: github-actions --- test/__snapshots__/build.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 443390f..85f8bb8 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", + "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From 1aabd4e75a362e27d2846a5439a805583e9cdc37 Mon Sep 17 00:00:00 2001 From: Warrenn Enslin Date: Mon, 28 Oct 2024 15:32:23 +0200 Subject: [PATCH 03/15] added importFrom --- API.md | 124 ++++++++++++++++++ .../ssm-parameters-glossary.md | 18 ++- src/data-landing-zone.ts | 18 +++ src/index.ts | 1 + 4 files changed, 159 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index fd34d29..89d8493 100644 --- a/API.md +++ b/API.md @@ -15922,10 +15922,29 @@ new DataLandingZone(app: App, props: DataLandingZoneProps) | **Name** | **Description** | | --- | --- | +| importFrom | *No description.* | | stageManagement | *No description.* | --- +##### `importFrom` + +```typescript +public importFrom(accountName: string, region: Region): DataLandingZoneClient +``` + +###### `accountName`Required + +- *Type:* string + +--- + +###### `region`Required + +- *Type:* Region + +--- + ##### `stageManagement` ```typescript @@ -16051,6 +16070,111 @@ public readonly workloadRegionalStacks: WorkloadRegionalStack[]; --- +### DataLandingZoneClient + +#### Initializers + +```typescript +import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' + +new DataLandingZoneClient(accountId: string, accountName: string, region: string) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| accountId | string | *No description.* | +| accountName | string | *No description.* | +| region | string | *No description.* | + +--- + +##### `accountId`Required + +- *Type:* string + +--- + +##### `accountName`Required + +- *Type:* string + +--- + +##### `region`Required + +- *Type:* string + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| getBastionSecurityGroupId | *No description.* | +| getVpcId | *No description.* | +| notificationTopicArn | *No description.* | +| permissionsBoundaryArn | *No description.* | +| routeTableId | *No description.* | + +--- + +##### `getBastionSecurityGroupId` + +```typescript +public getBastionSecurityGroupId(bastionName?: string): string +``` + +###### `bastionName`Optional + +- *Type:* string + +--- + +##### `getVpcId` + +```typescript +public getVpcId(vpcName: string): string +``` + +###### `vpcName`Required + +- *Type:* string + +--- + +##### `notificationTopicArn` + +```typescript +public notificationTopicArn(): string +``` + +##### `permissionsBoundaryArn` + +```typescript +public permissionsBoundaryArn(): string +``` + +##### `routeTableId` + +```typescript +public routeTableId(vpcName: string, segment: string): string +``` + +###### `vpcName`Required + +- *Type:* string + +--- + +###### `segment`Required + +- *Type:* string + +--- + + + + ### Defaults #### Initializers diff --git a/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md b/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md index 29f7f9b..57cc6c3 100644 --- a/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md +++ b/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md @@ -2,16 +2,18 @@ ## `/dlz/networking-entity/bastion/${bastion.name}/security-group/id` +### Scope: External + The security group ID of the bastion host [link](../bastion-hosts/bastion-hosts.md). - **bastion.name** - The name of the bastion host. Property is optional, but if not provided, it will default to `default`. -### Scope: Internal - --- ## `/dlz/networking-entity/vpc/${vpcAddress}/id` +### Scope: External + The VPC ID of the VPC. - **vpcAddress** - The address of the VPC. @@ -20,6 +22,8 @@ The VPC ID of the VPC. ## `/dlz/networking-entity/vpc/${routeTableAddress}/id` +### Scope: External + The route table ID of the route table. - **routeTableAddress** - The address of the route table. @@ -28,6 +32,8 @@ The route table ID of the route table. ## `/dlz/networking-entity/vpc/${subnetAddress}/id` +### Scope: External + The subnet ID of the subnet. - **subnetAddress** - The address of the subnet. @@ -36,18 +42,24 @@ The subnet ID of the subnet. ## `/dlz/sns/default-notification/arn` +### Scope: External + The ARN of the default notification topic. --- ## `/dlz/iam/permission-boundary-policy/arn` +### Scope: External + The ARN of the permission boundary policy. --- ## `/dlz/networking/vpc-peering-role-arn--${vpcPeeringRolesKey}` +### Scope: Internal + The ARN of the VPC peering role. - **vpcPeeringRolesKey** - The key used to identify the VPC peering role. @@ -56,6 +68,8 @@ The ARN of the VPC peering role. ## `/dlz/networking-entity/vpc/${fromVpc.address}/peer/${toVpc.address}/id` +### Scope: Internal + The ID of the VPC peering connection. - **fromVpc.address** - The address of the source VPC. diff --git a/src/data-landing-zone.ts b/src/data-landing-zone.ts index 32ff719..870faee 100644 --- a/src/data-landing-zone.ts +++ b/src/data-landing-zone.ts @@ -12,6 +12,7 @@ import { import { DlzSsmReaderStackCache } from './constructs/dlz-ssm-reader/dlz-ssm-reader-stack-cache'; import { NetworkAddress } from './constructs/dlz-vpc/network-address'; import { DlzTag } from './constructs/organization-policies/tag-policy'; +import { DataLandingZoneClient } from './data-landing-zone-client'; import { Report } from './lib/report'; import { ManagementStack, WorkloadGlobalNetworkConnectionsPhase1Stack } from './stacks'; import { AuditGlobalStack } from './stacks/organization/security/audit/global-stack'; @@ -779,6 +780,23 @@ export class DataLandingZone { return management; }; + importFrom(accountName: string, region: Region): DataLandingZoneClient { + const allAccountIds = new Map(); + allAccountIds.set('root', this.props.organization.root.accounts.management.accountId); + allAccountIds.set('log', this.props.organization.ous.security.accounts.log.accountId); + allAccountIds.set('audit', this.props.organization.ous.security.accounts.audit.accountId); + for (const account of this.props.organization.ous.workloads.accounts) { + allAccountIds.set(account.name, account.accountId); + } + + if (!allAccountIds.has(accountName)) { + throw new Error(`Account ${accountName} not found`); + } + const accountId = allAccountIds.get(accountName)!; + const regionName = region.toString(); + + return new DataLandingZoneClient(accountId, accountName, regionName); + } private stageLog() { const ou = 'security'; diff --git a/src/index.ts b/src/index.ts index e1d0eb1..bf85886 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ export * from './data-landing-zone'; +export * from './data-landing-zone-client'; export * from './stacks'; export * from './constructs'; export * from './scripts'; From 933fdfab9a297b86ae85464f7e15a1d8545ed622 Mon Sep 17 00:00:00 2001 From: Warrenn Enslin Date: Mon, 28 Oct 2024 15:46:00 +0200 Subject: [PATCH 04/15] included comments --- API.md | 25 +++++++++++ src/data-landing-zone-client.ts | 64 +++++++++++++++++++++++++++ test/__snapshots__/build.test.ts.snap | 2 +- 3 files changed, 90 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 89d8493..fb7b939 100644 --- a/API.md +++ b/API.md @@ -16115,6 +16115,7 @@ new DataLandingZoneClient(accountId: string, accountName: string, region: string | notificationTopicArn | *No description.* | | permissionsBoundaryArn | *No description.* | | routeTableId | *No description.* | +| subnetId | *No description.* | --- @@ -16172,6 +16173,30 @@ public routeTableId(vpcName: string, segment: string): string --- +##### `subnetId` + +```typescript +public subnetId(vpcName: string, segment: string, subnetName: string): string +``` + +###### `vpcName`Required + +- *Type:* string + +--- + +###### `segment`Required + +- *Type:* string + +--- + +###### `subnetName`Required + +- *Type:* string + +--- + diff --git a/src/data-landing-zone-client.ts b/src/data-landing-zone-client.ts index 3d781a7..e165d37 100644 --- a/src/data-landing-zone-client.ts +++ b/src/data-landing-zone-client.ts @@ -3,11 +3,19 @@ import { AssumeRoleCommand, STSClient, Credentials } from '@aws-sdk/client-sts'; import { NetworkAddress } from './constructs/dlz-vpc/network-address'; import { DynamicConstants, SSM_PARAMETERS_DLZ, SSM_PARAMETER_DLZ_PREFIX } from './stacks/organization/constants'; +/* +* This class is used to fetch parameters from the SSM Parameter Store and uses the AWS SDK to assume the role +*/ export class DataLandingZoneClient { constructor(private accountId: string, private accountName: string, private region: string) { } + /* + * Assumes the role and returns the credentials + * @param roleArn - The ARN of the role to assume + * @returns - The credentials of the role + */ private async assumeRole(roleArn: string): Promise { try { const stsClient = new STSClient({ region: this.region }); @@ -24,6 +32,12 @@ export class DataLandingZoneClient { } } + /* + * Fetches the parameter from the SSM Parameter Store and returns the value + * @param parameterName - The name of the parameter to fetch + * @param roleArn - The ARN of the role to assume + * @returns - The value of the parameter + */ private async getSSMParameter(parameterName: string, roleArn: string): Promise { const credentials = await this.assumeRole(roleArn); if (!credentials) { @@ -54,6 +68,12 @@ export class DataLandingZoneClient { } } + /* + * Fetches the parameter from the SSM Parameter Store and returns the value + * @param parameterName - The name of the parameter to fetch + * @param errorMessage - The error message to throw if the parameter is not found + * @returns - The value of the parameter + */ private async getParameter(parameterName: string, errorMessage: string): Promise { const dynamicProps = new DynamicConstants(); const assumeRoleArn = dynamicProps.getSsmAssumeCrossAccountRoleArn(this.accountId); @@ -64,6 +84,12 @@ export class DataLandingZoneClient { return value; } + /* + * Fetches the bastion security group ID from the SSM Parameter Store + * @param bastionName - The name of the bastion to fetch the security group ID for + * @returns - The security group ID of the bastion + * @throws - An error if the parameter is not found + */ public async getBastionSecurityGroupId(bastionName?: string): Promise { bastionName = bastionName ?? 'default'; @@ -72,6 +98,12 @@ export class DataLandingZoneClient { `Failed to get bastion security group id for ${bastionName}`); } + /* + * Fetches the VPC ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the ID for + * @returns - The ID of the VPC + * @throws - An error if the parameter is not found + */ public async getVpcId(vpcName: string): Promise { const vpcAddress = new NetworkAddress(this.accountName, this.region, vpcName); return this.getParameter( @@ -79,6 +111,13 @@ export class DataLandingZoneClient { `Failed to get vpc id for ${vpcAddress}`); } + /* + * Fetches the route table ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the route table ID for + * @param segment - The segment of the VPC to fetch the route table ID for + * @returns - The ID of the route table + * @throws - An error if the parameter is not found + */ public async routeTableId(vpcName: string, segment: string): Promise { const routeTableAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment); return this.getParameter( @@ -86,12 +125,37 @@ export class DataLandingZoneClient { `Failed to get route table id for ${routeTableAddress}`); } + /* + * Fetches the subnet ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the subnet ID for + * @param segment - The segment of the VPC to fetch the subnet ID for + * @param subnetName - The name of the subnet to fetch the ID for + * @returns - The ID of the subnet + * @throws - An error if the parameter is not found + */ + public async subnetId(vpcName: string, segment: string, subnetName: string): Promise { + const subnetAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment, subnetName); + return this.getParameter( + `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${subnetAddress}/id`, + `Failed to get subnet id for ${subnetAddress}`); + } + + /* + * Fetches the notification topic ARN from the SSM Parameter Store + * @returns - The ARN of the notification topic + * @throws - An error if the parameter is not found + */ public async notificationTopicArn(): Promise { return this.getParameter( `${SSM_PARAMETER_DLZ_PREFIX}/sns/default-notification/arn`, 'Failed to get ARN for default notification topic'); } + /* + * Fetches the permissions boundary ARN from the SSM Parameter Store + * @returns - The ARN of the permissions boundary + * @throws - An error if the parameter is not found + */ public async permissionsBoundaryArn(): Promise { return this.getParameter( `${SSM_PARAMETER_DLZ_PREFIX}/iam/permission-boundary-policy/arn`, diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 85f8bb8..443390f 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", + "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From 1acdcb0d037e71b929497f90c79e6b55422fb40b Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 28 Oct 2024 13:50:22 +0000 Subject: [PATCH 05/15] chore: self mutation Signed-off-by: github-actions --- test/__snapshots__/build.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 443390f..85f8bb8 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", + "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From 64e84c6c2198bf76391658ffabc4f74c0f7ff054 Mon Sep 17 00:00:00 2001 From: Warrenn Enslin Date: Mon, 28 Oct 2024 16:20:22 +0200 Subject: [PATCH 06/15] used CDK constructs instead of SSM parameters --- .projen/deps.json | 4 - .projen/tasks.json | 4 +- .projenrc.ts | 2 +- API.md | 59 +-- package-lock.json | 541 -------------------------- package.json | 2 - src/data-landing-zone-client.ts | 154 +++----- src/data-landing-zone.ts | 2 +- test/__snapshots__/build.test.ts.snap | 2 +- 9 files changed, 86 insertions(+), 684 deletions(-) diff --git a/.projen/deps.json b/.projen/deps.json index 32f73e2..2e056c0 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -110,10 +110,6 @@ "name": "@aws-sdk/client-identitystore", "type": "bundled" }, - { - "name": "@aws-sdk/client-ssm", - "type": "bundled" - }, { "name": "@aws-sdk/client-sso-admin", "type": "bundled" diff --git a/.projen/tasks.json b/.projen/tasks.json index 7cd43c6..b7981a0 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -322,13 +322,13 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@types/aws-lambda,@types/aws-sdk,@types/jest,esbuild,eslint-import-resolver-typescript,eslint-plugin-import,husky,jest,jsii-diff,jsii-pacmak,projen,ts-jest,ts-node,@aws-sdk/client-cost-explorer,@aws-sdk/client-identitystore,@aws-sdk/client-ssm,@aws-sdk/client-sso-admin,@aws-sdk/client-sts,@aws-sdk/credential-providers,aws-lambda,table" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@types/aws-lambda,@types/aws-sdk,@types/jest,esbuild,eslint-import-resolver-typescript,eslint-plugin-import,husky,jest,jsii-diff,jsii-pacmak,projen,ts-jest,ts-node,@aws-sdk/client-cost-explorer,@aws-sdk/client-identitystore,@aws-sdk/client-sso-admin,@aws-sdk/client-sts,@aws-sdk/credential-providers,aws-lambda,table" }, { "exec": "npm install" }, { - "exec": "npm update @types/aws-lambda @types/aws-sdk @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser commit-and-tag-version esbuild eslint-import-resolver-typescript eslint-plugin-import eslint husky jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii projen ts-jest ts-node typescript @aws-sdk/client-cost-explorer @aws-sdk/client-identitystore @aws-sdk/client-ssm @aws-sdk/client-sso-admin @aws-sdk/client-sts @aws-sdk/credential-providers aws-lambda execa table aws-cdk-lib constructs" + "exec": "npm update @types/aws-lambda @types/aws-sdk @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser commit-and-tag-version esbuild eslint-import-resolver-typescript eslint-plugin-import eslint husky jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii projen ts-jest ts-node typescript @aws-sdk/client-cost-explorer @aws-sdk/client-identitystore @aws-sdk/client-sso-admin @aws-sdk/client-sts @aws-sdk/credential-providers aws-lambda execa table aws-cdk-lib constructs" }, { "exec": "npx projen" diff --git a/.projenrc.ts b/.projenrc.ts index edbe296..894aaab 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -49,7 +49,7 @@ const project = new awscdk.AwsCdkConstructLibrary({ /* Runtime dependencies of this module that are jsii-enabled. */ // deps: [ ], /* Runtime dependencies of this module that are NOT jsii-enabled. */ - bundledDeps: ['execa@5.1.1', '@aws-sdk/client-sts', '@aws-sdk/credential-providers', '@aws-sdk/client-cost-explorer', 'table', 'aws-lambda', '@aws-sdk/client-identitystore', '@aws-sdk/client-sso-admin', '@aws-sdk/client-ssm', '@aws-sdk/client-sts'], + bundledDeps: ['execa@5.1.1', '@aws-sdk/client-sts', '@aws-sdk/credential-providers', '@aws-sdk/client-cost-explorer', 'table', 'aws-lambda', '@aws-sdk/client-identitystore', '@aws-sdk/client-sso-admin'], // description: undefined, /* Build dependencies for this repo/module. */ devDeps: ['husky', '@types/aws-lambda', '@types/aws-sdk', '@types/node'], diff --git a/API.md b/API.md index fb7b939..7ce0ba6 100644 --- a/API.md +++ b/API.md @@ -16077,17 +16077,24 @@ public readonly workloadRegionalStacks: WorkloadRegionalStack[]; ```typescript import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' -new DataLandingZoneClient(accountId: string, accountName: string, region: string) +new DataLandingZoneClient(scope: Construct, accountId: string, accountName: string, region: string) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | +| scope | constructs.Construct | *No description.* | | accountId | string | *No description.* | | accountName | string | *No description.* | | region | string | *No description.* | --- +##### `scope`Required + +- *Type:* constructs.Construct + +--- + ##### `accountId`Required - *Type:* string @@ -16111,11 +16118,11 @@ new DataLandingZoneClient(accountId: string, accountName: string, region: string | **Name** | **Description** | | --- | --- | | getBastionSecurityGroupId | *No description.* | +| getSubnetId | *No description.* | | getVpcId | *No description.* | | notificationTopicArn | *No description.* | | permissionsBoundaryArn | *No description.* | | routeTableId | *No description.* | -| subnetId | *No description.* | --- @@ -16131,6 +16138,30 @@ public getBastionSecurityGroupId(bastionName?: string): string --- +##### `getSubnetId` + +```typescript +public getSubnetId(vpcName: string, segment: string, subnetName: string): string +``` + +###### `vpcName`Required + +- *Type:* string + +--- + +###### `segment`Required + +- *Type:* string + +--- + +###### `subnetName`Required + +- *Type:* string + +--- + ##### `getVpcId` ```typescript @@ -16173,30 +16204,6 @@ public routeTableId(vpcName: string, segment: string): string --- -##### `subnetId` - -```typescript -public subnetId(vpcName: string, segment: string, subnetName: string): string -``` - -###### `vpcName`Required - -- *Type:* string - ---- - -###### `segment`Required - -- *Type:* string - ---- - -###### `subnetName`Required - -- *Type:* string - ---- - diff --git a/package-lock.json b/package-lock.json index ade0f1d..c912c7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "bundleDependencies": [ "@aws-sdk/client-cost-explorer", "@aws-sdk/client-identitystore", - "@aws-sdk/client-ssm", "@aws-sdk/client-sso-admin", "@aws-sdk/client-sts", "@aws-sdk/credential-providers", @@ -22,7 +21,6 @@ "dependencies": { "@aws-sdk/client-cost-explorer": "^3.650.0", "@aws-sdk/client-identitystore": "^3.654.0", - "@aws-sdk/client-ssm": "^3.679.0", "@aws-sdk/client-sso-admin": "^3.654.0", "@aws-sdk/client-sts": "^3.679.0", "@aws-sdk/credential-providers": "^3.650.0", @@ -983,523 +981,6 @@ } } }, - "node_modules/@aws-sdk/client-ssm": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.679.0.tgz", - "integrity": "sha512-wmKpnb1iIfa/c/8EaYtQg/inPMEZ3Y67/RFQsm2nenFuq2UkCUj/kS4l0F84cBHfZALNIw9d1SVIqOjEfrIC8A==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/client-sso-oidc": "3.679.0", - "@aws-sdk/client-sts": "3.679.0", - "@aws-sdk/core": "3.679.0", - "@aws-sdk/credential-provider-node": "3.679.0", - "@aws-sdk/middleware-host-header": "3.679.0", - "@aws-sdk/middleware-logger": "3.679.0", - "@aws-sdk/middleware-recursion-detection": "3.679.0", - "@aws-sdk/middleware-user-agent": "3.679.0", - "@aws-sdk/region-config-resolver": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@aws-sdk/util-endpoints": "3.679.0", - "@aws-sdk/util-user-agent-browser": "3.679.0", - "@aws-sdk/util-user-agent-node": "3.679.0", - "@smithy/config-resolver": "^3.0.9", - "@smithy/core": "^2.4.8", - "@smithy/fetch-http-handler": "^3.2.9", - "@smithy/hash-node": "^3.0.7", - "@smithy/invalid-dependency": "^3.0.7", - "@smithy/middleware-content-length": "^3.0.9", - "@smithy/middleware-endpoint": "^3.1.4", - "@smithy/middleware-retry": "^3.0.23", - "@smithy/middleware-serde": "^3.0.7", - "@smithy/middleware-stack": "^3.0.7", - "@smithy/node-config-provider": "^3.1.8", - "@smithy/node-http-handler": "^3.2.4", - "@smithy/protocol-http": "^4.1.4", - "@smithy/smithy-client": "^3.4.0", - "@smithy/types": "^3.5.0", - "@smithy/url-parser": "^3.0.7", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.23", - "@smithy/util-defaults-mode-node": "^3.0.23", - "@smithy/util-endpoints": "^2.1.3", - "@smithy/util-middleware": "^3.0.7", - "@smithy/util-retry": "^3.0.7", - "@smithy/util-utf8": "^3.0.0", - "@smithy/util-waiter": "^3.1.6", - "@types/uuid": "^9.0.1", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/client-sso": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.679.0.tgz", - "integrity": "sha512-/0cAvYnpOZTo/Y961F1kx2fhDDLUYZ0SQQ5/75gh3xVImLj7Zw+vp74ieqFbqWLYGMaq8z1Arr9A8zG95mbLdg==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.679.0", - "@aws-sdk/middleware-host-header": "3.679.0", - "@aws-sdk/middleware-logger": "3.679.0", - "@aws-sdk/middleware-recursion-detection": "3.679.0", - "@aws-sdk/middleware-user-agent": "3.679.0", - "@aws-sdk/region-config-resolver": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@aws-sdk/util-endpoints": "3.679.0", - "@aws-sdk/util-user-agent-browser": "3.679.0", - "@aws-sdk/util-user-agent-node": "3.679.0", - "@smithy/config-resolver": "^3.0.9", - "@smithy/core": "^2.4.8", - "@smithy/fetch-http-handler": "^3.2.9", - "@smithy/hash-node": "^3.0.7", - "@smithy/invalid-dependency": "^3.0.7", - "@smithy/middleware-content-length": "^3.0.9", - "@smithy/middleware-endpoint": "^3.1.4", - "@smithy/middleware-retry": "^3.0.23", - "@smithy/middleware-serde": "^3.0.7", - "@smithy/middleware-stack": "^3.0.7", - "@smithy/node-config-provider": "^3.1.8", - "@smithy/node-http-handler": "^3.2.4", - "@smithy/protocol-http": "^4.1.4", - "@smithy/smithy-client": "^3.4.0", - "@smithy/types": "^3.5.0", - "@smithy/url-parser": "^3.0.7", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.23", - "@smithy/util-defaults-mode-node": "^3.0.23", - "@smithy/util-endpoints": "^2.1.3", - "@smithy/util-middleware": "^3.0.7", - "@smithy/util-retry": "^3.0.7", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.679.0.tgz", - "integrity": "sha512-/dBYWcCwbA/id4sFCIVZvf0UsvzHCC68SryxeNQk/PDkY9N4n5yRcMUkZDaEyQCjowc3kY4JOXp2AdUP037nhA==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.679.0", - "@aws-sdk/credential-provider-node": "3.679.0", - "@aws-sdk/middleware-host-header": "3.679.0", - "@aws-sdk/middleware-logger": "3.679.0", - "@aws-sdk/middleware-recursion-detection": "3.679.0", - "@aws-sdk/middleware-user-agent": "3.679.0", - "@aws-sdk/region-config-resolver": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@aws-sdk/util-endpoints": "3.679.0", - "@aws-sdk/util-user-agent-browser": "3.679.0", - "@aws-sdk/util-user-agent-node": "3.679.0", - "@smithy/config-resolver": "^3.0.9", - "@smithy/core": "^2.4.8", - "@smithy/fetch-http-handler": "^3.2.9", - "@smithy/hash-node": "^3.0.7", - "@smithy/invalid-dependency": "^3.0.7", - "@smithy/middleware-content-length": "^3.0.9", - "@smithy/middleware-endpoint": "^3.1.4", - "@smithy/middleware-retry": "^3.0.23", - "@smithy/middleware-serde": "^3.0.7", - "@smithy/middleware-stack": "^3.0.7", - "@smithy/node-config-provider": "^3.1.8", - "@smithy/node-http-handler": "^3.2.4", - "@smithy/protocol-http": "^4.1.4", - "@smithy/smithy-client": "^3.4.0", - "@smithy/types": "^3.5.0", - "@smithy/url-parser": "^3.0.7", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.23", - "@smithy/util-defaults-mode-node": "^3.0.23", - "@smithy/util-endpoints": "^2.1.3", - "@smithy/util-middleware": "^3.0.7", - "@smithy/util-retry": "^3.0.7", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-sts": "^3.679.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/core": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.679.0.tgz", - "integrity": "sha512-CS6PWGX8l4v/xyvX8RtXnBisdCa5+URzKd0L6GvHChype9qKUVxO/Gg6N/y43Hvg7MNWJt9FBPNWIxUB+byJwg==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.679.0", - "@smithy/core": "^2.4.8", - "@smithy/node-config-provider": "^3.1.8", - "@smithy/property-provider": "^3.1.7", - "@smithy/protocol-http": "^4.1.4", - "@smithy/signature-v4": "^4.2.0", - "@smithy/smithy-client": "^3.4.0", - "@smithy/types": "^3.5.0", - "@smithy/util-middleware": "^3.0.7", - "fast-xml-parser": "4.4.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.679.0.tgz", - "integrity": "sha512-EdlTYbzMm3G7VUNAMxr9S1nC1qUNqhKlAxFU8E7cKsAe8Bp29CD5HAs3POc56AVo9GC4yRIS+/mtlZSmrckzUA==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@smithy/property-provider": "^3.1.7", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-http": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.679.0.tgz", - "integrity": "sha512-ZoKLubW5DqqV1/2a3TSn+9sSKg0T8SsYMt1JeirnuLJF0mCoYFUaWMyvxxKuxPoqvUsaycxKru4GkpJ10ltNBw==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@smithy/fetch-http-handler": "^3.2.9", - "@smithy/node-http-handler": "^3.2.4", - "@smithy/property-provider": "^3.1.7", - "@smithy/protocol-http": "^4.1.4", - "@smithy/smithy-client": "^3.4.0", - "@smithy/types": "^3.5.0", - "@smithy/util-stream": "^3.1.9", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.679.0.tgz", - "integrity": "sha512-Rg7t8RwUzKcumpipG4neZqaeJ6DF+Bco1+FHn5BZB68jpvwvjBjcQUuWkxj18B6ctYHr1fkunnzeKEn/+vy7+w==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.679.0", - "@aws-sdk/credential-provider-env": "3.679.0", - "@aws-sdk/credential-provider-http": "3.679.0", - "@aws-sdk/credential-provider-process": "3.679.0", - "@aws-sdk/credential-provider-sso": "3.679.0", - "@aws-sdk/credential-provider-web-identity": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@smithy/credential-provider-imds": "^3.2.4", - "@smithy/property-provider": "^3.1.7", - "@smithy/shared-ini-file-loader": "^3.1.8", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-sts": "^3.679.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.679.0.tgz", - "integrity": "sha512-E3lBtaqCte8tWs6Rkssc8sLzvGoJ10TLGvpkijOlz43wPd6xCRh1YLwg6zolf9fVFtEyUs/GsgymiASOyxhFtw==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.679.0", - "@aws-sdk/credential-provider-http": "3.679.0", - "@aws-sdk/credential-provider-ini": "3.679.0", - "@aws-sdk/credential-provider-process": "3.679.0", - "@aws-sdk/credential-provider-sso": "3.679.0", - "@aws-sdk/credential-provider-web-identity": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@smithy/credential-provider-imds": "^3.2.4", - "@smithy/property-provider": "^3.1.7", - "@smithy/shared-ini-file-loader": "^3.1.8", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.679.0.tgz", - "integrity": "sha512-u/p4TV8kQ0zJWDdZD4+vdQFTMhkDEJFws040Gm113VHa/Xo1SYOjbpvqeuFoz6VmM0bLvoOWjxB9MxnSQbwKpQ==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@smithy/property-provider": "^3.1.7", - "@smithy/shared-ini-file-loader": "^3.1.8", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.679.0.tgz", - "integrity": "sha512-SAtWonhi9asxn0ukEbcE81jkyanKgqpsrtskvYPpO9Z9KOednM4Cqt6h1bfcS9zaHjN2zu815Gv8O7WiV+F/DQ==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso": "3.679.0", - "@aws-sdk/core": "3.679.0", - "@aws-sdk/token-providers": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@smithy/property-provider": "^3.1.7", - "@smithy/shared-ini-file-loader": "^3.1.8", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.679.0.tgz", - "integrity": "sha512-a74tLccVznXCaBefWPSysUcLXYJiSkeUmQGtalNgJ1vGkE36W5l/8czFiiowdWdKWz7+x6xf0w+Kjkjlj42Ung==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@smithy/property-provider": "^3.1.7", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-sts": "^3.679.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.679.0.tgz", - "integrity": "sha512-y176HuQ8JRY3hGX8rQzHDSbCl9P5Ny9l16z4xmaiLo+Qfte7ee4Yr3yaAKd7GFoJ3/Mhud2XZ37fR015MfYl2w==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.679.0", - "@smithy/protocol-http": "^4.1.4", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/middleware-logger": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.679.0.tgz", - "integrity": "sha512-0vet8InEj7nvIvGKk+ch7bEF5SyZ7Us9U7YTEgXPrBNStKeRUsgwRm0ijPWWd0a3oz2okaEwXsFl7G/vI0XiEA==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.679.0", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.679.0.tgz", - "integrity": "sha512-sQoAZFsQiW/LL3DfKMYwBoGjYDEnMbA9WslWN8xneCmBAwKo6IcSksvYs23PP8XMIoBGe2I2J9BSr654XWygTQ==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.679.0", - "@smithy/protocol-http": "^4.1.4", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.679.0.tgz", - "integrity": "sha512-4hdeXhPDURPqQLPd9jCpUEo9fQITXl3NM3W1MwcJpE0gdUM36uXkQOYsTPeeU/IRCLVjK8Htlh2oCaM9iJrLCA==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@aws-sdk/util-endpoints": "3.679.0", - "@smithy/core": "^2.4.8", - "@smithy/protocol-http": "^4.1.4", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/region-config-resolver": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.679.0.tgz", - "integrity": "sha512-Ybx54P8Tg6KKq5ck7uwdjiKif7n/8g1x+V0V9uTjBjRWqaIgiqzXwKWoPj6NCNkE7tJNtqI4JrNxp/3S3HvmRw==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.679.0", - "@smithy/node-config-provider": "^3.1.8", - "@smithy/types": "^3.5.0", - "@smithy/util-config-provider": "^3.0.0", - "@smithy/util-middleware": "^3.0.7", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/token-providers": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.679.0.tgz", - "integrity": "sha512-1/+Zso/x2jqgutKixYFQEGli0FELTgah6bm7aB+m2FAWH4Hz7+iMUsazg6nSWm714sG9G3h5u42Dmpvi9X6/hA==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.679.0", - "@smithy/property-provider": "^3.1.7", - "@smithy/shared-ini-file-loader": "^3.1.8", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-sso-oidc": "^3.679.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/types": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.679.0.tgz", - "integrity": "sha512-NwVq8YvInxQdJ47+zz4fH3BRRLC6lL+WLkvr242PVBbUOLRyK/lkwHlfiKUoeVIMyK5NF+up6TRg71t/8Bny6Q==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/util-endpoints": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.679.0.tgz", - "integrity": "sha512-YL6s4Y/1zC45OvddvgE139fjeWSKKPgLlnfrvhVL7alNyY9n7beR4uhoDpNrt5mI6sn9qiBF17790o+xLAXjjg==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.679.0", - "@smithy/types": "^3.5.0", - "@smithy/util-endpoints": "^2.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.679.0.tgz", - "integrity": "sha512-CusSm2bTBG1kFypcsqU8COhnYc6zltobsqs3nRrvYqYaOqtMnuE46K4XTWpnzKgwDejgZGOE+WYyprtAxrPvmQ==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.679.0", - "@smithy/types": "^3.5.0", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.679.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.679.0.tgz", - "integrity": "sha512-Bw4uXZ+NU5ed6TNfo4tBbhBSW+2eQxXYjYBGl5gLUNUpg2pDFToQAP6rXBFiwcG52V2ny5oLGiD82SoYuYkAVg==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-user-agent": "3.679.0", - "@aws-sdk/types": "3.679.0", - "@smithy/node-config-provider": "^3.1.8", - "@smithy/types": "^3.5.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "aws-crt": ">=1.0.0" - }, - "peerDependenciesMeta": { - "aws-crt": { - "optional": true - } - } - }, - "node_modules/@aws-sdk/client-ssm/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "inBundle": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@aws-sdk/client-sso": { "version": "3.650.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.650.0.tgz", @@ -5428,21 +4909,6 @@ "node": ">=16.0.0" } }, - "node_modules/@smithy/util-waiter": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-3.1.7.tgz", - "integrity": "sha512-d5yGlQtmN/z5eoTtIYgkvOw27US2Ous4VycnXatyoImIF9tzlcpnKqQ/V7qhvJmb2p6xZne1NopCLakdTnkBBQ==", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^3.1.6", - "@smithy/types": "^3.6.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/@tsconfig/node10": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.10.tgz", @@ -5602,13 +5068,6 @@ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, - "node_modules/@types/uuid": { - "version": "9.0.8", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", - "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", - "inBundle": true, - "license": "MIT" - }, "node_modules/@types/yargs": { "version": "17.0.32", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", diff --git a/package.json b/package.json index 654c229..3c65722 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,6 @@ "dependencies": { "@aws-sdk/client-cost-explorer": "^3.650.0", "@aws-sdk/client-identitystore": "^3.654.0", - "@aws-sdk/client-ssm": "^3.679.0", "@aws-sdk/client-sso-admin": "^3.654.0", "@aws-sdk/client-sts": "^3.679.0", "@aws-sdk/credential-providers": "^3.650.0", @@ -84,7 +83,6 @@ "bundledDependencies": [ "@aws-sdk/client-cost-explorer", "@aws-sdk/client-identitystore", - "@aws-sdk/client-ssm", "@aws-sdk/client-sso-admin", "@aws-sdk/client-sts", "@aws-sdk/credential-providers", diff --git a/src/data-landing-zone-client.ts b/src/data-landing-zone-client.ts index e165d37..15cdd87 100644 --- a/src/data-landing-zone-client.ts +++ b/src/data-landing-zone-client.ts @@ -1,83 +1,25 @@ -import { SSMClient, GetParameterCommand } from '@aws-sdk/client-ssm'; -import { AssumeRoleCommand, STSClient, Credentials } from '@aws-sdk/client-sts'; +import { Construct } from 'constructs'; +import { DlzSsmReader } from './constructs/dlz-ssm-reader'; import { NetworkAddress } from './constructs/dlz-vpc/network-address'; -import { DynamicConstants, SSM_PARAMETERS_DLZ, SSM_PARAMETER_DLZ_PREFIX } from './stacks/organization/constants'; +import { SSM_PARAMETERS_DLZ, SSM_PARAMETER_DLZ_PREFIX } from './stacks/organization/constants'; /* * This class is used to fetch parameters from the SSM Parameter Store and uses the AWS SDK to assume the role */ export class DataLandingZoneClient { - constructor(private accountId: string, private accountName: string, private region: string) { + constructor(private scope: Construct, private accountId: string, private accountName: string, private region: string) { } - /* - * Assumes the role and returns the credentials - * @param roleArn - The ARN of the role to assume - * @returns - The credentials of the role - */ - private async assumeRole(roleArn: string): Promise { - try { - const stsClient = new STSClient({ region: this.region }); - const command = new AssumeRoleCommand({ - RoleArn: roleArn, - RoleSessionName: 'AssumeRoleSession', - }); - - const response = await stsClient.send(command); - return response.Credentials; - } catch (error) { - console.error('Error assuming role:', error); - return undefined; - } - } - - /* - * Fetches the parameter from the SSM Parameter Store and returns the value - * @param parameterName - The name of the parameter to fetch - * @param roleArn - The ARN of the role to assume - * @returns - The value of the parameter - */ - private async getSSMParameter(parameterName: string, roleArn: string): Promise { - const credentials = await this.assumeRole(roleArn); - if (!credentials) { - console.error('Failed to assume role.'); - return undefined; - } - - const ssmClient = new SSMClient({ - region: this.region, - credentials: { - accessKeyId: credentials.AccessKeyId!, - secretAccessKey: credentials.SecretAccessKey!, - sessionToken: credentials.SessionToken!, - }, - }); - - try { - const command = new GetParameterCommand({ - Name: parameterName, - WithDecryption: true, - }); - - const response = await ssmClient.send(command); - return response.Parameter?.Value; - } catch (error) { - console.error('Error fetching parameter:', error); - return undefined; - } - } /* - * Fetches the parameter from the SSM Parameter Store and returns the value - * @param parameterName - The name of the parameter to fetch - * @param errorMessage - The error message to throw if the parameter is not found - * @returns - The value of the parameter - */ - private async getParameter(parameterName: string, errorMessage: string): Promise { - const dynamicProps = new DynamicConstants(); - const assumeRoleArn = dynamicProps.getSsmAssumeCrossAccountRoleArn(this.accountId); - const value = await this.getSSMParameter(parameterName, assumeRoleArn) as string; + * Fetches the parameter from the SSM Parameter Store and returns the value + * @param parameterName - The name of the parameter to fetch + * @param errorMessage - The error message to throw if the parameter is not found + * @returns - The value of the parameter + */ + private getParameter(parameterName: string, errorMessage: string): string { + const value = DlzSsmReader.getValue(this.scope, `data-landing-zone-client-${parameterName}`, this.accountId, this.region, parameterName) as string; if (!value) { throw new Error(errorMessage); } @@ -85,12 +27,12 @@ export class DataLandingZoneClient { } /* - * Fetches the bastion security group ID from the SSM Parameter Store - * @param bastionName - The name of the bastion to fetch the security group ID for - * @returns - The security group ID of the bastion - * @throws - An error if the parameter is not found - */ - public async getBastionSecurityGroupId(bastionName?: string): Promise { + * Fetches the bastion security group ID from the SSM Parameter Store + * @param bastionName - The name of the bastion to fetch the security group ID for + * @returns - The security group ID of the bastion + * @throws - An error if the parameter is not found + */ + public getBastionSecurityGroupId(bastionName?: string): string { bastionName = bastionName ?? 'default'; return this.getParameter( @@ -99,12 +41,12 @@ export class DataLandingZoneClient { } /* - * Fetches the VPC ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the ID for - * @returns - The ID of the VPC - * @throws - An error if the parameter is not found - */ - public async getVpcId(vpcName: string): Promise { + * Fetches the VPC ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the ID for + * @returns - The ID of the VPC + * @throws - An error if the parameter is not found + */ + public getVpcId(vpcName: string): string { const vpcAddress = new NetworkAddress(this.accountName, this.region, vpcName); return this.getParameter( `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${vpcAddress}/id`, @@ -112,13 +54,13 @@ export class DataLandingZoneClient { } /* - * Fetches the route table ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the route table ID for - * @param segment - The segment of the VPC to fetch the route table ID for - * @returns - The ID of the route table - * @throws - An error if the parameter is not found - */ - public async routeTableId(vpcName: string, segment: string): Promise { + * Fetches the route table ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the route table ID for + * @param segment - The segment of the VPC to fetch the route table ID for + * @returns - The ID of the route table + * @throws - An error if the parameter is not found + */ + public routeTableId(vpcName: string, segment: string): string { const routeTableAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment); return this.getParameter( `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${routeTableAddress}/id`, @@ -126,14 +68,14 @@ export class DataLandingZoneClient { } /* - * Fetches the subnet ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the subnet ID for - * @param segment - The segment of the VPC to fetch the subnet ID for - * @param subnetName - The name of the subnet to fetch the ID for - * @returns - The ID of the subnet - * @throws - An error if the parameter is not found - */ - public async subnetId(vpcName: string, segment: string, subnetName: string): Promise { + * Fetches the subnet ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the subnet ID for + * @param segment - The segment of the VPC to fetch the subnet ID for + * @param subnetName - The name of the subnet to fetch the ID for + * @returns - The ID of the subnet + * @throws - An error if the parameter is not found + */ + public getSubnetId(vpcName: string, segment: string, subnetName: string): string { const subnetAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment, subnetName); return this.getParameter( `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${subnetAddress}/id`, @@ -141,22 +83,22 @@ export class DataLandingZoneClient { } /* - * Fetches the notification topic ARN from the SSM Parameter Store - * @returns - The ARN of the notification topic - * @throws - An error if the parameter is not found - */ - public async notificationTopicArn(): Promise { + * Fetches the notification topic ARN from the SSM Parameter Store + * @returns - The ARN of the notification topic + * @throws - An error if the parameter is not found + */ + public notificationTopicArn(): string { return this.getParameter( `${SSM_PARAMETER_DLZ_PREFIX}/sns/default-notification/arn`, 'Failed to get ARN for default notification topic'); } /* - * Fetches the permissions boundary ARN from the SSM Parameter Store - * @returns - The ARN of the permissions boundary - * @throws - An error if the parameter is not found - */ - public async permissionsBoundaryArn(): Promise { + * Fetches the permissions boundary ARN from the SSM Parameter Store + * @returns - The ARN of the permissions boundary + * @throws - An error if the parameter is not found + */ + public permissionsBoundaryArn(): string { return this.getParameter( `${SSM_PARAMETER_DLZ_PREFIX}/iam/permission-boundary-policy/arn`, 'Failed to get ARN for IAM permission boundary policy'); diff --git a/src/data-landing-zone.ts b/src/data-landing-zone.ts index 870faee..950fea4 100644 --- a/src/data-landing-zone.ts +++ b/src/data-landing-zone.ts @@ -795,7 +795,7 @@ export class DataLandingZone { const accountId = allAccountIds.get(accountName)!; const regionName = region.toString(); - return new DataLandingZoneClient(accountId, accountName, regionName); + return new DataLandingZoneClient(this.managementStack, accountId, accountName, regionName); } private stageLog() { diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 85f8bb8..443390f 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", + "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From 8873792133453d34db62c9afb51ce07f31a35159 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 28 Oct 2024 14:25:07 +0000 Subject: [PATCH 07/15] chore: self mutation Signed-off-by: github-actions --- test/__snapshots__/build.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 443390f..85f8bb8 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", + "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From 3234aafc8c94ca6524334841832661a69f4b10ae Mon Sep 17 00:00:00 2001 From: Warrenn Enslin Date: Mon, 28 Oct 2024 16:51:30 +0200 Subject: [PATCH 08/15] using ssm to lookup existing parameters --- API.md | 9 +-- src/data-landing-zone-client.ts | 82 +++++++++++++-------------- src/data-landing-zone.ts | 14 +---- test/__snapshots__/build.test.ts.snap | 2 +- 4 files changed, 44 insertions(+), 63 deletions(-) diff --git a/API.md b/API.md index 7ce0ba6..04ee1cd 100644 --- a/API.md +++ b/API.md @@ -16077,13 +16077,12 @@ public readonly workloadRegionalStacks: WorkloadRegionalStack[]; ```typescript import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' -new DataLandingZoneClient(scope: Construct, accountId: string, accountName: string, region: string) +new DataLandingZoneClient(scope: Construct, accountName: string, region: string) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | | scope | constructs.Construct | *No description.* | -| accountId | string | *No description.* | | accountName | string | *No description.* | | region | string | *No description.* | @@ -16095,12 +16094,6 @@ new DataLandingZoneClient(scope: Construct, accountId: string, accountName: stri --- -##### `accountId`Required - -- *Type:* string - ---- - ##### `accountName`Required - *Type:* string diff --git a/src/data-landing-zone-client.ts b/src/data-landing-zone-client.ts index 15cdd87..cf0c6e9 100644 --- a/src/data-landing-zone-client.ts +++ b/src/data-landing-zone-client.ts @@ -1,5 +1,5 @@ +import * as ssm from 'aws-cdk-lib/aws-ssm'; import { Construct } from 'constructs'; -import { DlzSsmReader } from './constructs/dlz-ssm-reader'; import { NetworkAddress } from './constructs/dlz-vpc/network-address'; import { SSM_PARAMETERS_DLZ, SSM_PARAMETER_DLZ_PREFIX } from './stacks/organization/constants'; @@ -8,30 +8,30 @@ import { SSM_PARAMETERS_DLZ, SSM_PARAMETER_DLZ_PREFIX } from './stacks/organizat */ export class DataLandingZoneClient { - constructor(private scope: Construct, private accountId: string, private accountName: string, private region: string) { + constructor(private scope: Construct, private accountName: string, private region: string) { } /* - * Fetches the parameter from the SSM Parameter Store and returns the value - * @param parameterName - The name of the parameter to fetch - * @param errorMessage - The error message to throw if the parameter is not found - * @returns - The value of the parameter - */ + * Fetches the parameter from the SSM Parameter Store and returns the value + * @param parameterName - The name of the parameter to fetch + * @param errorMessage - The error message to throw if the parameter is not found + * @returns - The value of the parameter + */ private getParameter(parameterName: string, errorMessage: string): string { - const value = DlzSsmReader.getValue(this.scope, `data-landing-zone-client-${parameterName}`, this.accountId, this.region, parameterName) as string; - if (!value) { + const parameter = ssm.StringParameter.fromStringParameterName(this.scope, `data-landing-zone-client-${parameterName}`, parameterName); + if (!parameter || !parameter.stringValue) { throw new Error(errorMessage); } - return value; + return parameter.stringValue; } /* - * Fetches the bastion security group ID from the SSM Parameter Store - * @param bastionName - The name of the bastion to fetch the security group ID for - * @returns - The security group ID of the bastion - * @throws - An error if the parameter is not found - */ + * Fetches the bastion security group ID from the SSM Parameter Store + * @param bastionName - The name of the bastion to fetch the security group ID for + * @returns - The security group ID of the bastion + * @throws - An error if the parameter is not found + */ public getBastionSecurityGroupId(bastionName?: string): string { bastionName = bastionName ?? 'default'; @@ -41,11 +41,11 @@ export class DataLandingZoneClient { } /* - * Fetches the VPC ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the ID for - * @returns - The ID of the VPC - * @throws - An error if the parameter is not found - */ + * Fetches the VPC ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the ID for + * @returns - The ID of the VPC + * @throws - An error if the parameter is not found + */ public getVpcId(vpcName: string): string { const vpcAddress = new NetworkAddress(this.accountName, this.region, vpcName); return this.getParameter( @@ -54,12 +54,12 @@ export class DataLandingZoneClient { } /* - * Fetches the route table ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the route table ID for - * @param segment - The segment of the VPC to fetch the route table ID for - * @returns - The ID of the route table - * @throws - An error if the parameter is not found - */ + * Fetches the route table ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the route table ID for + * @param segment - The segment of the VPC to fetch the route table ID for + * @returns - The ID of the route table + * @throws - An error if the parameter is not found + */ public routeTableId(vpcName: string, segment: string): string { const routeTableAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment); return this.getParameter( @@ -68,13 +68,13 @@ export class DataLandingZoneClient { } /* - * Fetches the subnet ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the subnet ID for - * @param segment - The segment of the VPC to fetch the subnet ID for - * @param subnetName - The name of the subnet to fetch the ID for - * @returns - The ID of the subnet - * @throws - An error if the parameter is not found - */ + * Fetches the subnet ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the subnet ID for + * @param segment - The segment of the VPC to fetch the subnet ID for + * @param subnetName - The name of the subnet to fetch the ID for + * @returns - The ID of the subnet + * @throws - An error if the parameter is not found + */ public getSubnetId(vpcName: string, segment: string, subnetName: string): string { const subnetAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment, subnetName); return this.getParameter( @@ -83,10 +83,10 @@ export class DataLandingZoneClient { } /* - * Fetches the notification topic ARN from the SSM Parameter Store - * @returns - The ARN of the notification topic - * @throws - An error if the parameter is not found - */ + * Fetches the notification topic ARN from the SSM Parameter Store + * @returns - The ARN of the notification topic + * @throws - An error if the parameter is not found + */ public notificationTopicArn(): string { return this.getParameter( `${SSM_PARAMETER_DLZ_PREFIX}/sns/default-notification/arn`, @@ -94,10 +94,10 @@ export class DataLandingZoneClient { } /* - * Fetches the permissions boundary ARN from the SSM Parameter Store - * @returns - The ARN of the permissions boundary - * @throws - An error if the parameter is not found - */ + * Fetches the permissions boundary ARN from the SSM Parameter Store + * @returns - The ARN of the permissions boundary + * @throws - An error if the parameter is not found + */ public permissionsBoundaryArn(): string { return this.getParameter( `${SSM_PARAMETER_DLZ_PREFIX}/iam/permission-boundary-policy/arn`, diff --git a/src/data-landing-zone.ts b/src/data-landing-zone.ts index 950fea4..c88a789 100644 --- a/src/data-landing-zone.ts +++ b/src/data-landing-zone.ts @@ -781,21 +781,9 @@ export class DataLandingZone { }; importFrom(accountName: string, region: Region): DataLandingZoneClient { - const allAccountIds = new Map(); - allAccountIds.set('root', this.props.organization.root.accounts.management.accountId); - allAccountIds.set('log', this.props.organization.ous.security.accounts.log.accountId); - allAccountIds.set('audit', this.props.organization.ous.security.accounts.audit.accountId); - for (const account of this.props.organization.ous.workloads.accounts) { - allAccountIds.set(account.name, account.accountId); - } - - if (!allAccountIds.has(accountName)) { - throw new Error(`Account ${accountName} not found`); - } - const accountId = allAccountIds.get(accountName)!; const regionName = region.toString(); - return new DataLandingZoneClient(this.managementStack, accountId, accountName, regionName); + return new DataLandingZoneClient(this.app, accountName, regionName); } private stageLog() { diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 85f8bb8..443390f 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", + "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From 63ad6d8d22b6e017fb709a06bfed9b575e0379e8 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 28 Oct 2024 14:58:20 +0000 Subject: [PATCH 09/15] chore: self mutation Signed-off-by: github-actions --- test/__snapshots__/build.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 443390f..85f8bb8 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", + "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From 02e47da7a36788a057a2556742a0497f2057c39e Mon Sep 17 00:00:00 2001 From: Warrenn Enslin Date: Mon, 28 Oct 2024 16:59:58 +0200 Subject: [PATCH 10/15] using ssm to lookup existing parameters --- .../ssm-parameters-glossary.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md b/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md index 57cc6c3..90de3e2 100644 --- a/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md +++ b/docs/rough-docs/ssm-parameters-glossary/ssm-parameters-glossary.md @@ -2,7 +2,7 @@ ## `/dlz/networking-entity/bastion/${bastion.name}/security-group/id` -### Scope: External +**Scope:** External The security group ID of the bastion host [link](../bastion-hosts/bastion-hosts.md). @@ -12,7 +12,7 @@ The security group ID of the bastion host [link](../bastion-hosts/bastion-hosts. ## `/dlz/networking-entity/vpc/${vpcAddress}/id` -### Scope: External +**Scope:** External The VPC ID of the VPC. @@ -22,7 +22,7 @@ The VPC ID of the VPC. ## `/dlz/networking-entity/vpc/${routeTableAddress}/id` -### Scope: External +**Scope:** External The route table ID of the route table. @@ -32,7 +32,7 @@ The route table ID of the route table. ## `/dlz/networking-entity/vpc/${subnetAddress}/id` -### Scope: External +**Scope:** External The subnet ID of the subnet. @@ -42,7 +42,7 @@ The subnet ID of the subnet. ## `/dlz/sns/default-notification/arn` -### Scope: External +**Scope:** External The ARN of the default notification topic. @@ -50,7 +50,7 @@ The ARN of the default notification topic. ## `/dlz/iam/permission-boundary-policy/arn` -### Scope: External +**Scope:** External The ARN of the permission boundary policy. @@ -58,7 +58,7 @@ The ARN of the permission boundary policy. ## `/dlz/networking/vpc-peering-role-arn--${vpcPeeringRolesKey}` -### Scope: Internal +**Scope:** Internal The ARN of the VPC peering role. @@ -68,7 +68,7 @@ The ARN of the VPC peering role. ## `/dlz/networking-entity/vpc/${fromVpc.address}/peer/${toVpc.address}/id` -### Scope: Internal +**Scope:** Internal The ID of the VPC peering connection. From e564862049a843b21e8f3a60803390a310e3b4c4 Mon Sep 17 00:00:00 2001 From: Warrenn Enslin Date: Mon, 28 Oct 2024 17:05:00 +0200 Subject: [PATCH 11/15] using ssm to lookup existing parameters --- src/data-landing-zone-client.ts | 78 +++++++++++++-------------- test/__snapshots__/build.test.ts.snap | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/data-landing-zone-client.ts b/src/data-landing-zone-client.ts index cf0c6e9..f3676e7 100644 --- a/src/data-landing-zone-client.ts +++ b/src/data-landing-zone-client.ts @@ -13,25 +13,25 @@ export class DataLandingZoneClient { /* - * Fetches the parameter from the SSM Parameter Store and returns the value - * @param parameterName - The name of the parameter to fetch - * @param errorMessage - The error message to throw if the parameter is not found - * @returns - The value of the parameter - */ + * Fetches the parameter from the SSM Parameter Store and returns the value + * @param parameterName - The name of the parameter to fetch + * @param errorMessage - The error message to throw if the parameter is not found + * @returns - The value of the parameter + */ private getParameter(parameterName: string, errorMessage: string): string { - const parameter = ssm.StringParameter.fromStringParameterName(this.scope, `data-landing-zone-client-${parameterName}`, parameterName); - if (!parameter || !parameter.stringValue) { + const value = ssm.StringParameter.valueFromLookup(this.scope, parameterName); + if (!value) { throw new Error(errorMessage); } - return parameter.stringValue; + return value; } /* - * Fetches the bastion security group ID from the SSM Parameter Store - * @param bastionName - The name of the bastion to fetch the security group ID for - * @returns - The security group ID of the bastion - * @throws - An error if the parameter is not found - */ + * Fetches the bastion security group ID from the SSM Parameter Store + * @param bastionName - The name of the bastion to fetch the security group ID for + * @returns - The security group ID of the bastion + * @throws - An error if the parameter is not found + */ public getBastionSecurityGroupId(bastionName?: string): string { bastionName = bastionName ?? 'default'; @@ -41,11 +41,11 @@ export class DataLandingZoneClient { } /* - * Fetches the VPC ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the ID for - * @returns - The ID of the VPC - * @throws - An error if the parameter is not found - */ + * Fetches the VPC ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the ID for + * @returns - The ID of the VPC + * @throws - An error if the parameter is not found + */ public getVpcId(vpcName: string): string { const vpcAddress = new NetworkAddress(this.accountName, this.region, vpcName); return this.getParameter( @@ -54,12 +54,12 @@ export class DataLandingZoneClient { } /* - * Fetches the route table ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the route table ID for - * @param segment - The segment of the VPC to fetch the route table ID for - * @returns - The ID of the route table - * @throws - An error if the parameter is not found - */ + * Fetches the route table ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the route table ID for + * @param segment - The segment of the VPC to fetch the route table ID for + * @returns - The ID of the route table + * @throws - An error if the parameter is not found + */ public routeTableId(vpcName: string, segment: string): string { const routeTableAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment); return this.getParameter( @@ -68,13 +68,13 @@ export class DataLandingZoneClient { } /* - * Fetches the subnet ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the subnet ID for - * @param segment - The segment of the VPC to fetch the subnet ID for - * @param subnetName - The name of the subnet to fetch the ID for - * @returns - The ID of the subnet - * @throws - An error if the parameter is not found - */ + * Fetches the subnet ID from the SSM Parameter Store + * @param vpcName - The name of the VPC to fetch the subnet ID for + * @param segment - The segment of the VPC to fetch the subnet ID for + * @param subnetName - The name of the subnet to fetch the ID for + * @returns - The ID of the subnet + * @throws - An error if the parameter is not found + */ public getSubnetId(vpcName: string, segment: string, subnetName: string): string { const subnetAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment, subnetName); return this.getParameter( @@ -83,10 +83,10 @@ export class DataLandingZoneClient { } /* - * Fetches the notification topic ARN from the SSM Parameter Store - * @returns - The ARN of the notification topic - * @throws - An error if the parameter is not found - */ + * Fetches the notification topic ARN from the SSM Parameter Store + * @returns - The ARN of the notification topic + * @throws - An error if the parameter is not found + */ public notificationTopicArn(): string { return this.getParameter( `${SSM_PARAMETER_DLZ_PREFIX}/sns/default-notification/arn`, @@ -94,10 +94,10 @@ export class DataLandingZoneClient { } /* - * Fetches the permissions boundary ARN from the SSM Parameter Store - * @returns - The ARN of the permissions boundary - * @throws - An error if the parameter is not found - */ + * Fetches the permissions boundary ARN from the SSM Parameter Store + * @returns - The ARN of the permissions boundary + * @throws - An error if the parameter is not found + */ public permissionsBoundaryArn(): string { return this.getParameter( `${SSM_PARAMETER_DLZ_PREFIX}/iam/permission-boundary-policy/arn`, diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 85f8bb8..443390f 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", + "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From c161ea16d90ab63efc0b4d16b49b2658d29d437e Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 28 Oct 2024 15:09:21 +0000 Subject: [PATCH 12/15] chore: self mutation Signed-off-by: github-actions --- test/__snapshots__/build.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 443390f..85f8bb8 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", + "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From d3a23010a933f17d980301da1eb85e2bb930c04b Mon Sep 17 00:00:00 2001 From: Warrenn Enslin Date: Tue, 29 Oct 2024 10:57:28 +0200 Subject: [PATCH 13/15] added static class --- API.md | 412 +++++++++++++++++++++++++++----- src/data-landing-zone-client.ts | 214 +++++++++++------ src/data-landing-zone.ts | 7 - 3 files changed, 493 insertions(+), 140 deletions(-) diff --git a/API.md b/API.md index 04ee1cd..40e4cd4 100644 --- a/API.md +++ b/API.md @@ -12495,6 +12495,278 @@ public readonly slack: SlackChannel; --- +### DataLandingZoneClientBastionProps + +#### Initializer + +```typescript +import { DataLandingZoneClientBastionProps } from '@DataChefHQ/data-landing-zone' + +const dataLandingZoneClientBastionProps: DataLandingZoneClientBastionProps = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| accountName | string | *No description.* | +| region | string | *No description.* | +| bastionName | string | *No description.* | + +--- + +##### `accountName`Required + +```typescript +public readonly accountName: string; +``` + +- *Type:* string + +--- + +##### `region`Required + +```typescript +public readonly region: string; +``` + +- *Type:* string + +--- + +##### `bastionName`Optional + +```typescript +public readonly bastionName: string; +``` + +- *Type:* string + +--- + +### DataLandingZoneClientProps + +#### Initializer + +```typescript +import { DataLandingZoneClientProps } from '@DataChefHQ/data-landing-zone' + +const dataLandingZoneClientProps: DataLandingZoneClientProps = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| accountName | string | *No description.* | +| region | string | *No description.* | + +--- + +##### `accountName`Required + +```typescript +public readonly accountName: string; +``` + +- *Type:* string + +--- + +##### `region`Required + +```typescript +public readonly region: string; +``` + +- *Type:* string + +--- + +### DataLandingZoneClientRouteTableIdProps + +#### Initializer + +```typescript +import { DataLandingZoneClientRouteTableIdProps } from '@DataChefHQ/data-landing-zone' + +const dataLandingZoneClientRouteTableIdProps: DataLandingZoneClientRouteTableIdProps = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| accountName | string | *No description.* | +| region | string | *No description.* | +| segment | string | *No description.* | +| vpcName | string | *No description.* | + +--- + +##### `accountName`Required + +```typescript +public readonly accountName: string; +``` + +- *Type:* string + +--- + +##### `region`Required + +```typescript +public readonly region: string; +``` + +- *Type:* string + +--- + +##### `segment`Required + +```typescript +public readonly segment: string; +``` + +- *Type:* string + +--- + +##### `vpcName`Required + +```typescript +public readonly vpcName: string; +``` + +- *Type:* string + +--- + +### DataLandingZoneClientSubnetIdProps + +#### Initializer + +```typescript +import { DataLandingZoneClientSubnetIdProps } from '@DataChefHQ/data-landing-zone' + +const dataLandingZoneClientSubnetIdProps: DataLandingZoneClientSubnetIdProps = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| accountName | string | *No description.* | +| region | string | *No description.* | +| segment | string | *No description.* | +| subnetName | string | *No description.* | +| vpcName | string | *No description.* | + +--- + +##### `accountName`Required + +```typescript +public readonly accountName: string; +``` + +- *Type:* string + +--- + +##### `region`Required + +```typescript +public readonly region: string; +``` + +- *Type:* string + +--- + +##### `segment`Required + +```typescript +public readonly segment: string; +``` + +- *Type:* string + +--- + +##### `subnetName`Required + +```typescript +public readonly subnetName: string; +``` + +- *Type:* string + +--- + +##### `vpcName`Required + +```typescript +public readonly vpcName: string; +``` + +- *Type:* string + +--- + +### DataLandingZoneClientVpcIdProps + +#### Initializer + +```typescript +import { DataLandingZoneClientVpcIdProps } from '@DataChefHQ/data-landing-zone' + +const dataLandingZoneClientVpcIdProps: DataLandingZoneClientVpcIdProps = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| accountName | string | *No description.* | +| region | string | *No description.* | +| vpcName | string | *No description.* | + +--- + +##### `accountName`Required + +```typescript +public readonly accountName: string; +``` + +- *Type:* string + +--- + +##### `region`Required + +```typescript +public readonly region: string; +``` + +- *Type:* string + +--- + +##### `vpcName`Required + +```typescript +public readonly vpcName: string; +``` + +- *Type:* string + +--- + ### DataLandingZoneProps #### Initializer @@ -15922,29 +16194,10 @@ new DataLandingZone(app: App, props: DataLandingZoneProps) | **Name** | **Description** | | --- | --- | -| importFrom | *No description.* | | stageManagement | *No description.* | --- -##### `importFrom` - -```typescript -public importFrom(accountName: string, region: Region): DataLandingZoneClient -``` - -###### `accountName`Required - -- *Type:* string - ---- - -###### `region`Required - -- *Type:* Region - ---- - ##### `stageManagement` ```typescript @@ -16077,36 +16330,16 @@ public readonly workloadRegionalStacks: WorkloadRegionalStack[]; ```typescript import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' -new DataLandingZoneClient(scope: Construct, accountName: string, region: string) +new DataLandingZoneClient() ``` | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| accountName | string | *No description.* | -| region | string | *No description.* | - ---- - -##### `scope`Required - -- *Type:* constructs.Construct --- -##### `accountName`Required - -- *Type:* string - ---- -##### `region`Required - -- *Type:* string - ---- - -#### Methods +#### Static Functions | **Name** | **Description** | | --- | --- | @@ -16122,81 +16355,146 @@ new DataLandingZoneClient(scope: Construct, accountName: string, region: string) ##### `getBastionSecurityGroupId` ```typescript -public getBastionSecurityGroupId(bastionName?: string): string +import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' + +DataLandingZoneClient.getBastionSecurityGroupId(scope: Construct, id: string, props: DataLandingZoneClientBastionProps) ``` -###### `bastionName`Optional +###### `scope`Required + +- *Type:* constructs.Construct + +--- + +###### `id`Required - *Type:* string --- +###### `props`Required + +- *Type:* DataLandingZoneClientBastionProps + +--- + ##### `getSubnetId` ```typescript -public getSubnetId(vpcName: string, segment: string, subnetName: string): string +import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' + +DataLandingZoneClient.getSubnetId(scope: Construct, id: string, props: DataLandingZoneClientSubnetIdProps) ``` -###### `vpcName`Required +###### `scope`Required -- *Type:* string +- *Type:* constructs.Construct --- -###### `segment`Required +###### `id`Required - *Type:* string --- -###### `subnetName`Required +###### `props`Required -- *Type:* string +- *Type:* DataLandingZoneClientSubnetIdProps --- ##### `getVpcId` ```typescript -public getVpcId(vpcName: string): string +import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' + +DataLandingZoneClient.getVpcId(scope: Construct, id: string, props: DataLandingZoneClientVpcIdProps) ``` -###### `vpcName`Required +###### `scope`Required + +- *Type:* constructs.Construct + +--- + +###### `id`Required - *Type:* string --- +###### `props`Required + +- *Type:* DataLandingZoneClientVpcIdProps + +--- + ##### `notificationTopicArn` ```typescript -public notificationTopicArn(): string +import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' + +DataLandingZoneClient.notificationTopicArn(scope: Construct, id: string) ``` +###### `scope`Required + +- *Type:* constructs.Construct + +--- + +###### `id`Required + +- *Type:* string + +--- + ##### `permissionsBoundaryArn` ```typescript -public permissionsBoundaryArn(): string +import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' + +DataLandingZoneClient.permissionsBoundaryArn(scope: Construct, id: string) ``` +###### `scope`Required + +- *Type:* constructs.Construct + +--- + +###### `id`Required + +- *Type:* string + +--- + ##### `routeTableId` ```typescript -public routeTableId(vpcName: string, segment: string): string +import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' + +DataLandingZoneClient.routeTableId(scope: Construct, id: string, props: DataLandingZoneClientRouteTableIdProps) ``` -###### `vpcName`Required +###### `scope`Required -- *Type:* string +- *Type:* constructs.Construct --- -###### `segment`Required +###### `id`Required - *Type:* string --- +###### `props`Required + +- *Type:* DataLandingZoneClientRouteTableIdProps + +--- diff --git a/src/data-landing-zone-client.ts b/src/data-landing-zone-client.ts index f3676e7..14c54ac 100644 --- a/src/data-landing-zone-client.ts +++ b/src/data-landing-zone-client.ts @@ -3,104 +3,166 @@ import { Construct } from 'constructs'; import { NetworkAddress } from './constructs/dlz-vpc/network-address'; import { SSM_PARAMETERS_DLZ, SSM_PARAMETER_DLZ_PREFIX } from './stacks/organization/constants'; +export interface DataLandingZoneClientProps { + readonly accountName: string; + readonly region: string; +} + +export interface DataLandingZoneClientBastionProps extends DataLandingZoneClientProps { + readonly bastionName?: string; +} + +export interface DataLandingZoneClientVpcIdProps extends DataLandingZoneClientProps { + readonly vpcName: string; +} + +export interface DataLandingZoneClientRouteTableIdProps extends DataLandingZoneClientProps { + readonly vpcName: string; + readonly segment: string; +} + +export interface DataLandingZoneClientSubnetIdProps extends DataLandingZoneClientProps { + readonly vpcName: string; + readonly segment: string; + readonly subnetName: string; +} /* * This class is used to fetch parameters from the SSM Parameter Store and uses the AWS SDK to assume the role */ export class DataLandingZoneClient { - constructor(private scope: Construct, private accountName: string, private region: string) { - } - - /* - * Fetches the parameter from the SSM Parameter Store and returns the value - * @param parameterName - The name of the parameter to fetch - * @param errorMessage - The error message to throw if the parameter is not found - * @returns - The value of the parameter - */ - private getParameter(parameterName: string, errorMessage: string): string { - const value = ssm.StringParameter.valueFromLookup(this.scope, parameterName); - if (!value) { - throw new Error(errorMessage); - } - return value; - } + * Fetches the bastion security group ID from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@param props - The props of the construct + *@returns - The security group ID of the bastion + *@throws - An error if the parameter is not found + */ + public static getBastionSecurityGroupId(scope: Construct, id: string, props: DataLandingZoneClientBastionProps): string { + const bastionName = props.bastionName ?? 'default'; - /* - * Fetches the bastion security group ID from the SSM Parameter Store - * @param bastionName - The name of the bastion to fetch the security group ID for - * @returns - The security group ID of the bastion - * @throws - An error if the parameter is not found - */ - public getBastionSecurityGroupId(bastionName?: string): string { - bastionName = bastionName ?? 'default'; + const parameter = ssm.StringParameter.fromStringParameterName( + scope, + id, + `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}bastion/${bastionName}/security-group/id`); - return this.getParameter( - `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}bastion/${bastionName}/security-group/id`, - `Failed to get bastion security group id for ${bastionName}`); + if (!parameter) { + throw new Error(`Failed to get bastion security group id for ${bastionName}`); + } + return parameter.stringValue; } /* - * Fetches the VPC ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the ID for - * @returns - The ID of the VPC - * @throws - An error if the parameter is not found - */ - public getVpcId(vpcName: string): string { - const vpcAddress = new NetworkAddress(this.accountName, this.region, vpcName); - return this.getParameter( - `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${vpcAddress}/id`, - `Failed to get vpc id for ${vpcAddress}`); + * Fetches the VPC ID from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@param props - The props of the construct + *@returns - The ID of the VPC + *@throws - An error if the parameter is not found + */ + public static getVpcId(scope: Construct, id: string, props: DataLandingZoneClientVpcIdProps): string { + const accountName = props.accountName; + const region = props.region; + const vpcName = props.vpcName; + const vpcAddress = new NetworkAddress(accountName, region, vpcName); + const parameterName = `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${vpcAddress}/id`; + const parameter = ssm.StringParameter.fromStringParameterName( + scope, + id, + parameterName); + if (!parameter) { + throw new Error(`Failed to get vpc id for ${vpcAddress}`); + } + return parameter.stringValue; } /* - * Fetches the route table ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the route table ID for - * @param segment - The segment of the VPC to fetch the route table ID for - * @returns - The ID of the route table - * @throws - An error if the parameter is not found - */ - public routeTableId(vpcName: string, segment: string): string { - const routeTableAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment); - return this.getParameter( - `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${routeTableAddress}/id`, - `Failed to get route table id for ${routeTableAddress}`); + * Fetches the route table ID from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@param props - The props of the construct + *@returns - The ID of the route table + *@throws - An error if the parameter is not found + */ + public static routeTableId(scope: Construct, id: string, props: DataLandingZoneClientRouteTableIdProps): string { + const accountName = props.accountName; + const region = props.region; + const vpcName = props.vpcName; + const segment = props.segment; + const routeTableAddress = new NetworkAddress(accountName, region, vpcName, segment); + const parameterName = `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${routeTableAddress}/id`; + const parameter = ssm.StringParameter.fromStringParameterName( + scope, + id, + parameterName); + if (!parameter) { + throw new Error(`Failed to get route table id for ${routeTableAddress}`); + } + return parameter.stringValue; } /* - * Fetches the subnet ID from the SSM Parameter Store - * @param vpcName - The name of the VPC to fetch the subnet ID for - * @param segment - The segment of the VPC to fetch the subnet ID for - * @param subnetName - The name of the subnet to fetch the ID for - * @returns - The ID of the subnet - * @throws - An error if the parameter is not found - */ - public getSubnetId(vpcName: string, segment: string, subnetName: string): string { - const subnetAddress = new NetworkAddress(this.accountName, this.region, vpcName, segment, subnetName); - return this.getParameter( - `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${subnetAddress}/id`, - `Failed to get subnet id for ${subnetAddress}`); + * Fetches the subnet ID from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@param props - The props of the construct + *@returns - The ID of the subnet + *@throws - An error if the parameter is not found + */ + public static getSubnetId(scope: Construct, id: string, props: DataLandingZoneClientSubnetIdProps): string { + const accountName = props.accountName; + const region = props.region; + const vpcName = props.vpcName; + const segment = props.segment; + const subnetName = props.subnetName; + const subnetAddress = new NetworkAddress(accountName, region, vpcName, segment, subnetName); + const parameterName = `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}vpc/${subnetAddress}/id`; + const parameter = ssm.StringParameter.fromStringParameterName( + scope, + id, + parameterName); + if (!parameter) { + throw new Error(`Failed to get subnet id for ${subnetAddress}`); + } + return parameter.stringValue; } /* - * Fetches the notification topic ARN from the SSM Parameter Store - * @returns - The ARN of the notification topic - * @throws - An error if the parameter is not found - */ - public notificationTopicArn(): string { - return this.getParameter( - `${SSM_PARAMETER_DLZ_PREFIX}/sns/default-notification/arn`, - 'Failed to get ARN for default notification topic'); + * Fetches the notification topic ARN from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@returns - The ARN of the notification topic + *@throws - An error if the parameter is not found + */ + public static notificationTopicArn(scope: Construct, id: string): string { + const parameterName = `${SSM_PARAMETER_DLZ_PREFIX}/sns/default-notification/arn`; + const parameter = ssm.StringParameter.fromStringParameterName( + scope, + id, + parameterName); + if (!parameter) { + throw new Error('Failed to get ARN for default notification topic'); + } + return parameter.stringValue; } /* - * Fetches the permissions boundary ARN from the SSM Parameter Store - * @returns - The ARN of the permissions boundary - * @throws - An error if the parameter is not found - */ - public permissionsBoundaryArn(): string { - return this.getParameter( - `${SSM_PARAMETER_DLZ_PREFIX}/iam/permission-boundary-policy/arn`, - 'Failed to get ARN for IAM permission boundary policy'); + * Fetches the permissions boundary ARN from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@returns - The ARN of the permissions boundary + *@throws - An error if the parameter is not found + */ + public static permissionsBoundaryArn(scope: Construct, id: string): string { + const parameterName = `${SSM_PARAMETER_DLZ_PREFIX}/iam/permission-boundary-policy/arn`; + const parameter = ssm.StringParameter.fromStringParameterName( + scope, + id, + parameterName); + if (!parameter) { + throw new Error('Failed to get ARN for IAM permission boundary policy'); + } + return parameter.stringValue; } } \ No newline at end of file diff --git a/src/data-landing-zone.ts b/src/data-landing-zone.ts index c88a789..d7b5566 100644 --- a/src/data-landing-zone.ts +++ b/src/data-landing-zone.ts @@ -12,7 +12,6 @@ import { import { DlzSsmReaderStackCache } from './constructs/dlz-ssm-reader/dlz-ssm-reader-stack-cache'; import { NetworkAddress } from './constructs/dlz-vpc/network-address'; import { DlzTag } from './constructs/organization-policies/tag-policy'; -import { DataLandingZoneClient } from './data-landing-zone-client'; import { Report } from './lib/report'; import { ManagementStack, WorkloadGlobalNetworkConnectionsPhase1Stack } from './stacks'; import { AuditGlobalStack } from './stacks/organization/security/audit/global-stack'; @@ -780,12 +779,6 @@ export class DataLandingZone { return management; }; - importFrom(accountName: string, region: Region): DataLandingZoneClient { - const regionName = region.toString(); - - return new DataLandingZoneClient(this.app, accountName, regionName); - } - private stageLog() { const ou = 'security'; const account = 'log'; From 82da609b066e615f82956da16059124dffcdf37a Mon Sep 17 00:00:00 2001 From: Warrenn Enslin Date: Tue, 29 Oct 2024 15:37:27 +0200 Subject: [PATCH 14/15] updated the data landing zone client --- API.md | 84 +++++++++++------------ src/data-landing-zone-client.ts | 99 ++++++++++----------------- test/__snapshots__/build.test.ts.snap | 2 +- 3 files changed, 80 insertions(+), 105 deletions(-) diff --git a/API.md b/API.md index 40e4cd4..037cfe9 100644 --- a/API.md +++ b/API.md @@ -16343,156 +16343,156 @@ new DataLandingZoneClient() | **Name** | **Description** | | --- | --- | -| getBastionSecurityGroupId | *No description.* | -| getSubnetId | *No description.* | -| getVpcId | *No description.* | +| bastionSecurityGroupId | *No description.* | | notificationTopicArn | *No description.* | | permissionsBoundaryArn | *No description.* | | routeTableId | *No description.* | +| subnetId | *No description.* | +| vpcId | *No description.* | --- -##### `getBastionSecurityGroupId` +##### `bastionSecurityGroupId` ```typescript import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' -DataLandingZoneClient.getBastionSecurityGroupId(scope: Construct, id: string, props: DataLandingZoneClientBastionProps) +DataLandingZoneClient.bastionSecurityGroupId(scope: Construct, id: string, props: DataLandingZoneClientBastionProps) ``` -###### `scope`Required +###### `scope`Required - *Type:* constructs.Construct --- -###### `id`Required +###### `id`Required - *Type:* string --- -###### `props`Required +###### `props`Required - *Type:* DataLandingZoneClientBastionProps --- -##### `getSubnetId` +##### `notificationTopicArn` ```typescript import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' -DataLandingZoneClient.getSubnetId(scope: Construct, id: string, props: DataLandingZoneClientSubnetIdProps) +DataLandingZoneClient.notificationTopicArn(scope: Construct, id: string) ``` -###### `scope`Required +###### `scope`Required - *Type:* constructs.Construct --- -###### `id`Required +###### `id`Required - *Type:* string --- -###### `props`Required - -- *Type:* DataLandingZoneClientSubnetIdProps - ---- - -##### `getVpcId` +##### `permissionsBoundaryArn` ```typescript import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' -DataLandingZoneClient.getVpcId(scope: Construct, id: string, props: DataLandingZoneClientVpcIdProps) +DataLandingZoneClient.permissionsBoundaryArn(scope: Construct, id: string) ``` -###### `scope`Required +###### `scope`Required - *Type:* constructs.Construct --- -###### `id`Required +###### `id`Required - *Type:* string --- -###### `props`Required - -- *Type:* DataLandingZoneClientVpcIdProps - ---- - -##### `notificationTopicArn` +##### `routeTableId` ```typescript import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' -DataLandingZoneClient.notificationTopicArn(scope: Construct, id: string) +DataLandingZoneClient.routeTableId(scope: Construct, id: string, props: DataLandingZoneClientRouteTableIdProps) ``` -###### `scope`Required +###### `scope`Required - *Type:* constructs.Construct --- -###### `id`Required +###### `id`Required - *Type:* string --- -##### `permissionsBoundaryArn` +###### `props`Required + +- *Type:* DataLandingZoneClientRouteTableIdProps + +--- + +##### `subnetId` ```typescript import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' -DataLandingZoneClient.permissionsBoundaryArn(scope: Construct, id: string) +DataLandingZoneClient.subnetId(scope: Construct, id: string, props: DataLandingZoneClientSubnetIdProps) ``` -###### `scope`Required +###### `scope`Required - *Type:* constructs.Construct --- -###### `id`Required +###### `id`Required - *Type:* string --- -##### `routeTableId` +###### `props`Required + +- *Type:* DataLandingZoneClientSubnetIdProps + +--- + +##### `vpcId` ```typescript import { DataLandingZoneClient } from '@DataChefHQ/data-landing-zone' -DataLandingZoneClient.routeTableId(scope: Construct, id: string, props: DataLandingZoneClientRouteTableIdProps) +DataLandingZoneClient.vpcId(scope: Construct, id: string, props: DataLandingZoneClientVpcIdProps) ``` -###### `scope`Required +###### `scope`Required - *Type:* constructs.Construct --- -###### `id`Required +###### `id`Required - *Type:* string --- -###### `props`Required +###### `props`Required -- *Type:* DataLandingZoneClientRouteTableIdProps +- *Type:* DataLandingZoneClientVpcIdProps --- diff --git a/src/data-landing-zone-client.ts b/src/data-landing-zone-client.ts index 14c54ac..579bb38 100644 --- a/src/data-landing-zone-client.ts +++ b/src/data-landing-zone-client.ts @@ -32,36 +32,30 @@ export interface DataLandingZoneClientSubnetIdProps extends DataLandingZoneClien export class DataLandingZoneClient { /* - * Fetches the bastion security group ID from the SSM Parameter Store - *@param scope - The scope of the construct - *@param id - The id of the construct - *@param props - The props of the construct - *@returns - The security group ID of the bastion - *@throws - An error if the parameter is not found - */ - public static getBastionSecurityGroupId(scope: Construct, id: string, props: DataLandingZoneClientBastionProps): string { + * Fetches the bastion security group ID from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@param props - The props of the construct + *@returns - The security group ID of the bastion + */ + public static bastionSecurityGroupId(scope: Construct, id: string, props: DataLandingZoneClientBastionProps): string { const bastionName = props.bastionName ?? 'default'; const parameter = ssm.StringParameter.fromStringParameterName( scope, id, `${SSM_PARAMETERS_DLZ.NETWORKING_ENTITY_PREFIX}bastion/${bastionName}/security-group/id`); - - if (!parameter) { - throw new Error(`Failed to get bastion security group id for ${bastionName}`); - } return parameter.stringValue; } /* - * Fetches the VPC ID from the SSM Parameter Store - *@param scope - The scope of the construct - *@param id - The id of the construct - *@param props - The props of the construct - *@returns - The ID of the VPC - *@throws - An error if the parameter is not found - */ - public static getVpcId(scope: Construct, id: string, props: DataLandingZoneClientVpcIdProps): string { + * Fetches the VPC ID from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@param props - The props of the construct + *@returns - The ID of the VPC + */ + public static vpcId(scope: Construct, id: string, props: DataLandingZoneClientVpcIdProps): string { const accountName = props.accountName; const region = props.region; const vpcName = props.vpcName; @@ -71,20 +65,16 @@ export class DataLandingZoneClient { scope, id, parameterName); - if (!parameter) { - throw new Error(`Failed to get vpc id for ${vpcAddress}`); - } return parameter.stringValue; } /* - * Fetches the route table ID from the SSM Parameter Store - *@param scope - The scope of the construct - *@param id - The id of the construct - *@param props - The props of the construct - *@returns - The ID of the route table - *@throws - An error if the parameter is not found - */ + * Fetches the route table ID from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@param props - The props of the construct + *@returns - The ID of the route table + */ public static routeTableId(scope: Construct, id: string, props: DataLandingZoneClientRouteTableIdProps): string { const accountName = props.accountName; const region = props.region; @@ -96,21 +86,17 @@ export class DataLandingZoneClient { scope, id, parameterName); - if (!parameter) { - throw new Error(`Failed to get route table id for ${routeTableAddress}`); - } return parameter.stringValue; } /* - * Fetches the subnet ID from the SSM Parameter Store - *@param scope - The scope of the construct - *@param id - The id of the construct - *@param props - The props of the construct - *@returns - The ID of the subnet - *@throws - An error if the parameter is not found - */ - public static getSubnetId(scope: Construct, id: string, props: DataLandingZoneClientSubnetIdProps): string { + * Fetches the subnet ID from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@param props - The props of the construct + *@returns - The ID of the subnet + */ + public static subnetId(scope: Construct, id: string, props: DataLandingZoneClientSubnetIdProps): string { const accountName = props.accountName; const region = props.region; const vpcName = props.vpcName; @@ -122,47 +108,36 @@ export class DataLandingZoneClient { scope, id, parameterName); - if (!parameter) { - throw new Error(`Failed to get subnet id for ${subnetAddress}`); - } return parameter.stringValue; } /* - * Fetches the notification topic ARN from the SSM Parameter Store - *@param scope - The scope of the construct - *@param id - The id of the construct - *@returns - The ARN of the notification topic - *@throws - An error if the parameter is not found - */ + * Fetches the notification topic ARN from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@returns - The ARN of the notification topic + */ public static notificationTopicArn(scope: Construct, id: string): string { const parameterName = `${SSM_PARAMETER_DLZ_PREFIX}/sns/default-notification/arn`; const parameter = ssm.StringParameter.fromStringParameterName( scope, id, parameterName); - if (!parameter) { - throw new Error('Failed to get ARN for default notification topic'); - } return parameter.stringValue; } /* - * Fetches the permissions boundary ARN from the SSM Parameter Store - *@param scope - The scope of the construct - *@param id - The id of the construct - *@returns - The ARN of the permissions boundary - *@throws - An error if the parameter is not found - */ + * Fetches the permissions boundary ARN from the SSM Parameter Store + *@param scope - The scope of the construct + *@param id - The id of the construct + *@returns - The ARN of the permissions boundary + */ public static permissionsBoundaryArn(scope: Construct, id: string): string { const parameterName = `${SSM_PARAMETER_DLZ_PREFIX}/iam/permission-boundary-policy/arn`; const parameter = ssm.StringParameter.fromStringParameterName( scope, id, parameterName); - if (!parameter) { - throw new Error('Failed to get ARN for IAM permission boundary policy'); - } return parameter.stringValue; } } \ No newline at end of file diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 85f8bb8..443390f 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", + "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128, From 3f89f5183e2ad9a2ae2c24c2515d92b1abb81503 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 29 Oct 2024 13:41:50 +0000 Subject: [PATCH 15/15] chore: self mutation Signed-off-by: github-actions --- test/__snapshots__/build.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/__snapshots__/build.test.ts.snap b/test/__snapshots__/build.test.ts.snap index 443390f..85f8bb8 100644 --- a/test/__snapshots__/build.test.ts.snap +++ b/test/__snapshots__/build.test.ts.snap @@ -444,7 +444,7 @@ exports[`Build Local snapshot testing: managementTemplate snapshot 1`] = ` "Properties": { "Code": { "S3Bucket": "cdk-hnb659fds-assets-882070149987-eu-west-1", - "S3Key": "cb1d30950bd51f1b6577e243ce3e4dd01703fdb8aefccc5cdbbc92c3b4bafde1.zip", + "S3Key": "2345bfda549311359d2c0007b52beb8c1d874fb148f8564002cca85bf36411d8.zip", }, "Handler": "__entrypoint__.handler", "MemorySize": 128,