diff --git a/.projen/deps.json b/.projen/deps.json index f29f83dd..5c62476b 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -102,7 +102,7 @@ }, { "name": "@aws-cdk/aws-redshift-alpha", - "version": "2.112.0-alpha.0", + "version": "2.160.0-alpha.0", "type": "devenv" }, { @@ -122,7 +122,7 @@ }, { "name": "aws-cdk-lib", - "version": "^2.112.0", + "version": "^2.160.0", "type": "peer" }, { diff --git a/.projen/tasks.json b/.projen/tasks.json index 061c0525..42fb93bc 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -244,7 +244,7 @@ "description": "Prepare a release from \"main\" branch", "env": { "RELEASE": "true", - "MAJOR": "8" + "MAJOR": "9" }, "steps": [ { diff --git a/.projenrc.ts b/.projenrc.ts index 85a8a243..72dd0990 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -7,7 +7,7 @@ import { } from "projen"; import { TrailingComma } from "projen/lib/javascript"; -const CDK_VERSION = "2.112.0"; +const CDK_VERSION = "2.160.0"; const project = new awscdk.AwsCdkConstructLibrary({ name: "cdk-monitoring-constructs", @@ -18,7 +18,7 @@ const project = new awscdk.AwsCdkConstructLibrary({ keywords: ["cloudwatch", "monitoring"], defaultReleaseBranch: "main", - majorVersion: 8, + majorVersion: 9, stability: "experimental", cdkVersion: CDK_VERSION, diff --git a/README.md b/README.md index 644587aa..986bf738 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ In your `package.json`: ```json { "dependencies": { - "cdk-monitoring-constructs": "^7.0.0", + "cdk-monitoring-constructs": "^9.0.0", // peer dependencies of cdk-monitoring-constructs - "aws-cdk-lib": "^2.112.0", + "aws-cdk-lib": "^2.160.0", "constructs": "^10.0.5" // ...your other dependencies... diff --git a/lib/monitoring/aws-rds/AuroraClusterMonitoring.ts b/lib/monitoring/aws-rds/AuroraClusterMonitoring.ts index da5404b1..bb62fd27 100644 --- a/lib/monitoring/aws-rds/AuroraClusterMonitoring.ts +++ b/lib/monitoring/aws-rds/AuroraClusterMonitoring.ts @@ -3,7 +3,6 @@ import { HorizontalAnnotation, IWidget, } from "aws-cdk-lib/aws-cloudwatch"; -import { ServerlessCluster } from "aws-cdk-lib/aws-rds"; import { RdsClusterMetricFactory, @@ -75,12 +74,6 @@ export class AuroraClusterMonitoring extends Monitoring { constructor(scope: MonitoringScope, props: AuroraClusterMonitoringProps) { super(scope, props); - if (!this.isServerlessCluster(props.cluster)) { - throw Error( - "Cluster is not of type `ServerlessCluster`. Monitoring is not applicable.", - ); - } - const metricFactory = new RdsClusterMetricFactory( scope.createMetricFactory(), props, @@ -164,10 +157,6 @@ export class AuroraClusterMonitoring extends Monitoring { props.useCreatedAlarms?.consume(this.createdAlarms()); } - private isServerlessCluster(obj: any): obj is ServerlessCluster { - return (obj as any).clusterArn !== undefined; - } - summaryWidgets(): IWidget[] { return [ this.createTitleWidget(), diff --git a/package.json b/package.json index 2a2e6c7a..517e2fa1 100644 --- a/package.json +++ b/package.json @@ -37,13 +37,13 @@ "organization": false }, "devDependencies": { - "@aws-cdk/aws-redshift-alpha": "2.112.0-alpha.0", + "@aws-cdk/aws-redshift-alpha": "2.160.0-alpha.0", "@types/jest": "^27", "@types/node": "^16 <= 16.18.78", "@types/prettier": "2.6.0", "@typescript-eslint/eslint-plugin": "^8", "@typescript-eslint/parser": "^8", - "aws-cdk-lib": "2.112.0", + "aws-cdk-lib": "2.160.0", "commit-and-tag-version": "^12", "constructs": "10.0.5", "eslint": "^9", @@ -65,7 +65,7 @@ "typescript": "^4.9.5" }, "peerDependencies": { - "aws-cdk-lib": "^2.112.0", + "aws-cdk-lib": "^2.160.0", "constructs": "^10.0.5" }, "resolutions": { diff --git a/test/dashboard/widget/__snapshots__/BitmapWidget.test.ts.snap b/test/dashboard/widget/__snapshots__/BitmapWidget.test.ts.snap index 9020ffeb..cc3d9648 100644 --- a/test/dashboard/widget/__snapshots__/BitmapWidget.test.ts.snap +++ b/test/dashboard/widget/__snapshots__/BitmapWidget.test.ts.snap @@ -2,6 +2,7 @@ exports[`support 1`] = ` Object { + "Mappings": [MAPPING REMOVED], "Parameters": Object { "BootstrapVersion": Object { "Default": "/cdk-bootstrap/hnb659fds/version", @@ -29,7 +30,15 @@ Object { "Arn", ], }, - "Runtime": "nodejs18.x", + "Runtime": Object { + "Fn::FindInMap": Array [ + "LatestNodeRuntimeMap", + Object { + "Ref": "AWS::Region", + }, + "value", + ], + }, "Timeout": 900, }, "Type": "AWS::Lambda::Function", diff --git a/test/facade/__snapshots__/MonitoringAspect.test.ts.snap b/test/facade/__snapshots__/MonitoringAspect.test.ts.snap index 49efeb92..fd828298 100644 --- a/test/facade/__snapshots__/MonitoringAspect.test.ts.snap +++ b/test/facade/__snapshots__/MonitoringAspect.test.ts.snap @@ -2591,6 +2591,7 @@ Object { exports[`MonitoringAspect DocumentDB 1`] = ` Object { + "Mappings": [MAPPING REMOVED], "Parameters": Object { "BootstrapVersion": Object { "Default": "/cdk-bootstrap/hnb659fds/version", @@ -3380,7 +3381,15 @@ Object { "Arn", ], }, - "Runtime": "nodejs18.x", + "Runtime": Object { + "Fn::FindInMap": Array [ + "LatestNodeRuntimeMap", + Object { + "Ref": "AWS::Region", + }, + "value", + ], + }, "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -5008,6 +5017,7 @@ Object { "Type": "AWS::CloudWatch::Dashboard", }, "DummyStreamBB06E5F7": Object { + "DeletionPolicy": "Retain", "Properties": Object { "RetentionPeriodHours": 24, "ShardCount": 1, @@ -5025,6 +5035,7 @@ Object { }, }, "Type": "AWS::Kinesis::Stream", + "UpdateReplacePolicy": "Retain", }, }, "Rules": Object { @@ -8840,115 +8851,6 @@ Object { exports[`MonitoringAspect StepFunctions 1`] = ` Object { - "Mappings": Object { - "ServiceprincipalMap": Object { - "af-south-1": Object { - "states": "states.af-south-1.amazonaws.com", - }, - "ap-east-1": Object { - "states": "states.ap-east-1.amazonaws.com", - }, - "ap-northeast-1": Object { - "states": "states.ap-northeast-1.amazonaws.com", - }, - "ap-northeast-2": Object { - "states": "states.ap-northeast-2.amazonaws.com", - }, - "ap-northeast-3": Object { - "states": "states.ap-northeast-3.amazonaws.com", - }, - "ap-south-1": Object { - "states": "states.ap-south-1.amazonaws.com", - }, - "ap-south-2": Object { - "states": "states.ap-south-2.amazonaws.com", - }, - "ap-southeast-1": Object { - "states": "states.ap-southeast-1.amazonaws.com", - }, - "ap-southeast-2": Object { - "states": "states.ap-southeast-2.amazonaws.com", - }, - "ap-southeast-3": Object { - "states": "states.ap-southeast-3.amazonaws.com", - }, - "ap-southeast-4": Object { - "states": "states.ap-southeast-4.amazonaws.com", - }, - "ca-central-1": Object { - "states": "states.ca-central-1.amazonaws.com", - }, - "cn-north-1": Object { - "states": "states.cn-north-1.amazonaws.com", - }, - "cn-northwest-1": Object { - "states": "states.cn-northwest-1.amazonaws.com", - }, - "eu-central-1": Object { - "states": "states.eu-central-1.amazonaws.com", - }, - "eu-central-2": Object { - "states": "states.eu-central-2.amazonaws.com", - }, - "eu-north-1": Object { - "states": "states.eu-north-1.amazonaws.com", - }, - "eu-south-1": Object { - "states": "states.eu-south-1.amazonaws.com", - }, - "eu-south-2": Object { - "states": "states.eu-south-2.amazonaws.com", - }, - "eu-west-1": Object { - "states": "states.eu-west-1.amazonaws.com", - }, - "eu-west-2": Object { - "states": "states.eu-west-2.amazonaws.com", - }, - "eu-west-3": Object { - "states": "states.eu-west-3.amazonaws.com", - }, - "il-central-1": Object { - "states": "states.il-central-1.amazonaws.com", - }, - "me-central-1": Object { - "states": "states.me-central-1.amazonaws.com", - }, - "me-south-1": Object { - "states": "states.me-south-1.amazonaws.com", - }, - "sa-east-1": Object { - "states": "states.sa-east-1.amazonaws.com", - }, - "us-east-1": Object { - "states": "states.us-east-1.amazonaws.com", - }, - "us-east-2": Object { - "states": "states.us-east-2.amazonaws.com", - }, - "us-gov-east-1": Object { - "states": "states.us-gov-east-1.amazonaws.com", - }, - "us-gov-west-1": Object { - "states": "states.us-gov-west-1.amazonaws.com", - }, - "us-iso-east-1": Object { - "states": "states.amazonaws.com", - }, - "us-iso-west-1": Object { - "states": "states.amazonaws.com", - }, - "us-isob-east-1": Object { - "states": "states.amazonaws.com", - }, - "us-west-1": Object { - "states": "states.us-west-1.amazonaws.com", - }, - "us-west-2": Object { - "states": "states.us-west-2.amazonaws.com", - }, - }, - }, "Parameters": Object { "BootstrapVersion": Object { "Default": "/cdk-bootstrap/hnb659fds/version", @@ -9137,15 +9039,7 @@ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { - "Service": Object { - "Fn::FindInMap": Array [ - "ServiceprincipalMap", - Object { - "Ref": "AWS::Region", - }, - "states", - ], - }, + "Service": "states.amazonaws.com", }, }, ], diff --git a/test/monitoring/aws-rds/AuroraClusterMonitoring.test.ts b/test/monitoring/aws-rds/AuroraClusterMonitoring.test.ts index c9291b8c..0c5e3335 100644 --- a/test/monitoring/aws-rds/AuroraClusterMonitoring.test.ts +++ b/test/monitoring/aws-rds/AuroraClusterMonitoring.test.ts @@ -1,12 +1,6 @@ import { Stack } from "aws-cdk-lib"; import { Template } from "aws-cdk-lib/assertions"; -import { InstanceType, SubnetType, Vpc } from "aws-cdk-lib/aws-ec2"; -import { - AuroraMysqlEngineVersion, - DatabaseCluster, - DatabaseClusterEngine, - ServerlessCluster, -} from "aws-cdk-lib/aws-rds"; +import { DatabaseClusterEngine, ServerlessCluster } from "aws-cdk-lib/aws-rds"; import { AuroraClusterMonitoring } from "../../../lib"; import { addMonitoringDashboardsToStack } from "../../utils/SnapshotUtil"; @@ -31,58 +25,6 @@ test("snapshot test: no alarms", () => { expect(Template.fromStack(stack)).toMatchSnapshot(); }); -test("RDS passed into Aurora Cluster", () => { - const testGuard = () => { - const stack = new Stack(); - const scope = new TestMonitoringScope(stack, "Scope"); - const vpc = new Vpc(scope, "DummyVpc", { - maxAzs: 3, - }); - const rdsCluster = new DatabaseCluster(scope, "DummyRdsCluster", { - engine: DatabaseClusterEngine.auroraMysql({ - version: AuroraMysqlEngineVersion.VER_2_07_10, - }), - instanceProps: { - instanceType: new InstanceType("t3.small"), - vpcSubnets: { - subnetType: SubnetType.PUBLIC, - }, - vpc, - }, - }); - - new AuroraClusterMonitoring(scope, { - alarmFriendlyName: "DummyAuroraCluster", - cluster: rdsCluster, - addCpuUsageAlarm: { - Warning: { - maxUsagePercent: 80, - }, - }, - addMaxConnectionCountAlarm: { - Warning: { - maxConnectionCount: 100, - }, - }, - addMinConnectionCountAlarm: { - Warning: { - minConnectionCount: 0, - }, - }, - addMaxServerlessDatabaseCapacityAlarm: { - Warning: { - maxUsageCount: 100, - }, - }, - }); - }; - - expect(testGuard).toThrow(Error); - expect(testGuard).toThrow( - "Cluster is not of type `ServerlessCluster`. Monitoring is not applicable.", - ); -}); - test("snapshot test: all alarms", () => { const stack = new Stack(); diff --git a/test/monitoring/aws-secretsmanager/__snapshots__/SecretsManagerSecretMonitoring.test.ts.snap b/test/monitoring/aws-secretsmanager/__snapshots__/SecretsManagerSecretMonitoring.test.ts.snap index 929c54b2..bfd9eabf 100644 --- a/test/monitoring/aws-secretsmanager/__snapshots__/SecretsManagerSecretMonitoring.test.ts.snap +++ b/test/monitoring/aws-secretsmanager/__snapshots__/SecretsManagerSecretMonitoring.test.ts.snap @@ -2,6 +2,7 @@ exports[`each stack in an app gets its own publisher instance 1`] = ` Object { + "Mappings": [MAPPING REMOVED], "Parameters": Object { "BootstrapVersion": Object { "Default": "/cdk-bootstrap/hnb659fds/version", @@ -29,7 +30,15 @@ Object { "Arn", ], }, - "Runtime": "nodejs18.x", + "Runtime": Object { + "Fn::FindInMap": Array [ + "LatestNodeRuntimeMap", + Object { + "Ref": "AWS::Region", + }, + "value", + ], + }, "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -329,6 +338,7 @@ Object { exports[`snapshot test 1`] = ` Object { + "Mappings": [MAPPING REMOVED], "Parameters": Object { "BootstrapVersion": Object { "Default": "/cdk-bootstrap/hnb659fds/version", @@ -356,7 +366,15 @@ Object { "Arn", ], }, - "Runtime": "nodejs18.x", + "Runtime": Object { + "Fn::FindInMap": Array [ + "LatestNodeRuntimeMap", + Object { + "Ref": "AWS::Region", + }, + "value", + ], + }, "Timeout": 900, }, "Type": "AWS::Lambda::Function", diff --git a/test/monitoring/aws-step-functions/__snapshots__/StepFunctionMonitoring.test.ts.snap b/test/monitoring/aws-step-functions/__snapshots__/StepFunctionMonitoring.test.ts.snap index dacc5624..305a79b4 100644 --- a/test/monitoring/aws-step-functions/__snapshots__/StepFunctionMonitoring.test.ts.snap +++ b/test/monitoring/aws-step-functions/__snapshots__/StepFunctionMonitoring.test.ts.snap @@ -2,115 +2,6 @@ exports[`snapshot test: all alarms 1`] = ` Object { - "Mappings": Object { - "ServiceprincipalMap": Object { - "af-south-1": Object { - "states": "states.af-south-1.amazonaws.com", - }, - "ap-east-1": Object { - "states": "states.ap-east-1.amazonaws.com", - }, - "ap-northeast-1": Object { - "states": "states.ap-northeast-1.amazonaws.com", - }, - "ap-northeast-2": Object { - "states": "states.ap-northeast-2.amazonaws.com", - }, - "ap-northeast-3": Object { - "states": "states.ap-northeast-3.amazonaws.com", - }, - "ap-south-1": Object { - "states": "states.ap-south-1.amazonaws.com", - }, - "ap-south-2": Object { - "states": "states.ap-south-2.amazonaws.com", - }, - "ap-southeast-1": Object { - "states": "states.ap-southeast-1.amazonaws.com", - }, - "ap-southeast-2": Object { - "states": "states.ap-southeast-2.amazonaws.com", - }, - "ap-southeast-3": Object { - "states": "states.ap-southeast-3.amazonaws.com", - }, - "ap-southeast-4": Object { - "states": "states.ap-southeast-4.amazonaws.com", - }, - "ca-central-1": Object { - "states": "states.ca-central-1.amazonaws.com", - }, - "cn-north-1": Object { - "states": "states.cn-north-1.amazonaws.com", - }, - "cn-northwest-1": Object { - "states": "states.cn-northwest-1.amazonaws.com", - }, - "eu-central-1": Object { - "states": "states.eu-central-1.amazonaws.com", - }, - "eu-central-2": Object { - "states": "states.eu-central-2.amazonaws.com", - }, - "eu-north-1": Object { - "states": "states.eu-north-1.amazonaws.com", - }, - "eu-south-1": Object { - "states": "states.eu-south-1.amazonaws.com", - }, - "eu-south-2": Object { - "states": "states.eu-south-2.amazonaws.com", - }, - "eu-west-1": Object { - "states": "states.eu-west-1.amazonaws.com", - }, - "eu-west-2": Object { - "states": "states.eu-west-2.amazonaws.com", - }, - "eu-west-3": Object { - "states": "states.eu-west-3.amazonaws.com", - }, - "il-central-1": Object { - "states": "states.il-central-1.amazonaws.com", - }, - "me-central-1": Object { - "states": "states.me-central-1.amazonaws.com", - }, - "me-south-1": Object { - "states": "states.me-south-1.amazonaws.com", - }, - "sa-east-1": Object { - "states": "states.sa-east-1.amazonaws.com", - }, - "us-east-1": Object { - "states": "states.us-east-1.amazonaws.com", - }, - "us-east-2": Object { - "states": "states.us-east-2.amazonaws.com", - }, - "us-gov-east-1": Object { - "states": "states.us-gov-east-1.amazonaws.com", - }, - "us-gov-west-1": Object { - "states": "states.us-gov-west-1.amazonaws.com", - }, - "us-iso-east-1": Object { - "states": "states.amazonaws.com", - }, - "us-iso-west-1": Object { - "states": "states.amazonaws.com", - }, - "us-isob-east-1": Object { - "states": "states.amazonaws.com", - }, - "us-west-1": Object { - "states": "states.us-west-1.amazonaws.com", - }, - "us-west-2": Object { - "states": "states.us-west-2.amazonaws.com", - }, - }, - }, "Parameters": Object { "BootstrapVersion": Object { "Default": "/cdk-bootstrap/hnb659fds/version", @@ -256,15 +147,7 @@ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { - "Service": Object { - "Fn::FindInMap": Array [ - "ServiceprincipalMap", - Object { - "Ref": "AWS::Region", - }, - "states", - ], - }, + "Service": "states.amazonaws.com", }, }, ], @@ -760,115 +643,6 @@ Object { exports[`snapshot test: all alarms, alarmPrefix on latency dedupeString 1`] = ` Object { - "Mappings": Object { - "ServiceprincipalMap": Object { - "af-south-1": Object { - "states": "states.af-south-1.amazonaws.com", - }, - "ap-east-1": Object { - "states": "states.ap-east-1.amazonaws.com", - }, - "ap-northeast-1": Object { - "states": "states.ap-northeast-1.amazonaws.com", - }, - "ap-northeast-2": Object { - "states": "states.ap-northeast-2.amazonaws.com", - }, - "ap-northeast-3": Object { - "states": "states.ap-northeast-3.amazonaws.com", - }, - "ap-south-1": Object { - "states": "states.ap-south-1.amazonaws.com", - }, - "ap-south-2": Object { - "states": "states.ap-south-2.amazonaws.com", - }, - "ap-southeast-1": Object { - "states": "states.ap-southeast-1.amazonaws.com", - }, - "ap-southeast-2": Object { - "states": "states.ap-southeast-2.amazonaws.com", - }, - "ap-southeast-3": Object { - "states": "states.ap-southeast-3.amazonaws.com", - }, - "ap-southeast-4": Object { - "states": "states.ap-southeast-4.amazonaws.com", - }, - "ca-central-1": Object { - "states": "states.ca-central-1.amazonaws.com", - }, - "cn-north-1": Object { - "states": "states.cn-north-1.amazonaws.com", - }, - "cn-northwest-1": Object { - "states": "states.cn-northwest-1.amazonaws.com", - }, - "eu-central-1": Object { - "states": "states.eu-central-1.amazonaws.com", - }, - "eu-central-2": Object { - "states": "states.eu-central-2.amazonaws.com", - }, - "eu-north-1": Object { - "states": "states.eu-north-1.amazonaws.com", - }, - "eu-south-1": Object { - "states": "states.eu-south-1.amazonaws.com", - }, - "eu-south-2": Object { - "states": "states.eu-south-2.amazonaws.com", - }, - "eu-west-1": Object { - "states": "states.eu-west-1.amazonaws.com", - }, - "eu-west-2": Object { - "states": "states.eu-west-2.amazonaws.com", - }, - "eu-west-3": Object { - "states": "states.eu-west-3.amazonaws.com", - }, - "il-central-1": Object { - "states": "states.il-central-1.amazonaws.com", - }, - "me-central-1": Object { - "states": "states.me-central-1.amazonaws.com", - }, - "me-south-1": Object { - "states": "states.me-south-1.amazonaws.com", - }, - "sa-east-1": Object { - "states": "states.sa-east-1.amazonaws.com", - }, - "us-east-1": Object { - "states": "states.us-east-1.amazonaws.com", - }, - "us-east-2": Object { - "states": "states.us-east-2.amazonaws.com", - }, - "us-gov-east-1": Object { - "states": "states.us-gov-east-1.amazonaws.com", - }, - "us-gov-west-1": Object { - "states": "states.us-gov-west-1.amazonaws.com", - }, - "us-iso-east-1": Object { - "states": "states.amazonaws.com", - }, - "us-iso-west-1": Object { - "states": "states.amazonaws.com", - }, - "us-isob-east-1": Object { - "states": "states.amazonaws.com", - }, - "us-west-1": Object { - "states": "states.us-west-1.amazonaws.com", - }, - "us-west-2": Object { - "states": "states.us-west-2.amazonaws.com", - }, - }, - }, "Parameters": Object { "BootstrapVersion": Object { "Default": "/cdk-bootstrap/hnb659fds/version", @@ -1014,15 +788,7 @@ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { - "Service": Object { - "Fn::FindInMap": Array [ - "ServiceprincipalMap", - Object { - "Ref": "AWS::Region", - }, - "states", - ], - }, + "Service": "states.amazonaws.com", }, }, ], @@ -1518,115 +1284,6 @@ Object { exports[`snapshot test: no alarms 1`] = ` Object { - "Mappings": Object { - "ServiceprincipalMap": Object { - "af-south-1": Object { - "states": "states.af-south-1.amazonaws.com", - }, - "ap-east-1": Object { - "states": "states.ap-east-1.amazonaws.com", - }, - "ap-northeast-1": Object { - "states": "states.ap-northeast-1.amazonaws.com", - }, - "ap-northeast-2": Object { - "states": "states.ap-northeast-2.amazonaws.com", - }, - "ap-northeast-3": Object { - "states": "states.ap-northeast-3.amazonaws.com", - }, - "ap-south-1": Object { - "states": "states.ap-south-1.amazonaws.com", - }, - "ap-south-2": Object { - "states": "states.ap-south-2.amazonaws.com", - }, - "ap-southeast-1": Object { - "states": "states.ap-southeast-1.amazonaws.com", - }, - "ap-southeast-2": Object { - "states": "states.ap-southeast-2.amazonaws.com", - }, - "ap-southeast-3": Object { - "states": "states.ap-southeast-3.amazonaws.com", - }, - "ap-southeast-4": Object { - "states": "states.ap-southeast-4.amazonaws.com", - }, - "ca-central-1": Object { - "states": "states.ca-central-1.amazonaws.com", - }, - "cn-north-1": Object { - "states": "states.cn-north-1.amazonaws.com", - }, - "cn-northwest-1": Object { - "states": "states.cn-northwest-1.amazonaws.com", - }, - "eu-central-1": Object { - "states": "states.eu-central-1.amazonaws.com", - }, - "eu-central-2": Object { - "states": "states.eu-central-2.amazonaws.com", - }, - "eu-north-1": Object { - "states": "states.eu-north-1.amazonaws.com", - }, - "eu-south-1": Object { - "states": "states.eu-south-1.amazonaws.com", - }, - "eu-south-2": Object { - "states": "states.eu-south-2.amazonaws.com", - }, - "eu-west-1": Object { - "states": "states.eu-west-1.amazonaws.com", - }, - "eu-west-2": Object { - "states": "states.eu-west-2.amazonaws.com", - }, - "eu-west-3": Object { - "states": "states.eu-west-3.amazonaws.com", - }, - "il-central-1": Object { - "states": "states.il-central-1.amazonaws.com", - }, - "me-central-1": Object { - "states": "states.me-central-1.amazonaws.com", - }, - "me-south-1": Object { - "states": "states.me-south-1.amazonaws.com", - }, - "sa-east-1": Object { - "states": "states.sa-east-1.amazonaws.com", - }, - "us-east-1": Object { - "states": "states.us-east-1.amazonaws.com", - }, - "us-east-2": Object { - "states": "states.us-east-2.amazonaws.com", - }, - "us-gov-east-1": Object { - "states": "states.us-gov-east-1.amazonaws.com", - }, - "us-gov-west-1": Object { - "states": "states.us-gov-west-1.amazonaws.com", - }, - "us-iso-east-1": Object { - "states": "states.amazonaws.com", - }, - "us-iso-west-1": Object { - "states": "states.amazonaws.com", - }, - "us-isob-east-1": Object { - "states": "states.amazonaws.com", - }, - "us-west-1": Object { - "states": "states.us-west-1.amazonaws.com", - }, - "us-west-2": Object { - "states": "states.us-west-2.amazonaws.com", - }, - }, - }, "Parameters": Object { "BootstrapVersion": Object { "Default": "/cdk-bootstrap/hnb659fds/version", @@ -1666,15 +1323,7 @@ Object { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": Object { - "Service": Object { - "Fn::FindInMap": Array [ - "ServiceprincipalMap", - Object { - "Ref": "AWS::Region", - }, - "states", - ], - }, + "Service": "states.amazonaws.com", }, }, ], diff --git a/test/setup/setup.ts b/test/setup/setup.ts index 0ad3d26f..fc303f0f 100644 --- a/test/setup/setup.ts +++ b/test/setup/setup.ts @@ -7,3 +7,9 @@ expect.addSnapshotSerializer({ "[HASH REMOVED].zip", )}"`, }); + +expect.addSnapshotSerializer({ + test: (val) => + val && Object.prototype.hasOwnProperty.call(val, "LatestNodeRuntimeMap"), + print: (_val) => "[MAPPING REMOVED]", +}); diff --git a/yarn.lock b/yarn.lock index eaf46788..b9dd55bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,25 +10,33 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@aws-cdk/asset-awscli-v1@^2.2.201": - version "2.2.210" - resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.210.tgz#1bea0c6b4742ab2ed529c2f8344d41ae502a5679" - integrity sha512-yxuGP52ZtdAGkcAik5mW79FKKv6yvc5QuCZbsKMyICk48alqs+ni7Iv2UnuGLkVSLh09+ixoHHu4o5rIv8X9jg== +"@aws-cdk/asset-awscli-v1@^2.2.202": + version "2.2.211" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.211.tgz#e33c1bab8e45ea3e4100fff1a0f4430a3ba2164d" + integrity sha512-56G1FYTiKyec3bEfEI/5UcU0XPnaGUlaDDH7OYClyvqss0HlnmoSulHK2gwai2PGAD1Nk+scPrdfH/MVAkSKuw== "@aws-cdk/asset-kubectl-v20@^2.1.2": version "2.1.3" resolved "https://registry.yarnpkg.com/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.3.tgz#80e09004be173995e91614e34d947da11dd9ff4d" integrity sha512-cDG1w3ieM6eOT9mTefRuTypk95+oyD7P5X/wRltwmYxU7nZc3+076YEVS6vrjDKr3ADYbfn0lDKpfB1FBtO9CQ== -"@aws-cdk/asset-node-proxy-agent-v6@^2.0.1": +"@aws-cdk/asset-node-proxy-agent-v6@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.0.tgz#6d3c7860354d4856a7e75375f2f0ecab313b4989" integrity sha512-7bY3J8GCVxLupn/kNmpPc5VJz8grx+4RKfnnJiO1LG+uxkZfANZG3RMHhE+qQxxwkyQ9/MfPtTpf748UhR425A== -"@aws-cdk/aws-redshift-alpha@2.112.0-alpha.0": - version "2.112.0-alpha.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/aws-redshift-alpha/-/aws-redshift-alpha-2.112.0-alpha.0.tgz#225dedf9fe860f049ec7f52214b0fbdae83ba449" - integrity sha512-vxGq1c/JPzJ9TT9Io222oE4WvjDQBuITOylVVDsWPCNXH8Detu147e5w6SfzIEESRwAlXwcgEonRb+arlMRplQ== +"@aws-cdk/aws-redshift-alpha@2.160.0-alpha.0": + version "2.160.0-alpha.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/aws-redshift-alpha/-/aws-redshift-alpha-2.160.0-alpha.0.tgz#7a4a230a40203bb88fbd35a7297abda73136a08f" + integrity sha512-fV13/aKZUYXRtfM/S9BcUU2MY5dzbRUg6uWXiLhfuFj6LK9/ej9K3n78K7Fbn/LezHVr0QPtU2LHI0vc/j0rJw== + +"@aws-cdk/cloud-assembly-schema@^38.0.0": + version "38.0.1" + resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-38.0.1.tgz#cdf4684ae8778459e039cd44082ea644a3504ca9" + integrity sha512-KvPe+NMWAulfNVwY7jenFhzhuLhLqJ/OPy5jx7wUstbjnYnjRVLpUHPU3yCjXFE0J8cuJVdx95BJ4rOs66Pi9w== + dependencies: + jsonschema "^1.4.1" + semver "^7.6.3" "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0": version "7.26.2" @@ -1181,23 +1189,25 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" -aws-cdk-lib@2.112.0: - version "2.112.0" - resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.112.0.tgz#42a9e821b95a67636328defd536e3c7bc833d67a" - integrity sha512-nrxfXM05Lq6HRoOXdrGXcc1XqqJTtCW3EkjPqdT0kkZ+fR6yQgbzdW2nVxSBiVDNmcf82vLBTmFMezdEgj8N4w== +aws-cdk-lib@2.160.0: + version "2.160.0" + resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.160.0.tgz#29e8104d2a4d93afd90c250265ea76e1c63baa3f" + integrity sha512-HJvn1lKmyZk1i56j4sgOddRfoDto9L/INgXSWmLzDdnMdMQWRvB/dbPQPrF1voVN26UKmrNdH9Irr0soMD5B1A== dependencies: - "@aws-cdk/asset-awscli-v1" "^2.2.201" + "@aws-cdk/asset-awscli-v1" "^2.2.202" "@aws-cdk/asset-kubectl-v20" "^2.1.2" - "@aws-cdk/asset-node-proxy-agent-v6" "^2.0.1" + "@aws-cdk/asset-node-proxy-agent-v6" "^2.1.0" + "@aws-cdk/cloud-assembly-schema" "^38.0.0" "@balena/dockerignore" "^1.0.2" case "1.6.3" - fs-extra "^11.1.1" - ignore "^5.3.0" + fs-extra "^11.2.0" + ignore "^5.3.2" jsonschema "^1.4.1" + mime-types "^2.1.35" minimatch "^3.1.2" punycode "^2.3.1" - semver "^7.5.4" - table "^6.8.1" + semver "^7.6.3" + table "^6.8.2" yaml "1.10.2" babel-jest@^27.5.1: @@ -2438,7 +2448,7 @@ fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^11.1.1: +fs-extra@^11.2.0: version "11.2.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== @@ -2796,7 +2806,7 @@ iconv-lite@0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ignore@^5.2.0, ignore@^5.3.0, ignore@^5.3.1: +ignore@^5.2.0, ignore@^5.3.1, ignore@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== @@ -3954,7 +3964,7 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12: +mime-types@^2.1.12, mime-types@^2.1.35: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -4636,7 +4646,7 @@ semver-intersect@^1.5.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@7.x, semver@^7.0.0, semver@^7.3.2, semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.3: +semver@7.x, semver@^7.0.0, semver@^7.3.2, semver@^7.3.4, semver@^7.5.3, semver@^7.6.0, semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -4968,7 +4978,7 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -table@^6.8.1: +table@^6.8.2: version "6.8.2" resolved "https://registry.yarnpkg.com/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" integrity sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==