@cdkd/cli 0.369.0 → 0.370.0

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 (58) hide show
  1. package/dist/{ambient-client-defaults-rk6Owoyy.js → ambient-client-defaults-BEAgEnYC.js} +3 -3
  2. package/dist/{ambient-client-defaults-rk6Owoyy.js.map → ambient-client-defaults-BEAgEnYC.js.map} +1 -1
  3. package/dist/{asg-provider-CNRVBqWX.js → asg-provider-cjMb8o1I.js} +6 -6
  4. package/dist/{asg-provider-CNRVBqWX.js.map → asg-provider-cjMb8o1I.js.map} +1 -1
  5. package/dist/cli.js +3 -3
  6. package/dist/{custom-resource-runtime-CEDK9itT.js → custom-resource-runtime-LiMlbcFx.js} +6 -6
  7. package/dist/{custom-resource-runtime-CEDK9itT.js.map → custom-resource-runtime-LiMlbcFx.js.map} +1 -1
  8. package/dist/{db-associated-roles-CmtjO5eX.js → db-associated-roles-BdugKxHB.js} +2 -2
  9. package/dist/{db-associated-roles-CmtjO5eX.js.map → db-associated-roles-BdugKxHB.js.map} +1 -1
  10. package/dist/{delete-started-Csx7vwyg.js → delete-started-BFRg37SF.js} +6 -6
  11. package/dist/{delete-started-Csx7vwyg.js.map → delete-started-BFRg37SF.js.map} +1 -1
  12. package/dist/{deploy-engine-BOJDF7gp.js → deploy-engine-DEH08Ipa.js} +530 -134
  13. package/dist/deploy-engine-DEH08Ipa.js.map +1 -0
  14. package/dist/{ec2-termination-protection-BfnGV4MW.js → ec2-termination-protection-C9-Ahvql.js} +16 -6
  15. package/dist/ec2-termination-protection-C9-Ahvql.js.map +1 -0
  16. package/dist/{ecr-uri-C6KQIzAh.js → ecr-uri-CRaJHJpC.js} +2 -2
  17. package/dist/{ecr-uri-C6KQIzAh.js.map → ecr-uri-CRaJHJpC.js.map} +1 -1
  18. package/dist/{expected-bucket-owner-CaFllAu_.js → expected-bucket-owner-CSHY4LqK.js} +2 -2
  19. package/dist/{expected-bucket-owner-CaFllAu_.js.map → expected-bucket-owner-CSHY4LqK.js.map} +1 -1
  20. package/dist/{iam-role-provider-DRszX-y3.js → iam-role-provider-7FpK27IJ.js} +9 -9
  21. package/dist/{iam-role-provider-DRszX-y3.js.map → iam-role-provider-7FpK27IJ.js.map} +1 -1
  22. package/dist/{image-plan-Db783emh.js → image-plan-CgnzL-SV.js} +9 -9
  23. package/dist/image-plan-CgnzL-SV.js.map +1 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +5 -5
  26. package/dist/{logger-Db1YslcC.js → logger-DjU1d8tR.js} +2 -2
  27. package/dist/{logger-Db1YslcC.js.map → logger-DjU1d8tR.js.map} +1 -1
  28. package/dist/{neptune-provider-rlCSoeoP.js → neptune-provider-CTAXvQQO.js} +20 -15
  29. package/dist/neptune-provider-CTAXvQQO.js.map +1 -0
  30. package/dist/{program-DpryKXTn.js → program-o9TI0b9j.js} +18 -16
  31. package/dist/program-o9TI0b9j.js.map +1 -0
  32. package/dist/{provider-classes-DtaAa9Bd.js → provider-classes-Baf5t9eA.js} +690 -68
  33. package/dist/provider-classes-Baf5t9eA.js.map +1 -0
  34. package/dist/{rds-provider-cQkTDV8C.js → rds-provider-DxQ515q8.js} +25 -19
  35. package/dist/rds-provider-DxQ515q8.js.map +1 -0
  36. package/dist/{read-replica-BhIJ9o47.js → read-replica-DQiPcXCF.js} +3 -3
  37. package/dist/{read-replica-BhIJ9o47.js.map → read-replica-DQiPcXCF.js.map} +1 -1
  38. package/dist/{replacement-rules-B4u0_NZA.js → replacement-rules-CV85H47l.js} +3 -3
  39. package/dist/{replacement-rules-B4u0_NZA.js.map → replacement-rules-CV85H47l.js.map} +1 -1
  40. package/dist/{resource-deadline-D4VcgDmH.js → resource-deadline-DaeYacij.js} +90 -87
  41. package/dist/{resource-deadline-D4VcgDmH.js.map → resource-deadline-DaeYacij.js.map} +1 -1
  42. package/dist/{restore-source-guard-CgUon9UO.js → restore-source-guard-VmeqbJUM.js} +53 -5
  43. package/dist/restore-source-guard-VmeqbJUM.js.map +1 -0
  44. package/dist/{run-cli-YiJIQRsR.js → run-cli-Cqev-Chr.js} +2 -2
  45. package/dist/{run-cli-YiJIQRsR.js.map → run-cli-Cqev-Chr.js.map} +1 -1
  46. package/dist/{settle-own-write-members-ojoMzO_S.js → settle-own-write-members-DzLGW7et.js} +42 -15
  47. package/dist/{settle-own-write-members-ojoMzO_S.js.map → settle-own-write-members-DzLGW7et.js.map} +1 -1
  48. package/dist/{version-D4-Ie5QB.js → version-5LxZZWe4.js} +2 -2
  49. package/dist/{version-D4-Ie5QB.js.map → version-5LxZZWe4.js.map} +1 -1
  50. package/package.json +1 -1
  51. package/dist/deploy-engine-BOJDF7gp.js.map +0 -1
  52. package/dist/ec2-termination-protection-BfnGV4MW.js.map +0 -1
  53. package/dist/image-plan-Db783emh.js.map +0 -1
  54. package/dist/neptune-provider-rlCSoeoP.js.map +0 -1
  55. package/dist/program-DpryKXTn.js.map +0 -1
  56. package/dist/provider-classes-DtaAa9Bd.js.map +0 -1
  57. package/dist/rds-provider-cQkTDV8C.js.map +0 -1
  58. package/dist/restore-source-guard-CgUon9UO.js.map +0 -1
@@ -1,21 +1,21 @@
1
- import { _ as verifyOwnIdentityBeforeUpdate, a as stackOwnHolders, b as IamCreateClientCache, c as clearOwnWriteRemovals, d as takeOwnWriteRemovals, f as InlinePolicyPrincipalMismatchError, g as verifyInlinePolicyPrincipals, h as compareMembershipWrites, i as isStackOwnHolder, l as recordOwnWriteRemoval, m as assertInlinePolicyAttachTargets, n as collectInlinePolicyNamesManagedBySiblings, o as planInlinePolicyNames, p as MANAGED_POLICY_OWNER, r as heldText, s as sameInlinePolicyName, t as IAMRoleProvider, u as restoreOwnWriteRemovals, v as iamEntityLeftByThisCreate, y as isEntityAlreadyExists } from "./iam-role-provider-DRszX-y3.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-Db1YslcC.js";
1
+ import { _ as verifyOwnIdentityBeforeUpdate, a as stackOwnHolders, b as IamCreateClientCache, c as clearOwnWriteRemovals, d as takeOwnWriteRemovals, f as InlinePolicyPrincipalMismatchError, g as verifyInlinePolicyPrincipals, h as compareMembershipWrites, i as isStackOwnHolder, l as recordOwnWriteRemoval, m as assertInlinePolicyAttachTargets, n as collectInlinePolicyNamesManagedBySiblings, o as planInlinePolicyNames, p as MANAGED_POLICY_OWNER, r as heldText, s as sameInlinePolicyName, t as IAMRoleProvider, u as restoreOwnWriteRemovals, v as iamEntityLeftByThisCreate, y as isEntityAlreadyExists } from "./iam-role-provider-7FpK27IJ.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-DjU1d8tR.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, 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-rk6Owoyy.js";
5
- import { $ as PROTECTION_FLIP_RETRY_WAIT_MS, A as assertRegionMatch, At as readPrincipalLists, B as readNameProperty, C as isInsideWindow, Cn as injectiveKeyPrefix, Ct as startInterruptWatch, D as withoutServerErrorRetries, Dt as diffPrincipalNames, E as setBounded, Et as SECRET_DERIVED_READ_LIVE, F as isPlainImportJson, Ft as compositeIdFormatMessage, G as markNotGone, Gt as isSecretDerivedValue, H as remedyLogicalId, Ht as stateOrphanRecordRemedy, I as isPlainImportValue, It as compositeIdSeparatorRefusal, J as logGroupProtectionSite, Jt as withDerivedNameMasks, Kt as maskDeep, L as isQuotableImportValue, Lt as compositeIdSkipResult, M as holderRefusalRun, Mt as recordedPrincipalsRepair, N as VALUE_NOT_SHOWN, O as DriftReadRefusedError, Ot as holdsSecretDerivedEntry, P as importRemedyCommand, Pt as canonicalizeRoute53QueryName, Q as userPoolProtectionSite, R as normalizeAwsTagsToCfn, Rt as logicalIdShown, S as createAttemptKey, Sn as injectiveKey, St as isInterruptedWaitError, T as replayedSendWindow, U as resolveExplicitPhysicalId, Ut as createMaskedLogSinks, V as refusalTypeShown, Vt as segmentAfterAnchor, Wt as createMaskedRetryLogger, X as rdsFamilyProtectionSite, Y as observeThenDisableProtection, Zt as clearCreatedBeforeFailure, _ as AMBIGUOUS_LATCH_TTL_MS, _t as protectedReplacementAdvice, a as clearOnUpdateRemoval, an as markSupersedesEarlierCreate, at as ProtectionFlipRegistry, b as RecentIdSet, c as removedTemplateKeys, et as deleteAfterProtectionFlipWithFinalSnapshot, g as retractCreatedResource, gt as pasteableAwsCommand, ht as isAwsCliLiteral, in as markCreatedBeforeFailure, j as holderRefusalMask, k as RESOURCE_NOT_FOUND, kt as onlySecretDerived, l as withRemovalDefaults, lt as ElapsedBudget, m as reportCreatedResource, mt as WITHHELD_AWS_COMMAND, n as enclosingDeadlineRemainingMs, nt as isProceedDbStatus, ot as isTerminalDeleteFailure, pt as UNNAMEABLE_ID_CLAUSE, q as deleteWithProtectionCompensation, qt as maskerOrIdentity, rn as markAuxiliaryFailure, rt as isTerminalDbWaitStatus, st as protectionFlipKey, t as enclosingDeadlineExpired, tn as isAuxiliaryFailure, ut as ElapsedBudgetRegistry, v as AmbiguousCreateLatch, vt as renderDisableCommand, w as replayFollowedAmbiguousAttempt, x as ambiguousAttemptLead, xn as withPasteableAwsProfile, y as CREATION_DATE_SKEW_MARGIN_MS, z as quotedRemedyLogicalId, zt as packCompositeId } from "./resource-deadline-D4VcgDmH.js";
6
- import { A as displayStackName, L as truncateCodePoints, 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-D4-Ie5QB.js";
7
- import { Ct as RecordedIdentityMismatchError, Mt as identityTimestamp, Ot as recordedIdentityId, Rt as isoTimestampAttribute, St as RecordedIdentityError, _t as isPermissionDenial, bt as lookupEachName, gt as deniedIdentityReadRefusal, kt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted, vt as chunks, wt as assertRecordedIdentity, xt as withApiLimit, yt as isAccessDeniedError } from "./delete-started-Csx7vwyg.js";
8
- import { $ as effectiveInventoryItem, A as withRecordedCidrSpelling, B as LIFECYCLE_DEFAULT_STATUS, C as securityGroupReadbackDelays, D as stackIngressRuleHolder, E as singleSecurityGroupRuleId, F as clearLifecycleWritesOf, G as canonicalizeItemList, H as LIFECYCLE_RULE_PATH, I as lifecycleSettleTarget, J as lifecycleUsesFilterForm, K as effectiveLifecycleConfiguration, L as recordLifecycleWrite, M as sgRemovalRuleKey, N as sgRuleListMember, O as survivingRecordOfRuleId, P as LIFECYCLE_BASELINE_REREAD_DELAYS_MS, Q as effectiveIntelligentTieringItem, R as settleLifecycleRead, S as reconcileSgRules, T as sgRuleKey, U as LIFECYCLE_TAG_FILTERS_PATH, V as LIFECYCLE_FILTER_PATH, W as canonicalizeBlock, X as EVENTBRIDGE_CONFIG_PATH, Y as parseCfnTimestamp, Z as effectiveAnalyticsItem, _ as ingressRuleIdentity, a as refuseRevertRevokingSiblingRules, at as declaresBucketObjectLock, b as isResendableSocketFailure, c as siblingIdOwnedSgRules, ct as isPlainObject$6, d as authorizeDefinitelyNotApplied, dt as shownLifecycleRuleId, et as effectiveNotificationConfiguration, f as canonicalizeSgInlineRuleProtocols, g as flattenIpPermissions, h as descriptionKey, i as resolveSecretDerivedPrincipals, it as configItemId, j as markCopiesAgreed, k as tagListsMatch, l as SG_READBACK_RETRY_DELAY_MS, lt as manualBucketDeletionClause, m as comparableIngressIdentity, n as holdsUnprovenSecretPrincipalToken, nt as caughtErrorName, o as sgRuleDiffKey, ot as declaresNestedObjectLock, p as canonicalizeSgRuleProtocol, q as lifecycleRuleScope, r as isResolvableSecretPrincipalList, rt as coerceCfnNumber, s as readSgIngressById, st as describeValue$1, t as runDestroyForStack, tt as eventBridgeEnabledOf, u as SG_RULE_PAGE_SIZE, ut as mergeLegacySingular, v as isConnectTimeout, w as securityGroupRuleMatchesCfnIngress, x as narrowIngressIpProtocol, y as isDefaultEgressRule, z as takeLifecycleWrite } from "./program-DpryKXTn.js";
9
- import { $ as desiredIndexEntriesByName, $i as getCurrentProducerRegions, $n as getCurrentNestedStackContext, $o as evaluateSignals, $r as canonicalizeIpv6Cidr, $t as reverseMapTableContributorInsights, Ao as KMS_DEFAULT_KEY_POLICY_ID, At as isDynamoDBTableArnIn, B as declaredStreamPolicyMember, Bc as LEGACY_HANDLE_ID_PREFIX, Bi as redactedDeleteAddressFields, Bo as reReadUntilSettled, Bt as planVectorIndexUpdates, Co as withoutSiblingOwned, Ct as sseSpecificationRefusal, Cu as withheldAccountClause, Dc as getAccountInfo, Dt as TAGS_BASELINE_REREAD_DELAYS_MS, Eo as getStackRecords, Es as withIndeterminateGuard, Et as tableNameReleaseWait, Fo as declaredPolicyDocument, Fs as isSettledInstanceState, Ft as isTtlAlreadyDisabled, G as streamDeclaresPolicy, Go as policyContentKey, Gr as siblingOwnedSgRuleIdentities, Gt as CONTRIBUTOR_INSIGHTS_KEY, H as planStreamMemberOps, Ho as warnUnsettledMember, Ht as vectorIndexesForCreate, Hu as normalizeRecordName, Io as efsPolicyMatchesDeclared, Is as connectInstanceIdOf, It as isTtlRateLimited, J as streamPolicyMatchesDeclared, Jr as SG_RULE_ID_PATTERN, Jt as indexDeclaresContributorInsights, K as streamDeclaresTags, Kn as getNestedRevertRun, Kt as completeTableContributorInsightsBaseline, L as DynamoDBGlobalTableProvider, Ln as licensedNameHolder, Lo as lambdaPermissionMatchesDeclared, Lt as planTimeToLive, Ma as replacedDeleteFailureVerdict, Mn as childRowTags, Mo as OWN_WRITE_REREAD_DELAYS_MS, Mt as settleWrittenTags, Nd as rewriteTemplateAssetReferences, Nn as childStackTags, No as SNS_DEFAULT_POLICY_ID, Ot as clearTagWrites, Po as declaredMemberDocument, Pt as takeTagWrite, Pu as withoutSdkUnwiredProperties, Q as deletionProtectionRefusal, Qc as APPSYNC_APIKEY_ARN_RESOURCE_PATH, Qo as classifyHandleUrl, Qr as sgProtocolKey, Qt as reverseMapIndexContributorInsights, R as STREAM_POLICY_KEY, Ri as REDACTED_DELETE_ADDRESS_SKIP_REASON, Ro as memberReadFailure, Rt as readTtlSpec, Si as reserveStackCreateToken, So as withoutSiblingAttachedArns, St as readCapacityNumber, Su as accountArgs, Ts as deleteSkipReason, Tt as tableDeleteGoneWait, Uo as verbatimEchoDriftKeys, Ut as vectorIndexesSettled, Uu as planSubscriptionAttributes, V as declaredStreamTagsMember, Vc as isLegacyHandleId, Vi as redactedDeleteAddressSkip, Vo as settleDeclaredMember, Vt as readbackVectorIndexes, W as reverseMapStreamPolicy, Wo as attemptedPolicyDocument, Wt as vectorIndexesShapeDetail, Wu as wireAttributeValue, X as canonicalizeStaleIndexDescription, Xc as toCfnInteger, Xr as recordedSgRuleId, Xt as planIndexContributorInsightsOps, Y as streamTagsMatchDeclared, Yc as isWarmThroughputDecrease, Yn as revertNestedChildFromJournal, Yr as cfnIngressPortValue, Yt as planContributorInsightsOp, Z as declaresIndexList, Zc as toFiniteNumber, Zo as WaitConditionSignalStore, Zt as readContributorInsightsSpec, _n as hasCdkAutoDeleteTag, _t as isPlainCapacityBlock, _u as refuseMalformedResourcesForDestroy, ac as s3BucketRegionalDomainName, an as deleteBudgetKey, at as coerceWarmThroughput, bc as outputReferenceProvenanceOf, bi as earliestDefined, bo as collectPrincipalsAttachingPolicy, bs as waitForGoneAfterDelete, bt as maskLeafValue, cf as displayAssemblyPath, cn as DELETE_INDEX_WAIT_PROCEED_NOTE, cs as getCurrentResourceSecrets, ct as isRefusedWarmThroughput, dd as findNestedTemplateTreeDefect, df as resolveAssemblyPath, dn as deleteTableWithIndexBusyRetry, dt as trimUnsentWarmMembers, ei as canonicalizeIpv4Cidr, el as maskedSecretSegment, en as stripIndexContributorInsights, er as withNestedStackContext, et as gsiUnsendableChangeRefusal, fd as isAbsoluteAssetPath, fi as calculateResourceDrift, fl as passedParameterClassesOf, fn as maskedLogger, ft as warmThroughputAlreadyMatches, gc as parseWebACLArn, gn as S3_AUTO_DELETE_OBJECTS_TAG, gt as hasUsableDeclaredCapacity, hn as ECR_AUTO_DELETE_IMAGES_TAG, ht as deleteTableRetryDelays, ic as s3BucketDualStackDomainName, in as compensateRemovedDeletionProtection, it as sameJsonValue, jt as recordTagWrite, ju as findSdkUnwiredProperties, ks as markWaitAbandoned, ld as stringifyValue, ln as INDEX_SETTLE_POLL_INTERVAL_MS, lt as readbackWarmThroughput, md as renderNestedTemplateTreeDefect, mn as waitForIndexesSettled, mt as KINESIS_DISABLE_PENDING_STATUSES, nc as s3BucketArn, nn as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, no as secretNamedAttributeNamesOf, nt as projectIndexesOnto, oc as s3BucketWebsiteUrl, on as resolveDynamoDbDeleteBudgetClock, ot as declaresWarmThroughput, pd as listNestedTemplateRows, pn as relayedIndexBusyDelete, pt as KINESIS_DESTINATION_SETTLE_POLL_MS, q as streamMemberRefusals, qr as withoutSiblingOwnedSgRules, qt as contributorInsightsRefusals, rc as s3BucketDomainName, rn as beginDeleteWait, rt as reverseMapSecondaryIndex, sf as describeFileReadFailure, sn as resolveDynamoDbDeleteBudgetMs, st as desiredBagIsInformative, su as refuseMalformedNestedChildOutputs, t as DeployEngine, tn as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, tt as localSecondaryIndexesKey, uf as renderAssemblyPathEscape, un as TABLE_INDEX_NOUN, ut as sentWarmThroughputMembers, vn as isTruthyCfnBoolean, vo as collectGroupsAddedBySiblings, vs as waitForLambdaFunctionActive, vt as isTableName, wi as acquireIdempotencyToken, wo as awaitInFlightSibling, wt as sseSpecificationToSend, xd as decodeListingKey, xo as isStoredExpression, xt as pointInTimeRecoveryRefusal, yo as collectManagedPolicyArnsAttachedBySiblings, yt as mapSSESpecification, z as STREAM_TAGS_KEY, zi as isRedactedRecordedValue, zo as policyDocumentMatchesDeclared, zt as sendTtlWaitingOutRateLimit } from "./deploy-engine-BOJDF7gp.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-CgUon9UO.js";
11
- import { G as timePhase, M as withRetry, _ as onlySecretReferencesDiffer, a as reDisableInstanceApiTermination, c as resolvedResourceTimeoutMs, f as markRefusedBeforeApplying, i as observeThenDisableInstanceApiTermination, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, r as isTerminationProtectionPropagationError, s as resolvedPerTypeResourceTimeoutMs, u as getPriorAttempts, v as unchangedBehindSecretReference } from "./ec2-termination-protection-BfnGV4MW.js";
12
- import { a as principalOwnWriteMembers, c as stringListMember, n as declaredStringList, o as settleOwnWriteMembers } from "./settle-own-write-members-ojoMzO_S.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, 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-BEAgEnYC.js";
5
+ import { $ as userPoolProtectionSite, A as RESOURCE_NOT_FOUND, B as quotedRemedyLogicalId, Bt as packCompositeId, C as createAttemptKey, Cn as injectiveKey, Ct as diffPrincipalNames, D as setBounded, E as replayedSendWindow, Et as readPrincipalLists, F as importRemedyCommand, Ft as canonicalizeRoute53QueryName, Gt as createMaskedRetryLogger, H as refusalTypeShown, Ht as segmentAfterAnchor, I as isPlainImportJson, It as compositeIdFormatMessage, J as deleteWithProtectionCompensation, Jt as maskerOrIdentity, K as markNotGone, Kt as isSecretDerivedValue, L as isPlainImportValue, Lt as compositeIdSeparatorRefusal, M as holderRefusalMask, N as holderRefusalRun, Nt as isInterruptedWaitError, O as withoutServerErrorRetries, Ot as recordedPrincipalsRepair, P as VALUE_NOT_SHOWN, Pt as startInterruptWatch, Qt as clearCreatedBeforeFailure, R as isQuotableImportValue, Rt as compositeIdSkipResult, S as ambiguousAttemptLead, Sn as withPasteableAwsProfile, St as SECRET_DERIVED_READ_LIVE, T as replayFollowedAmbiguousAttempt, Tt as onlySecretDerived, U as remedyLogicalId, Ut as stateOrphanRecordRemedy, V as readNameProperty, W as resolveExplicitPhysicalId, Wt as createMaskedLogSinks, X as observeThenDisableProtection, Y as logGroupProtectionSite, Yt as withDerivedNameMasks, Z as rdsFamilyProtectionSite, _ as retractCreatedResource, _t as pasteableAwsCommand, an as markCreatedBeforeFailure, b as CREATION_DATE_SKEW_MARGIN_MS, ct as protectionFlipKey, dt as ElapsedBudgetRegistry, et as PROTECTION_FLIP_RETRY_WAIT_MS, gt as isAwsCliLiteral, h as reportCreatedResource, ht as WITHHELD_AWS_COMMAND, in as markAuxiliaryFailure, it as isTerminalDbWaitStatus, j as assertRegionMatch, k as DriftReadRefusedError, l as removedTemplateKeys, mt as UNNAMEABLE_ID_CLAUSE, n as enclosingDeadlineRemainingMs, nn as isAuxiliaryFailure, o as clearOnUpdateRemoval, on as markSupersedesEarlierCreate, ot as ProtectionFlipRegistry, qt as maskDeep, rt as isProceedDbStatus, st as isTerminalDeleteFailure, t as enclosingDeadlineExpired, tt as deleteAfterProtectionFlipWithFinalSnapshot, u as withRemovalDefaults, ut as ElapsedBudget, v as AMBIGUOUS_LATCH_TTL_MS, vt as protectedReplacementAdvice, w as isInsideWindow, wn as injectiveKeyPrefix, wt as holdsSecretDerivedEntry, x as RecentIdSet, y as AmbiguousCreateLatch, yt as renderDisableCommand, z as normalizeAwsTagsToCfn, zt as logicalIdShown } from "./resource-deadline-DaeYacij.js";
6
+ import { A as displayStackName, L as truncateCodePoints, 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-5LxZZWe4.js";
7
+ import { Ct as RecordedIdentityMismatchError, Mt as identityTimestamp, Ot as recordedIdentityId, Rt as isoTimestampAttribute, St as RecordedIdentityError, _t as isPermissionDenial, bt as lookupEachName, gt as deniedIdentityReadRefusal, kt as slowCcOperationTimeoutMs, n as isRefusedByName, r as markDeleteStarted, vt as chunks, wt as assertRecordedIdentity, xt as withApiLimit, yt as isAccessDeniedError } from "./delete-started-BFRg37SF.js";
8
+ import { $ as effectiveInventoryItem, A as withRecordedCidrSpelling, B as LIFECYCLE_DEFAULT_STATUS, C as securityGroupReadbackDelays, D as stackIngressRuleHolder, E as singleSecurityGroupRuleId, F as clearLifecycleWritesOf, G as canonicalizeItemList, H as LIFECYCLE_RULE_PATH, I as lifecycleSettleTarget, J as lifecycleUsesFilterForm, K as effectiveLifecycleConfiguration, L as recordLifecycleWrite, M as sgRemovalRuleKey, N as sgRuleListMember, O as survivingRecordOfRuleId, P as LIFECYCLE_BASELINE_REREAD_DELAYS_MS, Q as effectiveIntelligentTieringItem, R as settleLifecycleRead, S as reconcileSgRules, T as sgRuleKey, U as LIFECYCLE_TAG_FILTERS_PATH, V as LIFECYCLE_FILTER_PATH, W as canonicalizeBlock, X as EVENTBRIDGE_CONFIG_PATH, Y as parseCfnTimestamp, Z as effectiveAnalyticsItem, _ as ingressRuleIdentity, a as refuseRevertRevokingSiblingRules, at as declaresBucketObjectLock, b as isResendableSocketFailure, c as siblingIdOwnedSgRules, ct as isPlainObject$6, d as authorizeDefinitelyNotApplied, dt as shownLifecycleRuleId, et as effectiveNotificationConfiguration, f as canonicalizeSgInlineRuleProtocols, g as flattenIpPermissions, h as descriptionKey, i as resolveSecretDerivedPrincipals, it as configItemId, j as markCopiesAgreed, k as tagListsMatch, l as SG_READBACK_RETRY_DELAY_MS, lt as manualBucketDeletionClause, m as comparableIngressIdentity, n as holdsUnprovenSecretPrincipalToken, nt as caughtErrorName, o as sgRuleDiffKey, ot as declaresNestedObjectLock, p as canonicalizeSgRuleProtocol, q as lifecycleRuleScope, r as isResolvableSecretPrincipalList, rt as coerceCfnNumber, s as readSgIngressById, st as describeValue$1, t as runDestroyForStack, tt as eventBridgeEnabledOf, u as SG_RULE_PAGE_SIZE, ut as mergeLegacySingular, v as isConnectTimeout, w as securityGroupRuleMatchesCfnIngress, x as narrowIngressIpProtocol, y as isDefaultEgressRule, z as takeLifecycleWrite } from "./program-o9TI0b9j.js";
9
+ import { $ as desiredIndexEntriesByName, $c as APPSYNC_APIKEY_ARN_RESOURCE_PATH, $i as getCurrentProducerRegions, $n as getCurrentNestedStackContext, $o as evaluateSignals, $r as canonicalizeIpv6Cidr, $t as reverseMapTableContributorInsights, Ao as KMS_DEFAULT_KEY_POLICY_ID, At as isDynamoDBTableArnIn, B as declaredStreamPolicyMember, Bi as redactedDeleteAddressFields, Bo as reReadUntilSettled, Bt as planVectorIndexUpdates, Co as withoutSiblingOwned, Ct as sseSpecificationRefusal, Cu as accountArgs, Dt as TAGS_BASELINE_REREAD_DELAYS_MS, Eo as getStackRecords, Es as withIndeterminateGuard, Et as tableNameReleaseWait, Fo as declaredPolicyDocument, Fs as isSettledInstanceState, Ft as isTtlAlreadyDisabled, Fu as withoutSdkUnwiredProperties, G as streamDeclaresPolicy, Go as policyContentKey, Gr as siblingOwnedSgRuleIdentities, Gt as CONTRIBUTOR_INSIGHTS_KEY, Gu as wireAttributeValue, H as planStreamMemberOps, Hc as isLegacyHandleId, Ho as warnUnsettledMember, Ht as vectorIndexesForCreate, Io as efsPolicyMatchesDeclared, Is as connectInstanceIdOf, It as isTtlRateLimited, J as streamPolicyMatchesDeclared, Jr as SG_RULE_ID_PATTERN, Jt as indexDeclaresContributorInsights, K as streamDeclaresTags, Kn as getNestedRevertRun, Kt as completeTableContributorInsightsBaseline, L as DynamoDBGlobalTableProvider, Ln as licensedNameHolder, Lo as lambdaPermissionMatchesDeclared, Lt as planTimeToLive, Ma as replacedDeleteFailureVerdict, Mn as childRowTags, Mo as OWN_WRITE_REREAD_DELAYS_MS, Mt as settleWrittenTags, Mu as findSdkUnwiredProperties, Nn as childStackTags, No as SNS_DEFAULT_POLICY_ID, Oc as getAccountInfo, Ot as clearTagWrites, Pd as rewriteTemplateAssetReferences, Po as declaredMemberDocument, Pt as takeTagWrite, Q as deletionProtectionRefusal, Qc as toFiniteNumber, Qo as classifyHandleUrl, Qr as sgProtocolKey, Qt as reverseMapIndexContributorInsights, R as STREAM_POLICY_KEY, Ri as REDACTED_DELETE_ADDRESS_SKIP_REASON, Ro as memberReadFailure, Rt as readTtlSpec, Sd as decodeListingKey, Si as reserveStackCreateToken, So as withoutSiblingAttachedArns, St as readCapacityNumber, Ts as deleteSkipReason, Tt as tableDeleteGoneWait, Uo as verbatimEchoDriftKeys, Ut as vectorIndexesSettled, Uu as normalizeRecordName, V as declaredStreamTagsMember, Vc as LEGACY_HANDLE_ID_PREFIX, Vi as redactedDeleteAddressSkip, Vo as settleDeclaredMember, Vt as readbackVectorIndexes, W as reverseMapStreamPolicy, Wo as attemptedPolicyDocument, Wt as vectorIndexesShapeDetail, Wu as planSubscriptionAttributes, X as canonicalizeStaleIndexDescription, Xc as isWarmThroughputDecrease, Xr as recordedSgRuleId, Xt as planIndexContributorInsightsOps, Y as streamTagsMatchDeclared, Yn as revertNestedChildFromJournal, Yr as cfnIngressPortValue, Yt as planContributorInsightsOp, Z as declaresIndexList, Zc as toCfnInteger, Zo as WaitConditionSignalStore, Zt as readContributorInsightsSpec, _c as parseWebACLArn, _n as hasCdkAutoDeleteTag, _t as isPlainCapacityBlock, ac as s3BucketDualStackDomainName, an as deleteBudgetKey, at as coerceWarmThroughput, bi as earliestDefined, bo as collectPrincipalsAttachingPolicy, bs as waitForGoneAfterDelete, bt as maskLeafValue, cf as describeFileReadFailure, cn as DELETE_INDEX_WAIT_PROCEED_NOTE, cs as getCurrentResourceSecrets, ct as isRefusedWarmThroughput, cu as refuseMalformedNestedChildOutputs, df as renderAssemblyPathEscape, dn as deleteTableWithIndexBusyRetry, dt as trimUnsentWarmMembers, ei as canonicalizeIpv4Cidr, en as stripIndexContributorInsights, er as withNestedStackContext, et as gsiUnsendableChangeRefusal, fd as findNestedTemplateTreeDefect, ff as resolveAssemblyPath, fi as calculateResourceDrift, fn as maskedLogger, ft as warmThroughputAlreadyMatches, gn as S3_AUTO_DELETE_OBJECTS_TAG, gt as hasUsableDeclaredCapacity, hd as renderNestedTemplateTreeDefect, hn as ECR_AUTO_DELETE_IMAGES_TAG, ht as deleteTableRetryDelays, ic as s3BucketDomainName, in as compensateRemovedDeletionProtection, it as sameJsonValue, jt as recordTagWrite, ks as markWaitAbandoned, lf as displayAssemblyPath, ln as INDEX_SETTLE_POLL_INTERVAL_MS, lt as readbackWarmThroughput, md as listNestedTemplateRows, mn as waitForIndexesSettled, mt as KINESIS_DISABLE_PENDING_STATUSES, nc as dnsEntryStrings, nn as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, no as secretNamedAttributeNamesOf, nt as projectIndexesOnto, oc as s3BucketRegionalDomainName, on as resolveDynamoDbDeleteBudgetClock, ot as declaresWarmThroughput, pd as isAbsoluteAssetPath, pl as passedParameterClassesOf, pn as relayedIndexBusyDelete, pt as KINESIS_DESTINATION_SETTLE_POLL_MS, q as streamMemberRefusals, qr as withoutSiblingOwnedSgRules, qt as contributorInsightsRefusals, rc as s3BucketArn, rn as beginDeleteWait, rt as reverseMapSecondaryIndex, sc as s3BucketWebsiteUrl, sn as resolveDynamoDbDeleteBudgetMs, st as desiredBagIsInformative, t as DeployEngine, tl as maskedSecretSegment, tn as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, tt as localSecondaryIndexesKey, ud as stringifyValue, un as TABLE_INDEX_NOUN, ut as sentWarmThroughputMembers, vn as isTruthyCfnBoolean, vo as collectGroupsAddedBySiblings, vs as waitForLambdaFunctionActive, vt as isTableName, vu as refuseMalformedResourcesForDestroy, wi as acquireIdempotencyToken, wo as awaitInFlightSibling, wt as sseSpecificationToSend, wu as withheldAccountClause, xc as outputReferenceProvenanceOf, xo as isStoredExpression, xt as pointInTimeRecoveryRefusal, yo as collectManagedPolicyArnsAttachedBySiblings, yt as mapSSESpecification, z as STREAM_TAGS_KEY, zi as isRedactedRecordedValue, zo as policyDocumentMatchesDeclared, zt as sendTtlWaitingOutRateLimit } from "./deploy-engine-DEH08Ipa.js";
10
+ import { S as throwIfReadinessAborted, _ as abortableSleep, 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, v as awaitDeferredResource, w as isUsableAttemptedName, x as deferReadiness } from "./restore-source-guard-VmeqbJUM.js";
11
+ import { G as timePhase, M as withRetry, _ as onlySecretReferencesDiffer, a as reDisableInstanceApiTermination, c as resolvedResourceTimeoutMs, f as markRefusedBeforeApplying, i as observeThenDisableInstanceApiTermination, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, r as isTerminationProtectionPropagationError, s as resolvedPerTypeResourceTimeoutMs, u as getPriorAttempts, v as unchangedBehindSecretReference } from "./ec2-termination-protection-C9-Ahvql.js";
12
+ import { a as principalOwnWriteMembers, c as stringListMember, n as declaredStringList, o as settleOwnWriteMembers } from "./settle-own-write-members-DzLGW7et.js";
13
13
  import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix } from "./aws-partition-DA0r2sr-.js";
14
14
  import { f as ambientRegion, r as awsEndpointOverrideActive } from "./aws-client-defaults-DAebi99J.js";
15
- import { $ as snapshotPassProvenance, C as passedNoEchoParametersOf, Ft as dynamicReferenceTokens, I as markSameGenerationBag, W as redactForState, Z as recordReferenceProvenanceEntry, _n as carriesSecretMask, a as emrClusterInstancesReplaced, c as parseLambdaFunctionAddress, cn as recoverMaskedOutput, i as ecsServiceLaunchTypeSetOrChanged, it as hasMaskableValues, jt as withoutPhysicalNameCopies, l as sameLambdaFunctionAddress, ln as physicalNameCopiesOf, n as blockDeviceMappingsDifferOnlyInDeleteOnTermination, o as canonicalLambdaFunctionName, s as lambdaFunctionNameForMask, un as recordAttributeIdCopy } from "./replacement-rules-B4u0_NZA.js";
16
- import { RDSProvider } from "./rds-provider-cQkTDV8C.js";
17
- import { NeptuneProvider } from "./neptune-provider-rlCSoeoP.js";
18
- import { ASGProvider } from "./asg-provider-CNRVBqWX.js";
15
+ import { $ as snapshotPassProvenance, C as passedNoEchoParametersOf, Ft as dynamicReferenceTokens, I as markSameGenerationBag, W as redactForState, Z as recordReferenceProvenanceEntry, _n as carriesSecretMask, a as emrClusterInstancesReplaced, c as parseLambdaFunctionAddress, cn as recoverMaskedOutput, i as ecsServiceLaunchTypeSetOrChanged, it as hasMaskableValues, jt as withoutPhysicalNameCopies, l as sameLambdaFunctionAddress, ln as physicalNameCopiesOf, n as blockDeviceMappingsDifferOnlyInDeleteOnTermination, o as canonicalLambdaFunctionName, s as lambdaFunctionNameForMask, un as recordAttributeIdCopy } from "./replacement-rules-CV85H47l.js";
16
+ import { RDSProvider } from "./rds-provider-DxQ515q8.js";
17
+ import { NeptuneProvider } from "./neptune-provider-CTAXvQQO.js";
18
+ import { ASGProvider } from "./asg-provider-cjMb8o1I.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, DeleteConflictException, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetLoginProfileCommand, 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";
@@ -23,7 +23,7 @@ import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQ
23
23
  import { AuthorizationErrorException, CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetSubscriptionAttributesCommand, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
24
24
  import { AddPermissionCommand, CodeSigningConfigNotFoundException, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCodeSigningConfigCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCodeSigningConfigCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionConfigurationCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionScalingConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, GetRuntimeManagementConfigCommand, LambdaClient, ListEventSourceMappingsCommand, ListLayerVersionsCommand, ListTagsCommand, PublishLayerVersionCommand, PublishVersionCommand, PutFunctionCodeSigningConfigCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, PutFunctionScalingConfigCommand, PutRuntimeManagementConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
25
25
  import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
26
- import { AllocateAddressCommand, AssociateAddressCommand, AssociateIamInstanceProfileCommand, AssociateNatGatewayAddressCommand, AssociateRouteTableCommand, AssociateSubnetCidrBlockCommand, AttachInternetGatewayCommand, AttachVolumeCommand, AttachVpnGatewayCommand, AuthorizeSecurityGroupEgressCommand, AuthorizeSecurityGroupIngressCommand, CreateInternetGatewayCommand, CreateNatGatewayCommand, CreateNetworkAclCommand, CreateNetworkAclEntryCommand, CreateRouteCommand, CreateRouteTableCommand, CreateSecurityGroupCommand, CreateSubnetCommand, CreateTagsCommand, CreateVpcCommand, DeleteInternetGatewayCommand, DeleteNatGatewayCommand, DeleteNetworkAclCommand, DeleteNetworkAclEntryCommand, DeleteNetworkInterfaceCommand, DeleteRouteCommand, DeleteRouteTableCommand, DeleteSecurityGroupCommand, DeleteSubnetCommand, DeleteTagsCommand, DeleteVpcCommand, DescribeAddressesCommand, DescribeAvailabilityZonesCommand, DescribeIamInstanceProfileAssociationsCommand, DescribeInstanceAttributeCommand, DescribeInstanceCreditSpecificationsCommand, DescribeInstancesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand, DescribeNetworkAclsCommand, DescribeNetworkInterfacesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupRulesCommand, DescribeSecurityGroupsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcAttributeCommand, DescribeVpcsCommand, DescribeVpnGatewaysCommand, DetachInternetGatewayCommand, DetachVolumeCommand, DetachVpnGatewayCommand, DisassociateAddressCommand, DisassociateIamInstanceProfileCommand, DisassociateNatGatewayAddressCommand, DisassociateRouteTableCommand, DisassociateSubnetCidrBlockCommand, EC2Client, GetIpamPoolAllocationsCommand, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifyInstancePlacementCommand, ModifyPrivateDnsNameOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, ModifyVpcTenancyCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceIamInstanceProfileAssociationCommand, ReplaceNetworkAclAssociationCommand, ReplaceNetworkAclEntryCommand, ReplaceRouteCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, StartInstancesCommand, StopInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, UpdateSecurityGroupRuleDescriptionsEgressCommand, UpdateSecurityGroupRuleDescriptionsIngressCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
26
+ import { AllocateAddressCommand, AssociateAddressCommand, AssociateIamInstanceProfileCommand, AssociateNatGatewayAddressCommand, AssociateRouteTableCommand, AssociateSubnetCidrBlockCommand, AttachInternetGatewayCommand, AttachVolumeCommand, AttachVpnGatewayCommand, AuthorizeSecurityGroupEgressCommand, AuthorizeSecurityGroupIngressCommand, CreateInternetGatewayCommand, CreateNatGatewayCommand, CreateNetworkAclCommand, CreateNetworkAclEntryCommand, CreateRouteCommand, CreateRouteTableCommand, CreateSecurityGroupCommand, CreateSubnetCommand, CreateTagsCommand, CreateVpcCommand, CreateVpcEndpointCommand, DeleteInternetGatewayCommand, DeleteNatGatewayCommand, DeleteNetworkAclCommand, DeleteNetworkAclEntryCommand, DeleteNetworkInterfaceCommand, DeleteRouteCommand, DeleteRouteTableCommand, DeleteSecurityGroupCommand, DeleteSubnetCommand, DeleteTagsCommand, DeleteVpcCommand, DeleteVpcEndpointsCommand, DescribeAddressesCommand, DescribeAvailabilityZonesCommand, DescribeIamInstanceProfileAssociationsCommand, DescribeInstanceAttributeCommand, DescribeInstanceCreditSpecificationsCommand, DescribeInstancesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand, DescribeNetworkAclsCommand, DescribeNetworkInterfacesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupRulesCommand, DescribeSecurityGroupsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcAttributeCommand, DescribeVpcEndpointsCommand, DescribeVpcsCommand, DescribeVpnGatewaysCommand, DetachInternetGatewayCommand, DetachVolumeCommand, DetachVpnGatewayCommand, DisassociateAddressCommand, DisassociateIamInstanceProfileCommand, DisassociateNatGatewayAddressCommand, DisassociateRouteTableCommand, DisassociateSubnetCidrBlockCommand, EC2Client, GetIpamPoolAllocationsCommand, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifyInstancePlacementCommand, ModifyPrivateDnsNameOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, ModifyVpcEndpointCommand, ModifyVpcTenancyCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceIamInstanceProfileAssociationCommand, ReplaceNetworkAclAssociationCommand, ReplaceNetworkAclEntryCommand, ReplaceRouteCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, StartInstancesCommand, StopInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, UpdateSecurityGroupRuleDescriptionsEgressCommand, UpdateSecurityGroupRuleDescriptionsIngressCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
27
27
  import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PolicyNotFoundException, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TableNotFoundException, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateKinesisStreamingDestinationCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
28
28
  import { APIGatewayClient, CreateAuthorizerCommand, CreateDeploymentCommand, CreateResourceCommand, CreateRestApiCommand, CreateStageCommand, DeleteAuthorizerCommand, DeleteDeploymentCommand, DeleteIntegrationCommand, DeleteIntegrationResponseCommand, DeleteMethodCommand, DeleteMethodResponseCommand, DeleteResourceCommand, DeleteRestApiCommand, DeleteStageCommand, GetAccountCommand, GetAuthorizerCommand, GetAuthorizersCommand, GetDeploymentCommand, GetDeploymentsCommand, GetMethodCommand, GetResourceCommand, GetRestApiCommand, GetRestApisCommand, GetStageCommand, ImportRestApiCommand, NotFoundException as NotFoundException$1, PutIntegrationCommand, PutIntegrationResponseCommand, PutMethodCommand, PutMethodResponseCommand, PutRestApiCommand, TagResourceCommand as TagResourceCommand$3, UntagResourceCommand as UntagResourceCommand$3, UpdateAccountCommand, UpdateAuthorizerCommand, UpdateDeploymentCommand, UpdateMethodCommand, UpdateRestApiCommand, UpdateStageCommand } from "@aws-sdk/client-api-gateway";
29
29
  import { CreateArchiveCommand, CreateEventBusCommand, DeleteArchiveCommand, DeleteEventBusCommand, DeleteRuleCommand, DescribeArchiveCommand, DescribeEventBusCommand, DescribeRuleCommand, EventBridgeClient, ListRulesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$1, ListTargetsByRuleCommand, PutPermissionCommand, PutRuleCommand, PutTargetsCommand, RemoveTargetsCommand, ResourceNotFoundException as ResourceNotFoundException$2, TagResourceCommand as TagResourceCommand$4, UntagResourceCommand as UntagResourceCommand$4, UpdateArchiveCommand, UpdateEventBusCommand } from "@aws-sdk/client-eventbridge";
@@ -12948,7 +12948,10 @@ var LambdaMicrovmImageProvider = class {
12948
12948
  updatedAt: response.updatedAt
12949
12949
  };
12950
12950
  if (!noWait) latest = await this.waitForTerminalState(imageArn, logicalId, "create");
12951
- else this.logger.warn(`Skipping wait for MicroVM image ${logicalId} (CDKD_NO_WAIT=true). The build continues asynchronously; a CREATE_FAILED will not be observed here.`);
12951
+ else {
12952
+ this.logger.warn(`Skipping wait for MicroVM image ${logicalId} (CDKD_NO_WAIT=true). The build continues asynchronously; a CREATE_FAILED will not be observed here.`);
12953
+ deferReadiness(logicalId, resourceType, imageArn, (signal) => this.waitForTerminalState(imageArn, logicalId, "create", signal));
12954
+ }
12952
12955
  return {
12953
12956
  physicalId: imageArn,
12954
12957
  attributes: this.buildAttributes(imageArn, latest.state, {
@@ -13005,7 +13008,10 @@ var LambdaMicrovmImageProvider = class {
13005
13008
  const noWait = process.env["CDKD_NO_WAIT"] === "true";
13006
13009
  let latest;
13007
13010
  if (!noWait) latest = await this.waitForTerminalState(physicalId, logicalId, "update");
13008
- else this.logger.warn(`Skipping wait for MicroVM image ${logicalId} update (CDKD_NO_WAIT=true). The rebuild continues asynchronously.`);
13011
+ else {
13012
+ this.logger.warn(`Skipping wait for MicroVM image ${logicalId} update (CDKD_NO_WAIT=true). The rebuild continues asynchronously.`);
13013
+ deferReadiness(logicalId, resourceType, physicalId, (signal) => this.waitForTerminalState(physicalId, logicalId, "update", signal));
13014
+ }
13009
13015
  return {
13010
13016
  physicalId,
13011
13017
  wasReplaced: false,
@@ -13099,9 +13105,10 @@ var LambdaMicrovmImageProvider = class {
13099
13105
  if (extra.updatedAt !== void 0) attributes["UpdatedAt"] = extra.updatedAt.toISOString();
13100
13106
  return attributes;
13101
13107
  }
13102
- async waitForTerminalState(imageArn, logicalId, operation) {
13108
+ async waitForTerminalState(imageArn, logicalId, operation, signal) {
13103
13109
  this.logger.debug(`Waiting for MicroVM image ${imageArn} to finish ${operation}...`);
13104
13110
  for (let attempt = 1; attempt <= this.maxPollAttempts; attempt++) {
13111
+ throwIfReadinessAborted(signal);
13105
13112
  const resp = await this.client.send(new GetMicrovmImageCommand({ imageIdentifier: imageArn }));
13106
13113
  const state = resp.state;
13107
13114
  if (state === "CREATED" || state === "UPDATED") {
@@ -13110,7 +13117,7 @@ var LambdaMicrovmImageProvider = class {
13110
13117
  }
13111
13118
  if (state === "CREATE_FAILED" || state === "UPDATE_FAILED") throw new Error(`MicroVM image ${logicalId} (${imageArn}) entered ${state} during ${operation}. Check the build logs in CloudWatch under /aws/lambda/microvms/ to diagnose.`);
13112
13119
  this.logger.debug(`MicroVM image ${imageArn} state: ${state} (attempt ${attempt}/${this.maxPollAttempts})`);
13113
- await sleep$5(this.pollIntervalMs);
13120
+ await abortableSleep(sleep$5, this.pollIntervalMs, signal);
13114
13121
  }
13115
13122
  throw new Error(`MicroVM image ${logicalIdShown(logicalId)} ${isPlainImportValue(imageArn) ? `(${imageArn})` : VALUE_NOT_SHOWN} did not finish ${operation} within ${this.maxPollAttempts * this.pollIntervalMs / 1e3}s. Increase --resource-timeout AWS::Lambda::MicrovmImage=${commandHole("duration")} or set CDKD_NO_WAIT=true.`);
13116
13123
  }
@@ -20638,8 +20645,8 @@ function sortKeys(value) {
20638
20645
  const record = value;
20639
20646
  return Object.fromEntries(Object.keys(record).sort().map((key) => [key, sortKeys(record[key])]));
20640
20647
  }
20641
- const SETTLED_STATES$1 = /* @__PURE__ */ new Set(["ENABLED", "DISABLED"]);
20642
- const FAILED_STATES$2 = /* @__PURE__ */ new Set(["CREATE_FAILED", "UPDATE_FAILED"]);
20648
+ const SETTLED_STATES$2 = /* @__PURE__ */ new Set(["ENABLED", "DISABLED"]);
20649
+ const FAILED_STATES$3 = /* @__PURE__ */ new Set(["CREATE_FAILED", "UPDATE_FAILED"]);
20643
20650
  var EventBridgeArchiveProvider = class {
20644
20651
  eventBridgeClient;
20645
20652
  logger = getLogger().child("EventBridgeArchiveProvider");
@@ -20711,7 +20718,7 @@ var EventBridgeArchiveProvider = class {
20711
20718
  created = true;
20712
20719
  reportCreatedResource(logicalId, resourceType, name);
20713
20720
  let arn = response.ArchiveArn;
20714
- if (!SETTLED_STATES$1.has(response.State ?? "ENABLED")) arn = await this.waitForSettled(name, logicalId, "create", mask) ?? arn;
20721
+ if (!SETTLED_STATES$2.has(response.State ?? "ENABLED")) arn = await this.waitForSettled(name, logicalId, "create", mask) ?? arn;
20715
20722
  return {
20716
20723
  physicalId: name,
20717
20724
  attributes: definedAttributes({ Arn: arn })
@@ -20743,9 +20750,14 @@ var EventBridgeArchiveProvider = class {
20743
20750
  async waitForSettled(name, logicalId, operation, mask) {
20744
20751
  if (process.env["CDKD_NO_WAIT"] === "true") {
20745
20752
  this.logger.debug(mask(`Skipping the ${operation} wait for EventBridge archive ${logicalId} (CDKD_NO_WAIT=true)`));
20753
+ deferReadiness(logicalId, RESOURCE_TYPE$1, name, (signal) => this.pollUntilSettled(name, logicalId, operation, mask, signal));
20746
20754
  return;
20747
20755
  }
20748
- const { pollIntervalMs, sleep } = this.stateWait;
20756
+ return this.pollUntilSettled(name, logicalId, operation, mask);
20757
+ }
20758
+ async pollUntilSettled(name, logicalId, operation, mask, signal) {
20759
+ const { pollIntervalMs } = this.stateWait;
20760
+ const sleep = (ms) => abortableSleep(this.stateWait.sleep, ms, signal);
20749
20761
  const userTimeoutMs = resolvedResourceTimeoutMs(RESOURCE_TYPE$1);
20750
20762
  const timeoutMs = userTimeoutMs === void 0 ? this.stateWait.timeoutMs : Math.min(this.stateWait.timeoutMs, userTimeoutMs / 2);
20751
20763
  const deadline = Date.now() + timeoutMs;
@@ -20764,8 +20776,8 @@ var EventBridgeArchiveProvider = class {
20764
20776
  continue;
20765
20777
  }
20766
20778
  const state = resp.State;
20767
- if (state === void 0 || SETTLED_STATES$1.has(state)) return resp.ArchiveArn;
20768
- if (FAILED_STATES$2.has(state)) {
20779
+ if (state === void 0 || SETTLED_STATES$2.has(state)) return resp.ArchiveArn;
20780
+ if (FAILED_STATES$3.has(state)) {
20769
20781
  if (resp.StateReason) this.logger.debug(mask(`EventBridge archive ${logicalId} entered ${state}: ${resp.StateReason}`));
20770
20782
  throw markNonRetryable(new ProvisioningError(safeMsg`EventBridge archive ${logicalId} entered ${state}.` + verbosePointerTail(), RESOURCE_TYPE$1, logicalId, name));
20771
20783
  }
@@ -20810,7 +20822,7 @@ var EventBridgeArchiveProvider = class {
20810
20822
  if (properties["KmsKeyIdentifier"] !== void 0 && properties["KmsKeyIdentifier"] !== null) input.KmsKeyIdentifier = properties["KmsKeyIdentifier"];
20811
20823
  const response = await this.eventBridgeClient.send(new UpdateArchiveCommand(input));
20812
20824
  let arn = response.ArchiveArn;
20813
- if (!SETTLED_STATES$1.has(response.State ?? "ENABLED")) arn = await this.waitForSettled(physicalId, logicalId, "update", mask) ?? arn;
20825
+ if (!SETTLED_STATES$2.has(response.State ?? "ENABLED")) arn = await this.waitForSettled(physicalId, logicalId, "update", mask) ?? arn;
20814
20826
  return {
20815
20827
  physicalId,
20816
20828
  wasReplaced: false,
@@ -21044,8 +21056,10 @@ var ConnectInstanceProvider = class {
21044
21056
  let instance = await this.waitForInstance(instanceId, logicalId, mustSettle ? "settled" : "ready", deadline, mask);
21045
21057
  for (const [key, flag] of written) await this.updateAttribute(instanceId, key, flag, deadline, logicalId, mask);
21046
21058
  const noWait = process.env["CDKD_NO_WAIT"] === "true";
21047
- if (noWait) this.logger.debug(mask(`Skipping the ACTIVE wait for Connect instance ${logicalId} (CDKD_NO_WAIT=true)`));
21048
- else {
21059
+ if (noWait) {
21060
+ this.logger.debug(mask(`Skipping the ACTIVE wait for Connect instance ${logicalId} (CDKD_NO_WAIT=true)`));
21061
+ deferReadiness(logicalId, resourceType, arn, (signal) => this.waitForInstance(instanceId, logicalId, "active", this.deadline(), mask, signal));
21062
+ } else {
21049
21063
  instance = await this.waitForInstance(instanceId, logicalId, "active", deadline, mask);
21050
21064
  if (written.length > 0) {
21051
21065
  const live = attributesFromList(await this.listAttributes(instanceId));
@@ -21145,8 +21159,9 @@ var ConnectInstanceProvider = class {
21145
21159
  return markCreatedBeforeFailure(thrown, logicalId, resourceType, arn);
21146
21160
  }
21147
21161
  }
21148
- async waitForInstance(instanceId, logicalId, until, deadline, mask) {
21149
- const { pollIntervalMs, sleep } = this.instanceWait;
21162
+ async waitForInstance(instanceId, logicalId, until, deadline, mask, signal) {
21163
+ const { pollIntervalMs } = this.instanceWait;
21164
+ const sleep = (ms) => abortableSleep(this.instanceWait.sleep, ms, signal);
21150
21165
  const watch = startInterruptWatch(`Connect instance ${logicalId} ${until} wait`);
21151
21166
  let instance;
21152
21167
  try {
@@ -22855,7 +22870,13 @@ async function createEip(logicalId, resourceType, properties, context) {
22855
22870
  if (!tagsApplied) await this.applyTags(allocationId, desiredTags, logicalId, maskerOrIdentity(context?.maskSecrets));
22856
22871
  const instanceId = properties["InstanceId"];
22857
22872
  if (instanceId) {
22858
- if (process.env["CDKD_NO_WAIT"] === "true") this.logger.warn(`EIP ${logicalId} (${allocationId}) was NOT associated with ${displayIdent(instanceId)}: --no-wait skips the instance running-state wait, and AssociateAddress rejects an instance that is not yet running. Verify and associate once the instance is running: ${pasteableAwsCommand(context?.maskSecrets)`aws ec2 describe-instances --instance-ids ${instanceId} --query 'Reservations[].Instances[].State.Name' && aws ec2 associate-address --allocation-id ${allocationId} --instance-id ${instanceId}`.render()}`);
22873
+ let associate = true;
22874
+ if (process.env["CDKD_NO_WAIT"] === "true") {
22875
+ const ready = awaitDeferredResource(logicalId, resourceType, instanceId, `Elastic IP ${logicalId} is associated with it, which AWS refuses until it is running`);
22876
+ if (ready !== void 0) await ready;
22877
+ else associate = false;
22878
+ }
22879
+ if (!associate) this.logger.warn(`EIP ${logicalId} (${allocationId}) was NOT associated with ${displayIdent(instanceId)}: --no-wait skips the instance running-state wait, and AssociateAddress rejects an instance that is not yet running. Verify and associate once the instance is running: ${pasteableAwsCommand(context?.maskSecrets)`aws ec2 describe-instances --instance-ids ${instanceId} --query 'Reservations[].Instances[].State.Name' && aws ec2 associate-address --allocation-id ${allocationId} --instance-id ${instanceId}`.render()}`);
22859
22880
  else {
22860
22881
  await this.ec2Client.send(new AssociateAddressCommand({
22861
22882
  AllocationId: allocationId,
@@ -22916,17 +22937,22 @@ async function updateEip(logicalId, physicalId, resourceType, properties, previo
22916
22937
  const oldInstanceId = previousProperties["InstanceId"];
22917
22938
  const newInstanceId = properties["InstanceId"];
22918
22939
  if (oldInstanceId !== newInstanceId) {
22919
- if (newInstanceId) try {
22920
- await this.ec2Client.send(new AssociateAddressCommand({
22921
- AllocationId: allocationId,
22922
- InstanceId: newInstanceId,
22923
- AllowReassociation: true
22924
- }));
22925
- } catch (error) {
22926
- if (process.env["CDKD_NO_WAIT"] === "true" && this.isIncorrectInstanceStateError(error)) this.logger.warn(`EIP ${logicalId} (${displayIdent(allocationId)}) was NOT associated with ${displayIdent(newInstanceId)}: --no-wait skips the instance running-state wait, and AssociateAddress rejects an instance that is not yet running. Verify and associate once the instance is running: ${pasteableAwsCommand()`aws ec2 describe-instances --instance-ids ${newInstanceId} --query 'Reservations[].Instances[].State.Name' && aws ec2 associate-address --allocation-id ${allocationId} --instance-id ${newInstanceId} --allow-reassociation`.render()}`);
22927
- else throw error;
22928
- }
22929
- else {
22940
+ if (newInstanceId) {
22941
+ if (process.env["CDKD_NO_WAIT"] === "true") {
22942
+ const ready = awaitDeferredResource(logicalId, resourceType, newInstanceId, `Elastic IP ${logicalId} is associated with it, which AWS refuses until it is running`);
22943
+ if (ready !== void 0) await ready;
22944
+ }
22945
+ try {
22946
+ await this.ec2Client.send(new AssociateAddressCommand({
22947
+ AllocationId: allocationId,
22948
+ InstanceId: newInstanceId,
22949
+ AllowReassociation: true
22950
+ }));
22951
+ } catch (error) {
22952
+ if (process.env["CDKD_NO_WAIT"] === "true" && this.isIncorrectInstanceStateError(error)) this.logger.warn(`EIP ${logicalId} (${displayIdent(allocationId)}) was NOT associated with ${displayIdent(newInstanceId)}: --no-wait skips the instance running-state wait, and AssociateAddress rejects an instance that is not yet running. Verify and associate once the instance is running: ${pasteableAwsCommand()`aws ec2 describe-instances --instance-ids ${newInstanceId} --query 'Reservations[].Instances[].State.Name' && aws ec2 associate-address --allocation-id ${allocationId} --instance-id ${newInstanceId} --allow-reassociation`.render()}`);
22953
+ else throw error;
22954
+ }
22955
+ } else {
22930
22956
  const associationId = (await this.ec2Client.send(new DescribeAddressesCommand({ AllocationIds: [allocationId] }))).Addresses?.[0]?.AssociationId;
22931
22957
  if (associationId) await this.ec2Client.send(new DisassociateAddressCommand({ AssociationId: associationId }));
22932
22958
  }
@@ -23480,7 +23506,16 @@ async function createNatGateway(logicalId, resourceType, properties, context) {
23480
23506
  maxDelay: 10
23481
23507
  }, { NatGatewayIds: [natGatewayId] })).reason?.NatGateways?.find((g) => g.NatGatewayId === natGatewayId);
23482
23508
  this.logger.debug(`NatGateway ${natGatewayId} is available`);
23483
- } else this.logger.debug(`NatGateway ${natGatewayId} created (skipping available-state wait per --no-wait)`);
23509
+ } else {
23510
+ this.logger.debug(`NatGateway ${natGatewayId} created (skipping available-state wait per --no-wait)`);
23511
+ deferReadiness(logicalId, resourceType, natGatewayId, (signal) => waitUntilNatGatewayAvailable({
23512
+ client: this.ec2Client,
23513
+ maxWaitTime: 900,
23514
+ minDelay: 5,
23515
+ maxDelay: 10,
23516
+ abortSignal: signal
23517
+ }, { NatGatewayIds: [natGatewayId] }));
23518
+ }
23484
23519
  this.logger.debug(`Successfully created NatGateway ${logicalId}: ${natGatewayId}`);
23485
23520
  natGatewayToken.release();
23486
23521
  return {
@@ -24974,7 +25009,16 @@ async function createInstance(logicalId, resourceType, properties, context) {
24974
25009
  minDelay: 2,
24975
25010
  maxDelay: 5
24976
25011
  }, { InstanceIds: [instanceId] });
24977
- } else this.logger.debug(`Instance ${instanceId} launched (skipping running-state wait per --no-wait)`);
25012
+ } else {
25013
+ this.logger.debug(`Instance ${instanceId} launched (skipping running-state wait per --no-wait)`);
25014
+ deferReadiness(logicalId, resourceType, instanceId, (signal) => waitUntilInstanceRunning({
25015
+ client: this.ec2Client,
25016
+ maxWaitTime: 300,
25017
+ minDelay: 2,
25018
+ maxDelay: 5,
25019
+ abortSignal: signal
25020
+ }, { InstanceIds: [instanceId] }));
25021
+ }
24978
25022
  if (iamInstanceProfile) {
24979
25023
  if (!waitsForRunning) {
24980
25024
  const aws = pasteableAwsCommand(context?.maskSecrets);
@@ -25587,6 +25631,10 @@ async function applyInstanceMemberUpdates(logicalId, physicalId, resourceType, p
25587
25631
  instancesLeftStoppedByCdkd.delete(physicalId);
25588
25632
  if (process.env["CDKD_NO_WAIT"] === "true") {
25589
25633
  this.logger.debug(safeMsg`Instance ${physicalId} started (skipping running-state wait per --no-wait)`);
25634
+ deferReadiness(logicalId, resourceType, physicalId, (signal) => this.waitForInstanceState(logicalId, physicalId, resourceType, "running", {
25635
+ stoppedIsTerminal: true,
25636
+ signal
25637
+ }));
25590
25638
  return;
25591
25639
  }
25592
25640
  phase = "wait";
@@ -25635,6 +25683,7 @@ async function waitForInstanceState(logicalId, physicalId, resourceType, target,
25635
25683
  try {
25636
25684
  for (;;) {
25637
25685
  if (watch.isInterrupted()) throw watch.onInterrupted();
25686
+ throwIfReadinessAborted(opts.signal);
25638
25687
  if (Math.min(enclosingDeadlineRemainingMs(), capAt - Date.now()) <= 0) throw markNonRetryable(new ProvisioningError(`${logicalId} (${resourceType}): timed out waiting for instance ${physicalId} to be ${target} (last state: ${last ?? "none reported"})`, resourceType, logicalId, physicalId));
25639
25688
  const previous = last;
25640
25689
  last = await this.readInstanceState(physicalId);
@@ -25647,7 +25696,7 @@ async function waitForInstanceState(logicalId, physicalId, resourceType, target,
25647
25696
  }
25648
25697
  if (last === "terminated" || last === "shutting-down" || last === void 0) throw markNonRetryable(new ProvisioningError(`${logicalId} (${resourceType}): instance ${physicalId} is ${last ?? "no longer returned by DescribeInstances"} while cdkd waited for it to be ${target}`, resourceType, logicalId, physicalId));
25649
25698
  if (watch.isInterrupted()) throw watch.onInterrupted();
25650
- await this.sleep(Math.max(0, Math.min(INSTANCE_STATE_POLL_MS, enclosingDeadlineRemainingMs())));
25699
+ await abortableSleep((ms) => this.sleep(ms), Math.max(0, Math.min(INSTANCE_STATE_POLL_MS, enclosingDeadlineRemainingMs())), opts.signal);
25651
25700
  }
25652
25701
  } finally {
25653
25702
  watch.dispose();
@@ -27984,6 +28033,548 @@ for (const methods of [
27984
28033
  enumerable: false
27985
28034
  });
27986
28035
 
28036
+ // src/provisioning/providers/ec2-vpc-endpoint/shape.ts
28037
+ const VPC_ENDPOINT_TYPE = "AWS::EC2::VPCEndpoint";
28038
+ const VPC_ENDPOINT_NOT_FOUND_NAMES = /* @__PURE__ */ new Set(["InvalidVpcEndpointId.NotFound", "InvalidVpcEndpoint.NotFound"]);
28039
+ const VPC_ENDPOINT_CREATE_ONLY = [
28040
+ "VpcId",
28041
+ "ServiceName",
28042
+ "VpcEndpointType",
28043
+ "ServiceNetworkArn",
28044
+ "ResourceConfigurationArn",
28045
+ "ServiceRegion"
28046
+ ];
28047
+ const VPC_ENDPOINT_CREATE_ONLY_NESTED = [["DnsOptions", "PrivateDnsPreference"], ["DnsOptions", "PrivateDnsSpecifiedDomains"]];
28048
+ function createOnlyValue(properties, key) {
28049
+ const value = properties[key] ?? null;
28050
+ return key === "VpcEndpointType" && value === null ? "Gateway" : value;
28051
+ }
28052
+ function createOnlyChange(properties, previousProperties) {
28053
+ for (const key of VPC_ENDPOINT_CREATE_ONLY) if (JSON.stringify(createOnlyValue(properties, key)) !== JSON.stringify(createOnlyValue(previousProperties, key))) return key;
28054
+ const member = (bag, top, key) => {
28055
+ const block = bag[top];
28056
+ return block !== null && typeof block === "object" && !Array.isArray(block) ? block[key] ?? null : null;
28057
+ };
28058
+ for (const [top, key] of VPC_ENDPOINT_CREATE_ONLY_NESTED) if (JSON.stringify(member(properties, top, key)) !== JSON.stringify(member(previousProperties, top, key))) return `${top}.${key}`;
28059
+ }
28060
+ const SETTLED_STATES$1 = /* @__PURE__ */ new Set(["available", "pendingacceptance"]);
28061
+ const FAILED_STATES$2 = /* @__PURE__ */ new Set([
28062
+ "failed",
28063
+ "rejected",
28064
+ "expired",
28065
+ "partial",
28066
+ "deleting",
28067
+ "deleted"
28068
+ ]);
28069
+ function endpointState(endpoint) {
28070
+ const state = endpoint?.State;
28071
+ return typeof state === "string" ? state.toLowerCase() : void 0;
28072
+ }
28073
+ function endpointWaitVerdict(endpoint) {
28074
+ const state = endpointState(endpoint);
28075
+ if (state !== void 0 && SETTLED_STATES$1.has(state)) return "settled";
28076
+ if (state !== void 0 && FAILED_STATES$2.has(state)) return "failed";
28077
+ return "pending";
28078
+ }
28079
+ function readIdList(value) {
28080
+ if (value === void 0 || value === null) return { kind: "absent" };
28081
+ if (!Array.isArray(value) || !value.every((v) => typeof v === "string" && v !== "")) return { kind: "malformed" };
28082
+ return {
28083
+ kind: "usable",
28084
+ ids: [...new Set(value)]
28085
+ };
28086
+ }
28087
+ function readPolicyDocument(value) {
28088
+ if (value === void 0 || value === null) return { kind: "absent" };
28089
+ if (typeof value === "string") return value === "" ? { kind: "malformed" } : {
28090
+ kind: "usable",
28091
+ text: value
28092
+ };
28093
+ if (typeof value === "object" && !Array.isArray(value)) return {
28094
+ kind: "usable",
28095
+ text: JSON.stringify(value)
28096
+ };
28097
+ return { kind: "malformed" };
28098
+ }
28099
+ function readBoolean(value) {
28100
+ if (value === void 0 || value === null) return { kind: "absent" };
28101
+ const flag = coerceCfnBoolean(value);
28102
+ return flag === void 0 ? { kind: "malformed" } : {
28103
+ kind: "usable",
28104
+ value: flag
28105
+ };
28106
+ }
28107
+ const INBOUND_RESOLVER_TO_SDK = {
28108
+ OnlyInboundResolver: true,
28109
+ AllResolvers: false,
28110
+ NotSpecified: void 0
28111
+ };
28112
+ const DNS_OPTIONS_MEMBERS = /* @__PURE__ */ new Set([
28113
+ "DnsRecordIpType",
28114
+ "PrivateDnsOnlyForInboundResolverEndpoint",
28115
+ "PrivateDnsPreference",
28116
+ "PrivateDnsSpecifiedDomains"
28117
+ ]);
28118
+ function readDnsOptions(value) {
28119
+ if (value === void 0 || value === null) return { kind: "absent" };
28120
+ if (typeof value !== "object" || Array.isArray(value)) return {
28121
+ kind: "malformed",
28122
+ reason: "must be an object"
28123
+ };
28124
+ const block = value;
28125
+ const unknown = Object.keys(block).filter((k) => !DNS_OPTIONS_MEMBERS.has(k));
28126
+ if (unknown.length > 0) return {
28127
+ kind: "malformed",
28128
+ reason: `names members the type does not have: ${unknown.join(", ")}`
28129
+ };
28130
+ const spec = {};
28131
+ for (const key of ["DnsRecordIpType", "PrivateDnsPreference"]) {
28132
+ const member = block[key];
28133
+ if (member === void 0 || member === null) continue;
28134
+ if (typeof member !== "string" || member === "") return {
28135
+ kind: "malformed",
28136
+ reason: `${key} must be a non-empty string`
28137
+ };
28138
+ spec[key] = member;
28139
+ }
28140
+ const inbound = block["PrivateDnsOnlyForInboundResolverEndpoint"];
28141
+ if (inbound !== void 0 && inbound !== null) {
28142
+ if (typeof inbound === "string" && Object.hasOwn(INBOUND_RESOLVER_TO_SDK, inbound)) {
28143
+ const flag = INBOUND_RESOLVER_TO_SDK[inbound];
28144
+ if (flag !== void 0) spec.PrivateDnsOnlyForInboundResolverEndpoint = flag;
28145
+ } else if (typeof inbound === "boolean") spec.PrivateDnsOnlyForInboundResolverEndpoint = inbound;
28146
+ else return {
28147
+ kind: "malformed",
28148
+ reason: "PrivateDnsOnlyForInboundResolverEndpoint must be OnlyInboundResolver, AllResolvers or NotSpecified"
28149
+ };
28150
+ }
28151
+ const domains = block["PrivateDnsSpecifiedDomains"];
28152
+ if (domains !== void 0 && domains !== null) {
28153
+ if (!Array.isArray(domains) || !domains.every((d) => typeof d === "string" && d !== "")) return {
28154
+ kind: "malformed",
28155
+ reason: "PrivateDnsSpecifiedDomains must be a list of domain names"
28156
+ };
28157
+ spec.PrivateDnsSpecifiedDomains = [...domains];
28158
+ }
28159
+ return {
28160
+ kind: "usable",
28161
+ spec
28162
+ };
28163
+ }
28164
+ function readOptionalString(value) {
28165
+ if (value === void 0 || value === null) return { kind: "absent" };
28166
+ return typeof value === "string" && value !== "" ? {
28167
+ kind: "usable",
28168
+ value
28169
+ } : { kind: "malformed" };
28170
+ }
28171
+ function vpcEndpointAttributes(endpoint, physicalId, withNetwork) {
28172
+ return definedAttributes({
28173
+ Id: physicalId,
28174
+ CreationTimestamp: isoTimestampAttribute(endpoint?.CreationTimestamp),
28175
+ DnsEntries: withNetwork && endpoint !== void 0 ? dnsEntryStrings(endpoint) : void 0,
28176
+ NetworkInterfaceIds: withNetwork && endpoint !== void 0 ? [...endpoint.NetworkInterfaceIds ?? []] : void 0
28177
+ });
28178
+ }
28179
+ function inboundResolverReadback(live, declared) {
28180
+ if (typeof declared === "boolean") return live;
28181
+ if (declared === "NotSpecified" && live !== true) return "NotSpecified";
28182
+ if (live === void 0) return void 0;
28183
+ return live ? "OnlyInboundResolver" : "AllResolvers";
28184
+ }
28185
+ function readbackVpcEndpoint(endpoint, properties) {
28186
+ const result = {};
28187
+ if (endpoint.VpcId !== void 0) result["VpcId"] = endpoint.VpcId;
28188
+ if (endpoint.ServiceName !== void 0) result["ServiceName"] = endpoint.ServiceName;
28189
+ if (endpoint.VpcEndpointType !== void 0) result["VpcEndpointType"] = endpoint.VpcEndpointType;
28190
+ const lists = [
28191
+ ["SubnetIds", endpoint.SubnetIds ?? []],
28192
+ ["SecurityGroupIds", (endpoint.Groups ?? []).flatMap((g) => g.GroupId ? [g.GroupId] : [])],
28193
+ ["RouteTableIds", endpoint.RouteTableIds ?? []]
28194
+ ];
28195
+ for (const [key, ids] of lists) if (ids.length > 0 || properties?.[key] != null) result[key] = ids;
28196
+ if (typeof endpoint.PrivateDnsEnabled === "boolean") result["PrivateDnsEnabled"] = endpoint.PrivateDnsEnabled;
28197
+ if (endpoint.IpAddressType !== void 0) result["IpAddressType"] = endpoint.IpAddressType;
28198
+ const declaredPolicy = properties?.["PolicyDocument"];
28199
+ if (declaredPolicy != null && typeof endpoint.PolicyDocument === "string") result["PolicyDocument"] = policyDocumentMatchesDeclared(endpoint.PolicyDocument, declaredPolicy) ? declaredPolicy : parsedPolicy(endpoint.PolicyDocument);
28200
+ const declaredDns = properties?.["DnsOptions"];
28201
+ if (declaredDns !== null && typeof declaredDns === "object" && !Array.isArray(declaredDns)) {
28202
+ const declared = declaredDns;
28203
+ const live = endpoint.DnsOptions ?? {};
28204
+ const out = {};
28205
+ if ("DnsRecordIpType" in declared && live.DnsRecordIpType !== void 0) out["DnsRecordIpType"] = live.DnsRecordIpType;
28206
+ if ("PrivateDnsOnlyForInboundResolverEndpoint" in declared) {
28207
+ const value = inboundResolverReadback(live.PrivateDnsOnlyForInboundResolverEndpoint, declared["PrivateDnsOnlyForInboundResolverEndpoint"]);
28208
+ if (value !== void 0) out["PrivateDnsOnlyForInboundResolverEndpoint"] = value;
28209
+ }
28210
+ if ("PrivateDnsPreference" in declared && live.PrivateDnsPreference !== void 0) out["PrivateDnsPreference"] = live.PrivateDnsPreference;
28211
+ if ("PrivateDnsSpecifiedDomains" in declared && live.PrivateDnsSpecifiedDomains !== void 0) out["PrivateDnsSpecifiedDomains"] = [...live.PrivateDnsSpecifiedDomains];
28212
+ result["DnsOptions"] = out;
28213
+ }
28214
+ if (properties?.["ServiceRegion"] != null && endpoint.ServiceRegion !== void 0) result["ServiceRegion"] = endpoint.ServiceRegion;
28215
+ if (endpoint.ServiceNetworkArn) result["ServiceNetworkArn"] = endpoint.ServiceNetworkArn;
28216
+ if (endpoint.ResourceConfigurationArn) result["ResourceConfigurationArn"] = endpoint.ResourceConfigurationArn;
28217
+ const tags = readbackEc2Tags(endpoint.Tags, properties, false);
28218
+ if (tags !== void 0) result["Tags"] = tags;
28219
+ return result;
28220
+ }
28221
+ function parsedPolicy(text) {
28222
+ try {
28223
+ return JSON.parse(text);
28224
+ } catch {
28225
+ return text;
28226
+ }
28227
+ }
28228
+
28229
+ // src/provisioning/providers/ec2-vpc-endpoint-provider.ts
28230
+ const ID_LISTS = [
28231
+ [
28232
+ "SubnetIds",
28233
+ "AddSubnetIds",
28234
+ "RemoveSubnetIds"
28235
+ ],
28236
+ [
28237
+ "SecurityGroupIds",
28238
+ "AddSecurityGroupIds",
28239
+ "RemoveSecurityGroupIds"
28240
+ ],
28241
+ [
28242
+ "RouteTableIds",
28243
+ "AddRouteTableIds",
28244
+ "RemoveRouteTableIds"
28245
+ ]
28246
+ ];
28247
+ var EC2VPCEndpointProvider = class {
28248
+ ec2Client;
28249
+ logger = getLogger().child("EC2VPCEndpointProvider");
28250
+ handledProperties = /* @__PURE__ */ new Map([["AWS::EC2::VPCEndpoint", /* @__PURE__ */ new Set([
28251
+ "VpcId",
28252
+ "ServiceName",
28253
+ "VpcEndpointType",
28254
+ "SubnetIds",
28255
+ "SecurityGroupIds",
28256
+ "RouteTableIds",
28257
+ "PolicyDocument",
28258
+ "PrivateDnsEnabled",
28259
+ "DnsOptions",
28260
+ "IpAddressType",
28261
+ "ResourceConfigurationArn",
28262
+ "ServiceNetworkArn",
28263
+ "ServiceRegion",
28264
+ "Tags"
28265
+ ])]]);
28266
+ removalHandledInUpdate = /* @__PURE__ */ new Map([[VPC_ENDPOINT_TYPE, /* @__PURE__ */ new Set([
28267
+ ...VPC_ENDPOINT_CREATE_ONLY,
28268
+ "SubnetIds",
28269
+ "SecurityGroupIds",
28270
+ "RouteTableIds",
28271
+ "PolicyDocument",
28272
+ "PrivateDnsEnabled",
28273
+ "Tags"
28274
+ ])]]);
28275
+ endpointWait = {
28276
+ pollIntervalMs: 3e3,
28277
+ timeoutMs: 9e5,
28278
+ deletePollIntervalMs: 5e3,
28279
+ deleteTimeoutMs: 9e5,
28280
+ sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms))
28281
+ };
28282
+ constructor() {
28283
+ this.ec2Client = getAwsClients().ec2;
28284
+ }
28285
+ wrapCaughtError(mask, error, build) {
28286
+ const failure = describeAwsFailure(error);
28287
+ if (!failure.redacted) return wrapMaskedAwsError(mask, error, build);
28288
+ this.logger.debug(mask(build(mask(failure.detail)).message));
28289
+ const wrapped = build(mask(failure.summary));
28290
+ return error instanceof Error ? markRedactedCause(wrapped) : wrapped;
28291
+ }
28292
+ vpcEndpointRefusal(logicalId, what, physicalId) {
28293
+ return markNonRetryable(new ProvisioningError(safeMsg`${what} for VPC endpoint ${logicalId}` + ` — the endpoint was not ${physicalId === void 0 ? "created" : "updated"}`, VPC_ENDPOINT_TYPE, logicalId, physicalId));
28294
+ }
28295
+ createInput(logicalId, properties) {
28296
+ const vpcId = readOptionalString(properties["VpcId"]);
28297
+ if (vpcId.kind !== "usable") throw this.vpcEndpointRefusal(logicalId, "VpcId must be a VPC id");
28298
+ const input = { VpcId: vpcId.value };
28299
+ for (const key of [
28300
+ "ServiceName",
28301
+ "VpcEndpointType",
28302
+ "IpAddressType",
28303
+ "ServiceNetworkArn",
28304
+ "ResourceConfigurationArn",
28305
+ "ServiceRegion"
28306
+ ]) {
28307
+ const read = readOptionalString(properties[key]);
28308
+ if (read.kind === "malformed") throw this.vpcEndpointRefusal(logicalId, `${key} must be a non-empty string`);
28309
+ if (read.kind === "usable") input[key] = read.value;
28310
+ }
28311
+ for (const [key] of ID_LISTS) {
28312
+ const read = readIdList(properties[key]);
28313
+ if (read.kind === "malformed") throw this.vpcEndpointRefusal(logicalId, `${key} must be a list of ids`);
28314
+ if (read.kind === "usable" && read.ids.length > 0) input[key] = read.ids;
28315
+ }
28316
+ const policy = readPolicyDocument(properties["PolicyDocument"]);
28317
+ if (policy.kind === "malformed") throw this.vpcEndpointRefusal(logicalId, "PolicyDocument must be a policy object or its JSON text");
28318
+ if (policy.kind === "usable") input.PolicyDocument = policy.text;
28319
+ const privateDns = readBoolean(properties["PrivateDnsEnabled"]);
28320
+ if (privateDns.kind === "malformed") throw this.vpcEndpointRefusal(logicalId, "PrivateDnsEnabled must be a boolean");
28321
+ if (privateDns.kind === "usable") input.PrivateDnsEnabled = privateDns.value;
28322
+ else if (input.VpcEndpointType === "Interface") input.PrivateDnsEnabled = false;
28323
+ const dns = readDnsOptions(properties["DnsOptions"]);
28324
+ if (dns.kind === "malformed") throw this.vpcEndpointRefusal(logicalId, `DnsOptions ${dns.reason}`);
28325
+ if (dns.kind === "usable") input.DnsOptions = dns.spec;
28326
+ return input;
28327
+ }
28328
+ async create(logicalId, resourceType, properties, context) {
28329
+ const mask = maskerOrIdentity(context?.maskSecrets);
28330
+ const input = this.createInput(logicalId, properties);
28331
+ const tags = refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId);
28332
+ if (tags.length > 0) input.TagSpecifications = [{
28333
+ ResourceType: "vpc-endpoint",
28334
+ Tags: tags
28335
+ }];
28336
+ const token = acquireIdempotencyToken({
28337
+ scope: "CreateVpcEndpoint",
28338
+ logicalId
28339
+ });
28340
+ input.ClientToken = token.value;
28341
+ this.logger.debug(safeMsg`Creating VPC endpoint ${logicalId}`);
28342
+ let endpointId;
28343
+ try {
28344
+ const response = await this.ec2Client.send(new CreateVpcEndpointCommand(input));
28345
+ endpointId = response.VpcEndpoint?.VpcEndpointId;
28346
+ if (!endpointId) throw new ProvisioningError(safeMsg`CreateVpcEndpoint returned no VpcEndpointId for VPC endpoint ${logicalId}`, resourceType, logicalId);
28347
+ reportCreatedResource(logicalId, resourceType, endpointId);
28348
+ let endpoint = response.VpcEndpoint;
28349
+ if (process.env["CDKD_NO_WAIT"] === "true") {
28350
+ this.logger.debug(safeMsg`VPC endpoint ${endpointId} created (skipping the available wait per --no-wait)`);
28351
+ const id = endpointId;
28352
+ deferReadiness(logicalId, resourceType, id, (signal) => this.waitForSettled(id, logicalId, mask, signal));
28353
+ } else endpoint = await this.waitForSettled(endpointId, logicalId, mask);
28354
+ token.release();
28355
+ return {
28356
+ physicalId: endpointId,
28357
+ attributes: vpcEndpointAttributes(endpoint, endpointId, true)
28358
+ };
28359
+ } catch (error) {
28360
+ let thrown = error;
28361
+ if (!isInterruptedWaitError(error) && !(error instanceof ProvisioningError)) {
28362
+ const cause = error instanceof Error ? error : void 0;
28363
+ thrown = this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to create VPC endpoint ${logicalId}: ${text}`, resourceType, logicalId, endpointId, cause));
28364
+ }
28365
+ if (endpointId !== void 0) markCreatedBeforeFailure(thrown, logicalId, resourceType, endpointId);
28366
+ throw thrown;
28367
+ }
28368
+ }
28369
+ async describe(endpointId) {
28370
+ try {
28371
+ return (await this.ec2Client.send(new DescribeVpcEndpointsCommand({ VpcEndpointIds: [endpointId] }))).VpcEndpoints?.find((e) => e.VpcEndpointId === endpointId);
28372
+ } catch (error) {
28373
+ if (isNamedError(error, VPC_ENDPOINT_NOT_FOUND_NAMES)) return void 0;
28374
+ throw error;
28375
+ }
28376
+ }
28377
+ async waitForSettled(endpointId, logicalId, mask, signal) {
28378
+ const { pollIntervalMs, timeoutMs } = this.endpointWait;
28379
+ const sleep = (ms) => abortableSleep(this.endpointWait.sleep, ms, signal);
28380
+ const userTimeoutMs = resolvedResourceTimeoutMs(VPC_ENDPOINT_TYPE);
28381
+ const deadline = Date.now() + (userTimeoutMs === void 0 ? timeoutMs : Math.min(timeoutMs, userTimeoutMs / 2));
28382
+ const watch = startInterruptWatch(`VPC endpoint ${logicalId} available wait`);
28383
+ let last;
28384
+ try {
28385
+ for (;;) {
28386
+ if (watch.isInterrupted()) throw watch.onInterrupted();
28387
+ await sleep(pollIntervalMs);
28388
+ try {
28389
+ last = await this.describe(endpointId);
28390
+ } catch (error) {
28391
+ if (!isThrottlingError(error) && !isTransientServerError(error)) throw error;
28392
+ this.logger.debug(mask(`VPC endpoint ${endpointId}: not readable yet (${describeAwsFailure(error).summary})`));
28393
+ }
28394
+ const verdict = endpointWaitVerdict(last);
28395
+ if (verdict === "settled" && last !== void 0) return last;
28396
+ if (verdict === "failed") throw markNonRetryable(new ProvisioningError(safeMsg`VPC endpoint ${logicalId} (${endpointId}) is ${endpointState(last) ?? "unknown"}, so it will not become available`, VPC_ENDPOINT_TYPE, logicalId, endpointId));
28397
+ if (Date.now() >= deadline) throw markNonRetryable(new ProvisioningError(safeMsg`VPC endpoint ${logicalId} (${endpointId}) was still ${endpointState(last) ?? "unreadable"} when its available wait ran out`, VPC_ENDPOINT_TYPE, logicalId, endpointId));
28398
+ }
28399
+ } finally {
28400
+ watch.dispose();
28401
+ }
28402
+ }
28403
+ async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
28404
+ assertRegionMatch(context?.expectedRegion ? await this.ec2Client.config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
28405
+ const mask = maskerOrIdentity(context?.maskSecrets);
28406
+ refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
28407
+ const changedCreateOnly = createOnlyChange(properties, previousProperties);
28408
+ if (changedCreateOnly !== void 0) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, `${changedCreateOnly} cannot change in place; re-deploy with ${deployReplaceCommand()}`);
28409
+ const stateBorne = context?.replayingState === true || context?.desiredFromAwsReadback === true;
28410
+ const kept = [];
28411
+ const unusable = (key, what) => {
28412
+ if (!stateBorne) throw this.vpcEndpointRefusal(logicalId, `${key} ${what}`, physicalId);
28413
+ this.logger.warn(safeMsg`VPC endpoint ${logicalId}: the recorded ${key} ${what}; it was left as it is`);
28414
+ kept.push(key);
28415
+ };
28416
+ const modify = { VpcEndpointId: physicalId };
28417
+ let modifying = false;
28418
+ const type = properties["VpcEndpointType"];
28419
+ try {
28420
+ let live;
28421
+ const liveRead = async () => live ??= await this.describe(physicalId);
28422
+ for (const [key, addKey, removeKey] of ID_LISTS) {
28423
+ const desired = readIdList(properties[key]);
28424
+ if (desired.kind === "malformed") throw this.vpcEndpointRefusal(logicalId, `${key} must be a list of ids`, physicalId);
28425
+ let recorded = readIdList(previousProperties[key]);
28426
+ if (recorded.kind === "malformed") {
28427
+ const endpoint = await liveRead();
28428
+ recorded = {
28429
+ kind: "usable",
28430
+ ids: key === "SecurityGroupIds" ? (endpoint?.Groups ?? []).flatMap((g) => g.GroupId ? [g.GroupId] : []) : (key === "SubnetIds" ? endpoint?.SubnetIds : endpoint?.RouteTableIds) ?? []
28431
+ };
28432
+ }
28433
+ const want = desired.kind === "usable" ? desired.ids : [];
28434
+ const have = recorded.kind === "usable" ? recorded.ids : [];
28435
+ const add = want.filter((id) => !have.includes(id));
28436
+ const remove = have.filter((id) => !want.includes(id));
28437
+ if (add.length > 0) modify[addKey] = add;
28438
+ if (remove.length > 0) modify[removeKey] = remove;
28439
+ if (add.length > 0 || remove.length > 0) modifying = true;
28440
+ }
28441
+ const policy = readPolicyDocument(properties["PolicyDocument"]);
28442
+ const previousPolicy = readPolicyDocument(previousProperties["PolicyDocument"]);
28443
+ if (policy.kind === "malformed") unusable("PolicyDocument", "is not a policy object or its JSON text");
28444
+ else if (policy.kind === "usable") {
28445
+ if (previousPolicy.kind !== "usable" || policyContentKey(policy.text) !== policyContentKey(previousPolicy.text)) {
28446
+ modify.PolicyDocument = policy.text;
28447
+ modifying = true;
28448
+ }
28449
+ } else if (previousPolicy.kind !== "absent") {
28450
+ modify.ResetPolicy = true;
28451
+ modifying = true;
28452
+ }
28453
+ const privateDns = readBoolean(properties["PrivateDnsEnabled"]);
28454
+ const previousPrivateDns = readBoolean(previousProperties["PrivateDnsEnabled"]);
28455
+ if (privateDns.kind === "malformed") unusable("PrivateDnsEnabled", "is not a boolean");
28456
+ else {
28457
+ const want = privateDns.kind === "usable" ? privateDns.value : void 0;
28458
+ const had = previousPrivateDns.kind === "usable" ? previousPrivateDns.value : void 0;
28459
+ const effective = (flag) => flag ?? (type === "Interface" ? false : void 0);
28460
+ if (effective(want) !== void 0 && effective(want) !== effective(had)) {
28461
+ modify.PrivateDnsEnabled = effective(want);
28462
+ modifying = true;
28463
+ }
28464
+ }
28465
+ const ipAddressType = readOptionalString(properties["IpAddressType"]);
28466
+ if (ipAddressType.kind === "malformed") unusable("IpAddressType", "is not a non-empty string");
28467
+ else if (ipAddressType.kind === "usable" && ipAddressType.value !== previousProperties["IpAddressType"]) {
28468
+ modify.IpAddressType = ipAddressType.value;
28469
+ modifying = true;
28470
+ }
28471
+ const dns = readDnsOptions(properties["DnsOptions"]);
28472
+ if (dns.kind === "malformed") unusable("DnsOptions", dns.reason);
28473
+ else if (dns.kind === "usable" && JSON.stringify(properties["DnsOptions"]) !== JSON.stringify(previousProperties["DnsOptions"])) {
28474
+ modify.DnsOptions = dns.spec;
28475
+ modifying = true;
28476
+ }
28477
+ if (modifying) await this.ec2Client.send(new ModifyVpcEndpointCommand(modify));
28478
+ const plan = planTagDiff(previousProperties["Tags"], properties["Tags"]);
28479
+ const planWarning = tagPlanWarning(plan, resourceType, physicalId);
28480
+ if (planWarning !== void 0) this.logger.warn(planWarning);
28481
+ if (plan.remove.length > 0) await this.ec2Client.send(new DeleteTagsCommand({
28482
+ Resources: [physicalId],
28483
+ Tags: plan.remove.map((Key) => ({ Key }))
28484
+ }));
28485
+ if (plan.set.size > 0) await this.ec2Client.send(new CreateTagsCommand({
28486
+ Resources: [physicalId],
28487
+ Tags: [...plan.set].map(([Key, Value]) => ({
28488
+ Key,
28489
+ Value
28490
+ }))
28491
+ }));
28492
+ const noWait = process.env["CDKD_NO_WAIT"] === "true";
28493
+ const endpoint = modifying && !noWait ? await this.waitForSettled(physicalId, logicalId, mask) : await this.describe(physicalId);
28494
+ if (modifying && noWait) deferReadiness(logicalId, resourceType, physicalId, (signal) => this.waitForSettled(physicalId, logicalId, mask, signal));
28495
+ const settled = !(modifying && noWait) && endpointWaitVerdict(endpoint) === "settled";
28496
+ let effectiveProperties;
28497
+ if (kept.length > 0) {
28498
+ effectiveProperties = { ...properties };
28499
+ for (const key of kept) if (previousProperties[key] === void 0) delete effectiveProperties[key];
28500
+ else effectiveProperties[key] = structuredClone(previousProperties[key]);
28501
+ }
28502
+ return {
28503
+ physicalId,
28504
+ wasReplaced: false,
28505
+ attributes: vpcEndpointAttributes(endpoint, physicalId, settled),
28506
+ ...effectiveProperties !== void 0 && { effectiveProperties }
28507
+ };
28508
+ } catch (error) {
28509
+ if (isInterruptedWaitError(error) || error instanceof ProvisioningError) throw error;
28510
+ const cause = error instanceof Error ? error : void 0;
28511
+ throw this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to update VPC endpoint ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
28512
+ }
28513
+ }
28514
+ async delete(logicalId, physicalId, resourceType, _properties, context) {
28515
+ const mask = maskerOrIdentity(context?.maskSecrets);
28516
+ const alreadyGone = async () => {
28517
+ assertRegionMatch(await this.ec2Client.config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
28518
+ this.logger.debug(mask(`VPC endpoint ${physicalId} does not exist, skipping deletion`));
28519
+ };
28520
+ let response;
28521
+ try {
28522
+ response = await this.ec2Client.send(new DeleteVpcEndpointsCommand({ VpcEndpointIds: [physicalId] }));
28523
+ } catch (error) {
28524
+ if (isNamedError(error, VPC_ENDPOINT_NOT_FOUND_NAMES)) return alreadyGone();
28525
+ const cause = error instanceof Error ? error : void 0;
28526
+ const thrown = this.wrapCaughtError(mask, error, (text) => new ProvisioningError(`Failed to delete VPC endpoint ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
28527
+ throw error instanceof Error && error.name.includes("NotFound") ? markNotGone(thrown) : thrown;
28528
+ }
28529
+ const refused = response.Unsuccessful?.find((u) => u.ResourceId === physicalId) ?? response.Unsuccessful?.[0];
28530
+ if (refused !== void 0) {
28531
+ const code = refused.Error?.Code;
28532
+ if (code !== void 0 && VPC_ENDPOINT_NOT_FOUND_NAMES.has(code)) return alreadyGone();
28533
+ if (refused.Error?.Message) this.logger.debug(mask(`DeleteVpcEndpoints refused ${physicalId}: ${refused.Error.Message}`));
28534
+ const thrown = markNonRetryable(new ProvisioningError(safeMsg`Failed to delete VPC endpoint ${logicalId}: DeleteVpcEndpoints refused it (${code ?? "no error code"}).` + verbosePointerTail(), resourceType, logicalId, physicalId));
28535
+ throw code?.includes("NotFound") === true ? markNotGone(thrown) : thrown;
28536
+ }
28537
+ await waitForGoneAfterDelete({
28538
+ what: `VPC endpoint ${physicalId}`,
28539
+ resourceType,
28540
+ describe: async () => {
28541
+ const endpoint = await this.describe(physicalId);
28542
+ const state = endpointState(endpoint);
28543
+ if (endpoint === void 0 || state === "deleted") return void 0;
28544
+ return state ?? "unknown";
28545
+ },
28546
+ consequence: "AWS finishes the delete on its side; until it does, its network interfaces keep its subnets and security groups from being deleted.",
28547
+ failedStatus: (status) => status === "failed" ? markNonRetryable(new ProvisioningError(safeMsg`VPC endpoint ${logicalId} (${physicalId}) entered the failed state while deleting.` + verbosePointerTail(), resourceType, logicalId, physicalId)) : void 0,
28548
+ logger: this.logger,
28549
+ pollIntervalMs: this.endpointWait.deletePollIntervalMs,
28550
+ maxWaitMs: this.endpointWait.deleteTimeoutMs,
28551
+ sleep: this.endpointWait.sleep
28552
+ });
28553
+ }
28554
+ async getAttribute(physicalId, _resourceType, attributeName, _logicalId) {
28555
+ if (attributeName === "Id") return physicalId;
28556
+ const endpoint = await this.describe(physicalId);
28557
+ if (endpoint === void 0) return void 0;
28558
+ return vpcEndpointAttributes(endpoint, physicalId, true)[attributeName];
28559
+ }
28560
+ async readCurrentState(physicalId, _logicalId, _resourceType, properties) {
28561
+ const endpoint = await this.describe(physicalId);
28562
+ const state = endpointState(endpoint);
28563
+ if (endpoint === void 0 || state === "deleted" || state === "deleting") return RESOURCE_NOT_FOUND;
28564
+ return readbackVpcEndpoint(endpoint, properties);
28565
+ }
28566
+ async import(input) {
28567
+ if (!input.knownPhysicalId) return null;
28568
+ const endpoint = await this.describe(input.knownPhysicalId);
28569
+ const state = endpointState(endpoint);
28570
+ if (endpoint === void 0 || state === "deleted" || state === "deleting") return null;
28571
+ return {
28572
+ physicalId: input.knownPhysicalId,
28573
+ attributes: vpcEndpointAttributes(endpoint, input.knownPhysicalId, endpointWaitVerdict(endpoint) === "settled")
28574
+ };
28575
+ }
28576
+ };
28577
+
27987
28578
  // src/provisioning/providers/apigateway/shared.ts
27988
28579
  const createAuthorizerLatch$1 = new AmbiguousCreateLatch("apigateway:CreateAuthorizer");
27989
28580
  const createDeploymentLatch = new AmbiguousCreateLatch("apigateway:CreateDeployment");
@@ -33368,6 +33959,10 @@ var AgentCoreRuntimeProvider = class {
33368
33959
  async settledStatus(agentRuntimeId, logicalId, resourceType, operation, responseStatus, mask) {
33369
33960
  if (process.env["CDKD_NO_WAIT"] === "true") {
33370
33961
  this.logger.debug(safeMsg`Skipping the READY wait for BedrockAgentCore Runtime ${logicalId} after ${operation} (CDKD_NO_WAIT=true)`);
33962
+ deferReadiness(logicalId, resourceType, agentRuntimeId, (signal) => waitForRuntimeReady({
33963
+ ...this.waitDeps(),
33964
+ sleep: (ms) => abortableSleep((d) => this.sleep(d), ms, signal)
33965
+ }, agentRuntimeId, logicalId, resourceType, operation, mask));
33371
33966
  return responseStatus;
33372
33967
  }
33373
33968
  return (await waitForRuntimeReady(this.waitDeps(), agentRuntimeId, logicalId, resourceType, operation, mask)).status;
@@ -35276,11 +35871,12 @@ async function settleService(logicalId, serviceRef, cluster, log, requested, ski
35276
35871
  this.logger.info(log.mask(`ECS service ${logicalIdShown(logicalId)} accepted (not waiting for steady state: ${skipReason}).`));
35277
35872
  return;
35278
35873
  }
35279
- if (process.env["CDKD_NO_WAIT"] !== "true") {
35874
+ const waitSteady = async (signal) => {
35280
35875
  log.debug(`Waiting for ECS service ${logicalId} to reach steady state...`);
35281
35876
  const maxWaitTime = Math.max(600, (resolvedResourceTimeoutMs("AWS::ECS::Service") ?? 0) / 1e3);
35282
35877
  const client = this.getClient();
35283
35878
  const breakerVerdict = new AbortController();
35879
+ signal?.addEventListener("abort", () => breakerVerdict.abort(), { once: true });
35284
35880
  let failedRollout;
35285
35881
  const watchedClient = { send: async (command) => {
35286
35882
  const output = await client.send(command);
@@ -35312,6 +35908,7 @@ async function settleService(logicalId, serviceRef, cluster, log, requested, ski
35312
35908
  const rolloutDeadline = Date.now() + 12e4;
35313
35909
  let settledDeployment;
35314
35910
  for (;;) {
35911
+ throwIfReadinessAborted(signal);
35315
35912
  const deployments = (await this.getClient().send(new DescribeServicesCommand({
35316
35913
  cluster,
35317
35914
  services: [serviceRef]
@@ -35326,7 +35923,7 @@ async function settleService(logicalId, serviceRef, cluster, log, requested, ski
35326
35923
  log.warn(`ECS service ${logicalId} is steady but its rollout is still ${rolloutState} after the post-stability grace window; continuing`);
35327
35924
  break;
35328
35925
  }
35329
- await settleRolloutDelays.sleep(3e3);
35926
+ await abortableSleep(settleRolloutDelays.sleep, 3e3, signal);
35330
35927
  }
35331
35928
  const supersededBy = rolloutSupersededBy(requested, settledDeployment);
35332
35929
  if (supersededBy !== void 0) {
@@ -35337,8 +35934,12 @@ async function settleService(logicalId, serviceRef, cluster, log, requested, ski
35337
35934
  })}). The new tasks failed to start or failed their health checks`);
35338
35935
  }
35339
35936
  log.debug(`ECS service ${logicalId} reached steady state`);
35937
+ };
35938
+ if (process.env["CDKD_NO_WAIT"] !== "true") {
35939
+ await waitSteady();
35340
35940
  return;
35341
35941
  }
35942
+ deferReadiness(logicalId, "AWS::ECS::Service", serviceRef, waitSteady);
35342
35943
  const aws = pasteableAwsCommand(log.mask);
35343
35944
  const clusterArg = cluster ? aws` --cluster ${cluster}` : aws``;
35344
35945
  this.logger.info(log.mask(`ECS service ${logicalIdShown(logicalId)} accepted (not waiting for steady state under --no-wait). To wait manually: ${aws`aws ecs wait services-stable${clusterArg} --services ${serviceRef}`.render()}`));
@@ -37004,7 +37605,16 @@ async function createLoadBalancer(logicalId, resourceType, properties, maskSecre
37004
37605
  maxDelay: 10
37005
37606
  }, { LoadBalancerArns: [lbArn] });
37006
37607
  this.logger.debug(`LoadBalancer ${logicalId} is active`);
37007
- } else this.logger.debug(`LoadBalancer ${logicalId} created (skipping active-state wait per --no-wait)`);
37608
+ } else {
37609
+ this.logger.debug(`LoadBalancer ${logicalId} created (skipping active-state wait per --no-wait)`);
37610
+ deferReadiness(logicalId, resourceType, lbArn, (signal) => waitUntilLoadBalancerAvailable({
37611
+ client: this.getClient(),
37612
+ maxWaitTime: 600,
37613
+ minDelay: 5,
37614
+ maxDelay: 10,
37615
+ abortSignal: signal
37616
+ }, { LoadBalancerArns: [lbArn] }));
37617
+ }
37008
37618
  if (lbAttributes.length > 0) {
37009
37619
  await this.getClient().send(new ModifyLoadBalancerAttributesCommand({
37010
37620
  LoadBalancerArn: lbArn,
@@ -40236,6 +40846,7 @@ async function createDBCluster(logicalId, resourceType, properties, mask, replay
40236
40846
  const followUp = restore === void 0 ? void 0 : docdbRestoreFollowUp(properties, restore, password, managedPassword);
40237
40847
  const followingUp = followUp !== void 0 && (followUp.parity !== void 0 || followUp.declared.length > 0);
40238
40848
  if (followingUp || process.env["CDKD_NO_WAIT"] !== "true") await this.waitForClusterAvailable(logicalId, dbClusterIdentifier, restore === void 0 ? void 0 : restoreWaitMs());
40849
+ else deferReadiness(logicalId, resourceType, dbClusterIdentifier, (signal) => this.waitForClusterAvailable(logicalId, dbClusterIdentifier, restore === void 0 ? void 0 : restoreWaitMs(), signal));
40239
40850
  if (followUp !== void 0 && followingUp) await this.sendRestoreFollowUp(logicalId, resourceType, dbClusterIdentifier, followUp, mask);
40240
40851
  if (restore !== void 0) this.warnRestoredDifferences(logicalId, resourceType, properties, restore, cluster);
40241
40852
  const described = await this.describeDBCluster(dbClusterIdentifier);
@@ -40310,6 +40921,7 @@ async function sendRestoreFollowUp(logicalId, resourceType, physicalId, followUp
40310
40921
  if (keys.length > 0) this.logger.warn(safeMsg`${logicalId} (${resourceType}): AWS refused ${keys.join(", ")} after the restore, so the cluster keeps its restored values. The record holds the declared ones, so drift does not report the difference. An update sends a declared BackupRetentionPeriod or window again; the password settings only once the template changes them.`);
40311
40922
  }
40312
40923
  if (process.env["CDKD_NO_WAIT"] !== "true") await this.waitForClusterAvailable(logicalId, physicalId, restoreWaitMs());
40924
+ else deferReadiness(logicalId, resourceType, physicalId, (signal) => this.waitForClusterAvailable(logicalId, physicalId, restoreWaitMs(), signal));
40313
40925
  }
40314
40926
  function warnRestoredDifferences(logicalId, resourceType, properties, restore, cluster) {
40315
40927
  const differs = (key, live) => properties[key] != null && live !== void 0 && String(properties[key]) !== live;
@@ -40774,6 +41386,7 @@ async function createDBInstance(logicalId, resourceType, properties, mask, repla
40774
41386
  if (!response.DBInstance) throw new Error("CreateDBInstance did not return DBInstance");
40775
41387
  this.logger.debug(`Successfully created DocDB DBInstance ${logicalId}: ${dbInstanceIdentifier}`);
40776
41388
  if (process.env["CDKD_NO_WAIT"] !== "true") await this.waitForInstanceAvailable(logicalId, dbInstanceIdentifier);
41389
+ else deferReadiness(logicalId, resourceType, dbInstanceIdentifier, (signal) => this.waitForInstanceAvailable(logicalId, dbInstanceIdentifier, void 0, signal));
40777
41390
  const described = await this.describeDBInstance(dbInstanceIdentifier);
40778
41391
  return {
40779
41392
  physicalId: dbInstanceIdentifier,
@@ -40950,15 +41563,16 @@ async function deleteAfterProtectionFlip(logicalId, physicalId, send) {
40950
41563
  remainingMs: enclosingDeadlineRemainingMs()
40951
41564
  });
40952
41565
  }
40953
- async function waitForClusterAvailable$1(logicalId, dbClusterIdentifier, maxWaitMs = CLUSTER_AVAILABLE_MAX_WAIT_MS) {
41566
+ async function waitForClusterAvailable$1(logicalId, dbClusterIdentifier, maxWaitMs = CLUSTER_AVAILABLE_MAX_WAIT_MS, signal) {
40954
41567
  const startTime = Date.now();
40955
41568
  let delay = 5e3;
40956
41569
  while (Date.now() - startTime < maxWaitMs) {
41570
+ throwIfReadinessAborted(signal);
40957
41571
  const status = (await this.describeDBCluster(dbClusterIdentifier))?.Status;
40958
41572
  this.logger.debug(`DocDB DBCluster ${dbClusterIdentifier} status: ${status}`);
40959
41573
  if (status === "available") return;
40960
41574
  if (isTerminalDbWaitStatus(status)) throw new Error(safeMsg`DocDB DBCluster ${logicalId} entered status ${status ?? ""} while being created, which it does not leave on its own`);
40961
- await this.sleep(delay);
41575
+ await abortableSleep((ms) => this.sleep(ms), delay, signal);
40962
41576
  delay = Math.min(delay * 2, 1e4);
40963
41577
  }
40964
41578
  throw new Error(`Timed out waiting for DocDB DBCluster ${dbClusterIdentifier} to become available`);
@@ -40981,15 +41595,16 @@ async function waitForClusterDeleted$1(logicalId, dbClusterIdentifier, maxWaitMs
40981
41595
  }
40982
41596
  throw new Error(`Timed out waiting for DocDB DBCluster ${logicalId} to be deleted`);
40983
41597
  }
40984
- async function waitForInstanceAvailable(logicalId, dbInstanceIdentifier, maxWaitMs = 18e5) {
41598
+ async function waitForInstanceAvailable(logicalId, dbInstanceIdentifier, maxWaitMs = 18e5, signal) {
40985
41599
  const startTime = Date.now();
40986
41600
  let delay = 1e4;
40987
41601
  while (Date.now() - startTime < maxWaitMs) {
41602
+ throwIfReadinessAborted(signal);
40988
41603
  const status = (await this.describeDBInstance(dbInstanceIdentifier))?.DBInstanceStatus;
40989
41604
  this.logger.debug(`DocDB DBInstance ${dbInstanceIdentifier} status: ${status}`);
40990
41605
  if (status === "available") return;
40991
41606
  if (isTerminalDbWaitStatus(status)) throw new Error(safeMsg`DocDB DBInstance ${logicalId} entered status ${status ?? ""} while being created, which it does not leave on its own`);
40992
- await this.sleep(delay);
41607
+ await abortableSleep((ms) => this.sleep(ms), delay, signal);
40993
41608
  delay = Math.min(delay * 2, 1e4);
40994
41609
  }
40995
41610
  throw new Error(`Timed out waiting for DocDB DBInstance ${dbInstanceIdentifier} to become available`);
@@ -41372,14 +41987,14 @@ var DocDBProvider = class {
41372
41987
  deleteAfterProtectionFlip(logicalId, physicalId, send) {
41373
41988
  return deleteAfterProtectionFlip.call(this, logicalId, physicalId, send);
41374
41989
  }
41375
- waitForClusterAvailable(logicalId, dbClusterIdentifier, maxWaitMs) {
41376
- return waitForClusterAvailable$1.call(this, logicalId, dbClusterIdentifier, maxWaitMs);
41990
+ waitForClusterAvailable(logicalId, dbClusterIdentifier, maxWaitMs, signal) {
41991
+ return waitForClusterAvailable$1.call(this, logicalId, dbClusterIdentifier, maxWaitMs, signal);
41377
41992
  }
41378
41993
  waitForClusterDeleted(logicalId, dbClusterIdentifier, maxWaitMs) {
41379
41994
  return waitForClusterDeleted$1.call(this, logicalId, dbClusterIdentifier, maxWaitMs);
41380
41995
  }
41381
- waitForInstanceAvailable(logicalId, dbInstanceIdentifier, maxWaitMs) {
41382
- return waitForInstanceAvailable.call(this, logicalId, dbInstanceIdentifier, maxWaitMs);
41996
+ waitForInstanceAvailable(logicalId, dbInstanceIdentifier, maxWaitMs, signal) {
41997
+ return waitForInstanceAvailable.call(this, logicalId, dbInstanceIdentifier, maxWaitMs, signal);
41383
41998
  }
41384
41999
  waitForInstanceDeleted(dbInstanceIdentifier, maxWaitMs) {
41385
42000
  return waitForInstanceDeleted.call(this, dbInstanceIdentifier, maxWaitMs);
@@ -45843,6 +46458,7 @@ async function createCacheCluster(logicalId, resourceType, properties, mask) {
45843
46458
  reportCreatedResource(logicalId, resourceType, cacheClusterId);
45844
46459
  this.logger.debug(`Successfully created CacheCluster ${logicalId}: ${cacheClusterId}`);
45845
46460
  if (process.env["CDKD_NO_WAIT"] !== "true") await this.waitForClusterAvailable(cacheClusterId);
46461
+ else deferReadiness(logicalId, resourceType, cacheClusterId, (signal) => this.waitForClusterAvailable(cacheClusterId, void 0, void 0, void 0, signal));
45846
46462
  const described = await this.describeCacheCluster(cacheClusterId);
45847
46463
  return {
45848
46464
  physicalId: cacheClusterId,
@@ -45887,10 +46503,11 @@ async function describeCacheCluster(cacheClusterId) {
45887
46503
  ShowCacheNodeInfo: true
45888
46504
  }))).CacheClusters?.[0];
45889
46505
  }
45890
- async function waitForClusterAvailable(cacheClusterId, maxWaitMs = 6e5, expectedNodeType, removedNodeIds = []) {
46506
+ async function waitForClusterAvailable(cacheClusterId, maxWaitMs = 6e5, expectedNodeType, removedNodeIds = [], signal) {
45891
46507
  const startTime = Date.now();
45892
46508
  let delay = 1e4;
45893
46509
  while (Date.now() - startTime < maxWaitMs) {
46510
+ throwIfReadinessAborted(signal);
45894
46511
  const cluster = await this.describeCacheCluster(cacheClusterId);
45895
46512
  const status = cluster?.CacheClusterStatus;
45896
46513
  this.logger.debug(`CacheCluster ${cacheClusterId} status: ${status}`);
@@ -45900,7 +46517,7 @@ async function waitForClusterAvailable(cacheClusterId, maxWaitMs = 6e5, expected
45900
46517
  if (status === "available" && removalDone && (expectedNodeType === void 0 || liveNodeType === expectedNodeType)) return;
45901
46518
  if (!removalDone && status === "available" && (cluster?.PendingModifiedValues?.CacheNodeIdsToRemove ?? []).length === 0 && Date.now() - startTime > 12e4) throw new Error(safeMsg`CacheCluster ${cacheClusterId} is available and still lists cache nodes ${removedNodeIds.join(", ")} with no removal pending; the removal was not applied. Check the cluster's events (aws elasticache describe-events) for the reason, then deploy again.`);
45902
46519
  if (expectedNodeType !== void 0 && liveNodeType !== expectedNodeType && status === "available" && cluster?.PendingModifiedValues?.CacheNodeType === void 0 && Date.now() - startTime > 12e4) throw new Error(safeMsg`CacheCluster ${cacheClusterId} is available with node type ${liveNodeType} and no node-type change pending; the change to ${expectedNodeType} was not applied. Check the cluster's events (aws elasticache describe-events) for the reason, then deploy again.`);
45903
- await this.sleep(delay);
46520
+ await abortableSleep((ms) => this.sleep(ms), delay, signal);
45904
46521
  delay = Math.min(delay * 2, 1e4);
45905
46522
  }
45906
46523
  throw new Error(expectedNodeType === void 0 && removedNodeIds.length === 0 ? `Timed out waiting for CacheCluster ${cacheClusterId} to become available` : safeMsg`Timed out waiting for CacheCluster ${cacheClusterId} to become available` + (expectedNodeType === void 0 ? "" : safeMsg` with node type ${expectedNodeType}`) + (removedNodeIds.length === 0 ? "" : safeMsg` without cache nodes ${removedNodeIds.join(", ")}`));
@@ -46339,8 +46956,8 @@ var ElastiCacheProvider = class {
46339
46956
  describeCacheCluster(cacheClusterId) {
46340
46957
  return describeCacheCluster.call(this, cacheClusterId);
46341
46958
  }
46342
- waitForClusterAvailable(cacheClusterId, maxWaitMs, expectedNodeType, removedNodeIds) {
46343
- return waitForClusterAvailable.call(this, cacheClusterId, maxWaitMs, expectedNodeType, removedNodeIds);
46959
+ waitForClusterAvailable(cacheClusterId, maxWaitMs, expectedNodeType, removedNodeIds, signal) {
46960
+ return waitForClusterAvailable.call(this, cacheClusterId, maxWaitMs, expectedNodeType, removedNodeIds, signal);
46344
46961
  }
46345
46962
  waitForClusterDeleted(logicalId, cacheClusterId, maxWaitMs) {
46346
46963
  return waitForClusterDeleted.call(this, logicalId, cacheClusterId, maxWaitMs);
@@ -68179,7 +68796,11 @@ async function create(logicalId, resourceType, properties, context) {
68179
68796
  reportCreatedResource(logicalId, resourceType, certificateArn);
68180
68797
  this.logger.debug(`Requested ACM certificate: ${certificateArn}`);
68181
68798
  if (!(process.env["CDKD_NO_WAIT"] === "true")) await this.waitForCertificateIssued(certificateArn, logicalId, resourceType, dnsValidationZones(properties));
68182
- else this.logger.warn(`Skipping wait for ACM certificate ${logicalId} (CDKD_NO_WAIT=true). Downstream consumers (CloudFront / ALB) will fail until the cert reaches ISSUED.`);
68799
+ else {
68800
+ this.logger.warn(`Skipping wait for ACM certificate ${logicalId} (CDKD_NO_WAIT=true). Downstream consumers (CloudFront / ALB) will fail until the cert reaches ISSUED.`);
68801
+ const zones = dnsValidationZones(properties);
68802
+ deferReadiness(logicalId, resourceType, certificateArn, (signal) => this.waitForCertificateIssued(certificateArn, logicalId, resourceType, zones, signal));
68803
+ }
68183
68804
  idempotencyToken.release();
68184
68805
  return {
68185
68806
  physicalId: certificateArn,
@@ -68410,7 +69031,7 @@ async function importImpl(input) {
68410
69031
  }
68411
69032
 
68412
69033
  // src/provisioning/providers/acm-certificate/wait.ts
68413
- async function waitForCertificateIssued(certificateArn, logicalId, resourceType, zones = /* @__PURE__ */ new Map()) {
69034
+ async function waitForCertificateIssued(certificateArn, logicalId, resourceType, zones = /* @__PURE__ */ new Map(), signal) {
68414
69035
  this.logger.debug(`Waiting for ACM certificate ${certificateArn} to reach ISSUED status...`);
68415
69036
  const written = /* @__PURE__ */ new Map();
68416
69037
  let interrupted = false;
@@ -68421,6 +69042,7 @@ async function waitForCertificateIssued(certificateArn, logicalId, resourceType,
68421
69042
  process.on("SIGINT", sigintHandler);
68422
69043
  try {
68423
69044
  for (let attempt = 1; attempt <= this.maxPollAttempts; attempt++) {
69045
+ throwIfReadinessAborted(signal);
68424
69046
  if (interrupted) {
68425
69047
  this.logger.debug(`ACM certificate ${certificateArn} wait interrupted by SIGINT, proceeding`);
68426
69048
  return;
@@ -68444,7 +69066,7 @@ async function waitForCertificateIssued(certificateArn, logicalId, resourceType,
68444
69066
  this.logger.debug(`ACM certificate ${certificateArn} status: ${status} (attempt ${attempt}/${this.maxPollAttempts})`);
68445
69067
  const sleepEnd = Date.now() + this.pollIntervalMs;
68446
69068
  const tickMs = Math.min(1e3, this.pollIntervalMs);
68447
- while (Date.now() < sleepEnd && !interrupted) await new Promise((resolve) => setTimeout(resolve, tickMs));
69069
+ while (Date.now() < sleepEnd && !interrupted && signal?.aborted !== true) await new Promise((resolve) => setTimeout(resolve, tickMs));
68448
69070
  }
68449
69071
  throw new ProvisioningError(`ACM certificate ${logicalIdShown(logicalId)} ${isPlainImportValue(certificateArn) ? `(${certificateArn})` : VALUE_NOT_SHOWN} did not reach ISSUED status within ${this.maxPollAttempts * this.pollIntervalMs / 1e3}s. ` + (lastValidationOptions === void 0 ? "AWS had not published this certificate's validation records before the wait ran out, so none were printed — re-run the deploy to request them again. " : `Add the validation records printed above to your DNS zone and re-run the deploy. `) + `ACM reuses a domain's validation CNAME across certificates, so records you add now validate the next attempt. To wait LONGER, raise CDKD_ACM_POLL_ATTEMPTS / CDKD_ACM_POLL_INTERVAL_MS — this cap is the provider's OWN and is what just fired; --resource-timeout alone will not lengthen it. Past ~30m also raise --resource-timeout AWS::CertificateManager::Certificate=${commandHole("duration")}, or the engine's per-resource deadline becomes the shorter of the two. Or set CDKD_NO_WAIT=true to keep the certificate and validate it out of band.`, resourceType, logicalId, certificateArn);
68450
69072
  } finally {
@@ -68557,8 +69179,8 @@ var ACMCertificateProvider = class {
68557
69179
  import(input) {
68558
69180
  return importImpl.call(this, input);
68559
69181
  }
68560
- waitForCertificateIssued(certificateArn, logicalId, resourceType, zones) {
68561
- return waitForCertificateIssued.call(this, certificateArn, logicalId, resourceType, zones);
69182
+ waitForCertificateIssued(certificateArn, logicalId, resourceType, zones, signal) {
69183
+ return waitForCertificateIssued.call(this, certificateArn, logicalId, resourceType, zones, signal);
68562
69184
  }
68563
69185
  writeValidationRecords(validations, zones, written, certificateArn, logicalId, resourceType) {
68564
69186
  return writeValidationRecords.call(this, validations, zones, written, certificateArn, logicalId, resourceType);
@@ -68571,5 +69193,5 @@ var ACMCertificateProvider = class {
68571
69193
  }
68572
69194
  };
68573
69195
 
68574
- export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppConfigEnvironmentProvider, AppSyncProvider, BudgetsBudgetProvider, CloudFrontDistributionProvider, CloudFrontOACProvider, CloudFrontOAIProvider, CloudTrailProvider, CloudWatchAlarmProvider, CloudWatchAnomalyDetectorProvider, CodeBuildProvider, CodeCommitRepositoryProvider, CognitoUserPoolProvider, ConnectInstanceProvider, 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, LightsailAlarmProvider, 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, WaitConditionProvider };
68575
- //# sourceMappingURL=provider-classes-DtaAa9Bd.js.map
69196
+ export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppConfigEnvironmentProvider, AppSyncProvider, BudgetsBudgetProvider, CloudFrontDistributionProvider, CloudFrontOACProvider, CloudFrontOAIProvider, CloudTrailProvider, CloudWatchAlarmProvider, CloudWatchAnomalyDetectorProvider, CodeBuildProvider, CodeCommitRepositoryProvider, CognitoUserPoolProvider, ConnectInstanceProvider, DLMLifecyclePolicyProvider, DocDBProvider, DocDBSubnetGroupProvider, DynamoDBGlobalTableProvider, DynamoDBTableProvider, EC2Provider, EC2VPCEndpointProvider, 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, LightsailAlarmProvider, 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, WaitConditionProvider };
69197
+ //# sourceMappingURL=provider-classes-Baf5t9eA.js.map