cdk-real-drift 0.12.92 → 0.12.94

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
@@ -3017,6 +3017,18 @@ const KNOWN_DEFAULT_PATHS = {
3017
3017
  InCluster: true
3018
3018
  }
3019
3019
  },
3020
+ "AWS::ElasticBeanstalk::Application": { "ResourceLifecycleConfig.VersionLifecycleConfig": {
3021
+ MaxCountRule: {
3022
+ DeleteSourceFromS3: false,
3023
+ Enabled: false,
3024
+ MaxCount: 200
3025
+ },
3026
+ MaxAgeRule: {
3027
+ DeleteSourceFromS3: false,
3028
+ MaxAgeInDays: 180,
3029
+ Enabled: false
3030
+ }
3031
+ } },
3020
3032
  "AWS::Batch::JobDefinition": {
3021
3033
  "ContainerProperties.RuntimePlatform.CpuArchitecture": "X86_64",
3022
3034
  "ContainerProperties.RuntimePlatform.OperatingSystemFamily": "LINUX",
@@ -3188,7 +3200,8 @@ const DESCEND_UNDECLARED_OBJECT_PATHS = {
3188
3200
  "AWS::EKS::Cluster": new Set(["KubernetesNetworkConfig"]),
3189
3201
  "AWS::Athena::WorkGroup": new Set(["WorkGroupConfiguration"]),
3190
3202
  "AWS::KinesisVideo::Stream": new Set(["StreamStorageConfiguration"]),
3191
- "AWS::MSK::Cluster": new Set(["EncryptionInfo"])
3203
+ "AWS::MSK::Cluster": new Set(["EncryptionInfo"]),
3204
+ "AWS::ElasticBeanstalk::Application": new Set(["ResourceLifecycleConfig"])
3192
3205
  };
3193
3206
  const GENERATED_LOGICALID_PREFIX_PATHS = {
3194
3207
  "AWS::Cognito::UserPoolClient": new Set(["ClientName"]),
@@ -3212,7 +3225,8 @@ const GENERATED_NESTED_PATHS = {
3212
3225
  "AWS::DynamoDB::Table": new Set(["SSESpecification.KMSMasterKeyId"]),
3213
3226
  "AWS::DynamoDB::GlobalTable": new Set(["Replicas.*.SSESpecification.KMSMasterKeyId"]),
3214
3227
  "AWS::AutoScaling::AutoScalingGroup": new Set(["LaunchTemplate.LaunchTemplateName"]),
3215
- "AWS::MSK::Cluster": new Set(["EncryptionInfo.EncryptionAtRest", "BrokerNodeGroupInfo.SecurityGroups"])
3228
+ "AWS::MSK::Cluster": new Set(["EncryptionInfo.EncryptionAtRest", "BrokerNodeGroupInfo.SecurityGroups"]),
3229
+ "AWS::ElasticBeanstalk::Application": new Set(["ResourceLifecycleConfig.ServiceRole"])
3216
3230
  };
3217
3231
  const EB_OPTION_DEFAULTS = {
3218
3232
  "aws:autoscaling:asg|Availability Zones": "Any",
@@ -5536,6 +5550,7 @@ const MEANINGFUL_WHEN_OFF = {
5536
5550
  "AWS::Lambda::EventSourceMapping": { Enabled: () => true },
5537
5551
  "AWS::ElasticLoadBalancingV2::TargetGroup": { HealthCheckEnabled: ({ declared }) => declared["TargetType"] !== "lambda" }
5538
5552
  };
5553
+ const MEANINGFUL_WHEN_OFF_NESTED = { "AWS::CloudFront::Distribution": { "DistributionConfig.IPV6Enabled": () => true } };
5539
5554
  const GUARDDUTY_DEFAULT_DISABLED_FEATURES = new Set(["AI_ANALYST"]);
5540
5555
  function guardDutyFeaturesAllAtDefault(features) {
5541
5556
  const atDefault = (node) => {
@@ -6701,13 +6716,16 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
6701
6716
  const freeFormMapPaths = schema.freeFormMapPaths ?? [];
6702
6717
  const underFreeFormMap = (schemaPath) => freeFormMapPaths.some((ff) => schemaPath.startsWith(`${ff}.`));
6703
6718
  const emitNested = (path, value) => {
6704
- if (isTrivialEmpty(value)) return;
6719
+ const schemaPath = path.replace(/\[[^\]]*\]/g, ".*");
6720
+ if (!(schemaPath in knownDefPaths && !matchesKnownDefault(value, knownDefPaths[schemaPath]) && (MEANINGFUL_WHEN_OFF_NESTED[resourceType]?.[schemaPath]?.({
6721
+ declared,
6722
+ live
6723
+ }) ?? false)) && isTrivialEmpty(value)) return;
6705
6724
  if (isAllAwsTags(value)) {
6706
6725
  const isObjectForm = value !== null && typeof value === "object" && !Array.isArray(value);
6707
6726
  const parentKey = (path.split(".").pop() ?? "").replace(/\[.*$/, "");
6708
6727
  if (!isObjectForm || /tags$/i.test(parentKey)) return;
6709
6728
  }
6710
- const schemaPath = path.replace(/\[[^\]]*\]/g, ".*");
6711
6729
  const tier = schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]) || (KNOWN_DEFAULT_ONE_OF_PATHS[resourceType]?.[schemaPath]?.some((d) => matchesKnownDefault(value, d)) ?? false) || dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live) || resourceType === "AWS::Events::EventBusPolicy" && schemaPath === "Statement.*.Sid" && typeof value === "string" && value === declared["StatementId"] ? "atDefault" : generatedPaths.includes(schemaPath) && isPhysicalIdSegment(value, physicalId) || generatedNestedPaths?.has(schemaPath) && !(schemaPath in knownDefPaths) && (!(schemaPath in (MANAGED_KEY_ALIAS_PATHS[resourceType] ?? {})) || shouldFoldManagedServiceKey(resourceType, schemaPath, value, opts.kmsAliasTargets)) ? "generated" : "undeclared";
6712
6730
  const freeFormKey = tier === "undeclared" && underFreeFormMap(schemaPath);
6713
6731
  findings.push({
@@ -16811,7 +16829,10 @@ const writeElasticBeanstalkApplication = async (ctx, ops) => {
16811
16829
  if (top && EB_APPLICATION_MODIFY_PARAMS.has(top)) {
16812
16830
  input[top] = op.op === "remove" ? "" : str(ctx.declared[top]) ?? "";
16813
16831
  any = true;
16814
- } else if (top === "ResourceLifecycleConfig") lifecycle = op.op === "remove" ? EB_APPLICATION_DEFAULT_RESOURCE_LIFECYCLE : asObject(ctx.declared["ResourceLifecycleConfig"]) ?? asObject(op.value) ?? EB_APPLICATION_DEFAULT_RESOURCE_LIFECYCLE;
16832
+ } else if (top === "ResourceLifecycleConfig") {
16833
+ const targetsWholeObject = op.path.replace(/^\//, "") === "ResourceLifecycleConfig";
16834
+ lifecycle = op.op === "remove" ? EB_APPLICATION_DEFAULT_RESOURCE_LIFECYCLE : asObject(ctx.declared["ResourceLifecycleConfig"]) ?? (targetsWholeObject ? asObject(op.value) : void 0) ?? EB_APPLICATION_DEFAULT_RESOURCE_LIFECYCLE;
16835
+ }
16815
16836
  }
16816
16837
  if (any) await client.send(new UpdateApplicationCommand(input));
16817
16838
  if (lifecycle !== void 0) await client.send(new UpdateApplicationResourceLifecycleCommand({