From aefef4e55232be3ce3b4dbb2e332d8204f31c443 Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Mon, 30 Oct 2023 10:52:55 +1300 Subject: [PATCH 1/2] feat: add cloudflared for remote access to argo (#213) #### Motivation To provide secure external access to the Argo server import a cloudflared tunnel #### Modification Imports the CDK8s configuration for cloudflared #### Checklist _If not applicable, provide explanation of why._ - [ ] Tests updated - [ ] Docs updated - [ ] Issue linked in Title --- infra/cdk8s.ts | 20 ++ infra/charts/cloudflared.ts | 63 +++++ infra/util/ssm.ts | 35 +++ package-lock.json | 537 +++++++++++++++++++----------------- package.json | 5 +- 5 files changed, 406 insertions(+), 254 deletions(-) create mode 100644 infra/charts/cloudflared.ts create mode 100644 infra/util/ssm.ts diff --git a/infra/cdk8s.ts b/infra/cdk8s.ts index e53c864d7..8dae0199c 100644 --- a/infra/cdk8s.ts +++ b/infra/cdk8s.ts @@ -1,11 +1,13 @@ import { App } from 'cdk8s'; import { ArgoSemaphore } from './charts/argo.semaphores'; +import { Cloudflared } from './charts/cloudflared'; import { FluentBit } from './charts/fluentbit'; import { Karpenter, KarpenterProvisioner } from './charts/karpenter'; import { CoreDns } from './charts/kube-system.coredns'; import { CfnOutputKeys, ClusterName } from './constants'; import { getCfnOutputs } from './util/cloud.formation'; +import { fetchSsmParameters } from './util/ssm'; const app = new App(); @@ -19,6 +21,17 @@ async function main(): Promise { throw new Error(`Missing CloudFormation Outputs for keys ${missingKeys.join(', ')}`); } + const ssmConfig = await fetchSsmParameters({ + // Config for Cloudflared to access argo-server + tunnelId: '/eks/cloudflared/argo/tunnelId', + tunnelSecret: '/eks/cloudflared/argo/tunnelSecret', + tunnelName: '/eks/cloudflared/argo/tunnelName', + accountId: '/eks/cloudflared/argo/accountId', + + // Personal access token to gain access to linz-basemaps github user + githubPat: '/eks/github/linz-basemaps/pat', + }); + new ArgoSemaphore(app, 'semaphore', {}); const coredns = new CoreDns(app, 'dns', {}); const fluentbit = new FluentBit(app, 'fluentbit', { @@ -45,6 +58,13 @@ async function main(): Promise { karpenterProvisioner.addDependency(karpenter); + new Cloudflared(app, 'cloudflared', { + tunnelId: ssmConfig.tunnelId, + tunnelSecret: ssmConfig.tunnelSecret, + tunnelName: ssmConfig.tunnelName, + accountId: ssmConfig.accountId, + }); + app.synth(); } diff --git a/infra/charts/cloudflared.ts b/infra/charts/cloudflared.ts new file mode 100644 index 000000000..a525b8b80 --- /dev/null +++ b/infra/charts/cloudflared.ts @@ -0,0 +1,63 @@ +import { Chart, ChartProps, Size } from 'cdk8s'; +import * as kplus from 'cdk8s-plus-27'; +import { Construct } from 'constructs'; + +import { applyDefaultLabels } from '../util/labels.js'; + +export class Cloudflared extends Chart { + constructor( + scope: Construct, + id: string, + props: { tunnelId: string; tunnelSecret: string; accountId: string; tunnelName: string } & ChartProps, + ) { + super(scope, id, applyDefaultLabels(props, 'cloudflared', '2023.8.2', 'tunnel', 'workflows')); + + // TODO should we create a new namespace every time + new kplus.Namespace(this, 'namespace', { + metadata: { name: props.namespace }, + }); + + const cm = new kplus.ConfigMap(this, 'config', { + data: { + 'config.yaml': [ + `tunnel: ${props.tunnelName}`, // Tunnel name must match the credentials + 'credentials-file: /etc/cloudflared/creds/credentials.json', // defined by "kplus.Secret" below + `metrics: "[::]:2000"`, + 'no-autoupdate: true', + 'protocol: http2', // quic is blocked in the LINZ network + ].join('\n'), + }, + }); + + // Secret credentials for the tunnel + const secret = new kplus.Secret(this, 'secret'); + secret.addStringData( + 'credentials.json', + JSON.stringify({ + AccountTag: props.accountId, + TunnelID: props.tunnelId, + TunnelSecret: props.tunnelSecret, + }), + ); + + new kplus.Deployment(this, 'tunnel', { + // Ensure two tunnels are active + replicas: 2, + containers: [ + { + name: 'cloudflared', + image: props.accountId + '.dkr.ecr.ap-southeast-2.amazonaws.com/eks:cloudflared-2023.8.2', + args: ['tunnel', '--loglevel', 'trace', '--config', '/etc/cloudflared/config/config.yaml', 'run'], + volumeMounts: [ + { volume: kplus.Volume.fromConfigMap(this, 'mount-config', cm), path: '/etc/cloudflared/config' }, + { volume: kplus.Volume.fromSecret(this, 'mount-secret', secret), path: '/etc/cloudflared/creds' }, + ], + resources: { memory: { request: Size.mebibytes(128) } }, + // Cloudflared runs as root + securityContext: { ensureNonRoot: false }, + }, + ], + securityContext: { ensureNonRoot: false }, + }); + } +} diff --git a/infra/util/ssm.ts b/infra/util/ssm.ts new file mode 100644 index 000000000..82ce417c5 --- /dev/null +++ b/infra/util/ssm.ts @@ -0,0 +1,35 @@ +import { SSM } from '@aws-sdk/client-ssm'; + +const ssm = new SSM(); + +/** + * Attempt to load a collection of SSM parameters throwing if any parameter cannot be found + * + * @example + * ```typescript + * const result = fetchSsmParameters({ clientId: '/eks/client-id' }) + * result.clientId // Value of '/eks/client-id' + * ``` + * + * @throws if a parameter is missing from the store + */ +export async function fetchSsmParameters>(query: T): Promise { + console.log('FetchSSM', Object.values(query)); + const ret = await ssm.getParameters({ Names: Object.values(query) }); + + const output: Record = {}; + const missing: string[] = []; + for (const [key, parameterName] of Object.entries(query)) { + const val = ret.Parameters?.find((f) => f.Name === parameterName); + if (val == null || val.Value == null) { + missing.push(parameterName); + continue; + } + output[key] = val.Value; + } + + if (missing.length > 0) { + throw new Error('Missing SSM Parameters: ' + missing.join(', ')); + } + return output as T; +} diff --git a/package-lock.json b/package-lock.json index 4fea19ccc..9685a5de3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,9 @@ "license": "MIT", "devDependencies": { "@aws-cdk/lambda-layer-kubectl-v27": "^2.0.0", - "@aws-sdk/client-cloudformation": "^3.429.0", - "@aws-sdk/client-eks": "^3.429.0", + "@aws-sdk/client-cloudformation": "3.429.0", + "@aws-sdk/client-eks": "3.429.0", + "@aws-sdk/client-ssm": "3.429.0", "@linzjs/style": "^5.0.0", "aws-cdk": "2.93.x", "aws-cdk-lib": "2.93.x", @@ -165,35 +166,35 @@ "dev": true }, "node_modules/@aws-sdk/client-cloudformation": { - "version": "3.431.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudformation/-/client-cloudformation-3.431.0.tgz", - "integrity": "sha512-ZBKyaro07W8ofkzmPg51LcgICeVu0nEEE9t91OxOIEnV3OFD7A2j/HWfPLL0KJ2zXXHGZn8oOJ4CiTNidV9bqQ==", + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudformation/-/client-cloudformation-3.429.0.tgz", + "integrity": "sha512-65BJgq5lkMzc3oSSjAjm04Dp009IBf1+IErT/KfDx+7+8eq0wE9gzp+a6t23LmyPVHTu8OmH5zRY15qOyQaD8Q==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.431.0", - "@aws-sdk/credential-provider-node": "3.431.0", - "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/client-sts": "3.429.0", + "@aws-sdk/credential-provider-node": "3.429.0", + "@aws-sdk/middleware-host-header": "3.429.0", "@aws-sdk/middleware-logger": "3.428.0", "@aws-sdk/middleware-recursion-detection": "3.428.0", "@aws-sdk/middleware-signing": "3.428.0", "@aws-sdk/middleware-user-agent": "3.428.0", - "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/region-config-resolver": "3.428.0", "@aws-sdk/types": "3.428.0", "@aws-sdk/util-endpoints": "3.428.0", "@aws-sdk/util-user-agent-browser": "3.428.0", - "@aws-sdk/util-user-agent-node": "3.430.0", - "@smithy/config-resolver": "^2.0.15", + "@aws-sdk/util-user-agent-node": "3.428.0", + "@smithy/config-resolver": "^2.0.14", "@smithy/fetch-http-handler": "^2.2.3", "@smithy/hash-node": "^2.0.11", "@smithy/invalid-dependency": "^2.0.11", "@smithy/middleware-content-length": "^2.0.13", - "@smithy/middleware-endpoint": "^2.1.2", - "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-endpoint": "^2.1.1", + "@smithy/middleware-retry": "^2.0.16", "@smithy/middleware-serde": "^2.0.11", "@smithy/middleware-stack": "^2.0.5", - "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-config-provider": "^2.1.1", "@smithy/node-http-handler": "^2.1.7", "@smithy/protocol-http": "^3.0.7", "@smithy/smithy-client": "^2.1.11", @@ -203,7 +204,7 @@ "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", "@smithy/util-defaults-mode-browser": "^2.0.15", - "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-defaults-mode-node": "^2.0.19", "@smithy/util-retry": "^2.0.4", "@smithy/util-utf8": "^2.0.0", "@smithy/util-waiter": "^2.0.11", @@ -216,35 +217,35 @@ } }, "node_modules/@aws-sdk/client-eks": { - "version": "3.431.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-eks/-/client-eks-3.431.0.tgz", - "integrity": "sha512-ZkEUx/foqi3GYFRspnQHAuh5EImDIAqgPwtuRTIoBf41fePsZ6fQXif6eaLObx6DcwRvMirRi7pzwkUxIYR+MA==", + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-eks/-/client-eks-3.429.0.tgz", + "integrity": "sha512-qOPaNpZNPIXGg60+r7b1s8w0zFsXDPCuBOWcQA5K6ekSQcY1JFlbydtBLoatIUVLpialKKgPIbAlqsHnN9PN/w==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.431.0", - "@aws-sdk/credential-provider-node": "3.431.0", - "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/client-sts": "3.429.0", + "@aws-sdk/credential-provider-node": "3.429.0", + "@aws-sdk/middleware-host-header": "3.429.0", "@aws-sdk/middleware-logger": "3.428.0", "@aws-sdk/middleware-recursion-detection": "3.428.0", "@aws-sdk/middleware-signing": "3.428.0", "@aws-sdk/middleware-user-agent": "3.428.0", - "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/region-config-resolver": "3.428.0", "@aws-sdk/types": "3.428.0", "@aws-sdk/util-endpoints": "3.428.0", "@aws-sdk/util-user-agent-browser": "3.428.0", - "@aws-sdk/util-user-agent-node": "3.430.0", - "@smithy/config-resolver": "^2.0.15", + "@aws-sdk/util-user-agent-node": "3.428.0", + "@smithy/config-resolver": "^2.0.14", "@smithy/fetch-http-handler": "^2.2.3", "@smithy/hash-node": "^2.0.11", "@smithy/invalid-dependency": "^2.0.11", "@smithy/middleware-content-length": "^2.0.13", - "@smithy/middleware-endpoint": "^2.1.2", - "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-endpoint": "^2.1.1", + "@smithy/middleware-retry": "^2.0.16", "@smithy/middleware-serde": "^2.0.11", "@smithy/middleware-stack": "^2.0.5", - "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-config-provider": "^2.1.1", "@smithy/node-http-handler": "^2.1.7", "@smithy/protocol-http": "^3.0.7", "@smithy/smithy-client": "^2.1.11", @@ -254,7 +255,57 @@ "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", "@smithy/util-defaults-mode-browser": "^2.0.15", - "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-defaults-mode-node": "^2.0.19", + "@smithy/util-retry": "^2.0.4", + "@smithy/util-utf8": "^2.0.0", + "@smithy/util-waiter": "^2.0.11", + "tslib": "^2.5.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-ssm": { + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-ssm/-/client-ssm-3.429.0.tgz", + "integrity": "sha512-wQMSabHaUMBcmmFGRWK9+kcgus7v60xyClr7lsfxE6EcKhVa5F7QpuSUxtTKiiNxyJ/GjKObaMWj0xd3ICNHMQ==", + "dev": true, + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.429.0", + "@aws-sdk/credential-provider-node": "3.429.0", + "@aws-sdk/middleware-host-header": "3.429.0", + "@aws-sdk/middleware-logger": "3.428.0", + "@aws-sdk/middleware-recursion-detection": "3.428.0", + "@aws-sdk/middleware-signing": "3.428.0", + "@aws-sdk/middleware-user-agent": "3.428.0", + "@aws-sdk/region-config-resolver": "3.428.0", + "@aws-sdk/types": "3.428.0", + "@aws-sdk/util-endpoints": "3.428.0", + "@aws-sdk/util-user-agent-browser": "3.428.0", + "@aws-sdk/util-user-agent-node": "3.428.0", + "@smithy/config-resolver": "^2.0.14", + "@smithy/fetch-http-handler": "^2.2.3", + "@smithy/hash-node": "^2.0.11", + "@smithy/invalid-dependency": "^2.0.11", + "@smithy/middleware-content-length": "^2.0.13", + "@smithy/middleware-endpoint": "^2.1.1", + "@smithy/middleware-retry": "^2.0.16", + "@smithy/middleware-serde": "^2.0.11", + "@smithy/middleware-stack": "^2.0.5", + "@smithy/node-config-provider": "^2.1.1", + "@smithy/node-http-handler": "^2.1.7", + "@smithy/protocol-http": "^3.0.7", + "@smithy/smithy-client": "^2.1.11", + "@smithy/types": "^2.3.5", + "@smithy/url-parser": "^2.0.11", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.15", + "@smithy/util-defaults-mode-node": "^2.0.19", "@smithy/util-retry": "^2.0.4", "@smithy/util-utf8": "^2.0.0", "@smithy/util-waiter": "^2.0.11", @@ -266,32 +317,32 @@ } }, "node_modules/@aws-sdk/client-sso": { - "version": "3.431.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.431.0.tgz", - "integrity": "sha512-iK8RxdBHFj1HtWpdTVfFdljZHXLWFv62SuIdkDswGE7L0zNbZIqBDGfEBnbagiQuxkz5D2YtnasydC5R3BcwVw==", + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.429.0.tgz", + "integrity": "sha512-Bz802NpXUrFI1KB9uu1GwCbmi0xpw+GY6+TIyaGTXbGQjg4fYOJQLUtMxmb1c1/qUTZX/x5qetF3QBwgpBbLug==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-host-header": "3.429.0", "@aws-sdk/middleware-logger": "3.428.0", "@aws-sdk/middleware-recursion-detection": "3.428.0", "@aws-sdk/middleware-user-agent": "3.428.0", - "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/region-config-resolver": "3.428.0", "@aws-sdk/types": "3.428.0", "@aws-sdk/util-endpoints": "3.428.0", "@aws-sdk/util-user-agent-browser": "3.428.0", - "@aws-sdk/util-user-agent-node": "3.430.0", - "@smithy/config-resolver": "^2.0.15", + "@aws-sdk/util-user-agent-node": "3.428.0", + "@smithy/config-resolver": "^2.0.14", "@smithy/fetch-http-handler": "^2.2.3", "@smithy/hash-node": "^2.0.11", "@smithy/invalid-dependency": "^2.0.11", "@smithy/middleware-content-length": "^2.0.13", - "@smithy/middleware-endpoint": "^2.1.2", - "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-endpoint": "^2.1.1", + "@smithy/middleware-retry": "^2.0.16", "@smithy/middleware-serde": "^2.0.11", "@smithy/middleware-stack": "^2.0.5", - "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-config-provider": "^2.1.1", "@smithy/node-http-handler": "^2.1.7", "@smithy/protocol-http": "^3.0.7", "@smithy/smithy-client": "^2.1.11", @@ -301,7 +352,7 @@ "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", "@smithy/util-defaults-mode-browser": "^2.0.15", - "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-defaults-mode-node": "^2.0.19", "@smithy/util-retry": "^2.0.4", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" @@ -311,35 +362,35 @@ } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.431.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.431.0.tgz", - "integrity": "sha512-IM/Fg3H1WuM9fnVriEoM6+sZ9LNUExxklxAnHwjLnprPRTDGbUXUfYjSry52LaQsZffP3RgWP11CYyjCYC8CfQ==", + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.429.0.tgz", + "integrity": "sha512-yNRYHXqGIYjEGlpaIll9zJDsVOQWjwbvR2zfTpUwEtN4I17k/psjLAsznfTbq/4tEftkpAJ2pNsVrkHUOmCewA==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.431.0", - "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/credential-provider-node": "3.429.0", + "@aws-sdk/middleware-host-header": "3.429.0", "@aws-sdk/middleware-logger": "3.428.0", "@aws-sdk/middleware-recursion-detection": "3.428.0", "@aws-sdk/middleware-sdk-sts": "3.428.0", "@aws-sdk/middleware-signing": "3.428.0", "@aws-sdk/middleware-user-agent": "3.428.0", - "@aws-sdk/region-config-resolver": "3.430.0", + "@aws-sdk/region-config-resolver": "3.428.0", "@aws-sdk/types": "3.428.0", "@aws-sdk/util-endpoints": "3.428.0", "@aws-sdk/util-user-agent-browser": "3.428.0", - "@aws-sdk/util-user-agent-node": "3.430.0", - "@smithy/config-resolver": "^2.0.15", + "@aws-sdk/util-user-agent-node": "3.428.0", + "@smithy/config-resolver": "^2.0.14", "@smithy/fetch-http-handler": "^2.2.3", "@smithy/hash-node": "^2.0.11", "@smithy/invalid-dependency": "^2.0.11", "@smithy/middleware-content-length": "^2.0.13", - "@smithy/middleware-endpoint": "^2.1.2", - "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-endpoint": "^2.1.1", + "@smithy/middleware-retry": "^2.0.16", "@smithy/middleware-serde": "^2.0.11", "@smithy/middleware-stack": "^2.0.5", - "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-config-provider": "^2.1.1", "@smithy/node-http-handler": "^2.1.7", "@smithy/protocol-http": "^3.0.7", "@smithy/smithy-client": "^2.1.11", @@ -349,7 +400,7 @@ "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", "@smithy/util-defaults-mode-browser": "^2.0.15", - "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-defaults-mode-node": "^2.0.19", "@smithy/util-retry": "^2.0.4", "@smithy/util-utf8": "^2.0.0", "fast-xml-parser": "4.2.5", @@ -375,14 +426,14 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.431.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.431.0.tgz", - "integrity": "sha512-SILMZuscwxeqB4kuZjWiu24wfvmvN3Tx7/j5n0t0Ob+cdpweK0IqkBQ/QkTbTiG0M1l8trMtMkrTb5510fupcQ==", + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.429.0.tgz", + "integrity": "sha512-rG1ecwU/8KojyXsx80tK/b+DDGqSbReakOm/db5fx2RzVnkAGdH9fvPNrhjjHZ1wGbPrUtXGmHGXP3eqnylazg==", "dev": true, "dependencies": { "@aws-sdk/credential-provider-env": "3.428.0", "@aws-sdk/credential-provider-process": "3.428.0", - "@aws-sdk/credential-provider-sso": "3.431.0", + "@aws-sdk/credential-provider-sso": "3.429.0", "@aws-sdk/credential-provider-web-identity": "3.428.0", "@aws-sdk/types": "3.428.0", "@smithy/credential-provider-imds": "^2.0.0", @@ -396,15 +447,15 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.431.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.431.0.tgz", - "integrity": "sha512-jj2gm92nfsFw5e48+7OCYM5PfiW3pd9FvhEoBfvKANwM6ztXzmNpQcz3iWsGVfzd+MUooVBoO2exhH9M8t+VDg==", + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.429.0.tgz", + "integrity": "sha512-XaXCIeF8UWAvqzXX/UaBQhICjyIjRksjuP0xMW+A23Nu4yPjYufuHL9AR4i6MVYEKP3inXHGAS7N0t35A8acOw==", "dev": true, "dependencies": { "@aws-sdk/credential-provider-env": "3.428.0", - "@aws-sdk/credential-provider-ini": "3.431.0", + "@aws-sdk/credential-provider-ini": "3.429.0", "@aws-sdk/credential-provider-process": "3.428.0", - "@aws-sdk/credential-provider-sso": "3.431.0", + "@aws-sdk/credential-provider-sso": "3.429.0", "@aws-sdk/credential-provider-web-identity": "3.428.0", "@aws-sdk/types": "3.428.0", "@smithy/credential-provider-imds": "^2.0.0", @@ -434,13 +485,13 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.431.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.431.0.tgz", - "integrity": "sha512-fh/yWKJtgEpxfuzd/KTVPQz0FjykbiPnU0OLm1wKgNZAyKTE9EyNvWR6P57TWv/sU8faa5uLaxdD0TBPxWReDA==", + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.429.0.tgz", + "integrity": "sha512-Nx3/18ZxV/trGz3HAQD6eGxO5Goqx3U5YR+CJsWPBh+4Jwkoo+HC5cyxq6cJIcZ5n75Wc4kPt7Im4ffVjTaJIg==", "dev": true, "dependencies": { - "@aws-sdk/client-sso": "3.431.0", - "@aws-sdk/token-providers": "3.431.0", + "@aws-sdk/client-sso": "3.429.0", + "@aws-sdk/token-providers": "3.429.0", "@aws-sdk/types": "3.428.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", @@ -467,9 +518,9 @@ } }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.431.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.431.0.tgz", - "integrity": "sha512-j+OBsCDDRXlMEQ4GCtTxVaMwxIHNKiwbDIZVyB6CDor8AFflKxWbO3cPSpUuGKlUN9OEexMR+XgwsjmaI6AGwg==", + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.429.0.tgz", + "integrity": "sha512-3v9WoDCmbfH28znQ43cQLvLlm8fhJFIDJLW19moFI8QbXMv85yojGEphBMlT2XZUw79+tyh7GWLFaNugYZ1o9A==", "dev": true, "dependencies": { "@aws-sdk/types": "3.428.0", @@ -560,12 +611,12 @@ } }, "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.430.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.430.0.tgz", - "integrity": "sha512-9lqgtkcd4dqsQ2yN6V/i06blyDh4yLmS+fAS7LwEZih/NZZ2cBIR+5kb9c236auvTcuMcL1zFxVRloWwesYZjA==", + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.428.0.tgz", + "integrity": "sha512-VqyHZ/Hoz3WrXXMx8cAhFBl8IpjodbRsTjBI117QPq1YRCegxNdGvqmGZnJj8N2Ef9MP1iU30ZWQB+sviDcogA==", "dev": true, "dependencies": { - "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-config-provider": "^2.1.1", "@smithy/types": "^2.3.5", "@smithy/util-config-provider": "^2.0.0", "@smithy/util-middleware": "^2.0.4", @@ -576,31 +627,31 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.431.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.431.0.tgz", - "integrity": "sha512-0ksZogF3Gy2i+yBb7T2g2e7QXzwZeQHmf09ihR1cwXwg7UIjsap6P3gPtC085bDkOD9iY8OdpL0Esp06N6xmCg==", + "version": "3.429.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.429.0.tgz", + "integrity": "sha512-1Lp5XW/aSHekMURfcoxhWR2ig0UlesD0wC1kcdrkhZGCPtvCE0VzMqgTmYkwtPKOWfRQf0qfu468ohBHBmzHdA==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.431.0", + "@aws-sdk/middleware-host-header": "3.429.0", "@aws-sdk/middleware-logger": "3.428.0", "@aws-sdk/middleware-recursion-detection": "3.428.0", "@aws-sdk/middleware-user-agent": "3.428.0", "@aws-sdk/types": "3.428.0", "@aws-sdk/util-endpoints": "3.428.0", "@aws-sdk/util-user-agent-browser": "3.428.0", - "@aws-sdk/util-user-agent-node": "3.430.0", - "@smithy/config-resolver": "^2.0.15", + "@aws-sdk/util-user-agent-node": "3.428.0", + "@smithy/config-resolver": "^2.0.14", "@smithy/fetch-http-handler": "^2.2.3", "@smithy/hash-node": "^2.0.11", "@smithy/invalid-dependency": "^2.0.11", "@smithy/middleware-content-length": "^2.0.13", - "@smithy/middleware-endpoint": "^2.1.2", - "@smithy/middleware-retry": "^2.0.17", + "@smithy/middleware-endpoint": "^2.1.1", + "@smithy/middleware-retry": "^2.0.16", "@smithy/middleware-serde": "^2.0.11", "@smithy/middleware-stack": "^2.0.5", - "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-config-provider": "^2.1.1", "@smithy/node-http-handler": "^2.1.7", "@smithy/property-provider": "^2.0.0", "@smithy/protocol-http": "^3.0.7", @@ -612,7 +663,7 @@ "@smithy/util-body-length-browser": "^2.0.0", "@smithy/util-body-length-node": "^2.1.0", "@smithy/util-defaults-mode-browser": "^2.0.15", - "@smithy/util-defaults-mode-node": "^2.0.20", + "@smithy/util-defaults-mode-node": "^2.0.19", "@smithy/util-retry": "^2.0.4", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" @@ -672,13 +723,13 @@ } }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.430.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.430.0.tgz", - "integrity": "sha512-DPpFPL3mFMPtipFxjY7TKQBjnhmsPzYCr4Y+qna0oR6ij8jZOz2ILQDK33GxTRNh3+bV9YYbx+ZGDOnxoK5Mhw==", + "version": "3.428.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.428.0.tgz", + "integrity": "sha512-s721C3H8TkNd0usWLPEAy7yW2lEglR8QAYojdQGzE0e0wymc671nZAFePSZFRtmqZiFOSfk0R602L5fDbP3a8Q==", "dev": true, "dependencies": { "@aws-sdk/types": "3.428.0", - "@smithy/node-config-provider": "^2.1.2", + "@smithy/node-config-provider": "^2.1.1", "@smithy/types": "^2.3.5", "tslib": "^2.5.0" }, @@ -1082,12 +1133,12 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.11.tgz", - "integrity": "sha512-MSzE1qR2JNyb7ot3blIOT3O3H0Jn06iNDEgHRaqZUwBgx5EG+VIx24Y21tlKofzYryIOcWpIohLrIIyocD6LMA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.12.tgz", + "integrity": "sha512-YIJyefe1mi3GxKdZxEBEuzYOeQ9xpYfqnFmWzojCssRAuR7ycxwpoRQgp965vuW426xUAQhCV5rCaWElQ7XsaA==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1095,15 +1146,15 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.15.tgz", - "integrity": "sha512-a2Pfocla5nSrG2RyB8i20jcWgMyR71TUeFKm8pmrnZotr/X22tlg4y/EhSvBK2oTE8MKHlKh4YdpDO2AryJbGQ==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.16.tgz", + "integrity": "sha512-1k+FWHQDt2pfpXhJsOmNMmlAZ3NUQ98X5tYsjQhVGq+0X6cOBMhfh6Igd0IX3Ut6lEO6DQAdPMI/blNr3JZfMQ==", "dev": true, "dependencies": { - "@smithy/node-config-provider": "^2.1.2", - "@smithy/types": "^2.3.5", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.4", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { @@ -1111,15 +1162,15 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.17.tgz", - "integrity": "sha512-2XcD414yrwbxxuYueTo7tzLC2/w3jj9FZqfenpv3MQkocdOEmuOVS0v9WHsY/nW6V+2EcR340rj/z5HnvsHncQ==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.18.tgz", + "integrity": "sha512-QnPBi6D2zj6AHJdUTo5zXmk8vwHJ2bNevhcVned1y+TZz/OI5cizz5DsYNkqFUIDn8tBuEyKNgbmKVNhBbuY3g==", "dev": true, "dependencies": { - "@smithy/node-config-provider": "^2.1.2", - "@smithy/property-provider": "^2.0.12", - "@smithy/types": "^2.3.5", - "@smithy/url-parser": "^2.0.11", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "tslib": "^2.5.0" }, "engines": { @@ -1139,25 +1190,25 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.3.tgz", - "integrity": "sha512-0G9sePU+0R+8d7cie+OXzNbbkjnD4RfBlVCs46ZEuQAMcxK8OniemYXSSkOc80CCk8Il4DnlYZcUSvsIs2OB2w==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.4.tgz", + "integrity": "sha512-gIPRFEGi+c6V52eauGKrjDzPWF2Cu7Z1r5F8A3j2wcwz25sPG/t8kjsbEhli/tS/2zJp/ybCZXe4j4ro3yv/HA==", "dev": true, "dependencies": { - "@smithy/protocol-http": "^3.0.7", - "@smithy/querystring-builder": "^2.0.11", - "@smithy/types": "^2.3.5", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/hash-node": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.11.tgz", - "integrity": "sha512-PbleVugN2tbhl1ZoNWVrZ1oTFFas/Hq+s6zGO8B9bv4w/StTriTKA9W+xZJACOj9X7zwfoTLbscM+avCB1KqOQ==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.12.tgz", + "integrity": "sha512-fDZnTr5j9t5qcbeJ037aMZXxMka13Znqwrgy3PAqYj6Dm3XHXHftTH3q+NWgayUxl1992GFtQt1RuEzRMy3NnQ==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" @@ -1167,12 +1218,12 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.11.tgz", - "integrity": "sha512-zazq99ujxYv/NOf9zh7xXbNgzoVLsqE0wle8P/1zU/XdhPi/0zohTPKWUzIxjGdqb5hkkwfBkNkl5H+LE0mvgw==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.12.tgz", + "integrity": "sha512-p5Y+iMHV3SoEpy3VSR7mifbreHQwVSvHSAz/m4GdoXfOzKzaYC8hYv10Ks7Deblkf7lhas8U+lAp9ThbBM+ZXA==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, @@ -1189,13 +1240,13 @@ } }, "node_modules/@smithy/middleware-content-length": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.13.tgz", - "integrity": "sha512-Md2kxWpaec3bXp1oERFPQPBhOXCkGSAF7uc1E+4rkwjgw3/tqAXRtbjbggu67HJdwaif76As8AV6XxbD1HzqTQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.14.tgz", + "integrity": "sha512-poUNgKTw9XwPXfX9nEHpVgrMNVpaSMZbshqvPxFVoalF4wp6kRzYKOfdesSVectlQ51VtigoLfbXcdyPwvxgTg==", "dev": true, "dependencies": { - "@smithy/protocol-http": "^3.0.7", - "@smithy/types": "^2.3.5", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1203,17 +1254,17 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.2.tgz", - "integrity": "sha512-dua4r2EbSTRzNefz72snz+KDuXN73RCe1K+rGeemzUyYemxuh1jujFbLQbTU6DVlTgHkhtrbH0+kdOFY/SV4Qg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.3.tgz", + "integrity": "sha512-ZrQ0/YX6hNVTxqMEHtEaDbDv6pNeEji/a5Vk3HuFC5R3ZY8lfoATyxmOGxBVYnF3NUvZLNC7umEv1WzWGWvCGQ==", "dev": true, "dependencies": { - "@smithy/middleware-serde": "^2.0.11", - "@smithy/node-config-provider": "^2.1.2", - "@smithy/shared-ini-file-loader": "^2.2.1", - "@smithy/types": "^2.3.5", - "@smithy/url-parser": "^2.0.11", - "@smithy/util-middleware": "^2.0.4", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { @@ -1221,17 +1272,17 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.17.tgz", - "integrity": "sha512-ZYVU1MmshCTbEKTNc5h7/Pps1vhH5C7hRclQWnAbVYKkIT+PEGu9dSVqprzEo/nlMA8Zv4Dj5Y+fv3pRnUwElw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.18.tgz", + "integrity": "sha512-VyrHQRldGSb3v9oFOB5yPxmLT7U2sQic2ytylOnYlnsmVOLlFIaI6sW22c+w2675yq+XZ6HOuzV7x2OBYCWRNA==", "dev": true, "dependencies": { - "@smithy/node-config-provider": "^2.1.2", - "@smithy/protocol-http": "^3.0.7", - "@smithy/service-error-classification": "^2.0.4", - "@smithy/types": "^2.3.5", - "@smithy/util-middleware": "^2.0.4", - "@smithy/util-retry": "^2.0.4", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "@smithy/util-retry": "^2.0.5", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -1240,12 +1291,12 @@ } }, "node_modules/@smithy/middleware-serde": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.11.tgz", - "integrity": "sha512-NuxnjMyf4zQqhwwdh0OTj5RqpnuT6HcH5Xg5GrPijPcKzc2REXVEVK4Yyk8ckj8ez1XSj/bCmJ+oNjmqB02GWA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.12.tgz", + "integrity": "sha512-IBeco157lIScecq2Z+n0gq56i4MTnfKxS7rbfrAORveDJgnbBAaEQgYqMqp/cYqKrpvEXcyTjwKHrBjCCIZh2A==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1253,12 +1304,12 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.5.tgz", - "integrity": "sha512-bVQU/rZzBY7CbSxIrDTGZYnBWKtIw+PL/cRc9B7etZk1IKSOe0NvKMJyWllfhfhrTeMF6eleCzOihIQympAvPw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.6.tgz", + "integrity": "sha512-YSvNZeOKWLJ0M/ycxwDIe2Ztkp6Qixmcml1ggsSv2fdHKGkBPhGrX5tMzPGMI1yyx55UEYBi2OB4s+RriXX48A==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1266,14 +1317,14 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.2.tgz", - "integrity": "sha512-tbYh/JK/ddxKWYTtjLgap0juyivJ0wCvywMqINb54zyOVHoKYM6iYl7DosQA0owFaNp6GAx1lXFjqGz7L2fAqA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.3.tgz", + "integrity": "sha512-J6lXvRHGVnSX3n1PYi+e1L5HN73DkkJpUviV3Ebf+8wSaIjAf+eVNbzyvh/S5EQz7nf4KVfwbD5vdoZMAthAEQ==", "dev": true, "dependencies": { - "@smithy/property-provider": "^2.0.12", - "@smithy/shared-ini-file-loader": "^2.2.1", - "@smithy/types": "^2.3.5", + "@smithy/property-provider": "^2.0.13", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1281,15 +1332,15 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.7.tgz", - "integrity": "sha512-PQIKZXlp3awCDn/xNlCSTFE7aYG/5Tx33M05NfQmWYeB5yV1GZZOSz4dXpwiNJYTXb9jPqjl+ueXXkwtEluFFA==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.8.tgz", + "integrity": "sha512-KZylM7Wff/So5SmCiwg2kQNXJ+RXgz34wkxS7WNwIUXuZrZZpY/jKJCK+ZaGyuESDu3TxcaY+zeYGJmnFKbQsA==", "dev": true, "dependencies": { - "@smithy/abort-controller": "^2.0.11", - "@smithy/protocol-http": "^3.0.7", - "@smithy/querystring-builder": "^2.0.11", - "@smithy/types": "^2.3.5", + "@smithy/abort-controller": "^2.0.12", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1297,12 +1348,12 @@ } }, "node_modules/@smithy/property-provider": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.12.tgz", - "integrity": "sha512-Un/OvvuQ1Kg8WYtoMCicfsFFuHb/TKL3pCA6ZIo/WvNTJTR94RtoRnL7mY4XkkUAoFMyf6KjcQJ76y1FX7S5rw==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.13.tgz", + "integrity": "sha512-VJqUf2CbsQX6uUiC5dUPuoEATuFjkbkW3lJHbRnpk9EDC9X+iKqhfTK+WP+lve5EQ9TcCI1Q6R7hrg41FyC54w==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1310,12 +1361,12 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.7.tgz", - "integrity": "sha512-HnZW8y+r66ntYueCDbLqKwWcMNWW8o3eVpSrHNluwtBJ/EUWfQHRKSiu6vZZtc6PGfPQWgVfucoCE/C3QufMAA==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1323,12 +1374,12 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.11.tgz", - "integrity": "sha512-b4kEbVMxpmfv2VWUITn2otckTi7GlMteZQxi+jlwedoATOGEyrCJPfRcYQJjbCi3fZ2QTfh3PcORvB27+j38Yg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.12.tgz", + "integrity": "sha512-cDbF07IuCjiN8CdGvPzfJjXIrmDSelScRfyJYrYBNBbKl2+k7QD/KqiHhtRyEKgID5mmEVrV6KE6L/iPJ98sFw==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, @@ -1337,12 +1388,12 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.11.tgz", - "integrity": "sha512-YXe7jhi7s3dQ0Fu9dLoY/gLu6NCyy8tBWJL/v2c9i7/RLpHgKT+uT96/OqZkHizCJ4kr0ZD46tzMjql/o60KLg==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.12.tgz", + "integrity": "sha512-fytyTcXaMzPBuNtPlhj5v6dbl4bJAnwKZFyyItAGt4Tgm9HFPZNo7a9r1SKPr/qdxUEBzvL9Rh+B9SkTX3kFxg==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1350,24 +1401,24 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.4.tgz", - "integrity": "sha512-77506l12I5gxTZqBkx3Wb0RqMG81bMYLaVQ+EqIWFwQDJRs5UFeXogKxSKojCmz1wLUziHZQXm03MBzPQiumQw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.5.tgz", + "integrity": "sha512-M0SeJnEgD2ywJyV99Fb1yKFzmxDe9JfpJiYTVSRMyRLc467BPU0qsuuDPzMCdB1mU8M8u1rVOdkqdoyFN8UFTw==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5" + "@smithy/types": "^2.4.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.1.tgz", - "integrity": "sha512-eAYajwo2eTTVU5KPX90+V6ccfrWphrzcUwOt7n9pLOMBO0fOKlRVshbvCBqfRCxEn7OYDGH6TsL3yrx+hAjddA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.2.tgz", + "integrity": "sha512-noyQUPn7b1M8uB0GEXc/Zyxq+5K2b7aaqWnLp+hgJ7+xu/FCvtyWy5eWLDjQEsHnAet2IZhS5QF8872OR69uNg==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1394,14 +1445,14 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.11.tgz", - "integrity": "sha512-okjMbuBBCTiieK665OFN/ap6u9+Z9z55PMphS5FYCsS6Zfp137Q3qlnt0OgBAnUVnH/mNGyoJV0LBX9gkTWptg==", + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.12.tgz", + "integrity": "sha512-XXqhridfkKnpj+lt8vM6HRlZbqUAqBjVC74JIi13F/AYQd/zTj9SOyGfxnbp4mjY9q28LityxIuV8CTinr9r5w==", "dev": true, "dependencies": { - "@smithy/middleware-stack": "^2.0.5", - "@smithy/types": "^2.3.5", - "@smithy/util-stream": "^2.0.16", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/types": "^2.4.0", + "@smithy/util-stream": "^2.0.17", "tslib": "^2.5.0" }, "engines": { @@ -1409,9 +1460,9 @@ } }, "node_modules/@smithy/types": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.3.5.tgz", - "integrity": "sha512-ehyDt8M9hehyxrLQGoA1BGPou8Js1Ocoh5M0ngDhJMqbFmNK5N6Xhr9/ZExWkyIW8XcGkiMPq3ZUEE0ScrhbuQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dev": true, "dependencies": { "tslib": "^2.5.0" @@ -1421,13 +1472,13 @@ } }, "node_modules/@smithy/url-parser": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.11.tgz", - "integrity": "sha512-h89yXMCCF+S5k9XIoKltMIWTYj+FcEkU/IIFZ6RtE222fskOTL4Iak6ZRG+ehSvZDt8yKEcxqheTDq7JvvtK3g==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.12.tgz", + "integrity": "sha512-qgkW2mZqRvlNUcBkxYB/gYacRaAdck77Dk3/g2iw0S9F0EYthIS3loGfly8AwoWpIvHKhkTsCXXQfzksgZ4zIA==", "dev": true, "dependencies": { - "@smithy/querystring-parser": "^2.0.11", - "@smithy/types": "^2.3.5", + "@smithy/querystring-parser": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, @@ -1491,14 +1542,14 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.15.tgz", - "integrity": "sha512-2raMZOYKSuke7QlDg/HDcxQdrp0zteJ8z+S0B9Rn23J55ZFNK1+IjG4HkN6vo/0u3Xy/JOdJ93ibiBSB8F7kOw==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.16.tgz", + "integrity": "sha512-Uv5Cu8nVkuvLn0puX+R9zWbSNpLIR3AxUlPoLJ7hC5lvir8B2WVqVEkJLwtixKAncVLasnTVjPDCidtAUTGEQw==", "dev": true, "dependencies": { - "@smithy/property-provider": "^2.0.12", - "@smithy/smithy-client": "^2.1.11", - "@smithy/types": "^2.3.5", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, @@ -1507,17 +1558,17 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.20.tgz", - "integrity": "sha512-kJjcZ/Lzvs3sPDKBwlhZsFFcgPNIpB3CMb6/saCakawRzo0E+JkyS3ZZRjVR3ce29yHtwoP/0YLKC1PeH0Dffg==", + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.21.tgz", + "integrity": "sha512-cUEsttVZ79B7Al2rWK2FW03HBpD9LyuqFtm+1qFty5u9sHSdesr215gS2Ln53fTopNiPgeXpdoM3IgjvIO0rJw==", "dev": true, "dependencies": { - "@smithy/config-resolver": "^2.0.15", - "@smithy/credential-provider-imds": "^2.0.17", - "@smithy/node-config-provider": "^2.1.2", - "@smithy/property-provider": "^2.0.12", - "@smithy/smithy-client": "^2.1.11", - "@smithy/types": "^2.3.5", + "@smithy/config-resolver": "^2.0.16", + "@smithy/credential-provider-imds": "^2.0.18", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1537,12 +1588,12 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.4.tgz", - "integrity": "sha512-Pbu6P4MBwRcjrLgdTR1O4Y3c0sTZn2JdOiJNcgL7EcIStcQodj+6ZTXtbyU/WTEU3MV2NMA10LxFc3AWHZ3+4A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.5.tgz", + "integrity": "sha512-1lyT3TcaMJQe+OFfVI+TlomDkPuVzb27NZYdYtmSTltVmLaUjdCyt4KE+OH1CnhZKsz4/cdCL420Lg9UH5Z2Mw==", "dev": true, "dependencies": { - "@smithy/types": "^2.3.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1550,13 +1601,13 @@ } }, "node_modules/@smithy/util-retry": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.4.tgz", - "integrity": "sha512-b+n1jBBKc77C1E/zfBe1Zo7S9OXGBiGn55N0apfhZHxPUP/fMH5AhFUUcWaJh7NAnah284M5lGkBKuhnr3yK5w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.5.tgz", + "integrity": "sha512-x3t1+MQAJ6QONk3GTbJNcugCFDVJ+Bkro5YqQQK1EyVesajNDqxFtCx9WdOFNGm/Cbm7tUdwVEmfKQOJoU2Vtw==", "dev": true, "dependencies": { - "@smithy/service-error-classification": "^2.0.4", - "@smithy/types": "^2.3.5", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -1564,14 +1615,14 @@ } }, "node_modules/@smithy/util-stream": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.16.tgz", - "integrity": "sha512-b5ZSRh1KzUzC7LoJcpfk7+iXGoRr3WylEfmPd4FnBLm90OwxSB9VgK1fDZwicfYxSEvWHdYXgvvjPtenEYBBhw==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.17.tgz", + "integrity": "sha512-fP/ZQ27rRvHsqItds8yB7jerwMpZFTL3QqbQbidUiG0+mttMoKdP0ZqnvM8UK5q0/dfc3/pN7g4XKPXOU7oRWw==", "dev": true, "dependencies": { - "@smithy/fetch-http-handler": "^2.2.3", - "@smithy/node-http-handler": "^2.1.7", - "@smithy/types": "^2.3.5", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-hex-encoding": "^2.0.0", @@ -1608,13 +1659,13 @@ } }, "node_modules/@smithy/util-waiter": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.11.tgz", - "integrity": "sha512-8SJWUl9O1YhjC77EccgltI3q4XZQp3vp9DGEW6o0OdkUcwqm/H4qOLnMkA2n+NDojuM5Iia2jWoCdbluIiG7TA==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.12.tgz", + "integrity": "sha512-3sENmyVa1NnOPoiT2NCApPmu7ukP7S/v7kL9IxNmnygkDldn7/yK0TP42oPJLwB2k3mospNsSePIlqdXEUyPHA==", "dev": true, "dependencies": { - "@smithy/abort-controller": "^2.0.11", - "@smithy/types": "^2.3.5", + "@smithy/abort-controller": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -2958,24 +3009,18 @@ }, "node_modules/cdk8s-plus-25/node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/cdk8s-plus-25/node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/cdk8s-plus-25/node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "inBundle": true, "license": "ISC", @@ -3020,24 +3065,18 @@ }, "node_modules/cdk8s-plus-27/node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/cdk8s-plus-27/node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/cdk8s-plus-27/node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "inBundle": true, "license": "ISC", @@ -3060,16 +3099,12 @@ }, "node_modules/cdk8s/node_modules/fast-json-patch": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", - "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/cdk8s/node_modules/follow-redirects": { "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "dev": true, "funding": [ { @@ -3090,8 +3125,6 @@ }, "node_modules/cdk8s/node_modules/yaml": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", - "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", "dev": true, "inBundle": true, "license": "ISC", diff --git a/package.json b/package.json index 7caf73322..56072196a 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,9 @@ "format": "npx prettier . -w" }, "devDependencies": { - "@aws-sdk/client-cloudformation": "^3.429.0", - "@aws-sdk/client-eks": "^3.429.0", + "@aws-sdk/client-cloudformation": "3.429.0", + "@aws-sdk/client-eks": "3.429.0", + "@aws-sdk/client-ssm": "3.429.0", "@aws-cdk/lambda-layer-kubectl-v27": "^2.0.0", "@linzjs/style": "^5.0.0", "aws-cdk": "2.93.x", From 27e97521084c5f02613e7710a3b7401809941634 Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Mon, 30 Oct 2023 10:53:25 +1300 Subject: [PATCH 2/2] refactor: simplify cfn output logic (#212) #### Motivation Use syntatical sugar to reduce the number of explicit checks needed #### Modification - Uses modern javascript syntax sugar - Avoids using `!object` or `if(object)` to prevent type conversions #### Checklist _If not applicable, provide explanation of why._ - [ ] Tests updated - [ ] Docs updated - [ ] Issue linked in Title --- infra/util/cloud.formation.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/infra/util/cloud.formation.ts b/infra/util/cloud.formation.ts index 618a3f136..04cb10dde 100644 --- a/infra/util/cloud.formation.ts +++ b/infra/util/cloud.formation.ts @@ -3,21 +3,12 @@ import { CloudFormation } from '@aws-sdk/client-cloudformation'; export async function getCfnOutputs(stackName: string): Promise> { const cfn = new CloudFormation(); const searchStacks = await cfn.describeStacks({ StackName: stackName }); - cfn.listExports; const outputs: Record = {}; - const stacks = (searchStacks && searchStacks.Stacks) || []; - const stack = stacks.find((s) => s.StackName === stackName); + const stack = searchStacks?.Stacks?.find((s) => s.StackName === stackName); + if (stack?.Outputs == null) throw new Error(`Unable to find stack "${stackName}"`); - if (!stack) { - throw new Error(`Unable to find stack "${stackName}"`); - } - if (!stack.Outputs) { - throw new Error(`There is no output for stack "${stackName}"`); - } stack.Outputs.forEach(({ OutputKey, OutputValue }) => { - if (OutputKey && OutputValue) { - outputs[OutputKey] = OutputValue; - } + if (OutputKey != null && OutputValue != null) outputs[OutputKey] = OutputValue; }); return outputs; }