cdk-real-drift 0.2.35 → 0.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1192,7 +1192,10 @@ const KNOWN_DEFAULTS = {
1192
1192
  },
1193
1193
  "AWS::Lambda::Alias": { Description: "" },
1194
1194
  "AWS::Lambda::Version": { RuntimePolicy: { UpdateRuntimeOn: "Auto" } },
1195
- "AWS::Events::Rule": { EventBusName: "default" },
1195
+ "AWS::Events::Rule": {
1196
+ EventBusName: "default",
1197
+ State: "ENABLED"
1198
+ },
1196
1199
  "AWS::Athena::WorkGroup": {
1197
1200
  State: "ENABLED",
1198
1201
  WorkGroupConfiguration: {
@@ -1253,7 +1256,9 @@ const KNOWN_DEFAULTS = {
1253
1256
  },
1254
1257
  "AWS::ElasticLoadBalancingV2::LoadBalancer": {
1255
1258
  IpAddressType: "ipv4",
1256
- EnablePrefixForIpv6SourceNat: "off"
1259
+ EnablePrefixForIpv6SourceNat: "off",
1260
+ Scheme: "internet-facing",
1261
+ Type: "application"
1257
1262
  },
1258
1263
  "AWS::ElasticLoadBalancingV2::Listener": { MutualAuthentication: { Mode: "off" } },
1259
1264
  "AWS::EC2::NatGateway": {
@@ -1369,6 +1374,14 @@ const KNOWN_DEFAULTS = {
1369
1374
  },
1370
1375
  KeyConfiguration: { KeyType: "AWS_OWNED_KEY" },
1371
1376
  IssuerConfiguration: { Type: "ORIGINAL" },
1377
+ VerificationMessageTemplate: { DefaultEmailOption: "CONFIRM_WITH_CODE" },
1378
+ AccountRecoverySetting: { RecoveryMechanisms: [{
1379
+ Priority: 1,
1380
+ Name: "verified_email"
1381
+ }, {
1382
+ Priority: 2,
1383
+ Name: "verified_phone_number"
1384
+ }] },
1372
1385
  WebAuthnFactorConfiguration: "SINGLE_FACTOR"
1373
1386
  },
1374
1387
  "AWS::Cognito::IdentityPool": { AllowClassicFlow: false },
@@ -1527,7 +1540,10 @@ const KNOWN_DEFAULTS = {
1527
1540
  }]
1528
1541
  }
1529
1542
  },
1530
- "AWS::EC2::EIP": { PublicIpv4Pool: "amazon" },
1543
+ "AWS::EC2::EIP": {
1544
+ PublicIpv4Pool: "amazon",
1545
+ Domain: "vpc"
1546
+ },
1531
1547
  "AWS::EC2::TransitGateway": { SecurityGroupReferencingSupport: "disable" },
1532
1548
  "AWS::EC2::FlowLog": { MaxAggregationInterval: 600 },
1533
1549
  "AWS::EC2::PlacementGroup": { SpreadLevel: "rack" },
@@ -2220,6 +2236,7 @@ function ebOptionSettingTier(namespace, optionName, value, envType) {
2220
2236
  return "undeclared";
2221
2237
  }
2222
2238
  const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
2239
+ "AWS::ElasticLoadBalancingV2::LoadBalancer": new Set(["SecurityGroups"]),
2223
2240
  "AWS::Batch::JobQueue": new Set(["JobQueueType"]),
2224
2241
  "AWS::ECS::Service": new Set(["AvailabilityZoneRebalancing", "PlatformVersion"]),
2225
2242
  "AWS::KinesisAnalyticsV2::Application": new Set(["ApplicationMaintenanceConfiguration"]),
@@ -4069,6 +4086,32 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4069
4086
  };
4070
4087
  }
4071
4088
  }
4089
+ if (resourceType === "AWS::Lambda::EventSourceMapping") {
4090
+ const arn = declared["EventSourceArn"];
4091
+ const service = typeof arn === "string" ? arn.split(":")[2] : void 0;
4092
+ const batchDefault = service === "sqs" ? 10 : service === "kinesis" || service === "dynamodb" || service === "kafka" ? 100 : void 0;
4093
+ if (batchDefault !== void 0) knownDef = {
4094
+ ...knownDef,
4095
+ BatchSize: batchDefault
4096
+ };
4097
+ }
4098
+ if (resourceType === "AWS::KMS::Key" && opts.accountId !== void 0) {
4099
+ const partition = opts.region?.startsWith("cn-") ? "aws-cn" : opts.region?.startsWith("us-gov-") ? "aws-us-gov" : "aws";
4100
+ knownDef = {
4101
+ ...knownDef,
4102
+ KeyPolicy: canonicalizePolicy({
4103
+ Version: "2012-10-17",
4104
+ Id: "key-default-1",
4105
+ Statement: [{
4106
+ Sid: "Enable IAM User Permissions",
4107
+ Effect: "Allow",
4108
+ Principal: { AWS: `arn:${partition}:iam::${opts.accountId}:root` },
4109
+ Action: "kms:*",
4110
+ Resource: "*"
4111
+ }]
4112
+ })
4113
+ };
4114
+ }
4072
4115
  if (resourceType === "AWS::ApiGateway::RestApi") {
4073
4116
  const types = declared["EndpointConfiguration"]?.["Types"];
4074
4117
  if (Array.isArray(types) && types.includes("PRIVATE")) {
@@ -4440,7 +4483,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4440
4483
  }
4441
4484
  continue;
4442
4485
  }
4443
- if (k in schema.defaults && matchesKnownDefault(v, schema.defaults[k]) || k in knownDef && matchesKnownDefault(v, knownDef[k]) || KNOWN_DEFAULT_ONE_OF[resourceType]?.[k]?.some((d) => matchesKnownDefault(v, d)) || VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS[resourceType]?.has(k)) {
4486
+ if (k in schema.defaults && matchesKnownDefault(v, schema.defaults[k]) || k in knownDef && matchesKnownDefault(v, knownDef[k]) || KNOWN_DEFAULT_ONE_OF[resourceType]?.[k]?.some((d) => matchesKnownDefault(v, d)) || VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS[resourceType]?.has(k) && !isTrivialEmpty(v)) {
4444
4487
  findings.push({
4445
4488
  tier: "atDefault",
4446
4489
  logicalId,