cdk-real-drift 0.23.4 → 0.23.6

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
@@ -1923,10 +1923,16 @@ function buildCorpusCase(resource, liveRaw, schema, opts, findings) {
1923
1923
  const gaListenerPort = typeof listenerArn === "string" && opts.siblingListenerPorts?.[listenerArn] !== void 0 ? { [listenerArn]: opts.siblingListenerPorts[listenerArn] } : void 0;
1924
1924
  const dmsClass = resource.resourceType === "AWS::DMS::ReplicationInstance" ? resource.declared?.ReplicationInstanceClass : void 0;
1925
1925
  const dmsStorageDefault = typeof dmsClass === "string" && opts.accountDefaults?.dmsAllocatedStorageDefaults?.[dmsClass] !== void 0 ? { dmsAllocatedStorageDefaults: { [dmsClass]: opts.accountDefaults.dmsAllocatedStorageDefaults[dmsClass] } } : void 0;
1926
+ const ebsEncDefault = resource.resourceType === "AWS::EC2::Volume" && opts.accountDefaults?.ebsEncryptionByDefault !== void 0 ? { ebsEncryptionByDefault: opts.accountDefaults.ebsEncryptionByDefault } : void 0;
1926
1927
  const cvpnVpcMap = opts.siblingClientVpnEndpointVpcs;
1927
1928
  const cvpnVpcKey = resource.resourceType !== "AWS::EC2::ClientVpnEndpoint" || cvpnVpcMap === void 0 ? void 0 : resource.logicalId in cvpnVpcMap ? resource.logicalId : resource.physicalId !== void 0 && resource.physicalId in cvpnVpcMap ? resource.physicalId : void 0;
1928
1929
  const cfCdMap = opts.siblingCloudFrontCdPolicyIds;
1929
1930
  const cfCdKey = resource.resourceType !== "AWS::CloudFront::Distribution" || cfCdMap === void 0 ? void 0 : resource.logicalId in cfCdMap ? resource.logicalId : resource.physicalId !== void 0 && resource.physicalId in cfCdMap ? resource.physicalId : void 0;
1931
+ const rdsSrcMap = opts.siblingRdsSourceModels;
1932
+ const rdsSrcKey = resource.resourceType === "AWS::RDS::DBInstance" && rdsSrcMap !== void 0 ? (() => {
1933
+ const srcId = resource.declared?.["SourceDBInstanceIdentifier"];
1934
+ return typeof srcId === "string" && srcId in rdsSrcMap ? srcId : void 0;
1935
+ })() : void 0;
1930
1936
  return sanitizeAccountId({
1931
1937
  corpusVersion: 1,
1932
1938
  resource: {
@@ -1965,9 +1971,13 @@ function buildCorpusCase(resource, liveRaw, schema, opts, findings) {
1965
1971
  ...echoModel && resource.physicalId ? { clusterEchoModel: { [resource.physicalId]: echoModel } } : {},
1966
1972
  ...rdsOptCatalog && resource.physicalId ? { rdsOptionSettingDefaults: { [resource.physicalId]: rdsOptCatalog } } : {},
1967
1973
  ...gaListenerPort ? { siblingListenerPorts: gaListenerPort } : {},
1968
- ...dmsStorageDefault ? { accountDefaults: dmsStorageDefault } : {},
1974
+ ...dmsStorageDefault || ebsEncDefault ? { accountDefaults: {
1975
+ ...dmsStorageDefault ?? {},
1976
+ ...ebsEncDefault ?? {}
1977
+ } } : {},
1969
1978
  ...cvpnVpcKey !== void 0 && cvpnVpcMap !== void 0 ? { siblingClientVpnEndpointVpcs: { [cvpnVpcKey]: cvpnVpcMap[cvpnVpcKey] ?? null } } : {},
1970
- ...cfCdKey !== void 0 && cfCdMap !== void 0 ? { siblingCloudFrontCdPolicyIds: { [cfCdKey]: cfCdMap[cfCdKey] ?? null } } : {}
1979
+ ...cfCdKey !== void 0 && cfCdMap !== void 0 ? { siblingCloudFrontCdPolicyIds: { [cfCdKey]: cfCdMap[cfCdKey] ?? null } } : {},
1980
+ ...rdsSrcKey !== void 0 && rdsSrcMap !== void 0 && rdsSrcMap[rdsSrcKey] ? { siblingRdsSourceModels: { [rdsSrcKey]: rdsSrcMap[rdsSrcKey] } } : {}
1971
1981
  },
1972
1982
  expected: findings
1973
1983
  }, opts.accountId);
@@ -2761,6 +2771,7 @@ const KNOWN_DEFAULTS = {
2761
2771
  InstanceLifecyclePolicy: { RetentionTriggers: { TerminateHookAbandon: "terminate" } },
2762
2772
  CapacityReservationSpecification: { CapacityReservationPreference: "default" }
2763
2773
  },
2774
+ "AWS::EC2::Volume": { VolumeType: "gp2" },
2764
2775
  "AWS::AutoScaling::WarmPool": { MinSize: 0 },
2765
2776
  "AWS::AutoScaling::ScheduledAction": { EndTime: "null" },
2766
2777
  "AWS::DocDB::DBCluster": {
@@ -2970,7 +2981,8 @@ const KNOWN_DEFAULTS = {
2970
2981
  WriteUnitsPerSecond: 4e3
2971
2982
  },
2972
2983
  EncryptionSpecification: { EncryptionType: "AWS_OWNED_KMS_KEY" },
2973
- CdcSpecification: { Status: "DISABLED" }
2984
+ CdcSpecification: { Status: "DISABLED" },
2985
+ DefaultTimeToLive: 0
2974
2986
  },
2975
2987
  "AWS::EMRServerless::Application": {
2976
2988
  Architecture: "X86_64",
@@ -3004,6 +3016,21 @@ const KNOWN_DEFAULT_ONE_OF_PATHS = {
3004
3016
  "AWS::OpenSearchService::Domain": { "EBSOptions.VolumeType": ["gp3", "gp2"] }
3005
3017
  };
3006
3018
  const KNOWN_DEFAULT_PATHS = {
3019
+ "AWS::AutoScaling::AutoScalingGroup": { "MixedInstancesPolicy.InstancesDistribution": {
3020
+ OnDemandAllocationStrategy: "prioritized",
3021
+ OnDemandBaseCapacity: 0,
3022
+ OnDemandPercentageAboveBaseCapacity: 100,
3023
+ SpotAllocationStrategy: "lowest-price",
3024
+ SpotInstancePools: 2
3025
+ } },
3026
+ "AWS::ElasticLoadBalancingV2::Listener": { "MutualAuthentication.AdvertiseTrustStoreCaNames": "off" },
3027
+ "AWS::GuardDuty::Detector": {
3028
+ "DataSources.S3Logs": { Enable: true },
3029
+ "DataSources.Kubernetes": { AuditLogs: { Enable: true } },
3030
+ "DataSources.Kubernetes.AuditLogs": { Enable: true },
3031
+ "DataSources.MalwareProtection": { ScanEc2InstanceWithFindings: { EbsVolumes: true } },
3032
+ "DataSources.MalwareProtection.ScanEc2InstanceWithFindings": { EbsVolumes: true }
3033
+ },
3007
3034
  "AWS::Backup::RestoreTestingPlan": { "RecoveryPointSelection.SelectionWindowDays": 30 },
3008
3035
  "AWS::Budgets::Budget": {
3009
3036
  "Budget.CostTypes": {
@@ -3111,6 +3138,7 @@ const KNOWN_DEFAULT_PATHS = {
3111
3138
  "AdminCreateUserConfig.UnusedAccountValidityDays": 7,
3112
3139
  "Policies.SignInPolicy": { AllowedFirstAuthFactors: ["PASSWORD"] },
3113
3140
  "Policies.PasswordPolicy.TemporaryPasswordValidityDays": 7,
3141
+ "Policies.PasswordPolicy.MinimumLength": 8,
3114
3142
  "Schema.*.AttributeDataType": "String",
3115
3143
  "Schema.*.StringAttributeConstraints": {
3116
3144
  MinLength: "0",
@@ -3151,6 +3179,14 @@ const KNOWN_DEFAULT_PATHS = {
3151
3179
  "TableInput.Retention": 0,
3152
3180
  "TableInput.StorageDescriptor.NumberOfBuckets": 0
3153
3181
  },
3182
+ "AWS::AppRunner::Service": {
3183
+ "NetworkConfiguration.IngressConfiguration": { IsPubliclyAccessible: true },
3184
+ "NetworkConfiguration.IpAddressType": "IPV4"
3185
+ },
3186
+ "AWS::ImageBuilder::ImagePipeline": {
3187
+ "ImageTestsConfiguration.ImageTestsEnabled": true,
3188
+ "ImageTestsConfiguration.TimeoutMinutes": 720
3189
+ },
3154
3190
  "AWS::Route53::HealthCheck": {
3155
3191
  "HealthCheckConfig.EnableSNI": true,
3156
3192
  "HealthCheckConfig.RequestInterval": 30,
@@ -3473,7 +3509,7 @@ const GENERATED_NESTED_PATHS = {
3473
3509
  "AWS::ApiGateway::Stage": new Set(["CanarySetting.DeploymentId"]),
3474
3510
  "AWS::DynamoDB::Table": new Set(["SSESpecification.KMSMasterKeyId"]),
3475
3511
  "AWS::DynamoDB::GlobalTable": new Set(["Replicas.*.SSESpecification.KMSMasterKeyId"]),
3476
- "AWS::AutoScaling::AutoScalingGroup": new Set(["LaunchTemplate.LaunchTemplateName"]),
3512
+ "AWS::AutoScaling::AutoScalingGroup": new Set(["LaunchTemplate.LaunchTemplateName", "MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.LaunchTemplateName"]),
3477
3513
  "AWS::MSK::Cluster": new Set(["EncryptionInfo.EncryptionAtRest", "BrokerNodeGroupInfo.SecurityGroups"]),
3478
3514
  "AWS::ElasticBeanstalk::Application": new Set(["ResourceLifecycleConfig.ServiceRole"])
3479
3515
  };
@@ -3700,7 +3736,8 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
3700
3736
  "AWS::ElastiCache::CacheCluster": new Set([
3701
3737
  "PreferredMaintenanceWindow",
3702
3738
  "SnapshotWindow",
3703
- "PreferredAvailabilityZones"
3739
+ "PreferredAvailabilityZones",
3740
+ "EngineVersion"
3704
3741
  ]),
3705
3742
  "AWS::ElastiCache::ReplicationGroup": new Set([
3706
3743
  "PreferredMaintenanceWindow",
@@ -6034,6 +6071,19 @@ const MEANINGFUL_WHEN_OFF_NESTED = {
6034
6071
  },
6035
6072
  "AWS::EKS::Cluster": { "ResourcesVpcConfig.EndpointPublicAccess": () => true },
6036
6073
  "AWS::Budgets::Budget": { "Budget.CostTypes": () => true },
6074
+ "AWS::GuardDuty::Detector": {
6075
+ "DataSources.S3Logs": () => true,
6076
+ "DataSources.Kubernetes": () => true,
6077
+ "DataSources.Kubernetes.AuditLogs": () => true,
6078
+ "DataSources.MalwareProtection": () => true,
6079
+ "DataSources.MalwareProtection.ScanEc2InstanceWithFindings": () => true
6080
+ },
6081
+ "AWS::Route53::HealthCheck": { "HealthCheckConfig.EnableSNI": ({ declared, live }) => {
6082
+ const t = (declared["HealthCheckConfig"] ?? live["HealthCheckConfig"])?.["Type"];
6083
+ return t === "HTTPS" || t === "HTTPS_STR_MATCH";
6084
+ } },
6085
+ "AWS::AppRunner::Service": { "NetworkConfiguration.IngressConfiguration": () => true },
6086
+ "AWS::ImageBuilder::ImagePipeline": { "ImageTestsConfiguration.ImageTestsEnabled": () => true },
6037
6087
  "AWS::ECS::Service": { "DeploymentConfiguration.DeploymentCircuitBreaker.ResetOnHealthyTask": ({ declared, live }) => {
6038
6088
  const enabled = (v) => typeof v === "object" && v !== null && v["DeploymentCircuitBreaker"]?.["Enable"] === true;
6039
6089
  return enabled(declared["DeploymentConfiguration"]) || enabled(live["DeploymentConfiguration"]);
@@ -6077,7 +6127,8 @@ const DEFAULT_SG_LIST_PATHS = {
6077
6127
  "AWS::DAX::Cluster": "SecurityGroupIds",
6078
6128
  "AWS::DMS::ReplicationInstance": "VpcSecurityGroupIds",
6079
6129
  "AWS::EC2::ClientVpnEndpoint": "SecurityGroupIds",
6080
- "AWS::VpcLattice::ResourceGateway": "SecurityGroupIds"
6130
+ "AWS::VpcLattice::ResourceGateway": "SecurityGroupIds",
6131
+ "AWS::EC2::VPCEndpoint": "SecurityGroupIds"
6081
6132
  };
6082
6133
  /** #1269 fold decision for an UNDECLARED default-SUBNET list (RedshiftServerless Workgroup
6083
6134
  * SubnetIds). Unlike the SG gate (which folds only a SINGLE default SG), a workgroup placed into
@@ -7073,6 +7124,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
7073
7124
  ClusterMode: declared["ClusterMode"],
7074
7125
  Engine: declared["Engine"]
7075
7126
  } : void 0;
7127
+ const rdsReplicaSourceId = resourceType === "AWS::RDS::DBInstance" && typeof declared["SourceDBInstanceIdentifier"] === "string" && declared["SourceDBInstanceIdentifier"] !== "" ? declared["SourceDBInstanceIdentifier"] : void 0;
7076
7128
  deepStripPaths(declared, schema.writeOnlyPaths);
7077
7129
  if (sfnDefinitionSubstitutions !== void 0 && typeof declared["DefinitionString"] === "string") declared["DefinitionString"] = applyDefinitionSubstitutions(declared["DefinitionString"], sfnDefinitionSubstitutions);
7078
7130
  if (resourceType === "AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation" && typeof physicalId === "string") {
@@ -7112,6 +7164,11 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
7112
7164
  HealthCheckTimeoutSeconds: 6,
7113
7165
  Matcher: { HttpCode: "200-399" }
7114
7166
  } : {},
7167
+ ...protocol === "GENEVE" ? {
7168
+ HealthCheckProtocol: "TCP",
7169
+ HealthCheckPort: "80"
7170
+ } : {},
7171
+ ...protocol === "HTTPS" ? { HealthCheckProtocol: "HTTPS" } : {},
7115
7172
  ...protocolVersion === "GRPC" ? { Matcher: { GrpcCode: "12" } } : {}
7116
7173
  };
7117
7174
  }
@@ -7263,6 +7320,45 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
7263
7320
  })
7264
7321
  };
7265
7322
  }
7323
+ if (resourceType === "AWS::Cassandra::Table") {
7324
+ const pt = declared["BillingMode"]?.["ProvisionedThroughput"];
7325
+ const rcu = pt?.["ReadCapacityUnits"];
7326
+ const wcu = pt?.["WriteCapacityUnits"];
7327
+ if (typeof rcu === "number" && typeof wcu === "number") knownDef = {
7328
+ ...knownDef,
7329
+ WarmThroughput: {
7330
+ ReadUnitsPerSecond: rcu,
7331
+ WriteUnitsPerSecond: wcu
7332
+ }
7333
+ };
7334
+ }
7335
+ if (resourceType === "AWS::RDS::DBInstance" && rdsReplicaSourceId !== void 0) {
7336
+ knownDef = {
7337
+ ...knownDef,
7338
+ BackupRetentionPeriod: 0
7339
+ };
7340
+ const src = opts.siblingRdsSourceModels?.[rdsReplicaSourceId];
7341
+ if (src) {
7342
+ const inherit = {};
7343
+ for (const k of [
7344
+ "Engine",
7345
+ "AllocatedStorage",
7346
+ "MasterUsername"
7347
+ ]) if (src[k] !== void 0) inherit[k] = src[k];
7348
+ knownDef = {
7349
+ ...knownDef,
7350
+ ...inherit
7351
+ };
7352
+ }
7353
+ }
7354
+ if (resourceType === "AWS::Route53::HealthCheck") {
7355
+ const hcType = declared["HealthCheckConfig"]?.["Type"];
7356
+ const defaultPort = hcType === "HTTP" || hcType === "HTTP_STR_MATCH" ? 80 : hcType === "HTTPS" || hcType === "HTTPS_STR_MATCH" ? 443 : void 0;
7357
+ if (defaultPort !== void 0) knownDefPaths = {
7358
+ ...knownDefPaths,
7359
+ "HealthCheckConfig.Port": defaultPort
7360
+ };
7361
+ }
7266
7362
  if (resourceType === "AWS::ApiGateway::RestApi") {
7267
7363
  const types = declared["EndpointConfiguration"]?.["Types"];
7268
7364
  if (Array.isArray(types) && types.includes("PRIVATE")) {
@@ -7396,7 +7492,14 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
7396
7492
  });
7397
7493
  };
7398
7494
  const allLeavesAtSchemaDefault = (value, basePath) => {
7399
- if (isTrivialEmpty(value)) return true;
7495
+ if (isTrivialEmpty(value)) {
7496
+ const schemaPath = basePath.replace(/\[[^\]]*\]/g, ".*");
7497
+ if (schemaPath in knownDefPaths && !matchesKnownDefault(value, knownDefPaths[schemaPath]) && (MEANINGFUL_WHEN_OFF_NESTED[resourceType]?.[schemaPath]?.({
7498
+ declared,
7499
+ live
7500
+ }) ?? false)) return false;
7501
+ return true;
7502
+ }
7400
7503
  if (Array.isArray(value)) return false;
7401
7504
  if (isNestedObject(value)) return Object.entries(value).every(([sk, sv]) => allLeavesAtSchemaDefault(sv, `${basePath}.${sk}`));
7402
7505
  const schemaPath = basePath.replace(/\[[^\]]*\]/g, ".*");
@@ -14369,7 +14472,8 @@ const DEFAULT_SG_LIST_TYPES = new Set([
14369
14472
  "AWS::DAX::Cluster",
14370
14473
  "AWS::DMS::ReplicationInstance",
14371
14474
  "AWS::EC2::ClientVpnEndpoint",
14372
- "AWS::VpcLattice::ResourceGateway"
14475
+ "AWS::VpcLattice::ResourceGateway",
14476
+ "AWS::EC2::VPCEndpoint"
14373
14477
  ]);
14374
14478
  const DEFAULT_SUBNET_LIST_TYPES = new Set(["AWS::RedshiftServerless::Workgroup"]);
14375
14479
  const defaultSgIdsCache = /* @__PURE__ */ new Map();
@@ -14976,6 +15080,17 @@ function buildClientVpnEndpointSiblingVpcs(desired) {
14976
15080
  }
14977
15081
  return out;
14978
15082
  }
15083
+ function buildRdsReplicaSourceModels(desired, liveByLogical) {
15084
+ const out = {};
15085
+ for (const r of desired.resources) {
15086
+ if (r.resourceType !== "AWS::RDS::DBInstance") continue;
15087
+ const live = liveByLogical?.get(r.logicalId);
15088
+ if (!live) continue;
15089
+ const id = live["DBInstanceIdentifier"] ?? r.physicalId;
15090
+ if (typeof id === "string" && id !== "") out[id] = live;
15091
+ }
15092
+ return out;
15093
+ }
14979
15094
  function buildCloudFrontStagingDistCdPolicyIds(desired, liveByLogical) {
14980
15095
  const refLogicalId = (ref) => {
14981
15096
  if (ref && typeof ref === "object") {
@@ -15442,6 +15557,7 @@ async function gatherFindings(stackName, region, templateOverride, recoveryTempl
15442
15557
  scalableTargetBands: buildScalableTargetBands(desired),
15443
15558
  siblingClientVpnEndpointVpcs: buildClientVpnEndpointSiblingVpcs(desired),
15444
15559
  siblingCloudFrontCdPolicyIds: buildCloudFrontStagingDistCdPolicyIds(desired, liveModelMap(reads)),
15560
+ siblingRdsSourceModels: buildRdsReplicaSourceModels(desired, liveModelMap(reads)),
15445
15561
  rdsOptionSettingDefaults: await buildRdsOptionSettingDefaults(desired, region)
15446
15562
  };
15447
15563
  const corpusDir = process.env[CORPUS_DIR_ENV];
@@ -15520,6 +15636,7 @@ async function regatherTouched(gathered, touched, region) {
15520
15636
  scalableTargetBands: buildScalableTargetBands(desired),
15521
15637
  siblingClientVpnEndpointVpcs: buildClientVpnEndpointSiblingVpcs(desired),
15522
15638
  siblingCloudFrontCdPolicyIds: buildCloudFrontStagingDistCdPolicyIds(desired, liveModelMap(reads)),
15639
+ siblingRdsSourceModels: buildRdsReplicaSourceModels(desired, liveModelMap(reads)),
15523
15640
  rdsOptionSettingDefaults: await buildRdsOptionSettingDefaults(desired, region)
15524
15641
  };
15525
15642
  const fresh = [];
@@ -19534,6 +19651,8 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
19534
19651
  "AWS::RUM::AppMonitor\0CustomEvents",
19535
19652
  "AWS::RUM::AppMonitor\0AppMonitorConfiguration",
19536
19653
  "AWS::GuardDuty::Filter\0Action",
19654
+ "AWS::GuardDuty::ThreatEntitySet\0ExpectedBucketOwner",
19655
+ "AWS::GuardDuty::TrustedEntitySet\0ExpectedBucketOwner",
19537
19656
  "AWS::ServiceCatalog::TagOption\0Active",
19538
19657
  "AWS::VpcLattice::ResourceConfiguration\0AllowAssociationToSharableServiceNetwork",
19539
19658
  "AWS::Backup::RestoreTestingPlan\0StartWindowHours",
@@ -19968,7 +20087,7 @@ function buildRevertPlan(findings, baseline, opts = {}) {
19968
20087
  desired: [...f.desired, ...sib]
19969
20088
  };
19970
20089
  }
19971
- const op = revertOp(toRevert, recorded);
20090
+ const op = revertOp(toRevert, recorded, opts.identity);
19972
20091
  const key = `${f.logicalId} ${kind}${propScoped ? ` ${f.path}` : ""}`;
19973
20092
  const item = itemsByLogical.get(key) ?? {
19974
20093
  logicalId: f.logicalId,
@@ -20009,7 +20128,16 @@ function coerceDeclaredScalar(desired, live) {
20009
20128
  }
20010
20129
  return desired;
20011
20130
  }
20012
- function revertOp(f, recorded) {
20131
+ function contextArnDefaultFor(resourceType, path, identity) {
20132
+ const template = CONTEXT_ARN_DEFAULTS[resourceType]?.[path];
20133
+ if (template === void 0) return void 0;
20134
+ const { accountId, region } = identity ?? {};
20135
+ if (accountId === void 0 || accountId === "" || region === void 0 || region === "") return;
20136
+ const partition = partitionForRegion(region).partition;
20137
+ const substitute = (t) => t.replace("{partition}", partition).replace("{region}", region).replace("{accountId}", accountId);
20138
+ return Array.isArray(template) ? template.map(substitute) : substitute(template);
20139
+ }
20140
+ function revertOp(f, recorded, identity) {
20013
20141
  const pointer = toPointer(f.path);
20014
20142
  if (f.tier === "declared") return {
20015
20143
  op: "add",
@@ -20034,7 +20162,7 @@ function revertOp(f, recorded) {
20034
20162
  human: `${f.path} -> baseline value`
20035
20163
  };
20036
20164
  const setDefaultKey = `${f.resourceType}\0${f.path}`;
20037
- const knownDefault = KNOWN_DEFAULTS[f.resourceType]?.[f.path] ?? REVERT_SET_DEFAULT_VALUES[setDefaultKey];
20165
+ const knownDefault = KNOWN_DEFAULTS[f.resourceType]?.[f.path] ?? REVERT_SET_DEFAULT_VALUES[setDefaultKey] ?? contextArnDefaultFor(f.resourceType, f.path, identity);
20038
20166
  if (knownDefault !== void 0 && REVERT_SET_DEFAULT_PATHS.has(setDefaultKey)) return {
20039
20167
  op: "add",
20040
20168
  path: pointer,
@@ -21068,7 +21196,11 @@ async function revertStack(p) {
21068
21196
  siblingSgRules: buildSiblingSgRules(gathered.desired),
21069
21197
  stackName,
21070
21198
  liveByLogical: gathered.liveByLogical,
21071
- maskReadGapKeys: maskReadGapKeysOf(reconciled)
21199
+ maskReadGapKeys: maskReadGapKeysOf(reconciled),
21200
+ identity: {
21201
+ accountId: gathered.desired.accountId,
21202
+ region
21203
+ }
21072
21204
  });
21073
21205
  if (plan.items.length === 0 && plan.notRevertable.length === 0) {
21074
21206
  out(style.clean(`${stackName} (${region}): no drift to revert.`));