@cdkd/cli 0.358.4 → 0.358.5

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.
Files changed (54) hide show
  1. package/dist/{ambient-client-defaults-CcCQuSZx.js → ambient-client-defaults-sV7_Dag9.js} +3 -3
  2. package/dist/{ambient-client-defaults-CcCQuSZx.js.map → ambient-client-defaults-sV7_Dag9.js.map} +1 -1
  3. package/dist/{asg-provider-BYsZoqmF.js → asg-provider-C8Z9gQh6.js} +6 -6
  4. package/dist/{asg-provider-BYsZoqmF.js.map → asg-provider-C8Z9gQh6.js.map} +1 -1
  5. package/dist/cli.js +3 -3
  6. package/dist/{custom-resource-runtime-vUQQgT6M.js → custom-resource-runtime-CFKtxcut.js} +6 -6
  7. package/dist/{custom-resource-runtime-vUQQgT6M.js.map → custom-resource-runtime-CFKtxcut.js.map} +1 -1
  8. package/dist/{db-associated-roles-D1kkpP0k.js → db-associated-roles-CAqrOMb6.js} +2 -2
  9. package/dist/{db-associated-roles-D1kkpP0k.js.map → db-associated-roles-CAqrOMb6.js.map} +1 -1
  10. package/dist/{delete-started-joCwegKq.js → delete-started-nZR1YxYW.js} +4 -4
  11. package/dist/{delete-started-joCwegKq.js.map → delete-started-nZR1YxYW.js.map} +1 -1
  12. package/dist/{deploy-engine-CilA7v8d.js → deploy-engine-DD0u1ctj.js} +397 -243
  13. package/dist/deploy-engine-DD0u1ctj.js.map +1 -0
  14. package/dist/{diff-calculator-Bjr0sh-h.js → diff-calculator-D6-l89Im.js} +12 -12
  15. package/dist/{diff-calculator-Bjr0sh-h.js.map → diff-calculator-D6-l89Im.js.map} +1 -1
  16. package/dist/{ec2-termination-protection-Gdl3Djvt.js → ec2-termination-protection-CrZB0URU.js} +6 -6
  17. package/dist/{ec2-termination-protection-Gdl3Djvt.js.map → ec2-termination-protection-CrZB0URU.js.map} +1 -1
  18. package/dist/{ecr-uri-BhoeLkz2.js → ecr-uri-97_fu_HH.js} +2 -2
  19. package/dist/{ecr-uri-BhoeLkz2.js.map → ecr-uri-97_fu_HH.js.map} +1 -1
  20. package/dist/{expected-bucket-owner-CIiqUDil.js → expected-bucket-owner-DztbSJ4h.js} +2 -2
  21. package/dist/{expected-bucket-owner-CIiqUDil.js.map → expected-bucket-owner-DztbSJ4h.js.map} +1 -1
  22. package/dist/{iam-role-provider-gS0g_h2H.js → iam-role-provider-CMtP4Ptf.js} +8 -8
  23. package/dist/{iam-role-provider-gS0g_h2H.js.map → iam-role-provider-CMtP4Ptf.js.map} +1 -1
  24. package/dist/{image-plan-hSzmMXmK.js → image-plan-B9r5-bNi.js} +8 -8
  25. package/dist/{image-plan-hSzmMXmK.js.map → image-plan-B9r5-bNi.js.map} +1 -1
  26. package/dist/index.d.ts +15 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +5 -5
  29. package/dist/{logger-ZjhMP0A2.js → logger-D2Z2OHGQ.js} +2 -2
  30. package/dist/{logger-ZjhMP0A2.js.map → logger-D2Z2OHGQ.js.map} +1 -1
  31. package/dist/{neptune-provider-D3O8Y0lx.js → neptune-provider-CXTIUxND.js} +7 -7
  32. package/dist/{neptune-provider-D3O8Y0lx.js.map → neptune-provider-CXTIUxND.js.map} +1 -1
  33. package/dist/{program-MndcrrWf.js → program-fQBUrH4s.js} +52 -46
  34. package/dist/program-fQBUrH4s.js.map +1 -0
  35. package/dist/{provider-classes-KrOpD8Sp.js → provider-classes-ZbdmR8mu.js} +427 -210
  36. package/dist/provider-classes-ZbdmR8mu.js.map +1 -0
  37. package/dist/{rds-provider-Q_PZr6mn.js → rds-provider-DH7JWWZE.js} +10 -10
  38. package/dist/{rds-provider-Q_PZr6mn.js.map → rds-provider-DH7JWWZE.js.map} +1 -1
  39. package/dist/{read-replica-DyQpEv77.js → read-replica-DPeTyeJe.js} +3 -3
  40. package/dist/{read-replica-DyQpEv77.js.map → read-replica-DPeTyeJe.js.map} +1 -1
  41. package/dist/{replacement-rules-BdvFwhmu.js → replacement-rules-CRiQUpPY.js} +3 -3
  42. package/dist/{replacement-rules-BdvFwhmu.js.map → replacement-rules-CRiQUpPY.js.map} +1 -1
  43. package/dist/{resource-deadline-CKaftDB_.js → resource-deadline-8W0fpf3B.js} +4 -4
  44. package/dist/{resource-deadline-CKaftDB_.js.map → resource-deadline-8W0fpf3B.js.map} +1 -1
  45. package/dist/{restore-source-guard-eOILAZqS.js → restore-source-guard-BFsarBUR.js} +4 -4
  46. package/dist/{restore-source-guard-eOILAZqS.js.map → restore-source-guard-BFsarBUR.js.map} +1 -1
  47. package/dist/{run-cli-PZtAEtYO.js → run-cli-APX25Mdo.js} +2 -2
  48. package/dist/{run-cli-PZtAEtYO.js.map → run-cli-APX25Mdo.js.map} +1 -1
  49. package/dist/{version-DiwszmmI.js → version-DiLAo6CH.js} +2 -2
  50. package/dist/{version-DiwszmmI.js.map → version-DiLAo6CH.js.map} +1 -1
  51. package/package.json +1 -1
  52. package/dist/deploy-engine-CilA7v8d.js.map +0 -1
  53. package/dist/program-MndcrrWf.js.map +0 -1
  54. package/dist/provider-classes-KrOpD8Sp.js.map +0 -1
@@ -1,21 +1,21 @@
1
- import { a as IamCreateClientCache, i as isEntityAlreadyExists, n as collectInlinePolicyNamesManagedBySiblings, r as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-gS0g_h2H.js";
2
- import { A as configStringRefusal, B as generateResourceName, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, J as getCurrentStackName, M as replayWarn, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, U as recordedGeneratedNameKept, V as generateResourceNameWithFallback, Y as isBeforeStateRead, c as VERBOSE_POINTER, d as describeAwsStatusReason, f as isAwsAuthoredFailure, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, w as generatedNameFor } from "./logger-ZjhMP0A2.js";
1
+ import { a as IamCreateClientCache, i as isEntityAlreadyExists, n as collectInlinePolicyNamesManagedBySiblings, r as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-CMtP4Ptf.js";
2
+ import { A as configStringRefusal, B as generateResourceName, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, J as getCurrentStackName, M as replayWarn, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, U as recordedGeneratedNameKept, V as generateResourceNameWithFallback, Y as isBeforeStateRead, c as VERBOSE_POINTER, d as describeAwsStatusReason, f as isAwsAuthoredFailure, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, w as generatedNameFor } from "./logger-D2Z2OHGQ.js";
3
3
  import { d as withApiGatewayPacing, l as s3ClientDefaults, r as getAwsClients } from "./aws-clients-DOkPjjAW.js";
4
- import { D as markReplayMayCollide, E as markNameCollision, F as isAmbiguousOutcomeError, G as markRedactedCause, I as isExplicitDenyError, K as wrapMaskedAwsError, M as explicitDenyPolicyKind, O as relayedNameCollision, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, V as THROTTLING_ERROR_NAMES, W as markNonRetryable, _ as ResourceUpdateNotSupportedError, at as ProvisioningError, et as CdkdError, i as credentialFingerprint, n as ambientCredentialConfig, r as clientDefaultsFor, t as ambientClientDefaults, x as hasReplayMayCollide, z as isTransientServerError } from "./ambient-client-defaults-CcCQuSZx.js";
5
- import { $ as deleteWithProtectionCompensation, $t as markAuxiliaryFailure, A as ambiguousAttemptLead, At as canonicalizeRoute53QueryName, B as isPlainImportValue, Bt as createMaskedRetryLogger, Ct as protectedReplacementAdvice, D as AmbiguousCreateLatch, E as AMBIGUOUS_LATCH_TTL_MS, F as setBounded, Ft as packCompositeId, G as remedyLogicalId, H as normalizeAwsTagsToCfn, Ht as maskDeep, I as withoutServerErrorRetries, J as RESOURCE_NOT_FOUND, K as resolveExplicitPhysicalId, L as VALUE_NOT_SHOWN, Lt as segmentAfterAnchor, M as isInsideWindow, Mt as compositeIdSeparatorRefusal, N as replayFollowedAmbiguousAttempt, Nt as compositeIdSkipResult, O as CREATION_DATE_SKEW_MARGIN_MS, Ot as isInterruptedWaitError, P as replayedSendWindow, Pt as logicalIdShown, R as importRemedyCommand, Rt as stateOrphanRecordRemedy, S as readPrincipalLists, St as pasteableAwsCommand, U as quotedRemedyLogicalId, Ut as maskerOrIdentity, V as isQuotableImportValue, Vt as isSecretDerivedValue, W as refusalTypeShown, Wt as withDerivedNameMasks, Y as assertRegionMatch, Z as markNotGone, Zt as isAuxiliaryFailure, _n as injectiveKey, a as clearOnUpdateRemoval, at as PROTECTION_FLIP_RETRY_WAIT_MS, b as holdsSecretDerivedEntry, bt as WITHHELD_AWS_COMMAND, c as removedTemplateKeys, ct as isProceedDbStatus, dt as ProtectionFlipRegistry, en as markCreatedBeforeFailure, et as logGroupProtectionSite, ft as isTerminalDeleteFailure, g as retractCreatedResource, gn as withPasteableAwsProfile, gt as ElapsedBudgetRegistry, ht as ElapsedBudget, it as userPoolProtectionSite, j as createAttemptKey, jt as compositeIdFormatMessage, k as RecentIdSet, kt as startInterruptWatch, l as withRemovalDefaults, lt as isTerminalDbWaitStatus, m as reportCreatedResource, n as enclosingDeadlineRemainingMs, nt as rdsFamilyProtectionSite, ot as deleteAfterProtectionFlipWithFinalSnapshot, pt as protectionFlipKey, q as DriftReadRefusedError, qt as clearCreatedBeforeFailure, t as enclosingDeadlineExpired, tn as markSupersedesEarlierCreate, tt as observeThenDisableProtection, vn as injectiveKeyPrefix, w as recordedPrincipalsRepair, wt as renderDisableCommand, x as onlySecretDerived, xt as isAwsCliLiteral, y as SECRET_DERIVED_READ_LIVE, yt as UNNAMEABLE_ID_CLAUSE, z as isPlainImportJson, zt as createMaskedLogSinks } from "./resource-deadline-CKaftDB_.js";
6
- import { A as displayStackName, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, c as deployReplaceCommand, d as pasteableCommand, j as isPasteableIdent, k as displaySafe, l as hasClauseBreak, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, u as isInertUnquoted, v as withheldTargetClause } from "./version-DiwszmmI.js";
7
- import { gt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted } from "./delete-started-joCwegKq.js";
8
- import { _ as warnUnsettledMember, a as resolveSecretDerivedPrincipals, b as verbatimEchoDriftKeys, c as SNS_DEFAULT_POLICY_ID, d as efsPolicyMatchesDeclared, f as lambdaPermissionMatchesDeclared, g as settleDeclaredMember, h as reReadUntilSettled, i as isResolvableSecretPrincipalList, l as declaredMemberDocument, m as policyDocumentMatchesDeclared, n as runDestroyForStack, o as KMS_DEFAULT_KEY_POLICY_ID, p as memberReadFailure, r as holdsUnprovenSecretPrincipalToken, s as OWN_WRITE_REREAD_DELAYS_MS, t as canonicalizeIpv4Cidr, u as declaredPolicyDocument, v as attemptedPolicyDocument, y as policyContentKey } from "./program-MndcrrWf.js";
9
- import { $ as sendTtlWaitingOutRateLimit, $a as markWaitAbandoned, $i as secretNamedAttributeNamesOf, $n as sgProtocolKey, $o as getAccountInfo, Ao as s3BucketDomainName, At as S3_AUTO_DELETE_OBJECTS_TAG, B as declaredStreamTagsMember, Br as redactedDeleteAddressSkip, Ci as getStackRecords, Cl as stringifyValue, Cs as toFiniteNumber, Ct as INDEX_SETTLE_POLL_INTERVAL_MS, Dc as refuseMalformedNestedChildOutputs, Dl as listNestedTemplateRows, Dt as relayedIndexBusyDelete, El as isAbsoluteAssetPath, Et as maskedLogger, Fl as decodeListingKey, G as streamDeclaresTags, Gt as chunks, Ha as waitForLambdaFunctionActive, Hc as accountArgs, I as DynamoDBGlobalTableProvider, J as streamTagsMatchDeclared, Jt as withApiLimit, K as streamMemberRefusals, Kt as isAccessDeniedError, L as STREAM_POLICY_KEY, Lc as refuseMalformedResourcesForDestroy, Lr as REDACTED_DELETE_ADDRESS_SKIP_REASON, Ma as getCurrentResourceSecrets, Mo as s3BucketRegionalDomainName, Ms as passedParameterClassesOf, Mt as isTruthyCfnBoolean, No as s3BucketWebsiteUrl, Ol as renderNestedTemplateTreeDefect, Ot as waitForIndexesSettled, Q as readTtlSpec, Qn as cfnIngressPortValue, R as STREAM_TAGS_KEY, Rr as isRedactedRecordedValue, Ss as toCfnInteger, St as DELETE_INDEX_WAIT_PROCEED_NOTE, Su as displayAssemblyPath, Ti as replacedDeleteFailureVerdict, Tl as findNestedTemplateTreeDefect, Tt as deleteTableWithIndexBusyRetry, Tu as resolveAssemblyPath, U as reverseMapStreamPolicy, Uc as withheldAccountClause, Uo as parseWebACLArn, V as planStreamMemberOps, W as streamDeclaresPolicy, Wa as waitForGoneAfterDelete, X as isTtlRateLimited, Xa as withIndeterminateGuard, Xn as siblingOwnedSgRuleIdentities, Y as isTtlAlreadyDisabled, Ya as deleteSkipReason, Z as planTimeToLive, Zc as findSdkUnwiredProperties, Zn as withoutSiblingOwnedSgRules, Zr as getCurrentProducerRegions, _a as isStoredExpression, _t as beginDeleteWait, ao as isSettledInstanceState, at as CONTRIBUTOR_INSIGHTS_KEY, br as acquireIdempotencyToken, bs as coerceWarmThroughput$1, bt as resolveDynamoDbDeleteBudgetClock, cn as getCurrentNestedStackContext, cr as calculateResourceDrift, ct as planContributorInsightsOp, dt as reverseMapIndexContributorInsights, el as withoutSdkUnwiredProperties, er as canonicalizeIpProtocolValue, et as planVectorIndexUpdates, ft as reverseMapTableContributorInsights, ga as collectPrincipalsAttachingPolicy, gr as earliestDefined, gt as DYNAMODB_DELETE_POLL_COST_MS, ha as collectManagedPolicyArnsAttachedBySiblings, ht as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, in as revertNestedChildFromJournal, it as vectorIndexesShapeDetail, jo as s3BucketDualStackDomainName, jt as hasCdkAutoDeleteTag, ko as s3BucketArn, kt as ECR_AUTO_DELETE_IMAGES_TAG, ln as withNestedStackContext, lt as planIndexContributorInsightsOps, ma as collectGroupsAddedBySiblings, mt as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, nt as vectorIndexesForCreate, oo as APPSYNC_APIKEY_ARN_RESOURCE_PATH, ot as contributorInsightsRefusals, pt as stripIndexContributorInsights, q as streamPolicyMatchesDeclared, ql as rewriteTemplateAssetReferences, qo as outputReferenceProvenanceOf, qt as lookupEachName, rt as vectorIndexesSettled, so as maskedSecretSegment, st as indexDeclaresContributorInsights, t as DeployEngine, tn as getNestedRevertRun, tt as readbackVectorIndexes, ut as readContributorInsightsSpec, va as withoutSiblingAttachedArns, vr as reserveStackCreateToken, vt as compensateRemovedDeletionProtection, wt as TABLE_INDEX_NOUN, wu as renderAssemblyPathEscape, xi as awaitInFlightSibling, xs as isWarmThroughputDecrease, xt as resolveDynamoDbDeleteBudgetMs, xu as describeFileReadFailure, ya as withoutSiblingOwned, ys as WARM_THROUGHPUT_MEMBERS, yt as deleteBudgetKey, z as declaredStreamPolicyMember, zr as redactedDeleteAddressFields } from "./deploy-engine-CilA7v8d.js";
10
- import { _ as isUsableAttemptedName, c as planTagDiff, d as tagMapAsList, f as tagPlanWarning, g as stringifyIfAssigned, h as definedAttributes, i as refuseRestoreFromItself, l as readTagList, m as modifyDbInstanceWhenAvailable, o as DBPROXY_TAGS_WHAT, p as isModifyNotAvailableRefusal, s as DBPROXY_TAG_OPTIONS, u as refuseMalformedDesiredTags } from "./restore-source-guard-eOILAZqS.js";
11
- import { A as withRetry, U as timePhase, _ as unchangedBehindSecretReference, a as reDisableInstanceApiTermination, d as markRefusedBeforeApplying, g as onlySecretReferencesDiffer, i as observeThenDisableInstanceApiTermination, l as getPriorAttempts, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, r as isTerminationProtectionPropagationError, s as resolvedResourceTimeoutMs } from "./ec2-termination-protection-Gdl3Djvt.js";
4
+ import { D as markReplayMayCollide, E as markNameCollision, F as isAmbiguousOutcomeError, G as markRedactedCause, I as isExplicitDenyError, K as wrapMaskedAwsError, M as explicitDenyPolicyKind, O as relayedNameCollision, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, V as THROTTLING_ERROR_NAMES, W as markNonRetryable, _ as ResourceUpdateNotSupportedError, at as ProvisioningError, et as CdkdError, i as credentialFingerprint, n as ambientCredentialConfig, r as clientDefaultsFor, t as ambientClientDefaults, x as hasReplayMayCollide, z as isTransientServerError } from "./ambient-client-defaults-sV7_Dag9.js";
5
+ import { $ as deleteWithProtectionCompensation, $t as markAuxiliaryFailure, A as ambiguousAttemptLead, At as canonicalizeRoute53QueryName, B as isPlainImportValue, Bt as createMaskedRetryLogger, Ct as protectedReplacementAdvice, D as AmbiguousCreateLatch, E as AMBIGUOUS_LATCH_TTL_MS, F as setBounded, Ft as packCompositeId, G as remedyLogicalId, H as normalizeAwsTagsToCfn, Ht as maskDeep, I as withoutServerErrorRetries, J as RESOURCE_NOT_FOUND, K as resolveExplicitPhysicalId, L as VALUE_NOT_SHOWN, Lt as segmentAfterAnchor, M as isInsideWindow, Mt as compositeIdSeparatorRefusal, N as replayFollowedAmbiguousAttempt, Nt as compositeIdSkipResult, O as CREATION_DATE_SKEW_MARGIN_MS, Ot as isInterruptedWaitError, P as replayedSendWindow, Pt as logicalIdShown, R as importRemedyCommand, Rt as stateOrphanRecordRemedy, S as readPrincipalLists, St as pasteableAwsCommand, U as quotedRemedyLogicalId, Ut as maskerOrIdentity, V as isQuotableImportValue, Vt as isSecretDerivedValue, W as refusalTypeShown, Wt as withDerivedNameMasks, Y as assertRegionMatch, Z as markNotGone, Zt as isAuxiliaryFailure, _n as injectiveKey, a as clearOnUpdateRemoval, at as PROTECTION_FLIP_RETRY_WAIT_MS, b as holdsSecretDerivedEntry, bt as WITHHELD_AWS_COMMAND, c as removedTemplateKeys, ct as isProceedDbStatus, dt as ProtectionFlipRegistry, en as markCreatedBeforeFailure, et as logGroupProtectionSite, ft as isTerminalDeleteFailure, g as retractCreatedResource, gn as withPasteableAwsProfile, gt as ElapsedBudgetRegistry, ht as ElapsedBudget, it as userPoolProtectionSite, j as createAttemptKey, jt as compositeIdFormatMessage, k as RecentIdSet, kt as startInterruptWatch, l as withRemovalDefaults, lt as isTerminalDbWaitStatus, m as reportCreatedResource, n as enclosingDeadlineRemainingMs, nt as rdsFamilyProtectionSite, ot as deleteAfterProtectionFlipWithFinalSnapshot, pt as protectionFlipKey, q as DriftReadRefusedError, qt as clearCreatedBeforeFailure, t as enclosingDeadlineExpired, tn as markSupersedesEarlierCreate, tt as observeThenDisableProtection, vn as injectiveKeyPrefix, w as recordedPrincipalsRepair, wt as renderDisableCommand, x as onlySecretDerived, xt as isAwsCliLiteral, y as SECRET_DERIVED_READ_LIVE, yt as UNNAMEABLE_ID_CLAUSE, z as isPlainImportJson, zt as createMaskedLogSinks } from "./resource-deadline-8W0fpf3B.js";
6
+ import { A as displayStackName, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, c as deployReplaceCommand, d as pasteableCommand, j as isPasteableIdent, k as displaySafe, l as hasClauseBreak, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, u as isInertUnquoted, v as withheldTargetClause } from "./version-DiLAo6CH.js";
7
+ import { gt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted } from "./delete-started-nZR1YxYW.js";
8
+ import { _ as warnUnsettledMember, a as resolveSecretDerivedPrincipals, c as SNS_DEFAULT_POLICY_ID, d as efsPolicyMatchesDeclared, f as lambdaPermissionMatchesDeclared, g as settleDeclaredMember, h as reReadUntilSettled, i as isResolvableSecretPrincipalList, l as declaredMemberDocument, m as policyDocumentMatchesDeclared, n as runDestroyForStack, o as KMS_DEFAULT_KEY_POLICY_ID, p as memberReadFailure, r as holdsUnprovenSecretPrincipalToken, s as OWN_WRITE_REREAD_DELAYS_MS, t as canonicalizeIpv4Cidr, u as declaredPolicyDocument, v as attemptedPolicyDocument, y as policyContentKey } from "./program-fQBUrH4s.js";
9
+ import { $ as sendTtlWaitingOutRateLimit, $c as findSdkUnwiredProperties, $n as sgProtocolKey, Al as renderNestedTemplateTreeDefect, At as S3_AUTO_DELETE_OBJECTS_TAG, B as declaredStreamTagsMember, Ci as replacedDeleteFailureVerdict, Cs as isWarmThroughputDecrease, Ct as INDEX_SETTLE_POLL_INTERVAL_MS, Cu as describeFileReadFailure, Dl as findNestedTemplateTreeDefect, Dt as relayedIndexBusyDelete, Du as resolveAssemblyPath, Et as maskedLogger, Eu as renderAssemblyPathEscape, Fo as s3BucketWebsiteUrl, Fr as REDACTED_DELETE_ADDRESS_SKIP_REASON, G as streamDeclaresTags, Gc as withheldAccountClause, Go as parseWebACLArn, Gt as chunks, I as DynamoDBGlobalTableProvider, Ir as isRedactedRecordedValue, J as streamTagsMatchDeclared, Jt as withApiLimit, K as streamMemberRefusals, Ka as waitForGoneAfterDelete, Kt as isAccessDeniedError, L as STREAM_POLICY_KEY, Ll as decodeListingKey, Lr as redactedDeleteAddressFields, Mo as s3BucketDomainName, Mt as isTruthyCfnBoolean, No as s3BucketDualStackDomainName, Ol as isAbsoluteAssetPath, Ot as waitForIndexesSettled, Pa as getCurrentResourceSecrets, Po as s3BucketRegionalDomainName, Ps as passedParameterClassesOf, Q as readTtlSpec, Qa as withIndeterminateGuard, Qn as cfnIngressPortValue, R as STREAM_TAGS_KEY, Rr as redactedDeleteAddressSkip, Ss as coerceWarmThroughput$1, St as DELETE_INDEX_WAIT_PROCEED_NOTE, Tl as stringifyValue, Ts as toFiniteNumber, Tt as deleteTableWithIndexBusyRetry, U as reverseMapStreamPolicy, V as planStreamMemberOps, W as streamDeclaresPolicy, Wa as waitForLambdaFunctionActive, Wc as accountArgs, X as isTtlRateLimited, Xn as siblingOwnedSgRuleIdentities, Y as isTtlAlreadyDisabled, Yl as rewriteTemplateAssetReferences, Yo as outputReferenceProvenanceOf, Yr as getCurrentProducerRegions, Z as planTimeToLive, Za as deleteSkipReason, Zn as withoutSiblingOwnedSgRules, _a as collectManagedPolicyArnsAttachedBySiblings, _r as earliestDefined, _t as beginDeleteWait, at as CONTRIBUTOR_INSIGHTS_KEY, ba as withoutSiblingAttachedArns, bt as resolveDynamoDbDeleteBudgetClock, cn as getCurrentNestedStackContext, co as APPSYNC_APIKEY_ARN_RESOURCE_PATH, cr as calculateResourceDrift, ct as planContributorInsightsOp, dt as reverseMapIndexContributorInsights, er as canonicalizeIpProtocolValue, et as planVectorIndexUpdates, fr as verbatimEchoDriftKeys, ft as reverseMapTableContributorInsights, ga as collectGroupsAddedBySiblings, gt as DYNAMODB_DELETE_POLL_COST_MS, ht as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, in as revertNestedChildFromJournal, it as vectorIndexesShapeDetail, jo as s3BucketArn, jt as hasCdkAutoDeleteTag, kc as refuseMalformedNestedChildOutputs, kl as listNestedTemplateRows, kt as ECR_AUTO_DELETE_IMAGES_TAG, ln as withNestedStackContext, lo as maskedSecretSegment, lt as planIndexContributorInsightsOps, mt as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, nl as withoutSdkUnwiredProperties, nt as vectorIndexesForCreate, ot as contributorInsightsRefusals, pt as stripIndexContributorInsights, q as streamPolicyMatchesDeclared, qt as lookupEachName, rt as vectorIndexesSettled, so as isSettledInstanceState, st as indexDeclaresContributorInsights, t as DeployEngine, ta as secretNamedAttributeNamesOf, tn as getNestedRevertRun, to as markWaitAbandoned, ts as getAccountInfo, tt as readbackVectorIndexes, ut as readContributorInsightsSpec, va as collectPrincipalsAttachingPolicy, vt as compensateRemovedDeletionProtection, ws as toCfnInteger, wt as TABLE_INDEX_NOUN, wu as displayAssemblyPath, xa as withoutSiblingOwned, xi as getStackRecords, xr as acquireIdempotencyToken, xs as WARM_THROUGHPUT_MEMBERS, xt as resolveDynamoDbDeleteBudgetMs, ya as isStoredExpression, yi as awaitInFlightSibling, yr as reserveStackCreateToken, yt as deleteBudgetKey, z as declaredStreamPolicyMember, zc as refuseMalformedResourcesForDestroy } from "./deploy-engine-DD0u1ctj.js";
10
+ import { _ as isUsableAttemptedName, c as planTagDiff, d as tagMapAsList, f as tagPlanWarning, g as stringifyIfAssigned, h as definedAttributes, i as refuseRestoreFromItself, l as readTagList, m as modifyDbInstanceWhenAvailable, o as DBPROXY_TAGS_WHAT, p as isModifyNotAvailableRefusal, s as DBPROXY_TAG_OPTIONS, u as refuseMalformedDesiredTags } from "./restore-source-guard-BFsarBUR.js";
11
+ import { A as withRetry, U as timePhase, _ as unchangedBehindSecretReference, a as reDisableInstanceApiTermination, d as markRefusedBeforeApplying, g as onlySecretReferencesDiffer, i as observeThenDisableInstanceApiTermination, l as getPriorAttempts, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, r as isTerminationProtectionPropagationError, s as resolvedResourceTimeoutMs } from "./ec2-termination-protection-CrZB0URU.js";
12
12
  import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix } from "./aws-partition-DA0r2sr-.js";
13
13
  import { f as ambientRegion, r as awsEndpointOverrideActive } from "./aws-client-defaults-DAebi99J.js";
14
- import { n as planSubscriptionAttributes } from "./diff-calculator-Bjr0sh-h.js";
15
- import { $ as snapshotPassProvenance, At as withoutPhysicalNameCopies, C as passedNoEchoParametersOf, I as markSameGenerationBag, Nt as dynamicReferenceTokens, W as redactForState, Z as recordReferenceProvenanceEntry, a as emrClusterInstancesReplaced, cn as recordAttributeIdCopy, i as ecsServiceLaunchTypeSetOrChanged, it as hasMaskableValues, l as sameLambdaFunctionAddress, mn as carriesSecretMask, n as blockDeviceMappingsDifferOnlyInDeleteOnTermination, o as canonicalLambdaFunctionName, on as recoverMaskedOutput, s as lambdaFunctionNameForMask, sn as physicalNameCopiesOf } from "./replacement-rules-BdvFwhmu.js";
16
- import { RDSProvider } from "./rds-provider-Q_PZr6mn.js";
17
- import { NeptuneProvider } from "./neptune-provider-D3O8Y0lx.js";
18
- import { ASGProvider } from "./asg-provider-BYsZoqmF.js";
14
+ import { n as planSubscriptionAttributes } from "./diff-calculator-D6-l89Im.js";
15
+ import { $ as snapshotPassProvenance, At as withoutPhysicalNameCopies, C as passedNoEchoParametersOf, I as markSameGenerationBag, Nt as dynamicReferenceTokens, W as redactForState, Z as recordReferenceProvenanceEntry, a as emrClusterInstancesReplaced, cn as recordAttributeIdCopy, i as ecsServiceLaunchTypeSetOrChanged, it as hasMaskableValues, l as sameLambdaFunctionAddress, mn as carriesSecretMask, n as blockDeviceMappingsDifferOnlyInDeleteOnTermination, o as canonicalLambdaFunctionName, on as recoverMaskedOutput, s as lambdaFunctionNameForMask, sn as physicalNameCopiesOf } from "./replacement-rules-CRiQUpPY.js";
16
+ import { RDSProvider } from "./rds-provider-DH7JWWZE.js";
17
+ import { NeptuneProvider } from "./neptune-provider-CXTIUxND.js";
18
+ import { ASGProvider } from "./asg-provider-C8Z9gQh6.js";
19
19
  import { createHash, randomUUID } from "node:crypto";
20
20
  import { CreateBucketCommand, CreateBucketMetadataConfigurationCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetadataConfigurationCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAbacCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketMetadataConfigurationCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAbacCommand, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, UpdateBucketMetadataAnnotationTableConfigurationCommand, UpdateBucketMetadataInventoryTableConfigurationCommand, UpdateBucketMetadataJournalTableConfigurationCommand } from "@aws-sdk/client-s3";
21
21
  import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateAccessKeyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateAccessKeyCommand, UpdateGroupCommand, UpdateLoginProfileCommand, UpdateUserCommand } from "@aws-sdk/client-iam";
@@ -41,7 +41,7 @@ import { CreateWebFunctionEndpointCommand, CreateWebFunctionRevisionCommand, Del
41
41
  import { CreateNetworkConnectorCommand, DeleteNetworkConnectorCommand, GetNetworkConnectorCommand, LambdaCoreClient, ResourceNotFoundException as ResourceNotFoundException$10, UpdateNetworkConnectorCommand } from "@aws-sdk/client-lambda-core";
42
42
  import * as fs from "node:fs";
43
43
  import * as path from "node:path";
44
- import { CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeRepositoriesCommand, ECRClient, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$9, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotEmptyException, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$11, UntagResourceCommand as UntagResourceCommand$11 } from "@aws-sdk/client-ecr";
44
+ import { CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeRepositoriesCommand, ECRClient, GetLifecyclePolicyCommand, GetRepositoryPolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$9, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotEmptyException, RepositoryNotFoundException, RepositoryPolicyNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$11, UntagResourceCommand as UntagResourceCommand$11 } from "@aws-sdk/client-ecr";
45
45
  import { AddTagsCommand, CreateListenerCommand, CreateLoadBalancerCommand, CreateTargetGroupCommand, DeleteListenerCommand, DeleteLoadBalancerCommand, DeleteTargetGroupCommand, DeregisterTargetsCommand, DescribeCapacityReservationCommand, DescribeListenerAttributesCommand, DescribeListenersCommand, DescribeLoadBalancerAttributesCommand, DescribeLoadBalancersCommand, DescribeTagsCommand, DescribeTargetGroupAttributesCommand, DescribeTargetGroupsCommand, DescribeTargetHealthCommand, ElasticLoadBalancingV2Client, ModifyCapacityReservationCommand, ModifyIpPoolsCommand, ModifyListenerAttributesCommand, ModifyListenerCommand, ModifyLoadBalancerAttributesCommand, ModifyTargetGroupAttributesCommand, ModifyTargetGroupCommand, RegisterTargetsCommand, RemoveTagsCommand, SetIpAddressTypeCommand, SetSecurityGroupsCommand, SetSubnetsCommand, waitUntilLoadBalancerAvailable } from "@aws-sdk/client-elastic-load-balancing-v2";
46
46
  import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, DisabledException, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListKeysCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12, UpdateAliasCommand, UpdateKeyDescriptionCommand } from "@aws-sdk/client-kms";
47
47
  import { isDeepStrictEqual } from "node:util";
@@ -236,6 +236,14 @@ async function detachPartialPolicy(logicalId, policyName, attached, sinks, maskS
236
236
  if (failed.length > 0) log.warn(`Failed to detach the partially-created IAM policy ${logicalId} (${v(policyName)}) after its create failed; cdkd has no record of it, so it stays attached and granting until it is removed by hand${withheld && verbosePointerSentence() ? ` (${VERBOSE_POINTER.replace(/\.$/, "")})` : ""}: ${failed.join("; ")}`);
237
237
  }
238
238
 
239
+ // src/provisioning/revert-no-replace.ts
240
+ function isDriftRevert(context) {
241
+ return context?.desiredFromAwsReadback === true;
242
+ }
243
+ function revertReplacementRefusal(resourceType, logicalId, reason) {
244
+ return new ResourceUpdateNotSupportedError(resourceType, logicalId, `${reason}, so reverting it would replace it, and a drift revert never replaces a resource. Nothing was changed; re-deploy with ${deployReplaceCommand()} to replace it`);
245
+ }
246
+
239
247
  // src/provisioning/providers/iam-policy/update.ts
240
248
  async function update$42(logicalId, physicalId, resourceType, properties, previousProperties, context) {
241
249
  const oldPolicyName = physicalId.includes(":") ? physicalId.split(":")[0] : physicalId;
@@ -251,6 +259,7 @@ async function update$42(logicalId, physicalId, resourceType, properties, previo
251
259
  logicalId,
252
260
  options: { maxLength: 64 }
253
261
  }) ? oldPolicyName : derivedPolicyName;
262
+ if (isDriftRevert(context) && newPolicyName !== oldPolicyName) throw revertReplacementRefusal(resourceType, logicalId, "its PolicyName differs from the name the policy is recorded under");
254
263
  const recordedPolicyName = previousProperties["PolicyName"];
255
264
  const oldPolicyNames = [...new Set([oldPolicyName, recordedPolicyName].filter((name) => typeof name === "string" && IAM_POLICY_NAME.test(name)))];
256
265
  const newTargets = readPolicyTargetLists(properties);
@@ -342,7 +351,7 @@ async function update$42(logicalId, physicalId, resourceType, properties, previo
342
351
  }
343
352
  log.debug(`Successfully updated IAM policy ${logicalId}`);
344
353
  return {
345
- physicalId: newPolicyName,
354
+ physicalId: isDriftRevert(context) ? physicalId : newPolicyName,
346
355
  wasReplaced: false,
347
356
  attributes: { PolicyName: newPolicyName }
348
357
  };
@@ -528,7 +537,7 @@ async function deleteImpl$40(logicalId, physicalId, resourceType, properties, co
528
537
 
529
538
  // src/provisioning/providers/iam-policy/read-state.ts
530
539
  const TARGET_READ_CONCURRENCY = 5;
531
- async function readCurrentState$40(physicalId, _logicalId, _resourceType, properties, context) {
540
+ async function readCurrentState$41(physicalId, _logicalId, _resourceType, properties, context) {
532
541
  if (!properties) return void 0;
533
542
  const policyDocument = properties["PolicyDocument"];
534
543
  if (!policyDocument) return void 0;
@@ -680,7 +689,7 @@ var IAMPolicyProvider = class {
680
689
  return deleteImpl$40.call(this, logicalId, physicalId, resourceType, properties, context);
681
690
  }
682
691
  readCurrentState(physicalId, logicalId, resourceType, properties, context) {
683
- return readCurrentState$40.call(this, physicalId, logicalId, resourceType, properties, context);
692
+ return readCurrentState$41.call(this, physicalId, logicalId, resourceType, properties, context);
684
693
  }
685
694
  decodePolicyDocument(raw) {
686
695
  return decodePolicyDocument.call(this, raw);
@@ -1040,7 +1049,7 @@ async function deleteImpl$39(logicalId, physicalId, resourceType, _properties, c
1040
1049
 
1041
1050
  // src/provisioning/providers/iam-managed-policy/read-state.ts
1042
1051
  const AWS_MANAGED_POLICY_ARN_RE = /^arn:aws[a-z0-9-]*:iam::aws:/;
1043
- async function readCurrentState$39(physicalId, _logicalId, _resourceType, properties, context) {
1052
+ async function readCurrentState$40(physicalId, _logicalId, _resourceType, properties, context) {
1044
1053
  let policy;
1045
1054
  try {
1046
1055
  policy = (await this.iamClient.send(new GetPolicyCommand({ PolicyArn: physicalId }))).Policy;
@@ -1188,7 +1197,7 @@ var IAMManagedPolicyProvider = class {
1188
1197
  }
1189
1198
  }
1190
1199
  readCurrentState(physicalId, logicalId, resourceType, properties, context) {
1191
- return readCurrentState$39.call(this, physicalId, logicalId, resourceType, properties, context);
1200
+ return readCurrentState$40.call(this, physicalId, logicalId, resourceType, properties, context);
1192
1201
  }
1193
1202
  import(input) {
1194
1203
  return importImpl$39.call(this, input);
@@ -3078,7 +3087,7 @@ async function readIdIfExists(resourceType, name) {
3078
3087
  if (token === void 0) throw new Error(`IAM returned no ${noun === "user" ? "UserId" : "GroupId"}`);
3079
3088
  return token;
3080
3089
  }
3081
- async function readCurrentState$38(physicalId, logicalId, resourceType, properties, context) {
3090
+ async function readCurrentState$39(physicalId, logicalId, resourceType, properties, context) {
3082
3091
  switch (resourceType) {
3083
3092
  case "AWS::IAM::User": return this.readUserCurrentState(physicalId, properties, context);
3084
3093
  case "AWS::IAM::Group": return this.readGroupCurrentState(physicalId, properties, context);
@@ -3367,7 +3376,7 @@ var IAMUserGroupProvider = class {
3367
3376
  return readIdIfExists.call(this, resourceType, name);
3368
3377
  }
3369
3378
  readCurrentState(physicalId, logicalId, resourceType, properties, context) {
3370
- return readCurrentState$38.call(this, physicalId, logicalId, resourceType, properties, context);
3379
+ return readCurrentState$39.call(this, physicalId, logicalId, resourceType, properties, context);
3371
3380
  }
3372
3381
  readUserCurrentState(physicalId, properties, context) {
3373
3382
  return readUserCurrentState.call(this, physicalId, properties, context);
@@ -6236,8 +6245,49 @@ async function create$38(logicalId, resourceType, properties, context) {
6236
6245
  }
6237
6246
  }
6238
6247
 
6248
+ // src/provisioning/providers/s3-bucket/survivor-identity.ts
6249
+ const UNKNOWN = { kind: "unknown" };
6250
+ async function replacedSurvivorIdentity(physicalId, resourceType, context) {
6251
+ try {
6252
+ if (resourceType !== "AWS::S3::Bucket" || !isPlainBucketName(physicalId)) return UNKNOWN;
6253
+ const want = canonicalizeRegion(context.expectedRegion);
6254
+ if (canonicalizeRegion(await this.getRegion()) !== want) return UNKNOWN;
6255
+ const probe = await this.probeBucketRegion(physicalId);
6256
+ if (probe.kind === "absent") return { kind: "gone" };
6257
+ const started = Date.now();
6258
+ for (let attempt = 0; attempt < 3; attempt++) {
6259
+ if (attempt > 0) {
6260
+ if (Date.now() - started > 6e3) break;
6261
+ await new Promise((r) => setTimeout(r, BUCKET_LIST_IDENTITY_DELAY_MS));
6262
+ }
6263
+ const listed = await this.listOwnedBucket(physicalId);
6264
+ if ("unknown" in listed) return UNKNOWN;
6265
+ if (listed.bucket === void 0) continue;
6266
+ if (probe.kind !== "region") return {
6267
+ kind: "owned",
6268
+ identity: void 0
6269
+ };
6270
+ if (probe.region !== want) return {
6271
+ kind: "foreign",
6272
+ seen: "other-region"
6273
+ };
6274
+ const created = listed.bucket.CreationDate;
6275
+ return {
6276
+ kind: "owned",
6277
+ identity: created instanceof Date && !Number.isNaN(created.getTime()) ? `${want}|${created.toISOString()}` : void 0
6278
+ };
6279
+ }
6280
+ return probe.kind === "region" || probe.kind === "indeterminate" && probe.errorName === "AccessDenied" ? {
6281
+ kind: "foreign",
6282
+ seen: "other-account"
6283
+ } : UNKNOWN;
6284
+ } catch {
6285
+ return UNKNOWN;
6286
+ }
6287
+ }
6288
+
6239
6289
  // src/provisioning/providers/s3-bucket/read-state.ts
6240
- async function readCurrentState$37(physicalId, logicalId, _resourceType, _properties, context) {
6290
+ async function readCurrentState$38(physicalId, logicalId, _resourceType, _properties, context) {
6241
6291
  const headAttempts = context?.afterOwnWrite === true ? 5 : 1;
6242
6292
  for (let attempt = 1;; attempt++) try {
6243
6293
  await this.s3Client.send(new HeadBucketCommand({ Bucket: physicalId }));
@@ -6760,7 +6810,7 @@ var S3BucketProvider = class {
6760
6810
  return canonicalizeDesiredProperties$3.call(this, resourceType, properties);
6761
6811
  }
6762
6812
  readCurrentState(physicalId, logicalId, _resourceType, _properties, context) {
6763
- return readCurrentState$37.call(this, physicalId, logicalId, _resourceType, _properties, context);
6813
+ return readCurrentState$38.call(this, physicalId, logicalId, _resourceType, _properties, context);
6764
6814
  }
6765
6815
  getDriftAbsentMeansDefaultKeys(_resourceType, properties) {
6766
6816
  return getDriftAbsentMeansDefaultKeys.call(this, _resourceType, properties);
@@ -6849,6 +6899,9 @@ var S3BucketProvider = class {
6849
6899
  resourceIdentity(physicalId, resourceType, context) {
6850
6900
  return resourceIdentity$6.call(this, physicalId, resourceType, context);
6851
6901
  }
6902
+ replacedSurvivorIdentity(physicalId, resourceType, context) {
6903
+ return replacedSurvivorIdentity.call(this, physicalId, resourceType, context);
6904
+ }
6852
6905
  generatedCreateName(_resourceType, logicalId, properties) {
6853
6906
  return generatedCreateName$3.call(this, _resourceType, logicalId, properties);
6854
6907
  }
@@ -6904,10 +6957,14 @@ function withoutInsecureTransportDenies(document) {
6904
6957
  };
6905
6958
  const kept = statements.filter((statement) => !isInsecureTransportDeny(statement));
6906
6959
  const dropped = statements.length - kept.length;
6907
- if (dropped === 0 || kept.length === 0) return {
6960
+ if (dropped === 0) return {
6908
6961
  document,
6909
6962
  dropped: 0
6910
6963
  };
6964
+ if (kept.length === 0) return {
6965
+ document: void 0,
6966
+ dropped
6967
+ };
6911
6968
  return {
6912
6969
  document: {
6913
6970
  ...parsed,
@@ -6920,19 +6977,37 @@ function sentPolicyDocument(document) {
6920
6977
  if (!awsEndpointOverrideActive()) return document;
6921
6978
  return withoutInsecureTransportDenies(document).document;
6922
6979
  }
6980
+ function sendsNoPolicy(document) {
6981
+ return document != null && sentPolicyDocument(document) === void 0;
6982
+ }
6923
6983
  function policyDocumentForEmulator(document, resourceType, logicalId) {
6924
6984
  if (!awsEndpointOverrideActive()) return document;
6925
6985
  const { document: sent, dropped } = withoutInsecureTransportDenies(document);
6926
6986
  if (dropped === 0) return document;
6927
6987
  const what = dropped === 1 ? "a Deny statement" : `${dropped} Deny statements`;
6928
- getLogger().warn(safeMsg`--aws-emulator: left ${what} on aws:SecureTransport out of ${logicalId} (${resourceType}): AWS Emulator does not evaluate that key, so the statement would deny every request; on AWS it never matches an HTTPS request. The state record keeps the templated policy.`);
6988
+ const outcome = sent === void 0 ? ", which leaves no statement, so no policy is set" : "";
6989
+ getLogger().warn(safeMsg`--aws-emulator: left ${what} on aws:SecureTransport out of ${logicalId} (${resourceType})${outcome}: AWS Emulator does not evaluate that key, so the statement would deny every request; on AWS it never matches an HTTPS request. The state record keeps the templated policy.`);
6929
6990
  return sent;
6930
6991
  }
6931
6992
  function serializeResourcePolicy(document, resourceType, logicalId) {
6932
6993
  const sent = policyDocumentForEmulator(document, resourceType, logicalId);
6994
+ if (sent === void 0) return void 0;
6933
6995
  return typeof sent === "string" ? sent : JSON.stringify(sent);
6934
6996
  }
6935
6997
 
6998
+ // src/provisioning/s3-bucket-policy-helpers.ts
6999
+ function isS3BucketName(value) {
7000
+ if (value.length < 3 || value.length > 63) return false;
7001
+ if (!/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(value)) return false;
7002
+ if (value.includes("..")) return false;
7003
+ if (value.startsWith("xn--")) return false;
7004
+ if (value.endsWith("-s3alias") || value.endsWith("--ol-s3")) return false;
7005
+ return true;
7006
+ }
7007
+ function ownPolicyHolder(logicalId, bucketName) {
7008
+ for (const [otherId, record] of getStackRecords()?.live() ?? []) if (otherId !== logicalId && record.resourceType === "AWS::S3::BucketPolicy" && record.physicalId === bucketName) return otherId;
7009
+ }
7010
+
6936
7011
  // src/provisioning/providers/s3-bucket-policy-provider.ts
6937
7012
  const OAI_USER_ARN_RE = /^arn:aws[a-z-]*:iam::cloudfront:user\/CloudFront Origin Access Identity ([A-Z0-9]+)$/;
6938
7013
  const IAM_UNIQUE_ID_RE = /^AIDA[A-Z0-9]{12,}$/;
@@ -6991,7 +7066,18 @@ var S3BucketPolicyProvider = class {
6991
7066
  } catch (error) {
6992
7067
  throw this.wrapOperationError("create", logicalId, resourceType, bucketName, error, context?.maskSecrets);
6993
7068
  }
6994
- await this.decideOnExistingPolicy(logicalId, resourceType, bucketName, policyDoc, existing, context?.replayingState === true, mask);
7069
+ await this.decideOnExistingPolicy(logicalId, resourceType, bucketName, policyDoc ?? (typeof policyDocument === "string" ? policyDocument : JSON.stringify(policyDocument)), existing, context?.replayingState === true, mask);
7070
+ if (policyDoc === void 0) {
7071
+ if (existing.kind === "present") try {
7072
+ await this.s3Client.send(new DeleteBucketPolicyCommand({ Bucket: bucketName }));
7073
+ } catch (error) {
7074
+ if (error.name !== "NoSuchBucketPolicy") throw this.wrapOperationError("create", logicalId, resourceType, bucketName, error, context?.maskSecrets);
7075
+ }
7076
+ return {
7077
+ physicalId: bucketName,
7078
+ attributes: {}
7079
+ };
7080
+ }
6995
7081
  try {
6996
7082
  await this.s3Client.send(new PutBucketPolicyCommand({
6997
7083
  Bucket: bucketName,
@@ -7016,7 +7102,12 @@ var S3BucketPolicyProvider = class {
7016
7102
  if (!policyDocument) throw new ProvisioningError(`PolicyDocument is required for S3 bucket policy ${logicalId}`, resourceType, logicalId, physicalId);
7017
7103
  try {
7018
7104
  const policyDoc = serializeResourcePolicy(policyDocument, resourceType, logicalId);
7019
- await this.s3Client.send(new PutBucketPolicyCommand({
7105
+ if (policyDoc === void 0) try {
7106
+ await this.s3Client.send(new DeleteBucketPolicyCommand({ Bucket: bucketName }));
7107
+ } catch (error) {
7108
+ if (error.name !== "NoSuchBucketPolicy") throw error;
7109
+ }
7110
+ else await this.s3Client.send(new PutBucketPolicyCommand({
7020
7111
  Bucket: bucketName,
7021
7112
  Policy: policyDoc
7022
7113
  }));
@@ -7173,7 +7264,10 @@ var S3BucketPolicyProvider = class {
7173
7264
  policyJson = (await this.s3Client.send(new GetBucketPolicyCommand({ Bucket: physicalId }))).Policy;
7174
7265
  } catch (err) {
7175
7266
  if (err instanceof NoSuchBucket) return RESOURCE_NOT_FOUND;
7176
- if (err.name === "NoSuchBucketPolicy") return RESOURCE_NOT_FOUND;
7267
+ if (err.name === "NoSuchBucketPolicy") {
7268
+ if (properties !== void 0 && sendsNoPolicy(properties["PolicyDocument"])) return { ...properties };
7269
+ return RESOURCE_NOT_FOUND;
7270
+ }
7177
7271
  throw err;
7178
7272
  }
7179
7273
  if (!policyJson) return void 0;
@@ -7240,17 +7334,6 @@ var S3BucketPolicyProvider = class {
7240
7334
  throw new Error(`Cannot determine bucket name for ${refusalTypeShown(input.resourceType)} ${logicalIdShown(input.logicalId)}.${knownNote}${bucketNote} Re-run with --resource ${remedyLogicalId(input.logicalId)}=${commandHole("bucketName")} (e.g. my-bucket-12345) to point cdkd at the bucket this policy is attached to.`);
7241
7335
  }
7242
7336
  };
7243
- function isS3BucketName(value) {
7244
- if (value.length < 3 || value.length > 63) return false;
7245
- if (!/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(value)) return false;
7246
- if (value.includes("..")) return false;
7247
- if (value.startsWith("xn--")) return false;
7248
- if (value.endsWith("-s3alias") || value.endsWith("--ol-s3")) return false;
7249
- return true;
7250
- }
7251
- function ownPolicyHolder(logicalId, bucketName) {
7252
- for (const [otherId, record] of getStackRecords()?.live() ?? []) if (otherId !== logicalId && record.resourceType === "AWS::S3::BucketPolicy" && record.physicalId === bucketName) return otherId;
7253
- }
7254
7337
 
7255
7338
  // src/provisioning/providers/sqs-queue-provider.ts
7256
7339
  function serializeRedrivePolicy(value) {
@@ -7612,7 +7695,7 @@ var SQSQueuePolicyProvider = class {
7612
7695
  this.logger.debug(`Setting policy for queue: ${queueUrl}`);
7613
7696
  await this.sqsClient.send(new SetQueueAttributesCommand({
7614
7697
  QueueUrl: queueUrl,
7615
- Attributes: { Policy: policyDoc }
7698
+ Attributes: { Policy: policyDoc ?? "" }
7616
7699
  }));
7617
7700
  applied.push(queueUrl);
7618
7701
  }
@@ -7642,7 +7725,7 @@ var SQSQueuePolicyProvider = class {
7642
7725
  this.logger.debug(`Updating policy for queue: ${queueUrl}`);
7643
7726
  await this.sqsClient.send(new SetQueueAttributesCommand({
7644
7727
  QueueUrl: queueUrl,
7645
- Attributes: { Policy: policyDoc }
7728
+ Attributes: { Policy: policyDoc ?? "" }
7646
7729
  }));
7647
7730
  }
7648
7731
  for (const queueUrl of removed) await this.clearQueuePolicy(queueUrl, resourceType, logicalId, context?.expectedRegion, "pre-update");
@@ -7757,6 +7840,7 @@ var SQSQueuePolicyProvider = class {
7757
7840
  async queuesCarryingDocument(candidates, document, logicalId) {
7758
7841
  const carrying = [];
7759
7842
  if (candidates.length === 0) return carrying;
7843
+ if (sendsNoPolicy(document)) return carrying;
7760
7844
  const reference = policyReference(sentPolicyDocument(document));
7761
7845
  if (reference === void 0) {
7762
7846
  this.logger.warn(safeMsg`The queues ${candidates.join(", ")} listed by ${logicalId} were not checked (no policy document recorded to compare with) and may still carry its policy.`);
@@ -7790,6 +7874,10 @@ var SQSQueuePolicyProvider = class {
7790
7874
  }
7791
7875
  }
7792
7876
  async readCurrentState(physicalId, _logicalId, _resourceType, properties, context) {
7877
+ if (properties !== void 0 && sendsNoPolicy(properties["PolicyDocument"])) {
7878
+ const read = await this.readQueuePolicy(physicalId);
7879
+ return read === RESOURCE_NOT_FOUND ? { ...properties } : read;
7880
+ }
7793
7881
  const declared = context?.afterOwnWrite === true ? declaredPolicyDocument(properties) : void 0;
7794
7882
  if (declared === void 0) return this.readQueuePolicy(physicalId);
7795
7883
  const queueCount = splitQueueUrls(physicalId).length;
@@ -8330,7 +8418,7 @@ async function deleteImpl$36(logicalId, physicalId, resourceType, _properties, c
8330
8418
  }
8331
8419
 
8332
8420
  // src/provisioning/providers/sns-topic/read-state.ts
8333
- async function readCurrentState$36(physicalId, _logicalId, _resourceType, properties) {
8421
+ async function readCurrentState$37(physicalId, _logicalId, _resourceType, properties) {
8334
8422
  let attrs;
8335
8423
  try {
8336
8424
  attrs = (await this.snsClient.send(new GetTopicAttributesCommand({ TopicArn: physicalId }))).Attributes;
@@ -8501,7 +8589,7 @@ var SNSTopicProvider = class {
8501
8589
  }
8502
8590
  }
8503
8591
  readCurrentState(physicalId, logicalId, resourceType, properties) {
8504
- return readCurrentState$36.call(this, physicalId, logicalId, resourceType, properties);
8592
+ return readCurrentState$37.call(this, physicalId, logicalId, resourceType, properties);
8505
8593
  }
8506
8594
  getDriftUnknownPaths() {
8507
8595
  return [];
@@ -8597,7 +8685,10 @@ var SNSSubscriptionProvider = class {
8597
8685
  async update(logicalId, physicalId, resourceType, properties, _previousProperties, context) {
8598
8686
  this.logger.debug(`Updating SNS subscription ${logicalId}: ${physicalId}`);
8599
8687
  const plan = await this.planInPlaceUpdate(logicalId, physicalId, resourceType, properties, context);
8600
- if (plan === void 0) return this.replace(logicalId, physicalId, resourceType, properties, context);
8688
+ if (!Array.isArray(plan)) {
8689
+ if (isDriftRevert(context)) throw revertReplacementRefusal(resourceType, logicalId, plan.replace);
8690
+ return this.replace(logicalId, physicalId, resourceType, properties, context);
8691
+ }
8601
8692
  const mask = maskerOrIdentity(context?.maskSecrets);
8602
8693
  for (const [name, value] of plan) try {
8603
8694
  await this.snsClient.send(new SetSubscriptionAttributesCommand({
@@ -8617,21 +8708,22 @@ var SNSSubscriptionProvider = class {
8617
8708
  };
8618
8709
  }
8619
8710
  async planInPlaceUpdate(logicalId, physicalId, resourceType, properties, context) {
8620
- if (physicalId === "PendingConfirmation" || physicalId === "pending confirmation") return;
8711
+ if (physicalId === "PendingConfirmation" || physicalId === "pending confirmation") return { replace: "its record names the PendingConfirmation placeholder, not a subscription" };
8621
8712
  let current;
8622
8713
  try {
8623
8714
  current = (await this.snsClient.send(new GetSubscriptionAttributesCommand({ SubscriptionArn: physicalId })))?.Attributes;
8624
8715
  } catch (error) {
8625
- if (error instanceof NotFoundException) return void 0;
8716
+ if (error instanceof NotFoundException) return { replace: "AWS no longer has the subscription" };
8626
8717
  throw this.wrapMaskedAwsCallError(maskerOrIdentity(context?.maskSecrets), error, `Failed to update SNS subscription ${logicalId}: could not read its attributes`, resourceType, logicalId, physicalId);
8627
8718
  }
8628
- if (current === void 0 || current["PendingConfirmation"] === "true") return void 0;
8719
+ if (current === void 0) return { replace: "AWS returned no attributes for it" };
8720
+ if (current["PendingConfirmation"] === "true") return { replace: "the subscription is still PendingConfirmation" };
8629
8721
  for (const field of CREATE_ONLY_FIELDS) {
8630
8722
  const desired = properties[field];
8631
- if (desired !== void 0 && stringifyValue(desired) !== current[field]) return void 0;
8723
+ if (desired !== void 0 && stringifyValue(desired) !== current[field]) return { replace: `its ${field} differs from the live subscription's` };
8632
8724
  }
8633
8725
  const planned = planSubscriptionAttributes(current, properties);
8634
- return planned.kind === "replace" ? void 0 : planned.calls;
8726
+ return planned.kind === "replace" ? { replace: planned.reason } : planned.calls;
8635
8727
  }
8636
8728
  wrapMaskedAwsCallError(mask, error, prefix, resourceType, logicalId, physicalId) {
8637
8729
  const build = (text) => new ProvisioningError(`${prefix}: ${text}`, resourceType, logicalId, physicalId, error instanceof Error ? error : void 0);
@@ -8740,10 +8832,45 @@ function isPendingConfirmationError(error) {
8740
8832
  return error instanceof InvalidParameterException && error.message.toLowerCase().includes("pending confirmation");
8741
8833
  }
8742
8834
 
8743
- // src/provisioning/providers/sns-topic-policy-provider.ts
8835
+ // src/provisioning/sns-default-topic-policy.ts
8744
8836
  function isSnsDefaultPolicy(document) {
8745
8837
  return typeof document === "object" && document !== null && document["Id"] === "__default_policy_ID";
8746
8838
  }
8839
+ function isSnsTopicArn(value) {
8840
+ return /^arn:[a-z0-9-]+:sns:[a-z0-9-]+:\d{12}:[\w.-]+$/.test(value);
8841
+ }
8842
+ function defaultTopicPolicy(topicArn) {
8843
+ if (!isSnsTopicArn(topicArn)) return void 0;
8844
+ const account = topicArn.split(":")[4];
8845
+ return JSON.stringify({
8846
+ Version: "2008-10-17",
8847
+ Id: "__default_policy_ID",
8848
+ Statement: [{
8849
+ Sid: "__default_statement_ID",
8850
+ Effect: "Allow",
8851
+ Principal: { AWS: "*" },
8852
+ Action: [
8853
+ "SNS:GetTopicAttributes",
8854
+ "SNS:SetTopicAttributes",
8855
+ "SNS:AddPermission",
8856
+ "SNS:RemovePermission",
8857
+ "SNS:DeleteTopic",
8858
+ "SNS:Subscribe",
8859
+ "SNS:ListSubscriptionsByTopic",
8860
+ "SNS:Publish"
8861
+ ],
8862
+ Resource: topicArn,
8863
+ Condition: { StringEquals: { "AWS:SourceOwner": account } }
8864
+ }]
8865
+ });
8866
+ }
8867
+ function defaultTopicPolicyOrThrow(topicArn, resourceType, logicalId) {
8868
+ const defaultPolicy = defaultTopicPolicy(topicArn);
8869
+ if (defaultPolicy === void 0) throw new ProvisioningError(`Cannot set SNS topic policy ${logicalId} on ${topicArn}: not an SNS topic ARN`, resourceType, logicalId, topicArn);
8870
+ return defaultPolicy;
8871
+ }
8872
+
8873
+ // src/provisioning/providers/sns-topic-policy-provider.ts
8747
8874
  const TOPIC_POLICY_UNREADABLE_SKIP_REASON = "the policy of a topic it wrote could not be read, so whether that topic still carries it is unknown";
8748
8875
  const TOPIC_POLICY_UNRESOLVED_DOCUMENT_SKIP_REASON = "the policy document it attempted could not be resolved right now to compare its topics with";
8749
8876
  const TOPIC_POLICY_MISMATCH_LEFT_REASON = "a topic it wrote carries a policy that does not match the document it attempted, so that topic was not reset";
@@ -8762,7 +8889,7 @@ var SNSTopicPolicyProvider = class {
8762
8889
  const applied = [];
8763
8890
  try {
8764
8891
  for (const topicArn of topics) {
8765
- await this.setTopicPolicy(topicArn, policyDoc);
8892
+ await this.setTopicPolicy(topicArn, policyDoc ?? defaultTopicPolicyOrThrow(topicArn, resourceType, logicalId));
8766
8893
  applied.push(topicArn);
8767
8894
  }
8768
8895
  this.logger.debug(`Successfully created SNS topic policy ${logicalId}`);
@@ -8795,7 +8922,7 @@ var SNSTopicPolicyProvider = class {
8795
8922
  }
8796
8923
  const removed = [...dropped.filter((arn) => isSnsTopicArn(arn)), ...listedOnly];
8797
8924
  try {
8798
- for (const topicArn of topics) await this.setTopicPolicy(topicArn, policyDoc);
8925
+ for (const topicArn of topics) await this.setTopicPolicy(topicArn, policyDoc ?? defaultTopicPolicyOrThrow(topicArn, resourceType, logicalId));
8799
8926
  for (const topicArn of removed) await this.resetTopicPolicy(topicArn, resourceType, logicalId, context?.expectedRegion, "not-found", mask);
8800
8927
  this.logger.debug(`Successfully updated SNS topic policy ${logicalId}`);
8801
8928
  return {
@@ -8845,6 +8972,10 @@ var SNSTopicPolicyProvider = class {
8845
8972
  };
8846
8973
  }
8847
8974
  const document = attempted.document;
8975
+ if (sendsNoPolicy(document)) {
8976
+ this.logger.debug(safeMsg`${logicalId} set no policy of its own; nothing to reset`);
8977
+ return;
8978
+ }
8848
8979
  const reference = policyContentKey(sentPolicyDocument(document));
8849
8980
  const fresh = new Set((context.writtenThisRun ?? []).flatMap((r) => r.resourceType === resourceType && typeof r.physicalId === "string" ? [...splitTopicArns(r.physicalId), ...listedTopics(r.properties !== null && typeof r.properties === "object" ? r.properties : {})] : []));
8850
8981
  let unreadable = false;
@@ -8921,6 +9052,7 @@ var SNSTopicPolicyProvider = class {
8921
9052
  }
8922
9053
  async topicsCarryingDocument(candidates, document, logicalId, mask) {
8923
9054
  if (candidates.length === 0) return [];
9055
+ if (sendsNoPolicy(document)) return [];
8924
9056
  const sent = sentPolicyDocument(document);
8925
9057
  let reference;
8926
9058
  if (typeof sent === "string" && sent.length > 0) reference = canonicalPolicy(sent);
@@ -8955,6 +9087,10 @@ var SNSTopicPolicyProvider = class {
8955
9087
  }
8956
9088
  }
8957
9089
  async readCurrentState(physicalId, _logicalId, _resourceType, properties, context) {
9090
+ if (properties !== void 0 && sendsNoPolicy(properties["PolicyDocument"])) {
9091
+ const read = await this.readTopicPolicy(physicalId);
9092
+ return read !== void 0 && read !== RESOURCE_NOT_FOUND && isSnsDefaultPolicy(read["PolicyDocument"]) ? { ...properties } : read;
9093
+ }
8958
9094
  const declared = context?.afterOwnWrite === true ? declaredPolicyDocument(properties) : void 0;
8959
9095
  if (declared === void 0) return this.readTopicPolicy(physicalId);
8960
9096
  const { answer, settled } = await reReadUntilSettled(() => this.readTopicPolicy(physicalId), (read) => read !== void 0 && read !== RESOURCE_NOT_FOUND && policyDocumentMatchesDeclared(read["PolicyDocument"], declared), this.ownWriteRereadDelaysMs);
@@ -9007,9 +9143,6 @@ var SNSTopicPolicyProvider = class {
9007
9143
  }));
9008
9144
  }
9009
9145
  };
9010
- function isSnsTopicArn(value) {
9011
- return /^arn:[a-z0-9-]+:sns:[a-z0-9-]+:\d{12}:[\w.-]+$/.test(value);
9012
- }
9013
9146
  function isSnsTopicArnList(value) {
9014
9147
  const segments = value.split(",");
9015
9148
  if (segments.length === 0) return false;
@@ -9025,31 +9158,6 @@ function listedTopics(bag) {
9025
9158
  for (const entry of listed) if (typeof entry === "string" && isSnsTopicArn(entry) && !out.includes(entry)) out.push(entry);
9026
9159
  return out;
9027
9160
  }
9028
- function defaultTopicPolicy(topicArn) {
9029
- if (!isSnsTopicArn(topicArn)) return void 0;
9030
- const account = topicArn.split(":")[4];
9031
- return JSON.stringify({
9032
- Version: "2008-10-17",
9033
- Id: "__default_policy_ID",
9034
- Statement: [{
9035
- Sid: "__default_statement_ID",
9036
- Effect: "Allow",
9037
- Principal: { AWS: "*" },
9038
- Action: [
9039
- "SNS:GetTopicAttributes",
9040
- "SNS:SetTopicAttributes",
9041
- "SNS:AddPermission",
9042
- "SNS:RemovePermission",
9043
- "SNS:DeleteTopic",
9044
- "SNS:Subscribe",
9045
- "SNS:ListSubscriptionsByTopic",
9046
- "SNS:Publish"
9047
- ],
9048
- Resource: topicArn,
9049
- Condition: { StringEquals: { "AWS:SourceOwner": account } }
9050
- }]
9051
- });
9052
- }
9053
9161
  function canonicalJson$1(value) {
9054
9162
  const sortKeys = (v) => {
9055
9163
  if (Array.isArray(v)) return v.map(sortKeys);
@@ -10175,7 +10283,7 @@ async function unsettledInTransition$6(physicalId, _logicalId, _resourceType, na
10175
10283
  return names;
10176
10284
  }
10177
10285
  }
10178
- async function readCurrentState$35(physicalId, _logicalId, _resourceType) {
10286
+ async function readCurrentState$36(physicalId, _logicalId, _resourceType) {
10179
10287
  try {
10180
10288
  const resp = await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: physicalId }));
10181
10289
  const cfg = resp.Configuration;
@@ -10474,7 +10582,7 @@ var LambdaFunctionProvider = class {
10474
10582
  return unsettledInTransition$6.call(this, physicalId, _logicalId, _resourceType, names);
10475
10583
  }
10476
10584
  readCurrentState(physicalId, _logicalId, _resourceType) {
10477
- return readCurrentState$35.call(this, physicalId, _logicalId, _resourceType);
10585
+ return readCurrentState$36.call(this, physicalId, _logicalId, _resourceType);
10478
10586
  }
10479
10587
  getDriftUnknownPaths() {
10480
10588
  return [
@@ -10579,6 +10687,7 @@ var LambdaPermissionProvider = class {
10579
10687
  ...functionNamePairs(properties["FunctionName"])
10580
10688
  ]);
10581
10689
  log.debug(`Updating Lambda permission ${logicalId}: ${physicalId}`);
10690
+ if (isDriftRevert(context)) throw revertReplacementRefusal(resourceType, logicalId, "a Lambda permission has no update API and is changed only by removing and re-adding its statement");
10582
10691
  try {
10583
10692
  const oldFunctionName = previousProperties["FunctionName"] || properties["FunctionName"];
10584
10693
  const oldStatementId = physicalId.includes("|") ? physicalId.split("|").pop() : physicalId;
@@ -11445,7 +11554,7 @@ async function deleteImpl$34(logicalId, physicalId, resourceType, properties, co
11445
11554
  }
11446
11555
 
11447
11556
  // src/provisioning/providers/lambda-eventsource/read-state.ts
11448
- async function readCurrentState$34(physicalId, _logicalId, _resourceType, properties) {
11557
+ async function readCurrentState$35(physicalId, _logicalId, _resourceType, properties) {
11449
11558
  let resp;
11450
11559
  try {
11451
11560
  resp = await this.lambdaClient.send(new GetEventSourceMappingCommand({ UUID: physicalId }));
@@ -11655,7 +11764,7 @@ var LambdaEventSourceMappingProvider = class {
11655
11764
  return deleteImpl$34.call(this, logicalId, physicalId, resourceType, properties, context);
11656
11765
  }
11657
11766
  readCurrentState(physicalId, logicalId, resourceType, properties) {
11658
- return readCurrentState$34.call(this, physicalId, logicalId, resourceType, properties);
11767
+ return readCurrentState$35.call(this, physicalId, logicalId, resourceType, properties);
11659
11768
  }
11660
11769
  canonicalizeDriftPair(resourceType, baseline, aws, properties) {
11661
11770
  return canonicalizeDriftPair$5.call(this, resourceType, baseline, aws, properties);
@@ -14930,7 +15039,7 @@ async function waitForKinesisDestinationSettled(tableName, streamArn, expectedPr
14930
15039
  function isTransientStreamReadFailure(err) {
14931
15040
  return isThrottlingError(err) || isTransientServerError(err) || isAmbiguousOutcomeError(err) || err instanceof ResourceNotFoundException$1;
14932
15041
  }
14933
- async function readCurrentState$33(physicalId, _logicalId, _resourceType, properties, context) {
15042
+ async function readCurrentState$34(physicalId, _logicalId, _resourceType, properties, context) {
14934
15043
  try {
14935
15044
  const table = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }))).Table;
14936
15045
  if (!table) return void 0;
@@ -16095,7 +16204,7 @@ var DynamoDBTableProvider = class {
16095
16204
  return unsettledInTransition$5.call(this, physicalId, _logicalId, _resourceType, names);
16096
16205
  }
16097
16206
  async readCurrentState(physicalId, _logicalId, _resourceType, properties, context) {
16098
- return readCurrentState$33.call(this, physicalId, _logicalId, _resourceType, properties, context);
16207
+ return readCurrentState$34.call(this, physicalId, _logicalId, _resourceType, properties, context);
16099
16208
  }
16100
16209
  readTableTags(...args) {
16101
16210
  return readTableTags.call(this, ...args);
@@ -16571,7 +16680,7 @@ async function readDataProtectionPolicy(physicalId) {
16571
16680
  return { value: document };
16572
16681
  }
16573
16682
  }
16574
- async function readCurrentState$32(physicalId, logicalId, _resourceType, properties, context) {
16683
+ async function readCurrentState$33(physicalId, logicalId, _resourceType, properties, context) {
16575
16684
  try {
16576
16685
  const found = (await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupNamePrefix: physicalId }))).logGroups?.find((g) => g.logGroupName === physicalId);
16577
16686
  if (!found) return RESOURCE_NOT_FOUND;
@@ -16702,7 +16811,7 @@ var LogsLogGroupProvider = class {
16702
16811
  return getAttribute$13.call(this, physicalId, _resourceType, attributeName);
16703
16812
  }
16704
16813
  readCurrentState(physicalId, _logicalId, _resourceType, properties, context) {
16705
- return readCurrentState$32.call(this, physicalId, _logicalId, _resourceType, properties, context);
16814
+ return readCurrentState$33.call(this, physicalId, _logicalId, _resourceType, properties, context);
16706
16815
  }
16707
16816
  import(input) {
16708
16817
  return importImpl$33.call(this, input);
@@ -18249,7 +18358,7 @@ function generateSecretString(config, options) {
18249
18358
  }
18250
18359
 
18251
18360
  // src/provisioning/providers/secretsmanager-secret/read-state.ts
18252
- async function readCurrentState$31(physicalId, _logicalId, _resourceType) {
18361
+ async function readCurrentState$32(physicalId, _logicalId, _resourceType) {
18253
18362
  try {
18254
18363
  const resp = await this.smClient.send(new DescribeSecretCommand({ SecretId: physicalId }));
18255
18364
  const result = {};
@@ -18372,7 +18481,7 @@ var SecretsManagerSecretProvider = class {
18372
18481
  return generateSecretString.call(this, config, options);
18373
18482
  }
18374
18483
  readCurrentState(physicalId, logicalId, resourceType) {
18375
- return readCurrentState$31.call(this, physicalId, logicalId, resourceType);
18484
+ return readCurrentState$32.call(this, physicalId, logicalId, resourceType);
18376
18485
  }
18377
18486
  getDriftUnknownPaths() {
18378
18487
  return ["SecretString", "GenerateSecretString"];
@@ -18503,7 +18612,7 @@ async function deleteImpl$31(logicalId, physicalId, resourceType, _properties, c
18503
18612
  }
18504
18613
 
18505
18614
  // src/provisioning/providers/ssm-parameter/read-state.ts
18506
- async function readCurrentState$30(physicalId, _logicalId, _resourceType) {
18615
+ async function readCurrentState$31(physicalId, _logicalId, _resourceType) {
18507
18616
  let getResp;
18508
18617
  try {
18509
18618
  getResp = await this.ssmClient.send(new GetParameterCommand({
@@ -18683,7 +18792,7 @@ var SSMParameterProvider = class SSMParameterProvider {
18683
18792
  return deleteImpl$31.call(this, logicalId, physicalId, resourceType, properties, context);
18684
18793
  }
18685
18794
  readCurrentState(physicalId, logicalId, resourceType) {
18686
- return readCurrentState$30.call(this, physicalId, logicalId, resourceType);
18795
+ return readCurrentState$31.call(this, physicalId, logicalId, resourceType);
18687
18796
  }
18688
18797
  refuseUnwritableParameterId(input, explicit) {
18689
18798
  return refuseUnwritableParameterId.call(this, input, explicit);
@@ -20427,7 +20536,7 @@ async function applyUpdate$3(logicalId, physicalId, resourceType, properties, pr
20427
20536
  case "AWS::EC2::Route": return this.updateRoute(logicalId, physicalId, resourceType, properties, previousProperties, context);
20428
20537
  case "AWS::EC2::SubnetRouteTableAssociation": return this.updateSubnetRouteTableAssociation(logicalId, physicalId);
20429
20538
  case "AWS::EC2::SecurityGroup": return this.updateSecurityGroup(logicalId, physicalId, resourceType, properties, previousProperties, context);
20430
- case "AWS::EC2::SecurityGroupIngress": return this.updateSecurityGroupIngress(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets, context?.replayingState === true, context?.recordedAttributes);
20539
+ case "AWS::EC2::SecurityGroupIngress": return this.updateSecurityGroupIngress(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets, context?.replayingState === true, context?.recordedAttributes, context?.desiredFromAwsReadback === true);
20431
20540
  case "AWS::EC2::Instance": return this.updateInstance(logicalId, physicalId, resourceType, properties, previousProperties, context);
20432
20541
  case "AWS::EC2::NetworkAclEntry": return this.updateNetworkAclEntry(logicalId, physicalId, resourceType, properties, previousProperties, context);
20433
20542
  case "AWS::EC2::SubnetNetworkAclAssociation": throw new ResourceUpdateNotSupportedError(resourceType, logicalId, `AWS provides no in-place Update API for this EC2 sub-resource type; every property change requires Delete + Create. Re-deploy with ${deployReplaceCommand()}, or destroy + redeploy`);
@@ -22418,6 +22527,7 @@ async function updateRoute$1(logicalId, physicalId, resourceType, properties, pr
22418
22527
  throw this.wrapCaughtError(maskerOrIdentity(maskSecrets), error, (text) => new ProvisioningError(`Failed to update Route ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
22419
22528
  }
22420
22529
  }
22530
+ if (isDriftRevert(context)) throw revertReplacementRefusal(resourceType, logicalId, "its route table or destination differs from the route its physical id names");
22421
22531
  try {
22422
22532
  await this.deleteRoute(logicalId, physicalId, resourceType, maskSecrets ? { maskSecrets } : void 0);
22423
22533
  const createResult = await this.createRoute(logicalId, resourceType, properties, (message) => this.logger.warn(message), maskSecrets);
@@ -23070,7 +23180,7 @@ async function lookupIngressRuleId(logicalId, groupId, properties) {
23070
23180
  return;
23071
23181
  }
23072
23182
  }
23073
- async function updateSecurityGroupIngress(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets, replayingState = false, recordedAttributes) {
23183
+ async function updateSecurityGroupIngress(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets, replayingState = false, recordedAttributes, driftRevert = false) {
23074
23184
  this.logger.debug(`Updating SecurityGroupIngress ${logicalId}: ${physicalId}`);
23075
23185
  if (JSON.stringify(properties) === JSON.stringify(previousProperties)) {
23076
23186
  if (!replayingState) return {
@@ -23121,6 +23231,7 @@ async function updateSecurityGroupIngress(logicalId, physicalId, resourceType, p
23121
23231
  ...narrowed !== properties && { effectiveProperties: narrowed }
23122
23232
  };
23123
23233
  }
23234
+ if (driftRevert) throw revertReplacementRefusal(resourceType, logicalId, "the rule cannot reach its record in place (the live rule's protocol, ports or source differ from it, AWS no longer has the rule, or its recorded description is redacted)");
23124
23235
  try {
23125
23236
  if (keptFor !== void 0) this.logger.info(safeMsg`SecurityGroupIngress ${logicalId}: its previous rule is also held by ${keptFor} of this stack, so the update left it in place`);
23126
23237
  const revoked = keptFor !== void 0 ? void 0 : await this.deleteSecurityGroupIngress(logicalId, physicalId, resourceType, previousProperties, recordedAttributes || maskSecrets ? {
@@ -25436,7 +25547,7 @@ function canonicalizeUnsettledProperties$1(resourceType, properties) {
25436
25547
  [key]: canonical
25437
25548
  };
25438
25549
  }
25439
- async function readCurrentState$29(physicalId, logicalId, resourceType, properties, context) {
25550
+ async function readCurrentState$30(physicalId, logicalId, resourceType, properties, context) {
25440
25551
  const attempts = context?.afterOwnWrite === true ? 5 : 1;
25441
25552
  for (let attempt = 1;; attempt++) {
25442
25553
  const read = await this.readCurrentStateOnce(physicalId, logicalId, resourceType, properties, context);
@@ -25557,7 +25668,7 @@ const driftMethods = {
25557
25668
  readUnsettled: readUnsettled$5,
25558
25669
  canonicalizeDriftPair: canonicalizeDriftPair$3,
25559
25670
  canonicalizeUnsettledProperties: canonicalizeUnsettledProperties$1,
25560
- readCurrentState: readCurrentState$29,
25671
+ readCurrentState: readCurrentState$30,
25561
25672
  readCurrentStateOnce,
25562
25673
  getDriftUnknownPaths: getDriftUnknownPaths$10,
25563
25674
  canonicalizeDesiredProperties: canonicalizeDesiredProperties$2
@@ -27321,7 +27432,7 @@ async function update$30(logicalId, physicalId, resourceType, properties, previo
27321
27432
  properties = withRemovalDefaults(this.removalDefaults, resourceType, properties, previousProperties, context);
27322
27433
  return this.updateAccount(logicalId, physicalId, resourceType, properties, log);
27323
27434
  case "AWS::ApiGateway::Authorizer": return this.updateAuthorizer(logicalId, physicalId, resourceType, properties, previousProperties, log);
27324
- case "AWS::ApiGateway::Resource": return this.updateResource(logicalId, physicalId, resourceType, properties, previousProperties, log);
27435
+ case "AWS::ApiGateway::Resource": return this.updateResource(logicalId, physicalId, resourceType, properties, previousProperties, log, context?.desiredFromAwsReadback === true);
27325
27436
  case "AWS::ApiGateway::Deployment": return this.updateDeployment(logicalId, physicalId, resourceType, properties, previousProperties, log);
27326
27437
  case "AWS::ApiGateway::Stage": return this.updateStage(logicalId, physicalId, resourceType, properties, previousProperties, stageSinks$1(this.logger, context, [[properties["StageName"], physicalId], [previousProperties["StageName"], physicalId]]));
27327
27438
  case "AWS::ApiGateway::Method": return this.updateMethod(logicalId, physicalId, resourceType, properties, previousProperties, log, context?.desiredFromAwsReadback === true);
@@ -27649,11 +27760,12 @@ async function createResource(logicalId, resourceType, properties, log) {
27649
27760
  throw this.wrapMaskedError(log.mask, error, (text) => new ProvisioningError(`Failed to create API Gateway Resource ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
27650
27761
  }
27651
27762
  }
27652
- async function updateResource(logicalId, physicalId, resourceType, properties, previousProperties, log) {
27763
+ async function updateResource(logicalId, physicalId, resourceType, properties, previousProperties, log, driftRevert = false) {
27653
27764
  log.debug(`Updating API Gateway Resource ${logicalId}: ${physicalId}`);
27654
27765
  const newPathPart = properties["PathPart"];
27655
27766
  const oldPathPart = previousProperties["PathPart"];
27656
27767
  if (newPathPart !== oldPathPart) {
27768
+ if (driftRevert) throw revertReplacementRefusal(resourceType, logicalId, "its PathPart differs from the live resource's, and cdkd would re-create the resource to revert it");
27657
27769
  log.debug(`PathPart changed from "${log.value(oldPathPart)}" to "${log.value(newPathPart)}", replacing resource`);
27658
27770
  const createResult = await this.createResource(logicalId, resourceType, properties, log);
27659
27771
  let orphanReason;
@@ -28360,7 +28472,7 @@ function getDriftUnorderedPaths$6(resourceType) {
28360
28472
  if (resourceType === "AWS::ApiGateway::RestApi") return ["BinaryMediaTypes"];
28361
28473
  return [];
28362
28474
  }
28363
- async function readCurrentState$28(physicalId, _logicalId, resourceType, properties) {
28475
+ async function readCurrentState$29(physicalId, _logicalId, resourceType, properties) {
28364
28476
  switch (resourceType) {
28365
28477
  case "AWS::ApiGateway::Account": return this.readCurrentStateAccount();
28366
28478
  case "AWS::ApiGateway::Method": return this.readCurrentStateMethod(physicalId);
@@ -28666,8 +28778,8 @@ var ApiGatewayProvider = class {
28666
28778
  createResource(logicalId, resourceType, properties, log) {
28667
28779
  return createResource.call(this, logicalId, resourceType, properties, log);
28668
28780
  }
28669
- updateResource(logicalId, physicalId, resourceType, properties, previousProperties, log) {
28670
- return updateResource.call(this, logicalId, physicalId, resourceType, properties, previousProperties, log);
28781
+ updateResource(logicalId, physicalId, resourceType, properties, previousProperties, log, driftRevert = false) {
28782
+ return updateResource.call(this, logicalId, physicalId, resourceType, properties, previousProperties, log, driftRevert);
28671
28783
  }
28672
28784
  deleteResource(logicalId, physicalId, resourceType, properties, context) {
28673
28785
  return deleteResource.call(this, logicalId, physicalId, resourceType, properties, context);
@@ -28753,7 +28865,7 @@ var ApiGatewayProvider = class {
28753
28865
  }
28754
28866
  readCurrentState(physicalId, _logicalId, resourceType, properties, context) {
28755
28867
  if (resourceType === "AWS::ApiGateway::RestApi") return this.readCurrentStateRestApi(physicalId, properties, context, _logicalId);
28756
- return readCurrentState$28.call(this, physicalId, _logicalId, resourceType, properties);
28868
+ return readCurrentState$29.call(this, physicalId, _logicalId, resourceType, properties);
28757
28869
  }
28758
28870
  readCurrentStateAuthorizer(physicalId, properties) {
28759
28871
  return readCurrentStateAuthorizer.call(this, physicalId, properties);
@@ -28914,7 +29026,7 @@ async function canonicalizeDriftPair$2(resourceType, baseline, aws, properties =
28914
29026
  aws
28915
29027
  };
28916
29028
  }
28917
- async function readCurrentState$27(physicalId, _logicalId, resourceType, properties) {
29029
+ async function readCurrentState$28(physicalId, _logicalId, resourceType, properties) {
28918
29030
  switch (resourceType) {
28919
29031
  case "AWS::ApiGatewayV2::Api": return this.readApi(physicalId);
28920
29032
  case "AWS::ApiGatewayV2::Stage": return this.readStage(physicalId, properties);
@@ -30329,7 +30441,7 @@ var ApiGatewayV2Provider = class {
30329
30441
  return canonicalizeDriftPair$2.call(this, resourceType, baseline, aws, properties);
30330
30442
  }
30331
30443
  readCurrentState(physicalId, _logicalId, resourceType, properties) {
30332
- return readCurrentState$27.call(this, physicalId, _logicalId, resourceType, properties);
30444
+ return readCurrentState$28.call(this, physicalId, _logicalId, resourceType, properties);
30333
30445
  }
30334
30446
  readApi(physicalId) {
30335
30447
  return readApi.call(this, physicalId);
@@ -31009,7 +31121,7 @@ async function waitForDistributionStable(distributionId, expectedEnabled) {
31009
31121
  }
31010
31122
 
31011
31123
  // src/provisioning/providers/cloudfront-distribution/read-state.ts
31012
- async function readCurrentState$26(physicalId, _logicalId, resourceType, _properties) {
31124
+ async function readCurrentState$27(physicalId, _logicalId, resourceType, _properties) {
31013
31125
  if (resourceType !== "AWS::CloudFront::Distribution") return void 0;
31014
31126
  let config;
31015
31127
  try {
@@ -31500,7 +31612,7 @@ var CloudFrontDistributionProvider = class {
31500
31612
  return deleteImpl$27.call(this, logicalId, physicalId, resourceType, _properties, context);
31501
31613
  }
31502
31614
  readCurrentState(physicalId, _logicalId, resourceType, _properties) {
31503
- return readCurrentState$26.call(this, physicalId, _logicalId, resourceType, _properties);
31615
+ return readCurrentState$27.call(this, physicalId, _logicalId, resourceType, _properties);
31504
31616
  }
31505
31617
  getDriftUnknownPaths(resourceType) {
31506
31618
  return getDriftUnknownPaths$7.call(this, resourceType);
@@ -31603,7 +31715,7 @@ function isUserTagKey(key) {
31603
31715
  }
31604
31716
 
31605
31717
  // src/provisioning/providers/agentcore-runtime/read-state.ts
31606
- async function readCurrentState$25(physicalId, _logicalId, _resourceType) {
31718
+ async function readCurrentState$26(physicalId, _logicalId, _resourceType) {
31607
31719
  let resp;
31608
31720
  try {
31609
31721
  resp = await this.client.send(new GetAgentRuntimeCommand({ agentRuntimeId: physicalId }));
@@ -31630,6 +31742,8 @@ async function readCurrentState$25(physicalId, _logicalId, _resourceType) {
31630
31742
  result["FilesystemConfigurations"] = resp.filesystemConfigurations !== void 0 ? camelToPascalCaseKeys(resp.filesystemConfigurations, SDK_MAP_KEYS) : [];
31631
31743
  result["CapacityProviderConfiguration"] = resp.capacityProviderConfiguration !== void 0 ? camelToPascalCaseKeys(resp.capacityProviderConfiguration, SDK_MAP_KEYS) : {};
31632
31744
  result["PlatformVersion"] = resp.platformVersion ?? "";
31745
+ result["HooksConfiguration"] = resp.hooksConfiguration !== void 0 ? camelToPascalCaseKeys(resp.hooksConfiguration, SDK_MAP_KEYS) : {};
31746
+ result["ResourceConfigurations"] = resp.resourceConfigurations !== void 0 ? camelToPascalCaseKeys(resp.resourceConfigurations, SDK_MAP_KEYS) : [];
31633
31747
  if (resp.agentRuntimeArn) try {
31634
31748
  const tagsResp = await this.client.send(new ListTagsForResourceCommand$6({ resourceArn: resp.agentRuntimeArn }));
31635
31749
  result["Tags"] = Object.fromEntries(Object.entries(tagsResp.tags ?? {}).filter(([k]) => isUserTagKey(k)));
@@ -31764,6 +31878,10 @@ function writeSharedRuntimeMembers(input, properties) {
31764
31878
  if (isNonEmptyObject(capacityProvider)) input["capacityProviderConfiguration"] = pascalToCamelCaseKeys(capacityProvider, CFN_MAP_KEYS);
31765
31879
  const platformVersion = properties["PlatformVersion"];
31766
31880
  if (platformVersion !== void 0 && platformVersion !== null && platformVersion !== "") input["platformVersion"] = platformVersion;
31881
+ const hooks = properties["HooksConfiguration"];
31882
+ if (isNonEmptyObject(hooks)) input["hooksConfiguration"] = pascalToCamelCaseKeys(hooks, CFN_MAP_KEYS);
31883
+ const resources = properties["ResourceConfigurations"];
31884
+ if (Array.isArray(resources) && resources.length > 0) input["resourceConfigurations"] = pascalToCamelCaseKeys(resources, CFN_MAP_KEYS);
31767
31885
  }
31768
31886
  var AgentCoreRuntimeProvider = class {
31769
31887
  client;
@@ -31816,6 +31934,8 @@ var AgentCoreRuntimeProvider = class {
31816
31934
  "FilesystemConfigurations",
31817
31935
  "CapacityProviderConfiguration",
31818
31936
  "PlatformVersion",
31937
+ "HooksConfiguration",
31938
+ "ResourceConfigurations",
31819
31939
  "Tags"
31820
31940
  ])]]);
31821
31941
  constructor() {
@@ -32011,7 +32131,7 @@ var AgentCoreRuntimeProvider = class {
32011
32131
  }
32012
32132
  }
32013
32133
  readCurrentState(physicalId, logicalId, resourceType) {
32014
- return readCurrentState$25.call(this, physicalId, logicalId, resourceType);
32134
+ return readCurrentState$26.call(this, physicalId, logicalId, resourceType);
32015
32135
  }
32016
32136
  import(input) {
32017
32137
  return importImpl$27.call(this, input);
@@ -32506,7 +32626,7 @@ async function applyTagDiff$12(stateMachineArn, resourceType, logicalId, oldTags
32506
32626
  }
32507
32627
 
32508
32628
  // src/provisioning/providers/stepfunctions/read-state.ts
32509
- async function readCurrentState$24(physicalId, _logicalId, _resourceType) {
32629
+ async function readCurrentState$25(physicalId, _logicalId, _resourceType) {
32510
32630
  let resp;
32511
32631
  try {
32512
32632
  resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: physicalId }));
@@ -32744,7 +32864,7 @@ var StepFunctionsProvider = class {
32744
32864
  return [...new Set(aliases)];
32745
32865
  }
32746
32866
  readCurrentState(physicalId, _logicalId, _resourceType) {
32747
- return readCurrentState$24.call(this, physicalId, _logicalId, _resourceType);
32867
+ return readCurrentState$25.call(this, physicalId, _logicalId, _resourceType);
32748
32868
  }
32749
32869
  generatedCreateName(_resourceType, logicalId, properties) {
32750
32870
  if (properties["StateMachineName"]) return void 0;
@@ -33400,13 +33520,13 @@ function createServiceOutcomeUnknown(error) {
33400
33520
  }
33401
33521
  async function settleAmbiguousCreateService(attempt, log) {
33402
33522
  try {
33403
- return await settle.call(this, attempt, log);
33523
+ return await settle$1.call(this, attempt, log);
33404
33524
  } catch (error) {
33405
33525
  log.debug(`Looking for ECS service ${attempt.logicalId} after its ambiguous CreateService failure failed: ${describeAwsFailure(error).detail}`);
33406
33526
  return;
33407
33527
  }
33408
33528
  }
33409
- async function settle(attempt, log) {
33529
+ async function settle$1(attempt, log) {
33410
33530
  const { logicalId, cluster, serviceName, createError } = attempt;
33411
33531
  if (!createServiceOutcomeUnknown(createError)) return void 0;
33412
33532
  if (attempt.heldBefore === "held") {
@@ -34452,7 +34572,7 @@ function getDriftUnknownPaths$6(resourceType) {
34452
34572
  ];
34453
34573
  return [];
34454
34574
  }
34455
- async function readCurrentState$23(physicalId, _logicalId, resourceType) {
34575
+ async function readCurrentState$24(physicalId, _logicalId, resourceType) {
34456
34576
  switch (resourceType) {
34457
34577
  case "AWS::ECS::Cluster": return this.readCurrentStateCluster(physicalId);
34458
34578
  case "AWS::ECS::Service": return this.readCurrentStateService(physicalId);
@@ -34979,7 +35099,7 @@ var ECSProvider = class {
34979
35099
  return getDriftUnknownPaths$6.call(this, resourceType);
34980
35100
  }
34981
35101
  readCurrentState(physicalId, _logicalId, resourceType) {
34982
- return readCurrentState$23.call(this, physicalId, _logicalId, resourceType);
35102
+ return readCurrentState$24.call(this, physicalId, _logicalId, resourceType);
34983
35103
  }
34984
35104
  readCurrentStateCluster(physicalId) {
34985
35105
  return readCurrentStateCluster.call(this, physicalId);
@@ -36126,7 +36246,7 @@ function convertCertificates(certificates) {
36126
36246
  }
36127
36247
 
36128
36248
  // src/provisioning/providers/elbv2/read-state.ts
36129
- async function readCurrentState$22(physicalId, _logicalId, resourceType) {
36249
+ async function readCurrentState$23(physicalId, _logicalId, resourceType) {
36130
36250
  switch (resourceType) {
36131
36251
  case "AWS::ElasticLoadBalancingV2::LoadBalancer": return this.readLoadBalancer(physicalId);
36132
36252
  case "AWS::ElasticLoadBalancingV2::TargetGroup": return this.readTargetGroup(physicalId);
@@ -36640,7 +36760,7 @@ var ELBv2Provider = class {
36640
36760
  return convertCertificates.call(this, certificates);
36641
36761
  }
36642
36762
  readCurrentState(physicalId, _logicalId, resourceType) {
36643
- return readCurrentState$22.call(this, physicalId, _logicalId, resourceType);
36763
+ return readCurrentState$23.call(this, physicalId, _logicalId, resourceType);
36644
36764
  }
36645
36765
  readLoadBalancer(physicalId) {
36646
36766
  return readLoadBalancer.call(this, physicalId);
@@ -37035,7 +37155,7 @@ async function importImpl$23(input) {
37035
37155
  if (explicit) return this.buildImportResult(explicit);
37036
37156
  return null;
37037
37157
  }
37038
- async function readCurrentState$21(physicalId) {
37158
+ async function readCurrentState$22(physicalId) {
37039
37159
  const client = this.getClient();
37040
37160
  let proxy;
37041
37161
  try {
@@ -37160,7 +37280,7 @@ var RDSDBProxyProvider = class {
37160
37280
  return importImpl$23.call(this, input);
37161
37281
  }
37162
37282
  readCurrentState(physicalId) {
37163
- return readCurrentState$21.call(this, physicalId);
37283
+ return readCurrentState$22.call(this, physicalId);
37164
37284
  }
37165
37285
  applyTagDiff(physicalId, oldTags, newTags, resourceType, logicalId, maskSecrets) {
37166
37286
  return applyTagDiff$9.call(this, physicalId, oldTags, newTags, resourceType, logicalId, maskSecrets);
@@ -37881,7 +38001,7 @@ async function importImpl$22(input) {
37881
38001
  };
37882
38002
  return null;
37883
38003
  }
37884
- async function readCurrentState$20(physicalId, _logicalId, _resourceType, properties) {
38004
+ async function readCurrentState$21(physicalId, _logicalId, _resourceType, properties) {
37885
38005
  const dbProxyName = readProxyName(properties["DBProxyName"]);
37886
38006
  const targetGroupName = requireConfigString(properties["TargetGroupName"], "default", "AWS::RDS::DBProxyTargetGroup TargetGroupName", { onUnusable: (message) => this.logger.warn(message) });
37887
38007
  if (!dbProxyName) return;
@@ -37972,7 +38092,7 @@ var RDSDBProxyTargetGroupProvider = class {
37972
38092
  return importImpl$22.call(this, input);
37973
38093
  }
37974
38094
  readCurrentState(physicalId, _logicalId, _resourceType, properties) {
37975
- return readCurrentState$20.call(this, physicalId, _logicalId, _resourceType, properties);
38095
+ return readCurrentState$21.call(this, physicalId, _logicalId, _resourceType, properties);
37976
38096
  }
37977
38097
  async retireRegistrationAfterFailedCreate(original, dbProxyName, targetGroupName, dbClusterIdentifiers, dbInstanceIdentifiers, maskSecrets, leftBehind) {
37978
38098
  const clusters = dbClusterIdentifiers?.length ? dbClusterIdentifiers : void 0;
@@ -39398,7 +39518,7 @@ async function unsettledInTransition$3(physicalId, _logicalId, resourceType, nam
39398
39518
  return names;
39399
39519
  }
39400
39520
  }
39401
- async function readCurrentState$19(physicalId, _logicalId, resourceType) {
39521
+ async function readCurrentState$20(physicalId, _logicalId, resourceType) {
39402
39522
  switch (resourceType) {
39403
39523
  case "AWS::DocDB::DBInstance": return this.readCurrentStateDBInstance(physicalId);
39404
39524
  case "AWS::DocDB::DBCluster": return this.readCurrentStateDBCluster(physicalId);
@@ -39733,7 +39853,7 @@ var DocDBProvider = class {
39733
39853
  return importImpl$21.call(this, input);
39734
39854
  }
39735
39855
  readCurrentState(physicalId, _logicalId, resourceType) {
39736
- return readCurrentState$19.call(this, physicalId, _logicalId, resourceType);
39856
+ return readCurrentState$20.call(this, physicalId, _logicalId, resourceType);
39737
39857
  }
39738
39858
  readCurrentStateDBInstance(physicalId) {
39739
39859
  return readCurrentStateDBInstance.call(this, physicalId);
@@ -40773,7 +40893,7 @@ async function updateRecordSet(logicalId, physicalId, resourceType, properties,
40773
40893
  }));
40774
40894
  this.logger.debug(`Successfully updated record set ${logicalId}`);
40775
40895
  return {
40776
- physicalId: compositeId,
40896
+ physicalId: context?.desiredFromAwsReadback === true ? physicalId : compositeId,
40777
40897
  wasReplaced: identityChanged,
40778
40898
  attributes: {}
40779
40899
  };
@@ -41541,7 +41661,7 @@ async function resolveRecordSetIdentity(physicalId, properties, options) {
41541
41661
  }
41542
41662
 
41543
41663
  // src/provisioning/providers/route53/read-state.ts
41544
- async function readCurrentState$18(physicalId, _logicalId, resourceType, properties) {
41664
+ async function readCurrentState$19(physicalId, _logicalId, resourceType, properties) {
41545
41665
  switch (resourceType) {
41546
41666
  case "AWS::Route53::HostedZone": return this.readHostedZone(physicalId, properties);
41547
41667
  case "AWS::Route53::RecordSet": return this.readRecordSet(physicalId, properties);
@@ -41953,7 +42073,7 @@ var Route53Provider = class {
41953
42073
  return resolveRecordSetIdentity.call(this, physicalId, properties, options);
41954
42074
  }
41955
42075
  readCurrentState(physicalId, _logicalId, resourceType, properties) {
41956
- return readCurrentState$18.call(this, physicalId, _logicalId, resourceType, properties);
42076
+ return readCurrentState$19.call(this, physicalId, _logicalId, resourceType, properties);
41957
42077
  }
41958
42078
  readUnsettled(physicalId, logicalId, resourceType, names, recordedProperties, desiredProperties, attemptedItems) {
41959
42079
  return readUnsettled$3.call(this, physicalId, logicalId, resourceType, names, recordedProperties, desiredProperties, attemptedItems);
@@ -42354,7 +42474,7 @@ async function deleteImpl$20(logicalId, physicalId, resourceType, _properties, c
42354
42474
  }
42355
42475
 
42356
42476
  // src/provisioning/providers/wafv2/read-state.ts
42357
- async function readCurrentState$17(physicalId, _logicalId, _resourceType, properties) {
42477
+ async function readCurrentState$18(physicalId, _logicalId, _resourceType, properties) {
42358
42478
  const { id, name, scope } = parseWebACLArn(physicalId);
42359
42479
  if (!id || !name) return void 0;
42360
42480
  let webACL;
@@ -42481,7 +42601,7 @@ var WAFv2WebACLProvider = class {
42481
42601
  return applyTagDiff$8.call(this, arn, resourceType, logicalId, oldTagsRaw, newTagsRaw);
42482
42602
  }
42483
42603
  readCurrentState(physicalId, logicalId, resourceType, properties) {
42484
- return readCurrentState$17.call(this, physicalId, logicalId, resourceType, properties);
42604
+ return readCurrentState$18.call(this, physicalId, logicalId, resourceType, properties);
42485
42605
  }
42486
42606
  import(input) {
42487
42607
  return importImpl$19.call(this, input);
@@ -42746,7 +42866,7 @@ function canonicalizeDesiredProperties$1(resourceType, properties) {
42746
42866
  if (resourceType !== "AWS::Cognito::UserPool") return properties;
42747
42867
  return narrowMfaConfiguration(properties);
42748
42868
  }
42749
- async function readCurrentState$16(physicalId, _logicalId, resourceType) {
42869
+ async function readCurrentState$17(physicalId, _logicalId, resourceType) {
42750
42870
  if (resourceType !== "AWS::Cognito::UserPool") return void 0;
42751
42871
  let resp;
42752
42872
  try {
@@ -42788,6 +42908,7 @@ async function readCurrentState$16(physicalId, _logicalId, resourceType) {
42788
42908
  result["UserPoolTier"] = pool.UserPoolTier ?? "ESSENTIALS";
42789
42909
  if (pool.KeyConfiguration) result["KeyConfiguration"] = pool.KeyConfiguration;
42790
42910
  if (pool.IssuerConfiguration) result["IssuerConfiguration"] = pool.IssuerConfiguration;
42911
+ if (pool.DcrConfiguration) result["DcrConfiguration"] = pool.DcrConfiguration;
42791
42912
  try {
42792
42913
  const mfa = await this.getClient().send(new GetUserPoolMfaConfigCommand({ UserPoolId: physicalId }));
42793
42914
  const enabledMfas = [];
@@ -43071,6 +43192,7 @@ async function create$19(logicalId, resourceType, properties, context) {
43071
43192
  if (properties["UserPoolTier"]) createParams.UserPoolTier = properties["UserPoolTier"];
43072
43193
  if (properties["KeyConfiguration"]) createParams.KeyConfiguration = properties["KeyConfiguration"];
43073
43194
  if (properties["IssuerConfiguration"]) createParams.IssuerConfiguration = properties["IssuerConfiguration"];
43195
+ if (properties["DcrConfiguration"]) createParams.DcrConfiguration = properties["DcrConfiguration"];
43074
43196
  const orphanWindow = createUserPoolLatch.take(logicalId);
43075
43197
  if (orphanWindow !== void 0) await this.reportPossibleOrphanPools(logicalId, poolName, orphanWindow, createMaskedLogSinks(this.logger, context?.maskSecrets));
43076
43198
  let created;
@@ -43191,6 +43313,9 @@ function warnOnUnremovablePoliciesSubKeys(physicalId, properties, previousProper
43191
43313
  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, so the pool keeps its current ${label}. CloudFormation is the same no-op on the identical template edit, so cdkd deliberately sends no reset. To change the live value, declare Policies.${subKey} explicitly with the intended configuration (${reset}).`);
43192
43314
  }
43193
43315
  }
43316
+ function sendsMessageMember(value) {
43317
+ return value !== void 0 && value !== "";
43318
+ }
43194
43319
  function warnOnKeptRemovedMembers(logicalId, physicalId, properties, previousProperties) {
43195
43320
  for (const [member, unset] of Object.entries(KEPT_ON_REMOVAL_MEMBERS)) {
43196
43321
  if (!declaresMember(previousProperties[member], unset)) continue;
@@ -43198,6 +43323,10 @@ function warnOnKeptRemovedMembers(logicalId, physicalId, properties, previousPro
43198
43323
  this.logger.warn(safeMsg`Cognito User Pool ${logicalId} (${physicalId}): the template no longer declares ` + safeMsg`${member}, and UpdateUserPool keeps a member it omits, so the pool keeps its ` + safeMsg`current ${member}. CloudFormation keeps it on the same edit too, so cdkd sends ` + safeMsg`no reset. To change it, declare ${member} with the value you want.`);
43199
43324
  }
43200
43325
  }
43326
+ function dcrConfigurationUpdate(properties, previousProperties) {
43327
+ if (properties["DcrConfiguration"]) return properties["DcrConfiguration"];
43328
+ if (previousProperties["DcrConfiguration"]) return { EnableStatus: "Disabled" };
43329
+ }
43201
43330
  async function update$19(logicalId, physicalId, resourceType, properties, previousProperties, context) {
43202
43331
  this.logger.debug(`Updating Cognito User Pool ${logicalId}: ${physicalId}`);
43203
43332
  const stateBorneDesired = context?.replayingState === true || context?.desiredFromAwsReadback === true;
@@ -43251,13 +43380,15 @@ async function update$19(logicalId, physicalId, resourceType, properties, previo
43251
43380
  if (properties["VerificationMessageTemplate"]) updateParams.VerificationMessageTemplate = properties["VerificationMessageTemplate"];
43252
43381
  if (properties["DeviceConfiguration"]) updateParams.DeviceConfiguration = properties["DeviceConfiguration"];
43253
43382
  if (properties["UserPoolAddOns"] && !isEmptyObjectPlaceholder(properties["UserPoolAddOns"])) updateParams.UserPoolAddOns = properties["UserPoolAddOns"];
43254
- if (properties["EmailVerificationMessage"] !== void 0) updateParams.EmailVerificationMessage = properties["EmailVerificationMessage"];
43255
- if (properties["EmailVerificationSubject"] !== void 0) updateParams.EmailVerificationSubject = properties["EmailVerificationSubject"];
43256
- if (properties["SmsAuthenticationMessage"] !== void 0) updateParams.SmsAuthenticationMessage = properties["SmsAuthenticationMessage"];
43257
- if (properties["SmsVerificationMessage"] !== void 0) updateParams.SmsVerificationMessage = properties["SmsVerificationMessage"];
43383
+ if (sendsMessageMember(properties["EmailVerificationMessage"])) updateParams.EmailVerificationMessage = properties["EmailVerificationMessage"];
43384
+ if (sendsMessageMember(properties["EmailVerificationSubject"])) updateParams.EmailVerificationSubject = properties["EmailVerificationSubject"];
43385
+ if (sendsMessageMember(properties["SmsAuthenticationMessage"])) updateParams.SmsAuthenticationMessage = properties["SmsAuthenticationMessage"];
43386
+ if (sendsMessageMember(properties["SmsVerificationMessage"])) updateParams.SmsVerificationMessage = properties["SmsVerificationMessage"];
43258
43387
  if (properties["UserPoolTier"]) updateParams.UserPoolTier = properties["UserPoolTier"];
43259
43388
  if (properties["KeyConfiguration"]) updateParams.KeyConfiguration = properties["KeyConfiguration"];
43260
43389
  if (properties["IssuerConfiguration"]) updateParams.IssuerConfiguration = properties["IssuerConfiguration"];
43390
+ const dcr = dcrConfigurationUpdate(properties, previousProperties);
43391
+ if (dcr) updateParams.DcrConfiguration = dcr;
43261
43392
  const mfaOptions = {
43262
43393
  ...liveMfa?.value !== void 0 ? { liveMfaConfiguration: liveMfa.value } : {},
43263
43394
  ...liveMfa?.failed === true ? { liveReadFailed: true } : {},
@@ -43670,6 +43801,7 @@ var CognitoUserPoolProvider = class {
43670
43801
  "UserPoolTier",
43671
43802
  "KeyConfiguration",
43672
43803
  "IssuerConfiguration",
43804
+ "DcrConfiguration",
43673
43805
  "EnabledMfas",
43674
43806
  "EmailAuthenticationMessage",
43675
43807
  "EmailAuthenticationSubject",
@@ -43774,7 +43906,7 @@ var CognitoUserPoolProvider = class {
43774
43906
  return warnGuardLeftOn.call(this, physicalId, pool, mask, error, echoError);
43775
43907
  }
43776
43908
  readCurrentState(physicalId, _logicalId, resourceType) {
43777
- return readCurrentState$16.call(this, physicalId, _logicalId, resourceType);
43909
+ return readCurrentState$17.call(this, physicalId, _logicalId, resourceType);
43778
43910
  }
43779
43911
  userPoolAttributes(userPoolId, arn) {
43780
43912
  return userPoolAttributes.call(this, userPoolId, arn);
@@ -44253,7 +44385,7 @@ async function applyTagDiff$7(arn, resourceType, logicalId, oldTagsRaw, newTagsR
44253
44385
  }
44254
44386
 
44255
44387
  // src/provisioning/providers/elasticache/read-state.ts
44256
- async function readCurrentState$15(physicalId, _logicalId, resourceType) {
44388
+ async function readCurrentState$16(physicalId, _logicalId, resourceType) {
44257
44389
  switch (resourceType) {
44258
44390
  case "AWS::ElastiCache::CacheCluster": return this.readCacheCluster(physicalId);
44259
44391
  case "AWS::ElastiCache::SubnetGroup": return this.readSubnetGroup(physicalId);
@@ -44509,7 +44641,7 @@ var ElastiCacheProvider = class {
44509
44641
  return resourceType === "AWS::ElastiCache::CacheCluster" ? ["SnapshotArns", "SnapshotName"] : [];
44510
44642
  }
44511
44643
  readCurrentState(physicalId, _logicalId, resourceType) {
44512
- return readCurrentState$15.call(this, physicalId, _logicalId, resourceType);
44644
+ return readCurrentState$16.call(this, physicalId, _logicalId, resourceType);
44513
44645
  }
44514
44646
  readCacheCluster(physicalId) {
44515
44647
  return readCacheCluster.call(this, physicalId);
@@ -45310,7 +45442,7 @@ async function readServiceIdForIdentity(serviceId) {
45310
45442
  if (typeof response.Service?.Id !== "string") throw new Error("GetService did not return the service asked for");
45311
45443
  return response.Service.Id;
45312
45444
  }
45313
- async function readCurrentState$14(physicalId, _logicalId, resourceType) {
45445
+ async function readCurrentState$15(physicalId, _logicalId, resourceType) {
45314
45446
  switch (resourceType) {
45315
45447
  case "AWS::ServiceDiscovery::PrivateDnsNamespace":
45316
45448
  case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.readNamespace(physicalId, { includeProperties: true });
@@ -45604,7 +45736,7 @@ var ServiceDiscoveryProvider = class {
45604
45736
  return readServiceIdForIdentity.call(this, serviceId);
45605
45737
  }
45606
45738
  readCurrentState(physicalId, _logicalId, resourceType) {
45607
- return readCurrentState$14.call(this, physicalId, _logicalId, resourceType);
45739
+ return readCurrentState$15.call(this, physicalId, _logicalId, resourceType);
45608
45740
  }
45609
45741
  getDriftUnknownPaths(resourceType) {
45610
45742
  return getDriftUnknownPaths$3.call(this, resourceType);
@@ -46961,7 +47093,7 @@ function isNotFoundError(error) {
46961
47093
  }
46962
47094
 
46963
47095
  // src/provisioning/providers/appsync/read-state.ts
46964
- async function readCurrentState$13(physicalId, _logicalId, resourceType, properties) {
47096
+ async function readCurrentState$14(physicalId, _logicalId, resourceType, properties) {
46965
47097
  switch (resourceType) {
46966
47098
  case "AWS::AppSync::GraphQLApi": return this.readGraphQLApi(physicalId);
46967
47099
  case "AWS::AppSync::DataSource": return this.readDataSource(physicalId);
@@ -47523,7 +47655,7 @@ var AppSyncProvider = class {
47523
47655
  return isNotFoundError.call(this, error);
47524
47656
  }
47525
47657
  readCurrentState(physicalId, _logicalId, resourceType, properties) {
47526
- return readCurrentState$13.call(this, physicalId, _logicalId, resourceType, properties);
47658
+ return readCurrentState$14.call(this, physicalId, _logicalId, resourceType, properties);
47527
47659
  }
47528
47660
  canonicalizeSdl(sdl, source) {
47529
47661
  return canonicalizeSdl.call(this, sdl, source);
@@ -51301,7 +51433,7 @@ async function deleteImpl$15(logicalId, physicalId, resourceType, _properties, c
51301
51433
  }
51302
51434
 
51303
51435
  // src/provisioning/providers/budgets-budget/read-state.ts
51304
- async function readCurrentState$12(physicalId, _logicalId, resourceType, properties) {
51436
+ async function readCurrentState$13(physicalId, _logicalId, resourceType, properties) {
51305
51437
  if (resourceType !== "AWS::Budgets::Budget") return void 0;
51306
51438
  const accountId = await this.resolveAccountId();
51307
51439
  const client = this.getClient();
@@ -51652,7 +51784,7 @@ var BudgetsBudgetProvider = class {
51652
51784
  }
51653
51785
  }
51654
51786
  readCurrentState(physicalId, logicalId, resourceType, properties) {
51655
- return readCurrentState$12.call(this, physicalId, logicalId, resourceType, properties);
51787
+ return readCurrentState$13.call(this, physicalId, logicalId, resourceType, properties);
51656
51788
  }
51657
51789
  listNotifications(accountId, budgetName) {
51658
51790
  return listNotifications.call(this, accountId, budgetName);
@@ -52304,7 +52436,7 @@ async function unsettledInTransition$2(physicalId, _logicalId, _resourceType, na
52304
52436
  return names;
52305
52437
  }
52306
52438
  }
52307
- async function readCurrentState$11(physicalId, _logicalId, resourceType, _properties) {
52439
+ async function readCurrentState$12(physicalId, _logicalId, resourceType, _properties) {
52308
52440
  if (resourceType !== "AWS::Kinesis::Stream") return void 0;
52309
52441
  let stream;
52310
52442
  try {
@@ -52435,7 +52567,7 @@ var KinesisStreamProvider = class {
52435
52567
  return unsettledInTransition$2.call(this, physicalId, _logicalId, _resourceType, names);
52436
52568
  }
52437
52569
  readCurrentState(physicalId, _logicalId, resourceType, _properties) {
52438
- return readCurrentState$11.call(this, physicalId, _logicalId, resourceType, _properties);
52570
+ return readCurrentState$12.call(this, physicalId, _logicalId, resourceType, _properties);
52439
52571
  }
52440
52572
  import(input) {
52441
52573
  return importImpl$12.call(this, input);
@@ -53035,7 +53167,7 @@ async function getAttribute$4(physicalId, resourceType, attributeName, logicalId
53035
53167
  throw this.wrapCaughtError(void 0, error, (text) => new ProvisioningError(`Failed to resolve Arn for Schedule ${physicalId}: ${text}${text.endsWith(".") ? "" : "."}${customGroupHint}`, resourceType, logicalId, physicalId, cause));
53036
53168
  }
53037
53169
  }
53038
- async function readCurrentState$10(physicalId, _logicalId, _resourceType, properties) {
53170
+ async function readCurrentState$11(physicalId, _logicalId, _resourceType, properties) {
53039
53171
  const groupName = this.groupNameOf(properties);
53040
53172
  try {
53041
53173
  const response = await this.getClient().send(new GetScheduleCommand({
@@ -53165,7 +53297,7 @@ var SchedulerScheduleProvider = class {
53165
53297
  return getAttribute$4.call(this, physicalId, resourceType, attributeName, logicalId);
53166
53298
  }
53167
53299
  readCurrentState(physicalId, _logicalId, _resourceType, properties) {
53168
- return readCurrentState$10.call(this, physicalId, _logicalId, _resourceType, properties);
53300
+ return readCurrentState$11.call(this, physicalId, _logicalId, _resourceType, properties);
53169
53301
  }
53170
53302
  import(input) {
53171
53303
  return importImpl$11.call(this, input);
@@ -53680,7 +53812,7 @@ async function getAttribute$3(physicalId, resourceType, attributeName, logicalId
53680
53812
  }
53681
53813
  return this.attributesOf(response)[attributeName];
53682
53814
  }
53683
- async function readCurrentState$9(physicalId, _logicalId, _resourceType) {
53815
+ async function readCurrentState$10(physicalId, _logicalId, _resourceType) {
53684
53816
  let r;
53685
53817
  try {
53686
53818
  r = await this.describe(physicalId);
@@ -53833,7 +53965,7 @@ var PipesPipeProvider = class {
53833
53965
  return getAttribute$3.call(this, physicalId, resourceType, attributeName, logicalId);
53834
53966
  }
53835
53967
  readCurrentState(physicalId, _logicalId, _resourceType) {
53836
- return readCurrentState$9.call(this, physicalId, _logicalId, _resourceType);
53968
+ return readCurrentState$10.call(this, physicalId, _logicalId, _resourceType);
53837
53969
  }
53838
53970
  getDriftUnknownPaths() {
53839
53971
  return ["SourceParameters", "TargetParameters"];
@@ -53974,7 +54106,7 @@ async function retryOnTransientControlPlane(op, label, log, maxAttempts = 8) {
53974
54106
  delayMs = Math.min(delayMs * 2, 3e4);
53975
54107
  }
53976
54108
  }
53977
- async function readCurrentState$8(physicalId, _logicalId, resourceType) {
54109
+ async function readCurrentState$9(physicalId, _logicalId, resourceType) {
53978
54110
  switch (resourceType) {
53979
54111
  case "AWS::EFS::FileSystem": return this.readFileSystem(physicalId);
53980
54112
  case "AWS::EFS::AccessPoint": return this.readAccessPoint(physicalId);
@@ -54888,7 +55020,7 @@ var EFSProvider = class {
54888
55020
  }
54889
55021
  readCurrentState(physicalId, _logicalId, resourceType, properties, context) {
54890
55022
  if (resourceType === "AWS::EFS::FileSystem") return this.readFileSystem(physicalId, properties, context, _logicalId);
54891
- return readCurrentState$8.call(this, physicalId, _logicalId, resourceType);
55023
+ return readCurrentState$9.call(this, physicalId, _logicalId, resourceType);
54892
55024
  }
54893
55025
  readFileSystem(physicalId, properties, context, logicalId) {
54894
55026
  return readFileSystem.call(this, physicalId, properties, context, logicalId);
@@ -56066,7 +56198,7 @@ function getDriftUnorderedPaths(resourceType) {
56066
56198
  if (resourceType !== "AWS::FSx::FileSystem") return [];
56067
56199
  return ["WindowsConfiguration.Aliases"];
56068
56200
  }
56069
- async function readCurrentState$7(physicalId, _logicalId, resourceType) {
56201
+ async function readCurrentState$8(physicalId, _logicalId, resourceType) {
56070
56202
  if (resourceType !== "AWS::FSx::FileSystem") return void 0;
56071
56203
  let fs;
56072
56204
  let listed;
@@ -56311,7 +56443,7 @@ var FSxFileSystemProvider = class {
56311
56443
  return getDriftUnorderedPaths.call(this, resourceType);
56312
56444
  }
56313
56445
  readCurrentState(physicalId, _logicalId, resourceType) {
56314
- return readCurrentState$7.call(this, physicalId, _logicalId, resourceType);
56446
+ return readCurrentState$8.call(this, physicalId, _logicalId, resourceType);
56315
56447
  }
56316
56448
  import(input) {
56317
56449
  return importImpl$8.call(this, input);
@@ -57963,7 +58095,7 @@ async function describeClusterOrUndefined(clusterId) {
57963
58095
  throw err;
57964
58096
  }
57965
58097
  }
57966
- async function readCurrentState$6(physicalId, _logicalId, _resourceType) {
58098
+ async function readCurrentState$7(physicalId, _logicalId, _resourceType) {
57967
58099
  const cluster = await this.describeClusterOrUndefined(physicalId);
57968
58100
  if (!cluster) return void 0;
57969
58101
  if (cluster.Status?.State && TERMINAL_STATES.has(cluster.Status.State)) return RESOURCE_NOT_FOUND;
@@ -58226,7 +58358,7 @@ var EMRClusterProvider = class {
58226
58358
  return describeClusterOrUndefined.call(this, clusterId);
58227
58359
  }
58228
58360
  readCurrentState(physicalId, _logicalId, _resourceType) {
58229
- return readCurrentState$6.call(this, physicalId, _logicalId, _resourceType);
58361
+ return readCurrentState$7.call(this, physicalId, _logicalId, _resourceType);
58230
58362
  }
58231
58363
  getDriftUnknownPaths(_resourceType) {
58232
58364
  return [
@@ -59401,7 +59533,7 @@ async function unsettledInTransition(physicalId, _logicalId, _resourceType, name
59401
59533
  return /* @__PURE__ */ new Set([ENCRYPTION_KEY]);
59402
59534
  }
59403
59535
  }
59404
- async function readCurrentState$5(physicalId, _logicalId, _resourceType, properties) {
59536
+ async function readCurrentState$6(physicalId, _logicalId, _resourceType, properties) {
59405
59537
  let desc;
59406
59538
  try {
59407
59539
  desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
@@ -59609,7 +59741,7 @@ var FirehoseProvider = class {
59609
59741
  return unsettledInTransition.call(this, physicalId, _logicalId, _resourceType, names);
59610
59742
  }
59611
59743
  readCurrentState(physicalId, _logicalId, _resourceType, properties) {
59612
- return readCurrentState$5.call(this, physicalId, _logicalId, _resourceType, properties);
59744
+ return readCurrentState$6.call(this, physicalId, _logicalId, _resourceType, properties);
59613
59745
  }
59614
59746
  getDriftUnknownPaths() {
59615
59747
  return getDriftUnknownPaths.call(this);
@@ -60078,7 +60210,7 @@ async function applyTagDiff(trailArn, resourceType, logicalId, oldTagsRaw, newTa
60078
60210
  }
60079
60211
 
60080
60212
  // src/provisioning/providers/cloudtrail/read-state.ts
60081
- async function readCurrentState$4(physicalId, _logicalId, _resourceType) {
60213
+ async function readCurrentState$5(physicalId, _logicalId, _resourceType) {
60082
60214
  let trail;
60083
60215
  try {
60084
60216
  trail = (await this.getClient().send(new GetTrailCommand({ Name: physicalId }))).Trail;
@@ -60235,7 +60367,7 @@ var CloudTrailProvider = class {
60235
60367
  return applyTagDiff.call(this, trailArn, resourceType, logicalId, oldTagsRaw, newTagsRaw);
60236
60368
  }
60237
60369
  readCurrentState(physicalId, _logicalId, _resourceType) {
60238
- return readCurrentState$4.call(this, physicalId, _logicalId, _resourceType);
60370
+ return readCurrentState$5.call(this, physicalId, _logicalId, _resourceType);
60239
60371
  }
60240
60372
  import(input) {
60241
60373
  return importImpl$5.call(this, input);
@@ -60676,7 +60808,7 @@ async function deleteImpl$5(logicalId, physicalId, resourceType, _properties, co
60676
60808
  }
60677
60809
 
60678
60810
  // src/provisioning/providers/codebuild/read-state.ts
60679
- async function readCurrentState$3(physicalId, logicalId, _resourceType, properties, context) {
60811
+ async function readCurrentState$4(physicalId, logicalId, _resourceType, properties, context) {
60680
60812
  const read = await readProject.call(this, physicalId);
60681
60813
  const declared = context?.afterOwnWrite === true ? properties?.["Visibility"] : void 0;
60682
60814
  if (typeof declared !== "string" || declared === "" || read === RESOURCE_NOT_FOUND) return read;
@@ -60966,7 +61098,7 @@ var CodeBuildProvider = class {
60966
61098
  return Promise.resolve(attributeName);
60967
61099
  }
60968
61100
  readCurrentState(physicalId, _logicalId, _resourceType, properties, context) {
60969
- return readCurrentState$3.call(this, physicalId, _logicalId, _resourceType, properties, context);
61101
+ return readCurrentState$4.call(this, physicalId, _logicalId, _resourceType, properties, context);
60970
61102
  }
60971
61103
  getDriftUnknownPaths() {
60972
61104
  return ["Source.Auth", "Triggers"];
@@ -61406,7 +61538,7 @@ function proceedUnconfirmed(logicalId, reason) {
61406
61538
  }
61407
61539
 
61408
61540
  // src/provisioning/providers/codecommit-repository/read-state.ts
61409
- async function readCurrentState$2(physicalId, _logicalId, _resourceType) {
61541
+ async function readCurrentState$3(physicalId, _logicalId, _resourceType) {
61410
61542
  let metadata;
61411
61543
  try {
61412
61544
  metadata = await this.getRepositoryMetadata(physicalId);
@@ -61548,7 +61680,7 @@ var CodeCommitRepositoryProvider = class {
61548
61680
  }
61549
61681
  }
61550
61682
  readCurrentState(physicalId, _logicalId, _resourceType) {
61551
- return readCurrentState$2.call(this, physicalId, _logicalId, _resourceType);
61683
+ return readCurrentState$3.call(this, physicalId, _logicalId, _resourceType);
61552
61684
  }
61553
61685
  getDriftUnknownPaths(_resourceType) {
61554
61686
  return ["Code", "Triggers"];
@@ -63770,7 +63902,7 @@ async function lookupTableArn(tableBucketARN, namespace, name) {
63770
63902
  }
63771
63903
 
63772
63904
  // src/provisioning/providers/s3-tables/read-state.ts
63773
- async function readCurrentState$1(physicalId, logicalId, resourceType) {
63905
+ async function readCurrentState$2(physicalId, logicalId, resourceType) {
63774
63906
  switch (resourceType) {
63775
63907
  case "AWS::S3Tables::TableBucket": return this.readTableBucketCurrentState(physicalId);
63776
63908
  case "AWS::S3Tables::Namespace": return this.readNamespaceCurrentState(physicalId);
@@ -64322,7 +64454,7 @@ var S3TablesProvider = class {
64322
64454
  return createTable.call(this, logicalId, resourceType, properties, context);
64323
64455
  }
64324
64456
  readCurrentState(physicalId, logicalId, resourceType) {
64325
- return readCurrentState$1.call(this, physicalId, logicalId, resourceType);
64457
+ return readCurrentState$2.call(this, physicalId, logicalId, resourceType);
64326
64458
  }
64327
64459
  readTableBucketCurrentState(physicalId) {
64328
64460
  return readTableBucketCurrentState.call(this, physicalId);
@@ -64386,12 +64518,117 @@ var S3TablesProvider = class {
64386
64518
  }
64387
64519
  };
64388
64520
 
64521
+ // src/provisioning/providers/ecr/read-state.ts
64522
+ const REPOSITORY_TYPE = "AWS::ECR::Repository";
64523
+ function toCfnTagMutabilityExclusionFilters(sdk) {
64524
+ if (!sdk || sdk.length === 0) return void 0;
64525
+ return sdk.map((f) => ({
64526
+ ...f.filterType !== void 0 && { ImageTagMutabilityExclusionFilterType: f.filterType },
64527
+ ...f.filter !== void 0 && { ImageTagMutabilityExclusionFilterValue: f.filter }
64528
+ }));
64529
+ }
64530
+ async function readRepositoryPolicy(repositoryName) {
64531
+ let policyText;
64532
+ try {
64533
+ policyText = (await this.getClient().send(new GetRepositoryPolicyCommand({ repositoryName }))).policyText;
64534
+ } catch (err) {
64535
+ if (err instanceof RepositoryPolicyNotFoundException) return "absent";
64536
+ throw err;
64537
+ }
64538
+ if (!policyText) return "absent";
64539
+ try {
64540
+ return { value: JSON.parse(policyText) };
64541
+ } catch {
64542
+ return { value: policyText };
64543
+ }
64544
+ }
64545
+ async function readPolicyMember(repositoryName, logicalId, properties, context) {
64546
+ const declared = declaredMemberDocument(properties?.["RepositoryPolicyText"]);
64547
+ if (declared === void 0) return void 0;
64548
+ if (context?.afterOwnWrite !== true) {
64549
+ const read = await readRepositoryPolicy.call(this, repositoryName);
64550
+ return typeof read === "object" ? read : void 0;
64551
+ }
64552
+ let firstError;
64553
+ let first;
64554
+ try {
64555
+ first = await readRepositoryPolicy.call(this, repositoryName);
64556
+ } catch (err) {
64557
+ if (err instanceof RepositoryNotFoundException) throw err;
64558
+ firstError = err;
64559
+ first = memberReadFailure(err);
64560
+ }
64561
+ const settled = await settleDeclaredMember(first, () => readRepositoryPolicy.call(this, repositoryName), (document) => policyDocumentMatchesDeclared(document, declared), declared, this.ownWriteRereadDelaysMs, () => warnUnsettledMember(this.logger, logicalId, REPOSITORY_TYPE, "RepositoryPolicyText"));
64562
+ if (settled === "failed" || settled === "refused") throw firstError;
64563
+ return typeof settled === "object" ? settled : void 0;
64564
+ }
64565
+ function settle(promise) {
64566
+ return promise.then((value) => ({
64567
+ ok: true,
64568
+ value
64569
+ }), (error) => ({
64570
+ ok: false,
64571
+ error
64572
+ }));
64573
+ }
64574
+ async function readCurrentState$1(physicalId, logicalId, properties, context) {
64575
+ let repo;
64576
+ try {
64577
+ repo = await this.getClient().send(new DescribeRepositoriesCommand({ repositoryNames: [physicalId] }));
64578
+ } catch (err) {
64579
+ if (err instanceof RepositoryNotFoundException) return RESOURCE_NOT_FOUND;
64580
+ throw err;
64581
+ }
64582
+ const r = repo.repositories?.[0];
64583
+ if (!r) return RESOURCE_NOT_FOUND;
64584
+ const result = {};
64585
+ if (r.repositoryName !== void 0) result["RepositoryName"] = r.repositoryName;
64586
+ if (r.imageTagMutability !== void 0) result["ImageTagMutability"] = r.imageTagMutability;
64587
+ const cfnExclusionFilters = toCfnTagMutabilityExclusionFilters(r.imageTagMutabilityExclusionFilters);
64588
+ if (cfnExclusionFilters) result["ImageTagMutabilityExclusionFilters"] = cfnExclusionFilters;
64589
+ result["ImageScanningConfiguration"] = { ScanOnPush: r.imageScanningConfiguration?.scanOnPush ?? false };
64590
+ {
64591
+ const encType = r.encryptionConfiguration?.encryptionType ?? "AES256";
64592
+ const enc = { EncryptionType: encType };
64593
+ if (encType === "KMS" && r.encryptionConfiguration?.kmsKey) enc["KmsKey"] = r.encryptionConfiguration.kmsKey;
64594
+ result["EncryptionConfiguration"] = enc;
64595
+ }
64596
+ const client = this.getClient();
64597
+ const readLifecycle = async () => {
64598
+ try {
64599
+ return (await client.send(new GetLifecyclePolicyCommand({ repositoryName: physicalId }))).lifecyclePolicyText;
64600
+ } catch (err) {
64601
+ if (err instanceof LifecyclePolicyNotFoundException) return void 0;
64602
+ throw err;
64603
+ }
64604
+ };
64605
+ const arn = r.repositoryArn;
64606
+ const readTags = async () => arn === void 0 || arn === "" ? void 0 : normalizeAwsTagsToCfn((await client.send(new ListTagsForResourceCommand$9({ resourceArn: arn }))).tags);
64607
+ const [lifecycle, policy, tags] = await Promise.all([
64608
+ settle(readLifecycle()),
64609
+ settle(readPolicyMember.call(this, physicalId, logicalId, properties, context)),
64610
+ settle(readTags())
64611
+ ]);
64612
+ const reads = [
64613
+ lifecycle,
64614
+ policy,
64615
+ tags
64616
+ ];
64617
+ if (reads.some((s) => !s.ok && s.error instanceof RepositoryNotFoundException)) return RESOURCE_NOT_FOUND;
64618
+ for (const s of reads) if (!s.ok) throw s.error;
64619
+ if (lifecycle.ok && lifecycle.value) result["LifecyclePolicy"] = { LifecyclePolicyText: lifecycle.value };
64620
+ if (policy.ok && policy.value !== void 0) result["RepositoryPolicyText"] = policy.value.value;
64621
+ if (tags.ok && tags.value !== void 0) result["Tags"] = tags.value;
64622
+ return result;
64623
+ }
64624
+
64389
64625
  // src/provisioning/providers/ecr-provider.ts
64390
64626
  var ECRProvider = class {
64391
64627
  client;
64392
64628
  createClient;
64393
64629
  providerRegion = ambientRegion();
64394
64630
  logger = getLogger().child("ECRProvider");
64631
+ ownWriteRereadDelaysMs = OWN_WRITE_REREAD_DELAYS_MS;
64395
64632
  handledProperties = /* @__PURE__ */ new Map([["AWS::ECR::Repository", /* @__PURE__ */ new Set([
64396
64633
  "RepositoryName",
64397
64634
  "ImageScanningConfiguration",
@@ -64439,13 +64676,6 @@ var ECRProvider = class {
64439
64676
  };
64440
64677
  });
64441
64678
  }
64442
- toCfnTagMutabilityExclusionFilters(sdk) {
64443
- if (!sdk || sdk.length === 0) return void 0;
64444
- return sdk.map((f) => ({
64445
- ...f.filterType !== void 0 && { ImageTagMutabilityExclusionFilterType: f.filterType },
64446
- ...f.filter !== void 0 && { ImageTagMutabilityExclusionFilterValue: f.filter }
64447
- }));
64448
- }
64449
64679
  async create(logicalId, resourceType, properties, context) {
64450
64680
  this.logger.debug(`Creating ECR Repository ${logicalId}`);
64451
64681
  const desiredTags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
@@ -64626,43 +64856,22 @@ var ECRProvider = class {
64626
64856
  throw error instanceof Error && error.name.includes("NotFound") ? markNotGone(thrown) : thrown;
64627
64857
  }
64628
64858
  }
64629
- async readCurrentState(physicalId, _logicalId, _resourceType) {
64630
- let repo;
64631
- try {
64632
- repo = await this.getClient().send(new DescribeRepositoriesCommand({ repositoryNames: [physicalId] }));
64633
- } catch (err) {
64634
- if (err instanceof RepositoryNotFoundException) return RESOURCE_NOT_FOUND;
64635
- throw err;
64636
- }
64637
- const r = repo.repositories?.[0];
64638
- if (!r) return RESOURCE_NOT_FOUND;
64639
- const result = {};
64640
- if (r.repositoryName !== void 0) result["RepositoryName"] = r.repositoryName;
64641
- if (r.imageTagMutability !== void 0) result["ImageTagMutability"] = r.imageTagMutability;
64642
- const cfnExclusionFilters = this.toCfnTagMutabilityExclusionFilters(r.imageTagMutabilityExclusionFilters);
64643
- if (cfnExclusionFilters) result["ImageTagMutabilityExclusionFilters"] = cfnExclusionFilters;
64644
- result["ImageScanningConfiguration"] = { ScanOnPush: r.imageScanningConfiguration?.scanOnPush ?? false };
64645
- {
64646
- const encType = r.encryptionConfiguration?.encryptionType ?? "AES256";
64647
- const enc = { EncryptionType: encType };
64648
- if (encType === "KMS" && r.encryptionConfiguration?.kmsKey) enc["KmsKey"] = r.encryptionConfiguration.kmsKey;
64649
- result["EncryptionConfiguration"] = enc;
64650
- }
64651
- try {
64652
- const lp = await this.getClient().send(new GetLifecyclePolicyCommand({ repositoryName: physicalId }));
64653
- if (lp.lifecyclePolicyText) result["LifecyclePolicy"] = { LifecyclePolicyText: lp.lifecyclePolicyText };
64654
- } catch (err) {
64655
- if (err instanceof RepositoryNotFoundException) return RESOURCE_NOT_FOUND;
64656
- if (!(err instanceof LifecyclePolicyNotFoundException)) throw err;
64657
- }
64658
- if (r.repositoryArn) try {
64659
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$9({ resourceArn: r.repositoryArn }));
64660
- result["Tags"] = normalizeAwsTagsToCfn(tagsResp.tags);
64661
- } catch (err) {
64662
- if (err instanceof RepositoryNotFoundException) return RESOURCE_NOT_FOUND;
64663
- throw err;
64664
- }
64665
- return result;
64859
+ readCurrentState(physicalId, logicalId, _resourceType, properties, context) {
64860
+ return readCurrentState$1.call(this, physicalId, logicalId, properties, context);
64861
+ }
64862
+ getDriftUnknownPaths(resourceType) {
64863
+ return resourceType === "AWS::ECR::Repository" ? ["EmptyOnDelete"] : [];
64864
+ }
64865
+ canonicalizeDriftProperties(resourceType, properties) {
64866
+ if (resourceType !== "AWS::ECR::Repository") return properties;
64867
+ const policy = properties["RepositoryPolicyText"];
64868
+ if (typeof policy !== "string") return properties;
64869
+ const parsed = declaredMemberDocument(policy);
64870
+ if (typeof parsed !== "object" || parsed === null) return properties;
64871
+ return {
64872
+ ...properties,
64873
+ RepositoryPolicyText: parsed
64874
+ };
64666
64875
  }
64667
64876
  async import(input) {
64668
64877
  const explicit = resolveExplicitPhysicalId(input, "RepositoryName");
@@ -65272,6 +65481,12 @@ async function cleanupRequestedCertificate(certificateArn, logicalId, idempotenc
65272
65481
  }
65273
65482
 
65274
65483
  // src/provisioning/providers/acm-certificate/update.ts
65484
+ function sameNamesWithDomain(properties) {
65485
+ const sans = properties["SubjectAlternativeNames"];
65486
+ const names = new Set(Array.isArray(sans) ? sans : sans === void 0 ? [] : [sans]);
65487
+ names.add(properties["DomainName"]);
65488
+ return JSON.stringify([...names].map((n) => JSON.stringify(n)).sort());
65489
+ }
65275
65490
  async function update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
65276
65491
  this.logger.debug(`Updating ACM certificate ${logicalId}: ${physicalId}`);
65277
65492
  properties = withRemovalDefaults(this.removalDefaults, resourceType, properties, previousProperties, context);
@@ -65288,6 +65503,7 @@ async function update(logicalId, physicalId, resourceType, properties, previousP
65288
65503
  let changedImmutable;
65289
65504
  for (const k of immutableFields) {
65290
65505
  if (JSON.stringify(properties[k]) === JSON.stringify(previousProperties[k])) continue;
65506
+ if (k === "SubjectAlternativeNames" && isDriftRevert(context) && sameNamesWithDomain(properties) === sameNamesWithDomain(previousProperties)) continue;
65291
65507
  if (k === "CertificateExport" && (properties[k] ?? "DISABLED") === (previousProperties[k] ?? "DISABLED")) continue;
65292
65508
  if (await unchangedBehindSecretReference({
65293
65509
  resourceType,
@@ -65300,6 +65516,7 @@ async function update(logicalId, physicalId, resourceType, properties, previousP
65300
65516
  break;
65301
65517
  }
65302
65518
  if (changedImmutable) {
65519
+ if (isDriftRevert(context)) throw revertReplacementRefusal(resourceType, logicalId, `its ${changedImmutable} differs from the live certificate's and cannot change in place`);
65303
65520
  this.logger.debug(`${changedImmutable} changed, replacing ACM certificate: ${physicalId}`);
65304
65521
  const createResult = await this.create(logicalId, resourceType, properties, context?.maskSecrets ? { maskSecrets: context.maskSecrets } : void 0);
65305
65522
  let orphanReason;
@@ -65600,4 +65817,4 @@ var ACMCertificateProvider = class {
65600
65817
  };
65601
65818
 
65602
65819
  export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppConfigEnvironmentProvider, AppSyncProvider, BudgetsBudgetProvider, CloudFrontDistributionProvider, CloudFrontOACProvider, CloudFrontOAIProvider, CloudTrailProvider, CloudWatchAlarmProvider, CloudWatchAnomalyDetectorProvider, CodeBuildProvider, CodeCommitRepositoryProvider, CognitoUserPoolProvider, DLMLifecyclePolicyProvider, DocDBProvider, DocDBSubnetGroupProvider, DynamoDBGlobalTableProvider, DynamoDBTableProvider, EC2Provider, ECRProvider, ECSProvider, EFSProvider, ELBv2Provider, EMRClusterProvider, EMRInstanceFleetConfigProvider, EMRInstanceGroupConfigProvider, ElastiCacheProvider, EventBridgeArchiveProvider, EventBridgeBusProvider, EventBridgeRuleProvider, FSxFileSystemProvider, FirehoseProvider, GlueConnectionProvider, GlueCrawlerProvider, GlueJobProvider, GlueProvider, GlueSecurityConfigurationProvider, GlueTriggerProvider, GlueWorkflowProvider, IAMAccessKeyProvider, IAMInstanceProfileProvider, IAMManagedPolicyProvider, IAMPolicyProvider, IAMRoleProvider, IAMUserGroupProvider, KMSProvider, KinesisStreamConsumerProvider, KinesisStreamProvider, LambdaEventInvokeConfigProvider, LambdaEventSourceMappingProvider, LambdaFunctionProvider, LambdaLayerVersionProvider, LambdaMicrovmImageProvider, LambdaNetworkConnectorProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaWebFunctionEndpointProvider, LambdaWebFunctionRevisionProvider, LogsDeliveryDestinationProvider, LogsDeliveryProvider, LogsDeliverySourceProvider, LogsLogGroupProvider, NeptuneProvider, NestedStackProvider, PipesPipeProvider, RDSDBProxyEndpointProvider, RDSDBProxyProvider, RDSDBProxyTargetGroupProvider, RDSProvider, Route53Provider, S3BucketPolicyProvider, S3BucketProvider, S3DirectoryBucketProvider, S3TablesProvider, S3VectorsProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, SNSTopicProvider, SQSQueuePolicyProvider, SQSQueueProvider, SSMParameterProvider, SchedulerScheduleProvider, SecretsManagerSecretProvider, ServiceDiscoveryProvider, StepFunctionsProvider, WAFv2WebACLProvider, WaitConditionHandleProvider };
65603
- //# sourceMappingURL=provider-classes-KrOpD8Sp.js.map
65820
+ //# sourceMappingURL=provider-classes-ZbdmR8mu.js.map