@go-to-k/cdkd 0.285.1 → 0.285.2

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Bn as Synthesizer, Br as normalizeAwsError, Dr as LockError, G as IAMRoleProvider, Ir as StateError, J as ProviderRegistry, Lr as SynthesisError, Rr as formatError, Ut as DagBuilder, Wt as TemplateParser, _r as AssetError, dr as clearBucketRegionCache, fr as resolveBucketRegion, gr as setAwsClients, hr as resetAwsClients, in as S3StateBackend, jr as ProvisioningError, lr as AssemblyReader, mr as getAwsClients, nn as LockManager, pr as AwsClients, r as DeployEngine, st as CloudControlProvider, un as AssetPublisher, vr as CdkdError, xr as DependencyError, yr as ConfigError, zr as isCdkdError, zt as DiffCalculator } from "./deploy-engine-CLglXV1z.js";
1
+ import { Bn as Synthesizer, Br as normalizeAwsError, Dr as LockError, G as IAMRoleProvider, Ir as StateError, J as ProviderRegistry, Lr as SynthesisError, Rr as formatError, Ut as DagBuilder, Wt as TemplateParser, _r as AssetError, dr as clearBucketRegionCache, fr as resolveBucketRegion, gr as setAwsClients, hr as resetAwsClients, in as S3StateBackend, jr as ProvisioningError, lr as AssemblyReader, mr as getAwsClients, nn as LockManager, pr as AwsClients, r as DeployEngine, st as CloudControlProvider, un as AssetPublisher, vr as CdkdError, xr as DependencyError, yr as ConfigError, zr as isCdkdError, zt as DiffCalculator } from "./deploy-engine-Bci2hIDt.js";
2
2
  import { i as setLogger, n as getLogger, t as ConsoleLogger } from "./logger-Dz3Le2Pw.js";
3
3
 
4
4
  export { AssemblyReader, AssetError, AssetPublisher, AwsClients, CdkdError, CloudControlProvider, ConfigError, ConsoleLogger, DagBuilder, DependencyError, DeployEngine, DiffCalculator, IAMRoleProvider, LockError, LockManager, ProviderRegistry, ProvisioningError, S3StateBackend, StateError, SynthesisError, Synthesizer, TemplateParser, clearBucketRegionCache, formatError, getAwsClients, getLogger, isCdkdError, normalizeAwsError, resetAwsClients, resolveBucketRegion, setAwsClients, setLogger };
@@ -1,8 +1,8 @@
1
- import { $ as maskerOrIdentity, $n as CFN_TEMPLATE_BODY_LIMIT, $t as maskSecretsInText, A as renderStatefulReason, An as describeAwsFailure, Ar as PartialFailureError, At as requireConfigString, B as exportAliasCollisionScrubWarning, Bn as Synthesizer, Br as normalizeAwsError, Bt as INTRINSIC_KEYS, C as isFinalSnapshotError, Cn as getBootstrapMarkerKey, Cr as DynamicReferenceRegionAmbiguousError, Ct as coerceCfnBoolean, D as extractDeploymentEventError, Dn as validateAssetBucketName, Dt as replayWarn, E as makeCanonicalizePropertiesFn, En as readBootstrapMarkerBody, Er as LocalStartServiceError, Et as readConfigString, F as green, Fn as partitionSensitiveEnv, Fr as StackTerminationProtectionError, Ft as s3BucketDualStackDomainName, G as IAMRoleProvider, Gn as resolveAutoAssetStorage, Gr as markNonRetryable, Gt as STATE_SOURCED_CROSS_GENERATION_RULES, H as secretBearingStateKeyWarning, Hn as getDefaultStateBucketName, Hr as isMarkedNonRetryable, Ht as withRetry, I as red, In as runDockerForeground, It as s3BucketRegionalDomainName, J as ProviderRegistry, Jn as resolveStateBucketWithDefault, Jt as createSecretMasker, K as collectInlinePolicyNamesManagedBySiblings, Kn as resolveCaptureObservedState, Kr as markRedactedCause, Kt as STATE_SOURCED_READBACK_RULES, L as yellow, Ln as runDockerStreaming, Lt as s3BucketWebsiteUrl, M as bold, Mn as dockerSpawnEnvWithSensitive, Mr as ResourceTimeoutError, Mt as producerRegionsFromState, N as cyan, Nn as formatDockerLoginError, Nr as ResourceUpdateNotSupportedError, Nt as s3BucketArn, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as validateContainerRepoName, Or as MissingCdkCliError, Ot as requireConfigArray, P as gray, Pn as getDockerCmd, Pr as StackHasActiveImportsError, Pt as s3BucketDomainName, Q as maskDeep, Qn as warnDeprecatedNoPrefixCliFlag, Qt as maskSecretsInError, R as collectDeclaredOutputNames, Rn as AssetManifestLoader, Rt as applyRoleArnIfSet, S as createPreDeleteFinalSnapshot, Sn as ensureAssetStorage, Sr as DeployCancelledError, St as assertRegionMatch, T as unsupportedFinalSnapshotError, Tn as parseBootstrapMarker, Tr as LocalMigrateError, Tt as configStringRefusal, U as stateKeySecretExposure, Un as getLegacyStateBucketName, Ur as isRetryableTransientError, Ut as DagBuilder, V as isExportAliasCollision, Vn as synthesisStatusMessage, Vr as withErrorHandling, Vt as describeTypeWithThrottleRetry, W as getCurrentResourceSecrets, Wn as resolveApp, Wr as isThrottlingError, Wt as TemplateParser, X as findSilentDropProperties, Xn as resolveUseCdkBootstrapAssets, Xt as errorCauseChain, Y as findActionableSilentDrops, Yn as resolveStateBucketWithDefaultAndSource, Yt as dynamicReferenceTokens, Z as createMaskedRetryLogger, Zn as stateBucketExistenceConfirmed, Zt as isSingleDynamicReferenceToken, _ as computeImplicitDeleteEdges, _n as escapeRegExp, _t as parameterTypeMayLoseSecretIdentity, a as DeploymentEventsStore, an as rebuildClientForBucketRegion, ar as expectedOwnerParam, at as isInterruptedWaitError, b as buildFinalSnapshotIdentifier, bn as BOOTSTRAP_MARKER_PREFIX, br as CrossAccountSecretRefusalError, bt as normalizeAwsTagsToCfn, c as replayFailedOperations, cn as importableOutputs, cr as derivePartitionAndUrlSuffix, ct as slowCcOperationTimeoutMs, d as updatePartialReason, dn as stringifyValue, dt as IntrinsicFunctionResolver, en as redactSecretsForState, er as CFN_TEMPLATE_URL_LIMIT, et as CUSTOM_RESOURCE_RESPONSE_PREFIX, f as UNSPECIFIED_SKIP_REASON, fn as WorkGraph, fr as resolveBucketRegion, ft as carriesDynamicReference, g as IMPLICIT_DELETE_DEPENDENCIES, gn as rewriteTemplateAssetReferences, gr as setAwsClients, gt as isUnboundTemplateParameter, h as maskingRetryLogger, hn as loadPublishableAssetManifest, hr as resetAwsClients, ht as getAccountInfo, i as DeploymentEventsReader, in as S3StateBackend, ir as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, it as interruptWatchListenerCount, j as formatResourceLine, jn as buildDockerImage, jr as ProvisioningError, jt as classifyReplaySecretRegion, k as isStatefulRecreateTargetSync, kn as buildDenyExternalAccessPolicy, kr as NestedStackChildDirectDestroyError, kt as requireConfigObject, l as replayRollback, ln as shouldRetainResource, lr as AssemblyReader, lt as disableInstanceApiTermination, m as withResourceDeadline, mn as createAssetRedirectResolver, mr as getAwsClients, mt as coerceParameterTypedValue, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as LockManager, nr as findLargeInlineResources, nt as beginCommandInterruptScope, o as planFailedOps, on as exportNamesCarriedFrom, or as PARTITION_TABLE, ot as startInterruptWatch, p as deleteSkipReason, pn as buildAssetRedirectMap, pr as AwsClients, pt as cfnRefValueFromPhysicalId, q as clearOnUpdateRemoval, qn as resolveSkipPrefix, qr as retryClassificationText, qt as TEMPLATE_SOURCED_RULES, r as DeployEngine, rn as displaySafe, rr as uploadCfnTemplate, rt as endCommandInterruptScope, s as planRollback, sn as importableOutputKeys, sr as canonicalizeRegion, st as CloudControlProvider, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as scrubResourceRecord, tr as MIGRATE_TMP_PREFIX, tt as DEFAULT_STATE_PREFIX, u as updatePartialMessage, un as AssetPublisher, ur as processStackMessages, ut as isTerminationProtectionPropagationError, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as stripControlChars, vr as CdkdError, vt as refStateLookupFromResource, w as refusesFinalSnapshot, wn as isCrossRegionRedirect, wr as LocalInvokeBuildError$1, wt as configBooleanRefusal, x as ccRoutedFinalSnapshotError, xn as assertAssetBucketRegion, xt as resolveExplicitPhysicalId, y as PRE_DELETE_SNAPSHOT_TYPES, yn as AssetModeResolver, yt as WAFv2WebACLProvider, z as collectPublishedOutputNames, zn as getDockerImageBySourceHash, zt as DiffCalculator } from "./deploy-engine-CLglXV1z.js";
1
+ import { $ as maskerOrIdentity, $n as CFN_TEMPLATE_BODY_LIMIT, $t as maskSecretsInText, A as renderStatefulReason, An as describeAwsFailure, Ar as PartialFailureError, At as requireConfigString, B as exportAliasCollisionScrubWarning, Bn as Synthesizer, Br as normalizeAwsError, Bt as INTRINSIC_KEYS, C as isFinalSnapshotError, Cn as getBootstrapMarkerKey, Cr as DynamicReferenceRegionAmbiguousError, Ct as coerceCfnBoolean, D as extractDeploymentEventError, Dn as validateAssetBucketName, Dt as replayWarn, E as makeCanonicalizePropertiesFn, En as readBootstrapMarkerBody, Er as LocalStartServiceError, Et as readConfigString, F as green, Fn as partitionSensitiveEnv, Fr as StackTerminationProtectionError, Ft as s3BucketDualStackDomainName, G as IAMRoleProvider, Gn as resolveAutoAssetStorage, Gr as markNonRetryable, Gt as STATE_SOURCED_CROSS_GENERATION_RULES, H as secretBearingStateKeyWarning, Hn as getDefaultStateBucketName, Hr as isMarkedNonRetryable, Ht as withRetry, I as red, In as runDockerForeground, It as s3BucketRegionalDomainName, J as ProviderRegistry, Jn as resolveStateBucketWithDefault, Jt as createSecretMasker, K as collectInlinePolicyNamesManagedBySiblings, Kn as resolveCaptureObservedState, Kr as markRedactedCause, Kt as STATE_SOURCED_READBACK_RULES, L as yellow, Ln as runDockerStreaming, Lt as s3BucketWebsiteUrl, M as bold, Mn as dockerSpawnEnvWithSensitive, Mr as ResourceTimeoutError, Mt as producerRegionsFromState, N as cyan, Nn as formatDockerLoginError, Nr as ResourceUpdateNotSupportedError, Nt as s3BucketArn, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as validateContainerRepoName, Or as MissingCdkCliError, Ot as requireConfigArray, P as gray, Pn as getDockerCmd, Pr as StackHasActiveImportsError, Pt as s3BucketDomainName, Q as maskDeep, Qn as warnDeprecatedNoPrefixCliFlag, Qt as maskSecretsInError, R as collectDeclaredOutputNames, Rn as AssetManifestLoader, Rt as applyRoleArnIfSet, S as createPreDeleteFinalSnapshot, Sn as ensureAssetStorage, Sr as DeployCancelledError, St as assertRegionMatch, T as unsupportedFinalSnapshotError, Tn as parseBootstrapMarker, Tr as LocalMigrateError, Tt as configStringRefusal, U as stateKeySecretExposure, Un as getLegacyStateBucketName, Ur as isRetryableTransientError, Ut as DagBuilder, V as isExportAliasCollision, Vn as synthesisStatusMessage, Vr as withErrorHandling, Vt as describeTypeWithThrottleRetry, W as getCurrentResourceSecrets, Wn as resolveApp, Wr as isThrottlingError, Wt as TemplateParser, X as findSilentDropProperties, Xn as resolveUseCdkBootstrapAssets, Xt as errorCauseChain, Y as findActionableSilentDrops, Yn as resolveStateBucketWithDefaultAndSource, Yt as dynamicReferenceTokens, Z as createMaskedRetryLogger, Zn as stateBucketExistenceConfirmed, Zt as isSingleDynamicReferenceToken, _ as computeImplicitDeleteEdges, _n as escapeRegExp, _t as parameterTypeMayLoseSecretIdentity, a as DeploymentEventsStore, an as rebuildClientForBucketRegion, ar as expectedOwnerParam, at as isInterruptedWaitError, b as buildFinalSnapshotIdentifier, bn as BOOTSTRAP_MARKER_PREFIX, br as CrossAccountSecretRefusalError, bt as normalizeAwsTagsToCfn, c as replayFailedOperations, cn as importableOutputs, cr as derivePartitionAndUrlSuffix, ct as slowCcOperationTimeoutMs, d as updatePartialReason, dn as stringifyValue, dt as IntrinsicFunctionResolver, en as redactSecretsForState, er as CFN_TEMPLATE_URL_LIMIT, et as CUSTOM_RESOURCE_RESPONSE_PREFIX, f as UNSPECIFIED_SKIP_REASON, fn as WorkGraph, fr as resolveBucketRegion, ft as carriesDynamicReference, g as IMPLICIT_DELETE_DEPENDENCIES, gn as rewriteTemplateAssetReferences, gr as setAwsClients, gt as isUnboundTemplateParameter, h as maskingRetryLogger, hn as loadPublishableAssetManifest, hr as resetAwsClients, ht as getAccountInfo, i as DeploymentEventsReader, in as S3StateBackend, ir as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, it as interruptWatchListenerCount, j as formatResourceLine, jn as buildDockerImage, jr as ProvisioningError, jt as classifyReplaySecretRegion, k as isStatefulRecreateTargetSync, kn as buildDenyExternalAccessPolicy, kr as NestedStackChildDirectDestroyError, kt as requireConfigObject, l as replayRollback, ln as shouldRetainResource, lr as AssemblyReader, lt as disableInstanceApiTermination, m as withResourceDeadline, mn as createAssetRedirectResolver, mr as getAwsClients, mt as coerceParameterTypedValue, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as LockManager, nr as findLargeInlineResources, nt as beginCommandInterruptScope, o as planFailedOps, on as exportNamesCarriedFrom, or as PARTITION_TABLE, ot as startInterruptWatch, p as deleteSkipReason, pn as buildAssetRedirectMap, pr as AwsClients, pt as cfnRefValueFromPhysicalId, q as clearOnUpdateRemoval, qn as resolveSkipPrefix, qr as retryClassificationText, qt as TEMPLATE_SOURCED_RULES, r as DeployEngine, rn as displaySafe, rr as uploadCfnTemplate, rt as endCommandInterruptScope, s as planRollback, sn as importableOutputKeys, sr as canonicalizeRegion, st as CloudControlProvider, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as scrubResourceRecord, tr as MIGRATE_TMP_PREFIX, tt as DEFAULT_STATE_PREFIX, u as updatePartialMessage, un as AssetPublisher, ur as processStackMessages, ut as isTerminationProtectionPropagationError, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as stripControlChars, vr as CdkdError, vt as refStateLookupFromResource, w as refusesFinalSnapshot, wn as isCrossRegionRedirect, wr as LocalInvokeBuildError$1, wt as configBooleanRefusal, x as ccRoutedFinalSnapshotError, xn as assertAssetBucketRegion, xt as resolveExplicitPhysicalId, y as PRE_DELETE_SNAPSHOT_TYPES, yn as AssetModeResolver, yt as WAFv2WebACLProvider, z as collectPublishedOutputNames, zn as getDockerImageBySourceHash, zt as DiffCalculator } from "./deploy-engine-Bci2hIDt.js";
2
2
  import { a as runStackBuffered, c as PATTERN_B_NAME_PROPERTIES, d as generateResourceName, f as generateResourceNameWithFallback, g as withStackName, h as withSkipPrefix, l as PATTERN_B_RESOURCE_TYPES, n as getLogger, o as getLiveRenderer, p as getCurrentStackName, r as reserveStdoutForPayload, s as PATTERN_B_NAME_OPTIONS } from "./logger-Dz3Le2Pw.js";
3
3
  import { t as awsClientDefaults } from "./aws-client-defaults-D-iYiIJ6.js";
4
- import { t as getCdkdVersion } from "./version-CnT0aZUb.js";
5
- import { t as ASGProvider } from "./asg-provider-BOx_2OWi.js";
4
+ import { t as getCdkdVersion } from "./version-CPBCBoA5.js";
5
+ import { t as ASGProvider } from "./asg-provider-DEG5QGu2.js";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
7
7
  import { createHash, randomBytes, randomUUID } from "node:crypto";
8
8
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -18553,9 +18553,9 @@ var DynamoDBTableProvider = class {
18553
18553
  * `observedProperties` baseline, a later AWS-side increase surfaces as drift
18554
18554
  * on a property the user never declared and `--revert` would issue a
18555
18555
  * decrease AWS rejects. `readCurrentState` therefore emits it only when the
18556
- * DESIRED bag declares it (the fix issue #1742 PROPOSES for the per-index
18557
- * sibling still open and unlanded at the time of writing, so this is the
18558
- * first site to carry the shape), never as a blanket drop:
18556
+ * DESIRED bag declares it (the same shape issue #1742 proposed for the
18557
+ * per-index sibling, which landed in #1859 this site carried it first),
18558
+ * never as a blanket drop:
18559
18559
  * `AWS::DynamoDB::Table` accepts an explicit `WarmThroughput` and a real
18560
18560
  * change to one must stay visible. Known residual on that declared arm
18561
18561
  * (issue #1768): AWS may GROW a declared value, which is reported as drift —
@@ -42409,6 +42409,48 @@ function readAllowedFirstAuthFactors(properties) {
42409
42409
  return factors.filter((factor) => typeof factor === "string");
42410
42410
  }
42411
42411
  /**
42412
+ * The two sub-keys of the CFn `Policies` blob — exactly the members
42413
+ * `UserPoolPolicyType` declares, and exactly the keys `toSdkUserPoolPolicies`
42414
+ * forwards. Iterated by the #1979 removal announcement so a sub-key AWS adds
42415
+ * later joins BOTH the forwarding and the announcement in one edit here.
42416
+ */
42417
+ const POLICIES_SUB_KEYS = ["PasswordPolicy", "SignInPolicy"];
42418
+ /**
42419
+ * Would this property bag put `Policies.<subKey>` on the wire?
42420
+ *
42421
+ * MIRRORS the wire's own two truthiness gates rather than re-deriving a
42422
+ * "present" notion of its own: `create()` / `update()` gate on
42423
+ * `if (properties['Policies'])` and `toSdkUserPoolPolicies` gates each sub-key
42424
+ * on `if (policies['SignInPolicy'])`. The #1979 removal announcement must fire
42425
+ * exactly when the wire STOPS carrying a sub-key it previously carried, so a
42426
+ * hand-written presence test here (`in`, `!== undefined`, a plain-object
42427
+ * guard) would disagree with the wire on `null` / `''` / `0` / `false` — the
42428
+ * config-shape.ts share-the-predicate rule, applied to a truthiness gate.
42429
+ * Agreement is pinned by a unit table that drives every value shape through
42430
+ * the PUBLIC `update()` and asserts warn-iff-not-sent.
42431
+ */
42432
+ function sendsPoliciesSubKey(bag, subKey) {
42433
+ const policies = bag["Policies"];
42434
+ if (!policies) return false;
42435
+ return Boolean(policies[subKey]);
42436
+ }
42437
+ /**
42438
+ * What the removal announcement tells the user about each sub-key: a short
42439
+ * label for the live value the pool keeps, and the AWS default the user must
42440
+ * DECLARE explicitly to get reset behavior (there is no removal path on the
42441
+ * wire, so an explicit declaration is the only way to change the live value).
42442
+ */
42443
+ const POLICIES_SUB_KEY_ANNOUNCEMENT = {
42444
+ PasswordPolicy: {
42445
+ label: "password policy",
42446
+ reset: "the AWS default is MinimumLength: 8 with every character-class requirement enabled and TemporaryPasswordValidityDays: 7"
42447
+ },
42448
+ SignInPolicy: {
42449
+ label: "sign-in policy",
42450
+ reset: "the AWS default is AllowedFirstAuthFactors: [PASSWORD]"
42451
+ }
42452
+ };
42453
+ /**
42412
42454
  * The PRE-FLIGHT: the reason this user-pool configuration cannot be applied at
42413
42455
  * all, or `undefined` when nothing is known to refuse it.
42414
42456
  *
@@ -42747,17 +42789,47 @@ var CognitoUserPoolProvider = class {
42747
42789
  * `readLiveMfaConfiguration`'s docstring, which carries the one ledger of
42748
42790
  * which fields were measured to reset and which were not.
42749
42791
  *
42750
- * **Consequence of that measurement, NOT fixed here: there is no removal
42751
- * path.** This builder forwards only what the template DECLARES, so deleting
42752
- * `SignInPolicy` from a template sends nothing for it -- and nothing sent
42753
- * means nothing changed. A user tightening their auth by removing a
42754
- * passwordless first-auth factor therefore leaves it live on the pool
42755
- * indefinitely, and `readCurrentState` keeps reporting a drift that
42756
- * `cdkd drift --revert` cannot clear, since the revert routes through this
42757
- * same builder. Clearing it needs an explicit reset value on the wire, which
42758
- * is a behavior change with its own integ and is out of this lane's scope.
42759
- * Whether CloudFormation removes it on the same template edit is UNMEASURED
42760
- * -- do not assume parity in either direction.
42792
+ * **Consequence of that measurement: there is no removal path, and that is
42793
+ * PARITY, not a gap to close with a reset** (issue #1979). This builder
42794
+ * forwards only what the template DECLARES, so deleting `SignInPolicy` from
42795
+ * a template sends nothing for it -- and nothing sent means nothing changed.
42796
+ * Whether that no-op should become an explicit reset was settled by a real
42797
+ * CloudFormation A/B rather than assumed. MEASURED us-east-1 2026-09-02
42798
+ * (issue #1979), on a CFn stack whose pool declared
42799
+ * `PasswordPolicy: {MinimumLength: 12, RequireSymbols: false}` +
42800
+ * `SignInPolicy: {AllowedFirstAuthFactors: [PASSWORD, EMAIL_OTP]}`
42801
+ * (ESSENTIALS tier), three template edits, each reaching UPDATE_COMPLETE:
42802
+ *
42803
+ * - removing the `SignInPolicy` sub-key alone left the live value at
42804
+ * `[PASSWORD, EMAIL_OTP]`;
42805
+ * - removing the `PasswordPolicy` sub-key alone left the live value at
42806
+ * `MinimumLength: 12` / `RequireSymbols: false` -- NOT reset to the
42807
+ * documented defaults (8, every requirement on);
42808
+ * - removing the whole `Policies` container left BOTH sub-keys intact.
42809
+ *
42810
+ * So CloudFormation performs the SAME silent no-op, and a cdkd-side reset
42811
+ * would be a DIVERGENCE from its stated template compatibility, not parity.
42812
+ * What was wrong was only the SILENCE: `update()` announces the
42813
+ * inexpressible removal via `warnOnUnremovablePoliciesSubKeys`, naming the
42814
+ * sub-key, saying the live value is unchanged, and pointing at the
42815
+ * explicit-declaration remedy. It fires on `cdkd deploy`; the other three
42816
+ * `update()` call sites reach it only under conditions each of which is
42817
+ * spelled out at that method, because the obvious reading of two of them is
42818
+ * wrong.
42819
+ *
42820
+ * **The announcement is the ONLY signal, which is why silence was the whole
42821
+ * defect.** The issue predicted that the removal would also leave a
42822
+ * permanent `cdkd drift` difference; MEASURED us-east-1 2026-09-02 on a live
42823
+ * pool (stack `Cdkd1979LiveVerify`), it does not, and the prediction is
42824
+ * withdrawn here rather than repeated. `update()` refreshes
42825
+ * `observedProperties` from the POST-update `readCurrentState`, so the
42826
+ * retained sub-key lands in the drift BASELINE (`observedProperties ??
42827
+ * properties`, `drift.ts`) as well as on the pool: the announcing deploy
42828
+ * converges, the next identical deploy is an honest NO_CHANGE, and both
42829
+ * `cdkd drift` and `cdkd diff` report nothing. Nothing downstream of the
42830
+ * deploy tells the operator that the tightening did not land -- so the warn
42831
+ * is not a supplement to a visible drift, it is the only place the fact
42832
+ * appears at all.
42761
42833
  */
42762
42834
  toSdkUserPoolPolicies(policies) {
42763
42835
  const result = {};
@@ -42939,7 +43011,10 @@ var CognitoUserPoolProvider = class {
42939
43011
  * container sent without `PasswordPolicy` left `PasswordPolicy` intact,
42940
43012
  * and omitting the container outright left both. Forwarding is still
42941
43013
  * REQUIRED to APPLY a changed sub-key — preservation is not application —
42942
- * and no omission can express a REMOVAL.
43014
+ * and no omission can express a REMOVAL. CloudFormation measured the same
43015
+ * way on all three removal edits (2026-09-02, issue #1979; transcript at
43016
+ * `toSdkUserPoolPolicies`), so the update path ANNOUNCES the removal via
43017
+ * `warnOnUnremovablePoliciesSubKeys` instead of resetting.
42943
43018
  *
42944
43019
  * `SetUserPoolMfaConfig` — a DIFFERENT API with a DIFFERENT rule, kept in
42945
43020
  * its own section so neither list is read as evidence for the other:
@@ -43005,6 +43080,76 @@ var CognitoUserPoolProvider = class {
43005
43080
  }
43006
43081
  }
43007
43082
  /**
43083
+ * Announce a `Policies` sub-key removal the wire cannot express (issue
43084
+ * #1979). Fires once per removed sub-key when the previous side would have
43085
+ * put it on the wire and the desired side no longer does — the same
43086
+ * truthiness gates the forwarding itself uses (`sendsPoliciesSubKey`).
43087
+ *
43088
+ * WARN, not a reset, and not silence. `UpdateUserPool` preserves an omitted
43089
+ * sub-key (measured 2026-08-19, issue #1968) and CloudFormation performs the
43090
+ * SAME no-op on the identical template edit (measured 2026-09-02, issue
43091
+ * #1979; both transcripts at `toSdkUserPoolPolicies`) — so sending a reset
43092
+ * would diverge from cdkd's stated template compatibility, while silence
43093
+ * leaves an operator believing a TIGHTENING landed (the motivating shape:
43094
+ * deleting `SignInPolicy` to revoke a passwordless first-auth factor
43095
+ * deploys green while AWS keeps allowing it). The announcement names the
43096
+ * sub-key, states that the live value is unchanged, and gives the only
43097
+ * remedy that exists on the wire: declaring the sub-key explicitly with the
43098
+ * intended (e.g. default) configuration.
43099
+ *
43100
+ * Reached by four `update()` call sites, and each one needs its own reading
43101
+ * of what "previous" MEANS there:
43102
+ *
43103
+ * - **`cdkd deploy`** (previous = the last-deployed template's record) warns
43104
+ * on the deploy that carries the removal. Later deploys compare template ==
43105
+ * record and are honest NO_CHANGEs, matching CloudFormation's own converged
43106
+ * stack (measured live, transcript at `toSdkUserPoolPolicies`).
43107
+ * - **`cdkd drift --revert`** (previous = the full live readback) is NARROWER
43108
+ * than it looks, and the obvious reading of it is backwards. The revert's
43109
+ * DESIRED side is not the drift baseline: `buildRevertNewProperties`
43110
+ * (`drift.ts`) starts from `{ ...awsProperties }` and overwrites only the
43111
+ * top-level keys that actually DRIFTED, so an undrifted `Policies` carries
43112
+ * the LIVE blob and no removal is visible at all. And on a record with no
43113
+ * `observedProperties` — the case that looks most reachable — the revert
43114
+ * sets `preserveUntemplated`, whose `mergeUntemplatedValue` merges AWS's
43115
+ * untemplated sub-keys straight back in, so the sub-key is present on the
43116
+ * desired side and this warning does not fire -- unless the baseline's own
43117
+ * `Policies` is not a plain record (a `null`, a string, an unresolved
43118
+ * intrinsic), the one shape that merge declines: it returns the baseline
43119
+ * whole and drops the live sub-keys with it. What else reaches it is the
43120
+ * opposite shape: a record WITH `observedProperties`, plus a sub-key added
43121
+ * out-of-band after that capture, so `Policies` drifts and the baseline
43122
+ * written over it lacks the sub-key. The warning is then exactly right —
43123
+ * the revert cannot take that sub-key back off the pool.
43124
+ * - **The rollback executor's `revert` arm** (previous = the newer state
43125
+ * record) warns when rolling back to a record that lacked the sub-key; the
43126
+ * rollback cannot restore that absence either.
43127
+ * - **The rollback executor's `revert-failed-update` arm** passes
43128
+ * `attemptedProps` as the previous side, which is
43129
+ * `op.attemptedProperties ?? current.properties` — so a journal segment
43130
+ * that recorded no attempted properties degrades to the newer state record
43131
+ * and behaves exactly as the `revert` arm above. With a real attempted bag
43132
+ * it is the bag of an update that FAILED: if `UpdateUserPool` itself was
43133
+ * rejected, the attempted sub-key may never have reached AWS, and the
43134
+ * announcement then names a removal that had nothing to remove. Its literal
43135
+ * claim (the pool keeps whatever policy it currently has) stays true, and
43136
+ * the arm is not gated because a failure
43137
+ * AFTER a successful `UpdateUserPool` is the same-shaped case where the
43138
+ * sub-key DID land and the warning is fully earned; the two are not
43139
+ * distinguishable from `attemptedProps` alone.
43140
+ *
43141
+ * The message interpolates NO property values (sub-key names and the
43142
+ * physical id only), so it needs no `maskSecrets` routing.
43143
+ */
43144
+ warnOnUnremovablePoliciesSubKeys(physicalId, properties, previousProperties) {
43145
+ for (const subKey of POLICIES_SUB_KEYS) {
43146
+ if (!sendsPoliciesSubKey(previousProperties, subKey)) continue;
43147
+ if (sendsPoliciesSubKey(properties, subKey)) continue;
43148
+ const { label, reset } = POLICIES_SUB_KEY_ANNOUNCEMENT[subKey];
43149
+ this.logger.warn(`UserPool ${physicalId}: the desired configuration no longer declares Policies.${subKey}, and no UpdateUserPool input can express that removal — omitting the sub-key PRESERVES the live value (measured us-east-1 2026-08-19, issue #1968), so the pool keeps its current ${label}. CloudFormation is the same no-op on the identical template edit (measured us-east-1 2026-09-02, issue #1979), so cdkd deliberately sends no reset. To change the live value, declare Policies.${subKey} explicitly with the intended configuration (${reset}).`);
43150
+ }
43151
+ }
43152
+ /**
43008
43153
  * Update a Cognito User Pool
43009
43154
  *
43010
43155
  * Note: PoolName (UserPoolName) is immutable and cannot be changed after
@@ -43029,6 +43174,7 @@ var CognitoUserPoolProvider = class {
43029
43174
  this.warnOnBlankMfaConfiguration(properties["MfaConfiguration"]);
43030
43175
  this.assertMfaCombinationApplicable(logicalId, resourceType, physicalId, properties, mfaConfiguration);
43031
43176
  const liveMfa = mfaConfiguration === "" && hasMfaConfigProps(properties) ? await this.readLiveMfaConfiguration(physicalId) : void 0;
43177
+ this.warnOnUnremovablePoliciesSubKeys(physicalId, properties, previousProperties);
43032
43178
  try {
43033
43179
  const updateParams = { UserPoolId: physicalId };
43034
43180
  if (properties["Policies"]) {
@@ -88755,4 +88901,4 @@ function buildProgram() {
88755
88901
 
88756
88902
  //#endregion
88757
88903
  export { buildProgram };
88758
- //# sourceMappingURL=program-BiugR6Z1.js.map
88904
+ //# sourceMappingURL=program-fntegUX1.js.map