@cdkd/cli 0.333.1 → 0.334.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 (32) hide show
  1. package/dist/{asg-provider-BbliKaDP.js → asg-provider-1ln_ANde.js} +4 -4
  2. package/dist/{asg-provider-BbliKaDP.js.map → asg-provider-1ln_ANde.js.map} +1 -1
  3. package/dist/{aws-failure-text-DiHodi76.js → aws-failure-text-CoS1huLy.js} +9 -3
  4. package/dist/aws-failure-text-CoS1huLy.js.map +1 -0
  5. package/dist/cli.js +2 -2
  6. package/dist/{db-instance-modify-retry-Bk1YZkjk.js → db-instance-modify-retry-BCMjrw0H.js} +4 -4
  7. package/dist/{db-instance-modify-retry-Bk1YZkjk.js.map → db-instance-modify-retry-BCMjrw0H.js.map} +1 -1
  8. package/dist/{deploy-engine-DKzYzhTn.js → deploy-engine-DIK2cLmn.js} +8479 -8209
  9. package/dist/deploy-engine-DIK2cLmn.js.map +1 -0
  10. package/dist/{iam-role-provider-71vuY1u1.js → iam-role-provider-I4_WshA4.js} +4 -4
  11. package/dist/{iam-role-provider-71vuY1u1.js.map → iam-role-provider-I4_WshA4.js.map} +1 -1
  12. package/dist/index.d.ts +167 -176
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +4 -4
  15. package/dist/{neptune-provider-CjstCj4P.js → neptune-provider-D4YDyGKt.js} +5 -5
  16. package/dist/{neptune-provider-CjstCj4P.js.map → neptune-provider-D4YDyGKt.js.map} +1 -1
  17. package/dist/{program-CC-_sxSR.js → program-Dipucz4X.js} +11640 -11454
  18. package/dist/program-Dipucz4X.js.map +1 -0
  19. package/dist/{provider-classes-CQGXOpn5.js → provider-classes-BBtEm3us.js} +661 -366
  20. package/dist/provider-classes-BBtEm3us.js.map +1 -0
  21. package/dist/{rds-provider-cPMJ6TAE.js → rds-provider-BOcleXHf.js} +11 -6
  22. package/dist/{rds-provider-cPMJ6TAE.js.map → rds-provider-BOcleXHf.js.map} +1 -1
  23. package/dist/{update-removal-B3ZdAPZ2.js → update-removal-C_x1-FM4.js} +366 -356
  24. package/dist/update-removal-C_x1-FM4.js.map +1 -0
  25. package/dist/{version-CwANBLn4.js → version-CXL6Ontw.js} +2 -2
  26. package/dist/{version-CwANBLn4.js.map → version-CXL6Ontw.js.map} +1 -1
  27. package/package.json +1 -1
  28. package/dist/aws-failure-text-DiHodi76.js.map +0 -1
  29. package/dist/deploy-engine-DKzYzhTn.js.map +0 -1
  30. package/dist/program-CC-_sxSR.js.map +0 -1
  31. package/dist/provider-classes-CQGXOpn5.js.map +0 -1
  32. package/dist/update-removal-B3ZdAPZ2.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { d as withApiGatewayPacing, l as s3ClientDefaults, r as getAwsClients } from "./aws-clients-ez_oXu6x.js";
2
- import { $ as safeMsg, A as isBeforeStateRead, E as generatedNameFor, J as displaySafe, N as recordedGeneratedNameKept, O as getCurrentStackInstanceId, Q as plainIdentOr, T as generateResourceNameWithFallback, V as SECRET_REF_MAX_CODE_POINTS, W as asIsMessage, X as isPasteableIdent, Y as displayStackName, a as safeStringify, i as isAwsAuthoredFailure, n as describeAwsFailure, q as displayIdent, r as describeAwsStatusReason, s as getLogger, t as VERBOSE_POINTER, w as generateResourceName } from "./aws-failure-text-DiHodi76.js";
3
- import { $ as isTerminalDeleteFailure, A as setBounded, Ar as isThrottlingError, At as stateOrphanRecordRemedy, B as resolveExplicitPhysicalId, C as AmbiguousCreateLatch, Cr as isExplicitDenyError, Ct as compositeIdFormatMessage, D as isInsideWindow, Dt as packCompositeId, E as createAttemptKey, Er as isTransientServerError, Et as logicalIdShown, F as isQuotableImportValue, Fn as ResourceUpdateNotSupportedError, Ft as maskerOrIdentity, Gt as markAuxiliaryFailure, H as assertRegionMatch, I as normalizeAwsTagsToCfn, It as withDerivedNameMasks, J as deleteAfterProtectionFlipWithFinalSnapshot, K as ProtectionFlipRegistry, Kt as markCreatedBeforeFailure, L as quotedRemedyLogicalId, M as VALUE_NOT_SHOWN, Mr as markRedactedCause, Mt as createMaskedRetryLogger, N as isPlainImportJson, Nn as ProvisioningError, Nr as wrapMaskedAwsError, Nt as isSecretDerivedValue, O as replayFollowedAmbiguousAttempt, Or as THROTTLING_ERROR_NAMES, P as isPlainImportValue, Pt as maskDeep, Q as isTerminalDbWaitStatus, Qn as pasteableCommand, R as refusalTypeShown, S as AMBIGUOUS_LATCH_TTL_MS, Sr as isAmbiguousOutcomeError, St as canonicalizeRoute53QueryName, T as ambiguousAttemptLead, Tr as isRetryableTransientError, Tt as compositeIdSkipResult, Ut as isAuxiliaryFailure, V as RESOURCE_NOT_FOUND, W as markNotGone, Xn as hasClauseBreak, Y as deleteWithProtectionCompensation, Yn as commandHole, Z as isProceedDbStatus, Zn as isInertUnquoted, _ as onlySecretDerived, a as withRemovalDefaults, b as recordedPrincipalsRepair, bt as isInterruptedWaitError, ct as UNNAMEABLE_ID_CLAUSE, dn as withPasteableAwsProfile, dt as pasteableAwsCommand, er as plainOrDescribed, et as logGroupProtectionSite, f as retractCreatedResource, fn as ambientClientDefaults, ft as protectedReplacementAdvice, g as holdsSecretDerivedEntry, gn as AccountIdUnavailableError, h as SECRET_DERIVED_READ_LIVE, hn as credentialFingerprint, hr as relayedNameCollision, ht as ElapsedBudgetRegistry, i as removedTemplateKeys, ir as withheldTargetClause, j as withoutServerErrorRetries, jr as markNonRetryable, jt as createMaskedLogSinks, k as replayedSendWindow, kr as isMarkedNonRetryable, kt as segmentAfterAnchor, lt as WITHHELD_AWS_COMMAND, mn as clientDefaultsFor, mr as markReplayMayCollide, mt as ElapsedBudget, nt as protectionFlipKey, on as injectiveKey, ot as userPoolProtectionSite, pn as ambientCredentialConfig, pr as markNameCollision, pt as renderDisableCommand, qt as markSupersedesEarlierCreate, rr as shellQuote, rt as rdsFamilyProtectionSite, sn as injectiveKeyPrefix, t as clearOnUpdateRemoval, tt as observeThenDisableProtection, u as reportCreatedResource, ut as isAwsCliLiteral, v as readPrincipalLists, vn as CdkdError, w as RecentIdSet, wt as compositeIdSeparatorRefusal, xt as startInterruptWatch, yr as explicitDenyPolicyKind, z as remedyLogicalId, zt as clearCreatedBeforeFailure } from "./update-removal-B3ZdAPZ2.js";
2
+ import { $ as safeMsg, E as generateResourceNameWithFallback, J as displaySafe, M as getCurrentStackInstanceId, O as recordedGeneratedNameKept, P as isBeforeStateRead, Q as plainIdentOr, T as generateResourceName, V as SECRET_REF_MAX_CODE_POINTS, W as asIsMessage, X as isPasteableIdent, Y as displayStackName, a as safeStringify, i as isAwsAuthoredFailure, n as describeAwsFailure, q as displayIdent, r as describeAwsStatusReason, s as getLogger, t as VERBOSE_POINTER, y as generatedNameFor } from "./aws-failure-text-CoS1huLy.js";
3
+ import { $ as isTerminalDeleteFailure, $n as markNonRetryable, A as setBounded, Ar as shellQuote, At as stateOrphanRecordRemedy, B as resolveExplicitPhysicalId, C as AmbiguousCreateLatch, Cr as hasClauseBreak, Ct as compositeIdFormatMessage, D as isInsideWindow, Dr as plainOrDescribed, Dt as packCompositeId, E as createAttemptKey, En as ResourceUpdateNotSupportedError, Et as logicalIdShown, F as isQuotableImportValue, Fn as markNameCollision, Ft as maskerOrIdentity, Gn as isExplicitDenyError, Gt as markAuxiliaryFailure, H as assertRegionMatch, I as normalizeAwsTagsToCfn, In as markReplayMayCollide, It as withDerivedNameMasks, J as deleteAfterProtectionFlipWithFinalSnapshot, Jn as isTransientServerError, K as ProtectionFlipRegistry, Kt as markCreatedBeforeFailure, L as quotedRemedyLogicalId, Ln as relayedNameCollision, M as VALUE_NOT_SHOWN, Mt as createMaskedRetryLogger, N as isPlainImportJson, Nt as isSecretDerivedValue, O as replayFollowedAmbiguousAttempt, P as isPlainImportValue, Pt as maskDeep, Q as isTerminalDbWaitStatus, Qn as isThrottlingError, R as refusalTypeShown, S as AMBIGUOUS_LATCH_TTL_MS, Sr as commandHole, St as canonicalizeRoute53QueryName, T as ambiguousAttemptLead, Tr as pasteableCommand, Tt as compositeIdSkipResult, Ut as isAuxiliaryFailure, V as RESOURCE_NOT_FOUND, Vn as explicitDenyPolicyKind, W as markNotGone, Wn as isAmbiguousOutcomeError, Xn as THROTTLING_ERROR_NAMES, Y as deleteWithProtectionCompensation, Z as isProceedDbStatus, Zn as isMarkedNonRetryable, _ as onlySecretDerived, a as withRemovalDefaults, b as recordedPrincipalsRepair, bt as isInterruptedWaitError, cr as CdkdError, ct as UNNAMEABLE_ID_CLAUSE, dn as withPasteableAwsProfile, dt as pasteableAwsCommand, er as markRedactedCause, et as logGroupProtectionSite, f as retractCreatedResource, fn as ambientClientDefaults, ft as protectedReplacementAdvice, g as holdsSecretDerivedEntry, h as SECRET_DERIVED_READ_LIVE, hn as credentialFingerprint, ht as ElapsedBudgetRegistry, i as removedTemplateKeys, j as withoutServerErrorRetries, jr as withheldTargetClause, jt as createMaskedLogSinks, k as replayedSendWindow, kt as segmentAfterAnchor, lt as WITHHELD_AWS_COMMAND, mn as clientDefaultsFor, mt as ElapsedBudget, nt as protectionFlipKey, on as injectiveKey, or as AccountIdUnavailableError, ot as userPoolProtectionSite, pn as ambientCredentialConfig, pr as ProvisioningError, pt as renderDisableCommand, qn as isRetryableTransientError, qt as markSupersedesEarlierCreate, rt as rdsFamilyProtectionSite, sn as injectiveKeyPrefix, t as clearOnUpdateRemoval, tr as wrapMaskedAwsError, tt as observeThenDisableProtection, u as reportCreatedResource, ut as isAwsCliLiteral, v as readPrincipalLists, w as RecentIdSet, wr as isInertUnquoted, wt as compositeIdSeparatorRefusal, xt as startInterruptWatch, z as remedyLogicalId, zt as clearCreatedBeforeFailure } from "./update-removal-C_x1-FM4.js";
4
4
  import { c as ambientRegion } from "./aws-client-defaults-BLXFsfMa.js";
5
- import { $ as deleteTableWithIndexBusyRetry, $c as redactForState, $i as refuseMalformedDesiredTags, A as vectorIndexesForCreate, Aa as reDisableInstanceApiTermination, Ac as ecsServiceLaunchTypeSetOrChanged, B as reverseMapTableContributorInsights, C as isTtlAlreadyDisabled, Cc as requireConfigString, Cd as decodeListingKey, D as sendTtlWaitingOutRateLimit, Da as ec2InstanceProtectionSite, Dc as withRetry, Dd as derivePartitionAndUrlSuffix, Dl as recoverMaskedOutput, Dt as enclosingDeadlineRemainingMs, E as readTtlSpec, Ed as canonicalizeRegion, Et as enclosingDeadlineExpired, F as indexDeclaresContributorInsights, Fi as APPSYNC_APIKEY_ARN_RESOURCE_PATH, Fo as passedParameterClassesOf, G as beginDeleteWait, Ga as isSettledInstanceState, Gn as getCurrentProducerRegions, H as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, Hd as displayAssemblyPath, Hr as awaitInFlightSibling, I as planContributorInsightsOp, Ii as maskedSecretSegment, J as resolveDynamoDbDeleteBudgetClock, Ja as s3BucketDualStackDomainName, Ji as stringifyIfAssigned, Jn as isRedactedRecordedValue, K as compensateRemovedDeletionProtection, Ka as s3BucketArn, Kc as passedNoEchoParametersOf, Kr as replacedDeleteFailureVerdict, L as planIndexContributorInsightsOps, La as isUsableAttemptedName, M as vectorIndexesShapeDetail, Ma as onlySecretReferencesDiffer, Mc as canonicalLambdaFunctionName, Ml as carriesSecretMask, Mo as parseWebACLArn, N as CONTRIBUTOR_INSIGHTS_KEY, Na as unchangedBehindSecretReference, Nc as lambdaFunctionNameForMask, O as planVectorIndexUpdates, Oa as isTerminationProtectionPropagationError, Oc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, Ol as physicalNameCopiesOf, Os as refuseMalformedNestedChildOutputs, P as contributorInsightsRefusals, Pc as sameLambdaFunctionAddress, Q as TABLE_INDEX_NOUN, Qc as markSameGenerationBag, Qi as readTagList, Qs as findSdkUnwiredProperties, Qt as withNestedStackContext, R as readContributorInsightsSpec, Rs as refuseMalformedResourcesForDestroy, Sc as requireConfigObject, Si as secretNamedAttributeNamesOf, T as planTimeToLive, Ta as withIndeterminateGuard, U as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Ud as renderAssemblyPathEscape, Ui as acquireIdempotencyToken, Us as accountArgs, V as stripIndexContributorInsights, Vd as describeFileReadFailure, Vi as reserveStackCreateToken, Vr as refuseRestoreFromItself, W as DYNAMODB_DELETE_POLL_COST_MS, Wd as resolveAssemblyPath, Wr as getStackRecords, Ws as withheldAccountClause, Wt as getNestedRevertRun, X as DELETE_INDEX_WAIT_PROCEED_NOTE, Xa as s3BucketWebsiteUrl, Xi as DBPROXY_TAG_OPTIONS, Xn as redactedDeleteAddressSkip, Y as resolveDynamoDbDeleteBudgetMs, Ya as s3BucketRegionalDomainName, Yi as DBPROXY_TAGS_WHAT, Yn as redactedDeleteAddressFields, Z as INDEX_SETTLE_POLL_INTERVAL_MS, Zi as planTagDiff, Zt as getCurrentNestedStackContext, _ as streamMemberRefusals, _a as waitForLambdaFunctionActive, _c as configIntegerRefusal, _t as findNestedTemplateTreeDefect, at as hasCdkAutoDeleteTag, b as waitForGoneAfterDelete, bc as replayWarn, bl as dynamicReferenceTokens, bt as renderNestedTemplateTreeDefect, c as DynamoDBGlobalTableProvider, cn as chunks, ct as markRefusedBeforeApplying, d as declaredStreamPolicyMember, dc as isWarmThroughputDecrease, dn as withApiLimit, ea as tagMapAsList, ec as withoutSdkUnwiredProperties, el as recordReferenceProvenanceEntry, et as maskedLogger, f as declaredStreamTagsMember, fc as toCfnInteger, g as streamDeclaresTags, gc as configBooleanRefusal, gu as timePhase, h as streamDeclaresPolicy, ha as getCurrentResourceSecrets, hc as coerceCfnInteger, il as hasMaskableValues, it as S3_AUTO_DELETE_OBJECTS_TAG, j as vectorIndexesSettled, ja as reEnableInstanceApiTermination, jc as emrClusterInstancesReplaced, k as readbackVectorIndexes, ka as observeThenDisableInstanceApiTermination, kl as recordAttributeIdCopy, l as STREAM_POLICY_KEY, lc as WARM_THROUGHPUT_MEMBERS, ln as isAccessDeniedError, m as reverseMapStreamPolicy, mc as coerceCfnBoolean, na as isRefusedByName, nt as waitForIndexesSettled, ot as isTruthyCfnBoolean, p as planStreamMemberOps, pc as toFiniteNumber, q as deleteBudgetKey, qa as s3BucketDomainName, qi as definedAttributes, qn as REDACTED_DELETE_ADDRESS_SKIP_REASON, qt as revertNestedChildFromJournal, ra as markDeleteStarted, rt as ECR_AUTO_DELETE_IMAGES_TAG, st as getPriorAttempts, t as DeployEngine, ta as tagPlanWarning, tl as snapshotPassProvenance, to as outputReferenceProvenanceOf, tt as relayedIndexBusyDelete, u as STREAM_TAGS_KEY, uc as coerceWarmThroughput$1, un as lookupEachName, v as streamPolicyMatchesDeclared, vc as configStringRefusal, vl as withoutPhysicalNameCopies, vt as isAbsoluteAssetPath, w as isTtlRateLimited, wa as deleteSkipReason, wu as rewriteTemplateAssetReferences, x as resolvedResourceTimeoutMs, xc as requireConfigArray, xo as getAccountInfo, y as streamTagsMatchDeclared, ya as slowCcOperationTimeoutMs, yc as readConfigString, yt as listNestedTemplateRows, yu as stringifyValue, z as reverseMapIndexContributorInsights, zi as earliestDefined } from "./deploy-engine-DKzYzhTn.js";
6
- import { a as IamCreateClientCache, i as isEntityAlreadyExists, n as collectInlinePolicyNamesManagedBySiblings, r as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-71vuY1u1.js";
7
- import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, t as canonicalizeIpv4Cidr } from "./program-CC-_sxSR.js";
8
- import { n as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-Bk1YZkjk.js";
9
- import { RDSProvider } from "./rds-provider-cPMJ6TAE.js";
10
- import { NeptuneProvider } from "./neptune-provider-CjstCj4P.js";
11
- import { ASGProvider } from "./asg-provider-BbliKaDP.js";
5
+ import { $ as deleteTableWithIndexBusyRetry, $c as markSameGenerationBag, $i as refuseMalformedDesiredTags, $o as requireConfigArray, A as vectorIndexesForCreate, Aa as reDisableInstanceApiTermination, B as reverseMapTableContributorInsights, C as isTtlAlreadyDisabled, D as sendTtlWaitingOutRateLimit, Da as ec2InstanceProtectionSite, Dd as canonicalizeRegion, Dl as recoverMaskedOutput, Dt as enclosingDeadlineRemainingMs, E as readTtlSpec, Ec as withoutSdkUnwiredProperties, Et as enclosingDeadlineExpired, F as indexDeclaresContributorInsights, Fc as sameLambdaFunctionAddress, Fi as APPSYNC_APIKEY_ARN_RESOURCE_PATH, G as beginDeleteWait, Gd as resolveAssemblyPath, Gn as getCurrentProducerRegions, Go as toFiniteNumber, H as DYNAMODB_DELETE_DEADLINE_MARGIN_MS, Hd as describeFileReadFailure, Ho as coerceWarmThroughput$1, Hr as awaitInFlightSibling, I as planContributorInsightsOp, Ii as maskedSecretSegment, J as resolveDynamoDbDeleteBudgetClock, Ji as stringifyIfAssigned, Jn as isRedactedRecordedValue, Jo as configBooleanRefusal, K as compensateRemovedDeletionProtection, Ko as coerceCfnBoolean, Kr as replacedDeleteFailureVerdict, L as planIndexContributorInsightsOps, M as vectorIndexesShapeDetail, Ma as onlySecretReferencesDiffer, Mc as emrClusterInstancesReplaced, N as CONTRIBUTOR_INSIGHTS_KEY, Na as unchangedBehindSecretReference, Nc as canonicalLambdaFunctionName, Nl as carriesSecretMask, O as planVectorIndexUpdates, Oa as isTerminationProtectionPropagationError, Od as derivePartitionAndUrlSuffix, Ol as physicalNameCopiesOf, P as contributorInsightsRefusals, Pc as lambdaFunctionNameForMask, Q as TABLE_INDEX_NOUN, Qi as readTagList, Qo as replayWarn, Qt as withNestedStackContext, R as readContributorInsightsSpec, Si as secretNamedAttributeNamesOf, T as planTimeToLive, Ta as withIndeterminateGuard, Tu as rewriteTemplateAssetReferences, U as DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS, Ud as displayAssemblyPath, Ui as acquireIdempotencyToken, Uo as isWarmThroughputDecrease, V as stripIndexContributorInsights, Vi as reserveStackCreateToken, Vo as WARM_THROUGHPUT_MEMBERS, Vr as refuseRestoreFromItself, W as DYNAMODB_DELETE_POLL_COST_MS, Wd as renderAssemblyPathEscape, Wo as toCfnInteger, Wr as getStackRecords, Wt as getNestedRevertRun, X as DELETE_INDEX_WAIT_PROCEED_NOTE, Xi as DBPROXY_TAG_OPTIONS, Xn as redactedDeleteAddressSkip, Xo as configStringRefusal, Y as resolveDynamoDbDeleteBudgetMs, Yi as DBPROXY_TAGS_WHAT, Yn as redactedDeleteAddressFields, Yo as configIntegerRefusal, Z as INDEX_SETTLE_POLL_INTERVAL_MS, Zi as planTagDiff, Zo as readConfigString, Zt as getCurrentNestedStackContext, _ as streamMemberRefusals, _a as waitForLambdaFunctionActive, _t as findNestedTemplateTreeDefect, _u as timePhase, al as hasMaskableValues, ao as s3BucketDualStackDomainName, as as withRetry, at as hasCdkAutoDeleteTag, b as waitForGoneAfterDelete, bt as renderNestedTemplateTreeDefect, bu as stringifyValue, c as DynamoDBGlobalTableProvider, cn as chunks, ct as markRefusedBeforeApplying, d as declaredStreamPolicyMember, dn as withApiLimit, ea as tagMapAsList, ec as refuseMalformedNestedChildOutputs, el as redactForState, es as requireConfigObject, et as maskedLogger, f as declaredStreamTagsMember, g as streamDeclaresTags, gc as withheldAccountClause, go as parseWebACLArn, h as streamDeclaresPolicy, ha as getCurrentResourceSecrets, hc as accountArgs, io as s3BucketDomainName, it as S3_AUTO_DELETE_OBJECTS_TAG, j as vectorIndexesSettled, ja as reEnableInstanceApiTermination, jc as ecsServiceLaunchTypeSetOrChanged, k as readbackVectorIndexes, ka as observeThenDisableInstanceApiTermination, kc as blockDeviceMappingsDifferOnlyInDeleteOnTermination, kl as recordAttributeIdCopy, ko as isUsableAttemptedName, l as STREAM_POLICY_KEY, ln as isAccessDeniedError, m as reverseMapStreamPolicy, na as isRefusedByName, nl as snapshotPassProvenance, nt as waitForIndexesSettled, oo as s3BucketRegionalDomainName, ot as isTruthyCfnBoolean, p as planStreamMemberOps, q as deleteBudgetKey, qc as passedNoEchoParametersOf, qi as definedAttributes, qn as REDACTED_DELETE_ADDRESS_SKIP_REASON, qo as coerceCfnInteger, qt as revertNestedChildFromJournal, ra as markDeleteStarted, ro as s3BucketArn, rt as ECR_AUTO_DELETE_IMAGES_TAG, so as s3BucketWebsiteUrl, ss as passedParameterClassesOf, st as getPriorAttempts, t as DeployEngine, ta as tagPlanWarning, tl as recordReferenceProvenanceEntry, ts as requireConfigString, tt as relayedIndexBusyDelete, u as STREAM_TAGS_KEY, uc as refuseMalformedResourcesForDestroy, un as lookupEachName, v as streamPolicyMatchesDeclared, vo as outputReferenceProvenanceOf, vt as isAbsoluteAssetPath, w as isTtlRateLimited, wa as deleteSkipReason, wc as findSdkUnwiredProperties, wd as decodeListingKey, x as resolvedResourceTimeoutMs, xl as dynamicReferenceTokens, xo as getAccountInfo, y as streamTagsMatchDeclared, ya as slowCcOperationTimeoutMs, yl as withoutPhysicalNameCopies, yt as listNestedTemplateRows, z as reverseMapIndexContributorInsights, za as isSettledInstanceState, zi as earliestDefined } from "./deploy-engine-DIK2cLmn.js";
6
+ import { a as IamCreateClientCache, i as isEntityAlreadyExists, n as collectInlinePolicyNamesManagedBySiblings, r as iamEntityLeftByThisCreate, t as IAMRoleProvider } from "./iam-role-provider-I4_WshA4.js";
7
+ import { a as resolveSecretDerivedPrincipals, i as isResolvableSecretPrincipalList, n as runDestroyForStack, o as canonicalizeIpProtocolValue, r as holdsUnprovenSecretPrincipalToken, t as canonicalizeIpv4Cidr } from "./program-Dipucz4X.js";
8
+ import { n as modifyDbInstanceWhenAvailable } from "./db-instance-modify-retry-BCMjrw0H.js";
9
+ import { RDSProvider } from "./rds-provider-BOcleXHf.js";
10
+ import { NeptuneProvider } from "./neptune-provider-D4YDyGKt.js";
11
+ import { ASGProvider } from "./asg-provider-1ln_ANde.js";
12
12
  import { createHash, randomUUID } from "node:crypto";
13
13
  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";
14
14
  import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateAccessKeyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateAccessKeyCommand, UpdateGroupCommand, UpdateLoginProfileCommand, UpdateUserCommand } from "@aws-sdk/client-iam";
@@ -16,7 +16,7 @@ import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQ
16
16
  import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetSubscriptionAttributesCommand, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
17
17
  import { AddPermissionCommand, 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";
18
18
  import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
19
- 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, ModifyPrivateDnsNameOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, ModifyVpcTenancyCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceIamInstanceProfileAssociationCommand, ReplaceNetworkAclAssociationCommand, ReplaceNetworkAclEntryCommand, ReplaceRouteCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, StartInstancesCommand, StopInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
19
+ 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, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
20
20
  import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PolicyNotFoundException, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateKinesisStreamingDestinationCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
21
21
  import { APIGatewayClient, CreateAuthorizerCommand, CreateDeploymentCommand, CreateResourceCommand, CreateStageCommand, DeleteAuthorizerCommand, DeleteDeploymentCommand, DeleteIntegrationCommand, DeleteIntegrationResponseCommand, DeleteMethodCommand, DeleteMethodResponseCommand, DeleteResourceCommand, DeleteStageCommand, GetAccountCommand, GetAuthorizerCommand, GetAuthorizersCommand, GetDeploymentCommand, GetDeploymentsCommand, GetMethodCommand, GetResourceCommand, GetStageCommand, NotFoundException as NotFoundException$1, PutIntegrationCommand, PutIntegrationResponseCommand, PutMethodCommand, PutMethodResponseCommand, TagResourceCommand as TagResourceCommand$3, UntagResourceCommand as UntagResourceCommand$3, UpdateAccountCommand, UpdateAuthorizerCommand, UpdateDeploymentCommand, UpdateMethodCommand, UpdateStageCommand } from "@aws-sdk/client-api-gateway";
22
22
  import { CreateEventBusCommand, DeleteEventBusCommand, DeleteRuleCommand, 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, UpdateEventBusCommand } from "@aws-sdk/client-eventbridge";
@@ -229,7 +229,7 @@ async function detachPartialPolicy(logicalId, policyName, attached, sinks, maskS
229
229
  }
230
230
 
231
231
  // src/provisioning/providers/iam-policy/update.ts
232
- async function update$41(logicalId, physicalId, resourceType, properties, previousProperties, context) {
232
+ async function update$42(logicalId, physicalId, resourceType, properties, previousProperties, context) {
233
233
  const oldPolicyName = physicalId.includes(":") ? physicalId.split(":")[0] : physicalId;
234
234
  const log = withDerivedNameMasks(this.logger, createMaskedLogSinks(this.logger, context?.maskSecrets), [[previousProperties["PolicyName"], oldPolicyName]]);
235
235
  const { value: v } = log;
@@ -519,7 +519,7 @@ async function deleteImpl$40(logicalId, physicalId, resourceType, properties, co
519
519
  }
520
520
 
521
521
  // src/provisioning/providers/iam-policy/read-state.ts
522
- async function readCurrentState$39(physicalId, _logicalId, _resourceType, properties) {
522
+ async function readCurrentState$40(physicalId, _logicalId, _resourceType, properties) {
523
523
  if (!properties) return void 0;
524
524
  if (!properties["PolicyDocument"]) return void 0;
525
525
  const policyName = physicalId.includes(":") ? physicalId.split(":")[0] : physicalId;
@@ -569,7 +569,7 @@ function decodePolicyDocument(raw) {
569
569
  return raw;
570
570
  }
571
571
  }
572
- async function importImpl$39(input) {
572
+ async function importImpl$40(input) {
573
573
  if (input.knownPhysicalId) return {
574
574
  physicalId: input.knownPhysicalId,
575
575
  attributes: {}
@@ -606,19 +606,19 @@ var IAMPolicyProvider = class {
606
606
  return detachPartialPolicy.call(this, logicalId, policyName, attached, sinks, maskSecrets);
607
607
  }
608
608
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
609
- return update$41.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
609
+ return update$42.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
610
610
  }
611
611
  delete(logicalId, physicalId, resourceType, properties, context) {
612
612
  return deleteImpl$40.call(this, logicalId, physicalId, resourceType, properties, context);
613
613
  }
614
614
  readCurrentState(physicalId, logicalId, resourceType, properties) {
615
- return readCurrentState$39.call(this, physicalId, logicalId, resourceType, properties);
615
+ return readCurrentState$40.call(this, physicalId, logicalId, resourceType, properties);
616
616
  }
617
617
  decodePolicyDocument(raw) {
618
618
  return decodePolicyDocument.call(this, raw);
619
619
  }
620
620
  import(input) {
621
- return importImpl$39.call(this, input);
621
+ return importImpl$40.call(this, input);
622
622
  }
623
623
  };
624
624
 
@@ -719,7 +719,7 @@ async function create$40(logicalId, resourceType, properties, context) {
719
719
  }
720
720
 
721
721
  // src/provisioning/providers/iam-managed-policy/update.ts
722
- async function update$40(logicalId, physicalId, resourceType, properties, previousProperties, context) {
722
+ async function update$41(logicalId, physicalId, resourceType, properties, previousProperties, context) {
723
723
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
724
724
  const derivedPolicyName = generateResourceNameWithFallback(properties["ManagedPolicyName"], logicalId, { maxLength: 128 });
725
725
  const oldPolicyName = derivePolicyNameFromArn(physicalId);
@@ -887,7 +887,7 @@ async function deleteImpl$39(logicalId, physicalId, resourceType, _properties, c
887
887
 
888
888
  // src/provisioning/providers/iam-managed-policy/read-state.ts
889
889
  const AWS_MANAGED_POLICY_ARN_RE = /^arn:aws[a-z0-9-]*:iam::aws:/;
890
- async function readCurrentState$38(physicalId, _logicalId, _resourceType, _properties) {
890
+ async function readCurrentState$39(physicalId, _logicalId, _resourceType, _properties) {
891
891
  let policy;
892
892
  try {
893
893
  policy = (await this.iamClient.send(new GetPolicyCommand({ PolicyArn: physicalId }))).Policy;
@@ -956,7 +956,7 @@ async function readCurrentState$38(physicalId, _logicalId, _resourceType, _prope
956
956
  }
957
957
  return result;
958
958
  }
959
- async function importImpl$38(input) {
959
+ async function importImpl$39(input) {
960
960
  const explicit = resolveExplicitPhysicalId(input, "ManagedPolicyName");
961
961
  if (explicit) {
962
962
  if (explicit.startsWith("arn:")) {
@@ -1015,7 +1015,7 @@ var IAMManagedPolicyProvider = class {
1015
1015
  return create$40.call(this, logicalId, resourceType, properties, context);
1016
1016
  }
1017
1017
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
1018
- return update$40.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
1018
+ return update$41.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
1019
1019
  }
1020
1020
  delete(logicalId, physicalId, resourceType, properties, context) {
1021
1021
  return deleteImpl$39.call(this, logicalId, physicalId, resourceType, properties, context);
@@ -1030,10 +1030,10 @@ var IAMManagedPolicyProvider = class {
1030
1030
  if (attributeName === "PolicyArn") return physicalId;
1031
1031
  }
1032
1032
  readCurrentState(physicalId, logicalId, resourceType, properties) {
1033
- return readCurrentState$38.call(this, physicalId, logicalId, resourceType, properties);
1033
+ return readCurrentState$39.call(this, physicalId, logicalId, resourceType, properties);
1034
1034
  }
1035
1035
  import(input) {
1036
- return importImpl$38.call(this, input);
1036
+ return importImpl$39.call(this, input);
1037
1037
  }
1038
1038
  async isSameResource(journaledPhysicalId, record, resourceType, context) {
1039
1039
  if (resourceType !== MANAGED_POLICY_TYPE) return "unknown";
@@ -1987,7 +1987,7 @@ async function create$39(logicalId, resourceType, properties, context) {
1987
1987
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
1988
1988
  }
1989
1989
  }
1990
- async function update$39(logicalId, physicalId, resourceType, properties, previousProperties, context) {
1990
+ async function update$40(logicalId, physicalId, resourceType, properties, previousProperties, context) {
1991
1991
  const log = withDerivedNameMasks(this.logger, createMaskedLogSinks(this.logger, context?.maskSecrets), [...derivedNamePairs(resourceType, logicalId, properties), ...derivedNamePairs(resourceType, logicalId, previousProperties).map(([raw]) => [raw, physicalId])]);
1992
1992
  switch (resourceType) {
1993
1993
  case "AWS::IAM::User": return this.updateUser(logicalId, physicalId, resourceType, properties, previousProperties, log, context?.inlinePolicyClaimed);
@@ -2915,7 +2915,7 @@ async function readIdIfExists(resourceType, name) {
2915
2915
  if (token === void 0) throw new Error(`IAM returned no ${noun === "user" ? "UserId" : "GroupId"}`);
2916
2916
  return token;
2917
2917
  }
2918
- async function readCurrentState$37(physicalId, logicalId, resourceType, properties, context) {
2918
+ async function readCurrentState$38(physicalId, logicalId, resourceType, properties, context) {
2919
2919
  switch (resourceType) {
2920
2920
  case "AWS::IAM::User": return this.readUserCurrentState(physicalId, properties, context);
2921
2921
  case "AWS::IAM::Group": return this.readGroupCurrentState(physicalId, properties, context);
@@ -3035,7 +3035,7 @@ async function collectInlinePolicies(kind, physicalId, statePolicies, context) {
3035
3035
  }
3036
3036
 
3037
3037
  // src/provisioning/providers/iam-user-group/import.ts
3038
- async function importImpl$37(input) {
3038
+ async function importImpl$38(input) {
3039
3039
  switch (input.resourceType) {
3040
3040
  case "AWS::IAM::User": return this.importUser(input);
3041
3041
  case "AWS::IAM::Group": return this.importGroup(input);
@@ -3117,7 +3117,7 @@ var IAMUserGroupProvider = class {
3117
3117
  return create$39.call(this, logicalId, resourceType, properties, context);
3118
3118
  }
3119
3119
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
3120
- return update$39.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
3120
+ return update$40.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
3121
3121
  }
3122
3122
  delete(logicalId, physicalId, resourceType, properties, context) {
3123
3123
  return deleteImpl$38.call(this, logicalId, physicalId, resourceType, properties, context);
@@ -3201,7 +3201,7 @@ var IAMUserGroupProvider = class {
3201
3201
  return readIdIfExists.call(this, resourceType, name);
3202
3202
  }
3203
3203
  readCurrentState(physicalId, logicalId, resourceType, properties, context) {
3204
- return readCurrentState$37.call(this, physicalId, logicalId, resourceType, properties, context);
3204
+ return readCurrentState$38.call(this, physicalId, logicalId, resourceType, properties, context);
3205
3205
  }
3206
3206
  readUserCurrentState(physicalId, properties, context) {
3207
3207
  return readUserCurrentState.call(this, physicalId, properties, context);
@@ -3213,7 +3213,7 @@ var IAMUserGroupProvider = class {
3213
3213
  return collectInlinePolicies.call(this, kind, physicalId, statePolicies, context);
3214
3214
  }
3215
3215
  import(input) {
3216
- return importImpl$37.call(this, input);
3216
+ return importImpl$38.call(this, input);
3217
3217
  }
3218
3218
  importUser(input) {
3219
3219
  return importUser.call(this, input);
@@ -3428,7 +3428,7 @@ async function applyTags$1(bucketName, tags) {
3428
3428
  }));
3429
3429
  this.logger.debug(`Applied ${tags.length} tags to bucket ${this.shown(bucketName)}`);
3430
3430
  }
3431
- async function applyTagDiff$19(bucketName, resourceType, logicalId, oldTagsRaw, newTagsRaw, abacEnabled = false) {
3431
+ async function applyTagDiff$20(bucketName, resourceType, logicalId, oldTagsRaw, newTagsRaw, abacEnabled = false) {
3432
3432
  const plan = planTagDiff(oldTagsRaw, newTagsRaw);
3433
3433
  const desiredRead = readTagList(newTagsRaw, "desired");
3434
3434
  const desired = desiredRead.kind === "tags" ? desiredRead.tags : [];
@@ -5667,7 +5667,7 @@ async function applySubConfigDiffs(bucketName, properties, previousProperties, c
5667
5667
  }
5668
5668
 
5669
5669
  // src/provisioning/providers/s3-bucket/update-delete.ts
5670
- async function update$38(logicalId, physicalId, resourceType, properties, previousProperties, context) {
5670
+ async function update$39(logicalId, physicalId, resourceType, properties, previousProperties, context) {
5671
5671
  if (this.opMask === void 0) {
5672
5672
  const sinks = withDerivedNameMasks(this.logger, createMaskedLogSinks(this.logger, context?.maskSecrets), [[previousProperties["BucketName"], physicalId], [previousProperties["BucketNamePrefix"], physicalId]]);
5673
5673
  return this.maskedView(sinks).update(logicalId, physicalId, resourceType, properties, previousProperties, context);
@@ -5818,7 +5818,7 @@ function generatedCreateName$3(_resourceType, logicalId, properties) {
5818
5818
  if (properties["BucketNamePrefix"] || properties["BucketName"]) return void 0;
5819
5819
  return generatedNameFor("AWS::S3::Bucket", logicalId);
5820
5820
  }
5821
- async function importImpl$36(input) {
5821
+ async function importImpl$37(input) {
5822
5822
  const explicit = resolveExplicitPhysicalId(input, "BucketName");
5823
5823
  if (explicit) try {
5824
5824
  await this.s3Client.send(new HeadBucketCommand({ Bucket: explicit }));
@@ -6074,7 +6074,7 @@ async function create$38(logicalId, resourceType, properties, context) {
6074
6074
  }
6075
6075
 
6076
6076
  // src/provisioning/providers/s3-bucket/read-state.ts
6077
- async function readCurrentState$36(physicalId, logicalId, _resourceType, _properties, context) {
6077
+ async function readCurrentState$37(physicalId, logicalId, _resourceType, _properties, context) {
6078
6078
  const headAttempts = context?.afterOwnWrite === true ? 5 : 1;
6079
6079
  for (let attempt = 1;; attempt++) try {
6080
6080
  await this.s3Client.send(new HeadBucketCommand({ Bucket: physicalId }));
@@ -6411,7 +6411,7 @@ var S3BucketProvider = class {
6411
6411
  return applyTags$1.call(this, bucketName, tags);
6412
6412
  }
6413
6413
  applyTagDiff(bucketName, resourceType, logicalId, oldTagsRaw, newTagsRaw, abacEnabled = false) {
6414
- return applyTagDiff$19.call(this, bucketName, resourceType, logicalId, oldTagsRaw, newTagsRaw, abacEnabled);
6414
+ return applyTagDiff$20.call(this, bucketName, resourceType, logicalId, oldTagsRaw, newTagsRaw, abacEnabled);
6415
6415
  }
6416
6416
  replaceAbacBucketTags(bucketName, tagSet) {
6417
6417
  return replaceAbacBucketTags.call(this, bucketName, tagSet);
@@ -6582,7 +6582,7 @@ var S3BucketProvider = class {
6582
6582
  return create$38.call(this, logicalId, resourceType, properties, context);
6583
6583
  }
6584
6584
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
6585
- return update$38.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
6585
+ return update$39.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
6586
6586
  }
6587
6587
  warnUnappliedBucketObjectLock(logicalId, bucketName, properties, previousProperties, context) {
6588
6588
  return warnUnappliedBucketObjectLock.call(this, logicalId, bucketName, properties, previousProperties, context);
@@ -6597,7 +6597,7 @@ var S3BucketProvider = class {
6597
6597
  return canonicalizeDesiredProperties$3.call(this, resourceType, properties);
6598
6598
  }
6599
6599
  readCurrentState(physicalId, logicalId, _resourceType, _properties, context) {
6600
- return readCurrentState$36.call(this, physicalId, logicalId, _resourceType, _properties, context);
6600
+ return readCurrentState$37.call(this, physicalId, logicalId, _resourceType, _properties, context);
6601
6601
  }
6602
6602
  getDriftAbsentMeansDefaultKeys(_resourceType, properties) {
6603
6603
  return getDriftAbsentMeansDefaultKeys.call(this, _resourceType, properties);
@@ -6690,7 +6690,7 @@ var S3BucketProvider = class {
6690
6690
  return generatedCreateName$3.call(this, _resourceType, logicalId, properties);
6691
6691
  }
6692
6692
  import(input) {
6693
- return importImpl$36.call(this, input);
6693
+ return importImpl$37.call(this, input);
6694
6694
  }
6695
6695
  deleteBucketWithEmptyRetry(logicalId, bucketName, allowAutoEmpty) {
6696
6696
  return deleteBucketWithEmptyRetry$1.call(this, logicalId, bucketName, allowAutoEmpty);
@@ -7904,7 +7904,7 @@ async function create$37(logicalId, resourceType, properties, context) {
7904
7904
  }
7905
7905
 
7906
7906
  // src/provisioning/providers/sns-topic/update.ts
7907
- async function update$37(logicalId, physicalId, resourceType, properties, previousProperties, context) {
7907
+ async function update$38(logicalId, physicalId, resourceType, properties, previousProperties, context) {
7908
7908
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
7909
7909
  try {
7910
7910
  return await this.applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context?.maskSecrets);
@@ -8085,7 +8085,7 @@ async function deleteImpl$36(logicalId, physicalId, resourceType, _properties, c
8085
8085
  }
8086
8086
 
8087
8087
  // src/provisioning/providers/sns-topic/read-state.ts
8088
- async function readCurrentState$35(physicalId, _logicalId, _resourceType, properties) {
8088
+ async function readCurrentState$36(physicalId, _logicalId, _resourceType, properties) {
8089
8089
  let attrs;
8090
8090
  try {
8091
8091
  attrs = (await this.snsClient.send(new GetTopicAttributesCommand({ TopicArn: physicalId }))).Attributes;
@@ -8149,7 +8149,7 @@ async function readCurrentState$35(physicalId, _logicalId, _resourceType, proper
8149
8149
  }
8150
8150
  return result;
8151
8151
  }
8152
- async function importImpl$35(input) {
8152
+ async function importImpl$36(input) {
8153
8153
  if (input.knownPhysicalId) try {
8154
8154
  await this.snsClient.send(new GetTopicAttributesCommand({ TopicArn: input.knownPhysicalId }));
8155
8155
  return {
@@ -8226,7 +8226,7 @@ var SNSTopicProvider = class {
8226
8226
  return create$37.call(this, logicalId, resourceType, properties, context);
8227
8227
  }
8228
8228
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
8229
- return update$37.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
8229
+ return update$38.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
8230
8230
  }
8231
8231
  applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets) {
8232
8232
  return applyUpdate$6.call(this, logicalId, physicalId, resourceType, properties, previousProperties, maskSecrets);
@@ -8256,7 +8256,7 @@ var SNSTopicProvider = class {
8256
8256
  }
8257
8257
  }
8258
8258
  readCurrentState(physicalId, logicalId, resourceType, properties) {
8259
- return readCurrentState$35.call(this, physicalId, logicalId, resourceType, properties);
8259
+ return readCurrentState$36.call(this, physicalId, logicalId, resourceType, properties);
8260
8260
  }
8261
8261
  getDriftUnknownPaths() {
8262
8262
  return [];
@@ -8266,7 +8266,7 @@ var SNSTopicProvider = class {
8266
8266
  return generatedNameFor("AWS::SNS::Topic", logicalId);
8267
8267
  }
8268
8268
  import(input) {
8269
- return importImpl$35.call(this, input);
8269
+ return importImpl$36.call(this, input);
8270
8270
  }
8271
8271
  };
8272
8272
 
@@ -9304,7 +9304,7 @@ function wrapStatusReasonError$2(target, log, cfg) {
9304
9304
  }
9305
9305
 
9306
9306
  // src/provisioning/providers/lambda-function/update.ts
9307
- async function update$36(logicalId, physicalId, resourceType, properties, previousProperties, context) {
9307
+ async function update$37(logicalId, physicalId, resourceType, properties, previousProperties, context) {
9308
9308
  const markUnsettled = (key) => context?.markUnsettled?.(key);
9309
9309
  properties = withRemovalDefaults(this.removalDefaults, resourceType, properties, previousProperties, context);
9310
9310
  const log = lambdaOperationSinks(this.logger, context?.maskSecrets, [[physicalId, physicalId], [previousProperties["FunctionName"], physicalId]], properties);
@@ -9491,7 +9491,7 @@ async function update$36(logicalId, physicalId, resourceType, properties, previo
9491
9491
  throw this.wrapMaskedError(log, error, (text) => new ProvisioningError(`Failed to update Lambda function ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause ?? new Error(safeStringify(error))));
9492
9492
  }
9493
9493
  }
9494
- async function applyTagDiff$18(functionArn, functionName, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, unsettled = {
9494
+ async function applyTagDiff$19(functionArn, functionName, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, unsettled = {
9495
9495
  forceUpsert: false,
9496
9496
  beforeWrite: () => void 0
9497
9497
  }) {
@@ -9844,7 +9844,7 @@ async function getAttribute$15(physicalId, _resourceType, attributeName) {
9844
9844
  throw err;
9845
9845
  }
9846
9846
  }
9847
- async function importImpl$34(input) {
9847
+ async function importImpl$35(input) {
9848
9848
  const explicit = resolveExplicitPhysicalId(input, "FunctionName");
9849
9849
  if (explicit) try {
9850
9850
  await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: explicit }));
@@ -9904,7 +9904,7 @@ async function unsettledInTransition$6(physicalId, _logicalId, _resourceType, na
9904
9904
  return names;
9905
9905
  }
9906
9906
  }
9907
- async function readCurrentState$34(physicalId, _logicalId, _resourceType) {
9907
+ async function readCurrentState$35(physicalId, _logicalId, _resourceType) {
9908
9908
  try {
9909
9909
  const resp = await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: physicalId }));
9910
9910
  const cfg = resp.Configuration;
@@ -10120,7 +10120,7 @@ var LambdaFunctionProvider = class {
10120
10120
  return putFunctionScalingConfig.call(this, target, log, config);
10121
10121
  }
10122
10122
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
10123
- return update$36.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
10123
+ return update$37.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
10124
10124
  }
10125
10125
  delete(logicalId, physicalId, resourceType, properties, context) {
10126
10126
  return deleteImpl$35.call(this, logicalId, physicalId, resourceType, properties, context);
@@ -10141,7 +10141,7 @@ var LambdaFunctionProvider = class {
10141
10141
  return hasVpcConfig.call(this, raw);
10142
10142
  }
10143
10143
  applyTagDiff(functionArn, functionName, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, unsettled) {
10144
- return applyTagDiff$18.call(this, functionArn, functionName, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, unsettled);
10144
+ return applyTagDiff$19.call(this, functionArn, functionName, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, unsettled);
10145
10145
  }
10146
10146
  waitForFunctionUpdated(logicalId, resourceType, functionName, log) {
10147
10147
  return waitForFunctionUpdated.call(this, logicalId, resourceType, functionName, log);
@@ -10192,7 +10192,7 @@ var LambdaFunctionProvider = class {
10192
10192
  return unsettledInTransition$6.call(this, physicalId, _logicalId, _resourceType, names);
10193
10193
  }
10194
10194
  readCurrentState(physicalId, _logicalId, _resourceType) {
10195
- return readCurrentState$34.call(this, physicalId, _logicalId, _resourceType);
10195
+ return readCurrentState$35.call(this, physicalId, _logicalId, _resourceType);
10196
10196
  }
10197
10197
  getDriftUnknownPaths() {
10198
10198
  return [
@@ -10206,7 +10206,7 @@ var LambdaFunctionProvider = class {
10206
10206
  ];
10207
10207
  }
10208
10208
  import(input) {
10209
- return importImpl$34.call(this, input);
10209
+ return importImpl$35.call(this, input);
10210
10210
  }
10211
10211
  };
10212
10212
 
@@ -10973,7 +10973,7 @@ async function reportPossibleMappingOrphans(logicalId, window, log, functionName
10973
10973
  }
10974
10974
 
10975
10975
  // src/provisioning/providers/lambda-eventsource/update.ts
10976
- async function update$35(logicalId, physicalId, resourceType, properties, previousProperties, context) {
10976
+ async function update$36(logicalId, physicalId, resourceType, properties, previousProperties, context) {
10977
10977
  const log = this.operationSinks(context?.maskSecrets, properties, previousProperties);
10978
10978
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId, "Tags", DBPROXY_TAGS_WHAT, DBPROXY_TAG_OPTIONS);
10979
10979
  const restoring = context?.replayingState === true || context?.desiredFromAwsReadback === true;
@@ -11104,7 +11104,7 @@ async function applyUpdate$5(logicalId, physicalId, resourceType, properties, pr
11104
11104
  } }
11105
11105
  };
11106
11106
  }
11107
- async function applyTagDiff$17(arn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log) {
11107
+ async function applyTagDiff$18(arn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log) {
11108
11108
  const plan = planTagDiff(oldTagsRaw, newTagsRaw, DBPROXY_TAG_OPTIONS);
11109
11109
  const tagWarning = tagPlanWarning(plan, resourceType, logicalId);
11110
11110
  if (tagWarning !== void 0) log.warn(tagWarning);
@@ -11156,7 +11156,7 @@ async function deleteImpl$34(logicalId, physicalId, resourceType, properties, co
11156
11156
  }
11157
11157
 
11158
11158
  // src/provisioning/providers/lambda-eventsource/read-state.ts
11159
- async function readCurrentState$33(physicalId, _logicalId, _resourceType, properties) {
11159
+ async function readCurrentState$34(physicalId, _logicalId, _resourceType, properties) {
11160
11160
  let resp;
11161
11161
  try {
11162
11162
  resp = await this.lambdaClient.send(new GetEventSourceMappingCommand({ UUID: physicalId }));
@@ -11235,7 +11235,7 @@ async function canonicalizeDriftPair$5(_resourceType, baseline, aws, properties)
11235
11235
  aws
11236
11236
  };
11237
11237
  }
11238
- async function importImpl$33(input) {
11238
+ async function importImpl$34(input) {
11239
11239
  if (!input.knownPhysicalId) return null;
11240
11240
  let resp;
11241
11241
  try {
@@ -11354,25 +11354,25 @@ var LambdaEventSourceMappingProvider = class {
11354
11354
  return reportPossibleMappingOrphans.call(this, logicalId, window, log, functionName, sourceArn);
11355
11355
  }
11356
11356
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
11357
- return update$35.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
11357
+ return update$36.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
11358
11358
  }
11359
11359
  applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, log, restoring) {
11360
11360
  return applyUpdate$5.call(this, logicalId, physicalId, resourceType, properties, previousProperties, log, restoring);
11361
11361
  }
11362
11362
  applyTagDiff(arn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log) {
11363
- return applyTagDiff$17.call(this, arn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log);
11363
+ return applyTagDiff$18.call(this, arn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log);
11364
11364
  }
11365
11365
  delete(logicalId, physicalId, resourceType, properties, context) {
11366
11366
  return deleteImpl$34.call(this, logicalId, physicalId, resourceType, properties, context);
11367
11367
  }
11368
11368
  readCurrentState(physicalId, logicalId, resourceType, properties) {
11369
- return readCurrentState$33.call(this, physicalId, logicalId, resourceType, properties);
11369
+ return readCurrentState$34.call(this, physicalId, logicalId, resourceType, properties);
11370
11370
  }
11371
11371
  canonicalizeDriftPair(resourceType, baseline, aws, properties) {
11372
11372
  return canonicalizeDriftPair$5.call(this, resourceType, baseline, aws, properties);
11373
11373
  }
11374
11374
  import(input) {
11375
- return importImpl$33.call(this, input);
11375
+ return importImpl$34.call(this, input);
11376
11376
  }
11377
11377
  };
11378
11378
 
@@ -14580,7 +14580,7 @@ async function waitForKinesisDestinationSettled(tableName, streamArn, expectedPr
14580
14580
  function isTransientStreamReadFailure(err) {
14581
14581
  return isThrottlingError(err) || isTransientServerError(err) || isAmbiguousOutcomeError(err) || err instanceof ResourceNotFoundException$1;
14582
14582
  }
14583
- async function readCurrentState$32(physicalId, _logicalId, _resourceType, properties, context) {
14583
+ async function readCurrentState$33(physicalId, _logicalId, _resourceType, properties, context) {
14584
14584
  try {
14585
14585
  const table = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }))).Table;
14586
14586
  if (!table) return void 0;
@@ -14908,7 +14908,7 @@ async function sendContributorInsightsOp(tableName, op, maskSecrets) {
14908
14908
  }
14909
14909
 
14910
14910
  // src/provisioning/providers/dynamodb-table/table-settings.ts
14911
- async function applyTagDiff$16(tableArn, resourceType, logicalId, oldTagsRaw, newTagsRaw, unsettled = {
14911
+ async function applyTagDiff$17(tableArn, resourceType, logicalId, oldTagsRaw, newTagsRaw, unsettled = {
14912
14912
  forceUpsert: false,
14913
14913
  beforeWrite: () => void 0
14914
14914
  }) {
@@ -15298,7 +15298,7 @@ async function applyIndexUpdates(logicalId, physicalId, resourceType, properties
15298
15298
  }
15299
15299
 
15300
15300
  // src/provisioning/providers/dynamodb-table/update.ts
15301
- async function update$34(logicalId, physicalId, resourceType, properties, previousProperties, context) {
15301
+ async function update$35(logicalId, physicalId, resourceType, properties, previousProperties, context) {
15302
15302
  const markUnsettled = (key) => context?.markUnsettled?.(key);
15303
15303
  const maskSecrets = context?.maskSecrets ?? ((text) => text);
15304
15304
  const warn = (message) => this.logger.warn(maskSecrets(message));
@@ -15536,7 +15536,7 @@ var DynamoDBTableProvider = class {
15536
15536
  return rollBackCreatedTable.call(this, ...args);
15537
15537
  }
15538
15538
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
15539
- return update$34.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
15539
+ return update$35.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
15540
15540
  }
15541
15541
  async waitForNameReleased(logicalId, physicalId, _resourceType, context) {
15542
15542
  return waitForNameReleased.call(this, logicalId, physicalId, _resourceType, context);
@@ -15548,7 +15548,7 @@ var DynamoDBTableProvider = class {
15548
15548
  return deleteTableResource.call(this, ...args);
15549
15549
  }
15550
15550
  applyTagDiff(...args) {
15551
- return applyTagDiff$16.call(this, ...args);
15551
+ return applyTagDiff$17.call(this, ...args);
15552
15552
  }
15553
15553
  applyPointInTimeRecovery(...args) {
15554
15554
  return applyPointInTimeRecovery.call(this, ...args);
@@ -15719,7 +15719,7 @@ var DynamoDBTableProvider = class {
15719
15719
  return unsettledInTransition$5.call(this, physicalId, _logicalId, _resourceType, names);
15720
15720
  }
15721
15721
  async readCurrentState(physicalId, _logicalId, _resourceType, properties, context) {
15722
- return readCurrentState$32.call(this, physicalId, _logicalId, _resourceType, properties, context);
15722
+ return readCurrentState$33.call(this, physicalId, _logicalId, _resourceType, properties, context);
15723
15723
  }
15724
15724
  readTableTags(...args) {
15725
15725
  return readTableTags.call(this, ...args);
@@ -15922,7 +15922,7 @@ async function create$33(logicalId, resourceType, properties, context) {
15922
15922
  }
15923
15923
 
15924
15924
  // src/provisioning/providers/logs-loggroup/update.ts
15925
- async function update$33(logicalId, physicalId, resourceType, properties, previousProperties, callerContext) {
15925
+ async function update$34(logicalId, physicalId, resourceType, properties, previousProperties, callerContext) {
15926
15926
  const context = {
15927
15927
  ...callerContext,
15928
15928
  maskSecrets: withDerivedNameMasks(this.logger, createMaskedLogSinks(this.logger, callerContext?.maskSecrets), [[previousProperties["LogGroupName"], physicalId]]).mask
@@ -16181,7 +16181,7 @@ async function getAttribute$13(physicalId, _resourceType, attributeName) {
16181
16181
  if (attributeName !== "Arn") return;
16182
16182
  return this.buildArn(physicalId);
16183
16183
  }
16184
- async function readCurrentState$31(physicalId, _logicalId, _resourceType) {
16184
+ async function readCurrentState$32(physicalId, _logicalId, _resourceType) {
16185
16185
  try {
16186
16186
  const found = (await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupNamePrefix: physicalId }))).logGroups?.find((g) => g.logGroupName === physicalId);
16187
16187
  if (!found) return RESOURCE_NOT_FOUND;
@@ -16234,7 +16234,7 @@ async function readCurrentState$31(physicalId, _logicalId, _resourceType) {
16234
16234
  }
16235
16235
 
16236
16236
  // src/provisioning/providers/logs-loggroup/import.ts
16237
- async function importImpl$32(input) {
16237
+ async function importImpl$33(input) {
16238
16238
  const explicit = resolveExplicitPhysicalId(input, "LogGroupName");
16239
16239
  if (explicit) try {
16240
16240
  return (await this.logsClient.send(new DescribeLogGroupsCommand({ logGroupNamePrefix: explicit }))).logGroups?.find((g) => g.logGroupName === explicit) ? {
@@ -16287,7 +16287,7 @@ var LogsLogGroupProvider = class {
16287
16287
  return create$33.call(this, logicalId, resourceType, properties, context);
16288
16288
  }
16289
16289
  update(logicalId, physicalId, resourceType, properties, previousProperties, callerContext) {
16290
- return update$33.call(this, logicalId, physicalId, resourceType, properties, previousProperties, callerContext);
16290
+ return update$34.call(this, logicalId, physicalId, resourceType, properties, previousProperties, callerContext);
16291
16291
  }
16292
16292
  applyUpdate(logicalId, physicalId, resourceType, properties, previousProperties, context) {
16293
16293
  return applyUpdate$4.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
@@ -16317,10 +16317,10 @@ var LogsLogGroupProvider = class {
16317
16317
  return getAttribute$13.call(this, physicalId, _resourceType, attributeName);
16318
16318
  }
16319
16319
  readCurrentState(physicalId, _logicalId, _resourceType) {
16320
- return readCurrentState$31.call(this, physicalId, _logicalId, _resourceType);
16320
+ return readCurrentState$32.call(this, physicalId, _logicalId, _resourceType);
16321
16321
  }
16322
16322
  import(input) {
16323
- return importImpl$32.call(this, input);
16323
+ return importImpl$33.call(this, input);
16324
16324
  }
16325
16325
  };
16326
16326
 
@@ -16993,7 +16993,7 @@ async function create$32(logicalId, resourceType, properties, context) {
16993
16993
  }
16994
16994
 
16995
16995
  // src/provisioning/providers/secretsmanager-secret/update.ts
16996
- async function update$32(logicalId, physicalId, resourceType, properties, previousProperties, context) {
16996
+ async function update$33(logicalId, physicalId, resourceType, properties, previousProperties, context) {
16997
16997
  const log = this.operationSinks(context?.maskSecrets, [
16998
16998
  [properties["Name"], properties["Name"]],
16999
16999
  [properties["Name"], physicalId],
@@ -17209,7 +17209,7 @@ function generateSecretString(config, options) {
17209
17209
  }
17210
17210
 
17211
17211
  // src/provisioning/providers/secretsmanager-secret/read-state.ts
17212
- async function readCurrentState$30(physicalId, _logicalId, _resourceType) {
17212
+ async function readCurrentState$31(physicalId, _logicalId, _resourceType) {
17213
17213
  try {
17214
17214
  const resp = await this.smClient.send(new DescribeSecretCommand({ SecretId: physicalId }));
17215
17215
  const result = {};
@@ -17230,7 +17230,7 @@ async function readCurrentState$30(physicalId, _logicalId, _resourceType) {
17230
17230
  throw err;
17231
17231
  }
17232
17232
  }
17233
- async function importImpl$31(input) {
17233
+ async function importImpl$32(input) {
17234
17234
  if (input.knownPhysicalId) try {
17235
17235
  const resp = await this.smClient.send(new DescribeSecretCommand({ SecretId: input.knownPhysicalId }));
17236
17236
  return resp.ARN ? {
@@ -17277,7 +17277,7 @@ var SecretsManagerSecretProvider = class {
17277
17277
  return create$32.call(this, logicalId, resourceType, properties, context);
17278
17278
  }
17279
17279
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
17280
- return update$32.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
17280
+ return update$33.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
17281
17281
  }
17282
17282
  wrapCaughtError(mask, error, build, relayCollision = false) {
17283
17283
  const failure = describeAwsFailure(error);
@@ -17332,13 +17332,13 @@ var SecretsManagerSecretProvider = class {
17332
17332
  return generateSecretString.call(this, config, options);
17333
17333
  }
17334
17334
  readCurrentState(physicalId, logicalId, resourceType) {
17335
- return readCurrentState$30.call(this, physicalId, logicalId, resourceType);
17335
+ return readCurrentState$31.call(this, physicalId, logicalId, resourceType);
17336
17336
  }
17337
17337
  getDriftUnknownPaths() {
17338
17338
  return ["SecretString", "GenerateSecretString"];
17339
17339
  }
17340
17340
  import(input) {
17341
- return importImpl$31.call(this, input);
17341
+ return importImpl$32.call(this, input);
17342
17342
  }
17343
17343
  };
17344
17344
 
@@ -17384,7 +17384,7 @@ async function create$31(logicalId, resourceType, properties, context) {
17384
17384
  }
17385
17385
 
17386
17386
  // src/provisioning/providers/ssm-parameter/update.ts
17387
- async function update$31(logicalId, physicalId, resourceType, properties, previousProperties, context) {
17387
+ async function update$32(logicalId, physicalId, resourceType, properties, previousProperties, context) {
17388
17388
  const mask = maskerOrIdentity(context?.maskSecrets);
17389
17389
  const debug = (message) => this.logger.debug(mask(message));
17390
17390
  debug(`Updating SSM parameter ${displaySafe(logicalId)}: ${displaySafe(mask(physicalId))}`);
@@ -17463,7 +17463,7 @@ async function deleteImpl$31(logicalId, physicalId, resourceType, _properties, c
17463
17463
  }
17464
17464
 
17465
17465
  // src/provisioning/providers/ssm-parameter/read-state.ts
17466
- async function readCurrentState$29(physicalId, _logicalId, _resourceType) {
17466
+ async function readCurrentState$30(physicalId, _logicalId, _resourceType) {
17467
17467
  let getResp;
17468
17468
  try {
17469
17469
  getResp = await this.ssmClient.send(new GetParameterCommand({
@@ -17532,7 +17532,7 @@ function refuseUnwritableParameterId(input, explicit) {
17532
17532
  const howToRead = readCommand ? ` Read the name AWS holds with: ${readCommand}` : " Read the name AWS holds via the console: the value cdkd was given cannot be reproduced safely on a command line (sanitizing would change it, so a command would read a different parameter, or it holds a character or prefix a pasted shell line, or the AWS CLI itself, would act on).";
17533
17533
  throw new ProvisioningError(`Cannot adopt ${subject} from ${shape} (${shown}): cdkd records a parameter's NAME as its physical id, because SSM's write APIs accept only the name (PutParameter and DeleteParameter both reject an ARN, and a name cannot contain ':'), so the next cdkd deploy and cdkd destroy would fail with a ValidationException. ${remedy}.${whyNotDerived}${howToRead}`, input.resourceType, input.logicalId);
17534
17534
  }
17535
- async function importImpl$30(input) {
17535
+ async function importImpl$31(input) {
17536
17536
  const explicit = resolveExplicitPhysicalId(input, "Name");
17537
17537
  if (explicit) {
17538
17538
  this.refuseUnwritableParameterId(input, explicit);
@@ -17637,19 +17637,19 @@ var SSMParameterProvider = class SSMParameterProvider {
17637
17637
  return create$31.call(this, logicalId, resourceType, properties, context);
17638
17638
  }
17639
17639
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
17640
- return update$31.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
17640
+ return update$32.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
17641
17641
  }
17642
17642
  delete(logicalId, physicalId, resourceType, properties, context) {
17643
17643
  return deleteImpl$31.call(this, logicalId, physicalId, resourceType, properties, context);
17644
17644
  }
17645
17645
  readCurrentState(physicalId, logicalId, resourceType) {
17646
- return readCurrentState$29.call(this, physicalId, logicalId, resourceType);
17646
+ return readCurrentState$30.call(this, physicalId, logicalId, resourceType);
17647
17647
  }
17648
17648
  refuseUnwritableParameterId(input, explicit) {
17649
17649
  return refuseUnwritableParameterId.call(this, input, explicit);
17650
17650
  }
17651
17651
  import(input) {
17652
- return importImpl$30.call(this, input);
17652
+ return importImpl$31.call(this, input);
17653
17653
  }
17654
17654
  };
17655
17655
  const SSM_CLEAR_POLICIES = "[{}]";
@@ -17740,7 +17740,7 @@ async function create$30(logicalId, resourceType, properties, context) {
17740
17740
  }
17741
17741
 
17742
17742
  // src/provisioning/providers/eventbridge-rule/update.ts
17743
- async function update$30(logicalId, physicalId, resourceType, properties, previousProperties, context) {
17743
+ async function update$31(logicalId, physicalId, resourceType, properties, previousProperties, context) {
17744
17744
  this.logger.debug(`Updating EventBridge rule ${logicalId}: ${physicalId}`);
17745
17745
  assertRegionMatch(context?.expectedRegion ? await this.eventBridgeClient.config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
17746
17746
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
@@ -17966,7 +17966,7 @@ var EventBridgeRuleProvider = class {
17966
17966
  return create$30.call(this, logicalId, resourceType, properties, context);
17967
17967
  }
17968
17968
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
17969
- return update$30.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
17969
+ return update$31.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
17970
17970
  }
17971
17971
  delete(logicalId, physicalId, resourceType, _properties, context) {
17972
17972
  return deleteImpl$30.call(this, logicalId, physicalId, resourceType, _properties, context);
@@ -18738,9 +18738,20 @@ const VPC_CREATE_ONLY_SENT = [
18738
18738
  "Ipv4NetmaskLength",
18739
18739
  "VpcEncryptionControl"
18740
18740
  ];
18741
+ const SUBNET_CREATE_ONLY_SENT = [
18742
+ "VpcId",
18743
+ "CidrBlock",
18744
+ "AvailabilityZone",
18745
+ "AvailabilityZoneId",
18746
+ "Ipv4IpamPoolId",
18747
+ "Ipv4NetmaskLength",
18748
+ "Ipv6IpamPoolId",
18749
+ "Ipv6NetmaskLength"
18750
+ ];
18751
+ const IPAM_POOL_ID_PATTERN = /^ipam-pool-[0-9a-z]+$/;
18741
18752
  function foldCreateOnlySent(key, value) {
18742
18753
  const asRecord = (v) => v !== null && typeof v === "object" && !Array.isArray(v) ? v : void 0;
18743
- if (key === "Ipv4NetmaskLength") return coerceCfnInteger(value) ?? value;
18754
+ if (key === "Ipv4NetmaskLength" || key === "Ipv6NetmaskLength") return coerceCfnInteger(value) ?? value;
18744
18755
  if (key === "CpuOptions") {
18745
18756
  const cpu = asRecord(value);
18746
18757
  if (cpu === void 0) return value;
@@ -18871,30 +18882,49 @@ async function reportPossibleOrphanVpcs(logicalId, match, sent, window, context)
18871
18882
  }
18872
18883
  async function reportPossibleOrphanSubnets(logicalId, vpcId, key, sent, window, context) {
18873
18884
  const log = createMaskedLogSinks(this.logger, context?.maskSecrets);
18874
- const cidrBlock = key.cidr;
18875
- const canonical = (cidr) => (key.family === "ipv4" ? canonicalizeIpv4Cidr(cidr) : canonicalizeIpv6Cidr(cidr)) ?? cidr;
18876
- const wanted = canonical(cidrBlock);
18877
- const holdsWanted = (subnet) => key.family === "ipv4" ? subnet.CidrBlock !== void 0 && canonical(subnet.CidrBlock) === wanted : (subnet.Ipv6CidrBlockAssociationSet ?? []).some((association) => association.Ipv6CidrBlock !== void 0 && ["associating", "associated"].includes(association.Ipv6CidrBlockState?.State ?? "") && canonical(association.Ipv6CidrBlock) === wanted);
18885
+ const byCidr = "cidr" in key ? key : void 0;
18886
+ const poolId = "ipamPoolId" in key ? key.ipamPoolId : "";
18887
+ const canonical = (cidr) => (byCidr?.family === "ipv6" ? canonicalizeIpv6Cidr(cidr) : canonicalizeIpv4Cidr(cidr)) ?? cidr;
18888
+ const wanted = byCidr !== void 0 ? canonical(byCidr.cidr) : void 0;
18889
+ const holdsWanted = (subnet) => byCidr === void 0 ? false : byCidr.family === "ipv4" ? subnet.CidrBlock !== void 0 && canonical(subnet.CidrBlock) === wanted : (subnet.Ipv6CidrBlockAssociationSet ?? []).some((association) => association.Ipv6CidrBlock !== void 0 && ["associating", "associated"].includes(association.Ipv6CidrBlockState?.State ?? "") && canonical(association.Ipv6CidrBlock) === wanted);
18890
+ const listSubnets = (inPool) => collectOrphanIds(async (token) => {
18891
+ const page = await this.ec2Client.send(new DescribeSubnetsCommand({
18892
+ Filters: [{
18893
+ Name: "vpc-id",
18894
+ Values: [vpcId]
18895
+ }],
18896
+ MaxResults: ORPHAN_LIST_PAGE_SIZE,
18897
+ NextToken: token
18898
+ }));
18899
+ return {
18900
+ items: page.Subnets ?? [],
18901
+ next: page.NextToken
18902
+ };
18903
+ }, (subnet) => subnet.SubnetId !== void 0 && mayBeLostCreate(subnet.Tags, sent) && (inPool !== void 0 ? inPool.has(subnet.SubnetId) : holdsWanted(subnet)) && !ec2IdsCreatedByThisProcess.has(subnet.SubnetId) ? subnet.SubnetId : void 0);
18878
18904
  await this.reportPossibleEc2Orphans(logicalId, window, log, {
18879
18905
  action: "CreateSubnet",
18880
- listAction: "DescribeSubnets",
18881
- subject: `a subnet with CIDR ${log.value(cidrBlock)} in VPC ${log.value(vpcId)}`,
18906
+ listAction: byCidr !== void 0 ? "DescribeSubnets" : "GetIpamPoolAllocations + DescribeSubnets",
18907
+ subject: byCidr !== void 0 ? `a subnet with CIDR ${log.value(byCidr.cidr)} in VPC ${log.value(vpcId)}` : `a subnet allocated from IPAM pool ${log.value(poolId)} in VPC ${log.value(vpcId)}`,
18882
18908
  noun: lostCreateNoun("subnet(s)", sent),
18883
- afterward: "Creating it again, which fails with InvalidSubnet.Conflict while that subnet exists.",
18884
- list: () => collectOrphanIds(async (token) => {
18885
- const page = await this.ec2Client.send(new DescribeSubnetsCommand({
18886
- Filters: [{
18887
- Name: "vpc-id",
18888
- Values: [vpcId]
18889
- }],
18890
- MaxResults: ORPHAN_LIST_PAGE_SIZE,
18891
- NextToken: token
18892
- }));
18909
+ ...byCidr !== void 0 && { afterward: "Creating it again, which fails with InvalidSubnet.Conflict while that subnet exists." },
18910
+ list: async () => {
18911
+ if (byCidr !== void 0) return listSubnets(void 0);
18912
+ const allocated = await collectOrphanIds(async (token) => {
18913
+ const page = await this.ec2Client.send(new GetIpamPoolAllocationsCommand({
18914
+ IpamPoolId: poolId,
18915
+ NextToken: token
18916
+ }));
18917
+ return {
18918
+ items: page.IpamPoolAllocations ?? [],
18919
+ next: page.NextToken
18920
+ };
18921
+ }, (allocation) => allocation.ResourceType === "subnet" && allocation.ResourceId !== void 0 ? allocation.ResourceId : void 0);
18922
+ const subnets = await listSubnets(new Set(allocated.ids));
18893
18923
  return {
18894
- items: page.Subnets ?? [],
18895
- next: page.NextToken
18924
+ ids: subnets.ids,
18925
+ truncated: allocated.truncated || subnets.truncated
18896
18926
  };
18897
- }, (subnet) => subnet.SubnetId !== void 0 && mayBeLostCreate(subnet.Tags, sent) && holdsWanted(subnet) && !ec2IdsCreatedByThisProcess.has(subnet.SubnetId) ? subnet.SubnetId : void 0),
18927
+ },
18898
18928
  inspect: (aws, id, regionArg) => aws`aws ec2 describe-subnets --subnet-ids ${id}${regionArg}`.render()
18899
18929
  });
18900
18930
  }
@@ -19385,31 +19415,47 @@ async function deleteVpc(logicalId, physicalId, resourceType, context, propertie
19385
19415
  }
19386
19416
  }
19387
19417
  async function waitForVpcIpamRelease(vpcId, resourceType, properties, context) {
19388
- const poolId = properties?.["Ipv4IpamPoolId"];
19389
- if (typeof poolId !== "string" || !/^ipam-pool-[0-9a-z]+$/.test(poolId)) return;
19390
- this.logger.info(maskerOrIdentity(context?.maskSecrets)(safeMsg` Waiting for IPAM pool ${poolId} to release the allocation of deleted VPC ${vpcId}; AWS can take about 18 minutes, and the pool CIDR cannot be deprovisioned before then`));
19418
+ await this.waitForIpamAllocationRelease([properties?.["Ipv4IpamPoolId"]], vpcId, "VPC", "AWS can take about 18 minutes", resourceType, context);
19419
+ }
19420
+ async function waitForIpamAllocationRelease(poolIds, resourceId, noun, expectedDuration, resourceType, context) {
19421
+ const pending = new Set(poolIds.filter((poolId) => typeof poolId === "string" && IPAM_POOL_ID_PATTERN.test(poolId)));
19422
+ if (pending.size === 0) return;
19423
+ const mask = maskerOrIdentity(context?.maskSecrets);
19424
+ const pools = [...pending].join(" and ");
19425
+ const plural = pending.size > 1;
19426
+ this.logger.info(mask(plural ? safeMsg` Waiting for IPAM pools ${pools} to release the allocations of deleted ${noun} ${resourceId}; ${expectedDuration}, and the pool CIDRs cannot be deprovisioned before then` : safeMsg` Waiting for IPAM pool ${pools} to release the allocation of deleted ${noun} ${resourceId}; ${expectedDuration}, and the pool CIDR cannot be deprovisioned before then`));
19427
+ const poolState = async (poolId) => {
19428
+ try {
19429
+ let token;
19430
+ let pages = 0;
19431
+ do {
19432
+ const page = await this.ec2Client.send(new GetIpamPoolAllocationsCommand({
19433
+ IpamPoolId: poolId,
19434
+ NextToken: token
19435
+ }));
19436
+ if ((page.IpamPoolAllocations ?? []).some((a) => a.ResourceId === resourceId)) return "allocated";
19437
+ token = page.NextToken;
19438
+ pages++;
19439
+ } while (token && pages < 20);
19440
+ return token ? "unknown" : "released";
19441
+ } catch (error) {
19442
+ if (isNamedError(error, IPAM_POOL_NOT_FOUND_NAMES)) return "released";
19443
+ throw error;
19444
+ }
19445
+ };
19391
19446
  await waitForGoneAfterDelete({
19392
- what: maskerOrIdentity(context?.maskSecrets)(`the IPAM pool ${poolId} allocation of VPC ${vpcId}`),
19447
+ what: mask(plural ? `the IPAM pool ${pools} allocations of ${noun} ${resourceId}` : `the IPAM pool ${pools} allocation of ${noun} ${resourceId}`),
19393
19448
  resourceType,
19394
- consequence: "AWS releases the allocation on its side; until it does, the pool refuses to deprovision its CIDR (\"The CIDR has one or more allocations.\"), so re-run the destroy if it stops there.",
19449
+ consequence: plural ? "AWS releases the allocations on its side; until it does, each pool refuses to deprovision its CIDR (\"The CIDR has one or more allocations.\"), so re-run the destroy if it stops there." : "AWS releases the allocation on its side; until it does, the pool refuses to deprovision its CIDR (\"The CIDR has one or more allocations.\"), so re-run the destroy if it stops there.",
19395
19450
  describe: async () => {
19396
- try {
19397
- let token;
19398
- let pages = 0;
19399
- do {
19400
- const page = await this.ec2Client.send(new GetIpamPoolAllocationsCommand({
19401
- IpamPoolId: poolId,
19402
- NextToken: token
19403
- }));
19404
- if ((page.IpamPoolAllocations ?? []).some((a) => a.ResourceId === vpcId)) return "allocated";
19405
- token = page.NextToken;
19406
- pages++;
19407
- } while (token && pages < 20);
19408
- return token ? "unknown (allocation listing truncated)" : void 0;
19409
- } catch (error) {
19410
- if (isNamedError(error, IPAM_POOL_NOT_FOUND_NAMES)) return void 0;
19411
- throw error;
19412
- }
19451
+ let truncated = false;
19452
+ for (const poolId of [...pending]) {
19453
+ const state = await poolState(poolId);
19454
+ if (state === "allocated") return "allocated";
19455
+ if (state === "released") pending.delete(poolId);
19456
+ else truncated = true;
19457
+ }
19458
+ return truncated ? "unknown (allocation listing truncated)" : void 0;
19413
19459
  },
19414
19460
  logger: this.logger,
19415
19461
  pollIntervalMs: vpcIpamReleaseWait.pollIntervalMs,
@@ -19455,6 +19501,7 @@ const vpcMethods = {
19455
19501
  updateVpc,
19456
19502
  deleteVpc,
19457
19503
  waitForVpcIpamRelease,
19504
+ waitForIpamAllocationRelease,
19458
19505
  getVpcAttribute
19459
19506
  };
19460
19507
 
@@ -19501,6 +19548,28 @@ function subnetPrivateDnsOptionsRefusal(block) {
19501
19548
  if (message !== void 0) return message;
19502
19549
  }
19503
19550
  }
19551
+ function readSubnetCreateInputs(properties, resourceType) {
19552
+ const stringRefusal = (key) => configStringRefusal(properties, key, "", resourceType) ?? (properties[key] === "" ? `${resourceType}.${key} must not be blank` : void 0);
19553
+ const refusal = stringRefusal("AvailabilityZoneId") ?? stringRefusal("Ipv4IpamPoolId") ?? configIntegerRefusal(properties, "Ipv4NetmaskLength", resourceType, 0, 32) ?? stringRefusal("Ipv6IpamPoolId") ?? configIntegerRefusal(properties, "Ipv6NetmaskLength", resourceType, 0, 128);
19554
+ if (refusal !== void 0) return { refusal };
19555
+ const text = (key) => typeof properties[key] === "string" ? properties[key] : void 0;
19556
+ const inputs = {};
19557
+ const availabilityZoneId = text("AvailabilityZoneId");
19558
+ if (availabilityZoneId !== void 0) inputs.availabilityZoneId = availabilityZoneId;
19559
+ const ipv4PoolId = text("Ipv4IpamPoolId");
19560
+ if (ipv4PoolId !== void 0) inputs.ipv4PoolId = ipv4PoolId;
19561
+ const ipv4NetmaskLength = coerceCfnInteger(properties["Ipv4NetmaskLength"]);
19562
+ if (ipv4NetmaskLength !== void 0) inputs.ipv4NetmaskLength = ipv4NetmaskLength;
19563
+ const ipv6PoolId = text("Ipv6IpamPoolId");
19564
+ if (ipv6PoolId !== void 0) inputs.ipv6PoolId = ipv6PoolId;
19565
+ const ipv6NetmaskLength = coerceCfnInteger(properties["Ipv6NetmaskLength"]);
19566
+ if (ipv6NetmaskLength !== void 0) inputs.ipv6NetmaskLength = ipv6NetmaskLength;
19567
+ return { inputs };
19568
+ }
19569
+ function cidrPrefixLength(cidr) {
19570
+ const prefix = cidr === void 0 ? void 0 : /\/(\d+)$/.exec(cidr)?.[1];
19571
+ return prefix === void 0 ? void 0 : Number(prefix);
19572
+ }
19504
19573
  function subnetPrivateDnsMemberValue(block, member) {
19505
19574
  if (block === null || typeof block !== "object" || Array.isArray(block)) return void 0;
19506
19575
  const value = block[member.member];
@@ -19508,6 +19577,7 @@ function subnetPrivateDnsMemberValue(block, member) {
19508
19577
  }
19509
19578
 
19510
19579
  // src/provisioning/providers/ec2/subnet.ts
19580
+ const SUBNET_POOL_ASSOCIATION_READS = 10;
19511
19581
  async function prepareSubnetProperties(logicalId, resourceType, properties, context, physicalId, previousProperties) {
19512
19582
  let prepared = properties;
19513
19583
  for (const key of [
@@ -19539,14 +19609,17 @@ async function createSubnet(logicalId, resourceType, properties, context) {
19539
19609
  const vpcId = properties["VpcId"];
19540
19610
  const cidrBlock = properties["CidrBlock"];
19541
19611
  const ipv6Native = coerceCfnBoolean(prepared["Ipv6Native"]);
19542
- if (!vpcId || !cidrBlock && ipv6Native !== true) throw new ProvisioningError(`VpcId and CidrBlock are required for Subnet ${logicalId} (CidrBlock may be omitted only when Ipv6Native is true)`, resourceType, logicalId);
19612
+ const read = readSubnetCreateInputs(properties, resourceType);
19613
+ if ("refusal" in read) throw markNonRetryable(new ProvisioningError(`${read.refusal}. The Subnet ${logicalId} was not created.${replayedRecordNote(context)}`, resourceType, logicalId));
19614
+ const inputs = read.inputs;
19615
+ if (!vpcId || !cidrBlock && inputs.ipv4PoolId === void 0 && ipv6Native !== true) throw new ProvisioningError(`VpcId and CidrBlock are required for Subnet ${logicalId} (CidrBlock may be omitted only when Ipv6Native is true or Ipv4IpamPoolId is set)`, resourceType, logicalId);
19543
19616
  const orphanCidr = cidrBlock ? {
19544
19617
  cidr: cidrBlock,
19545
19618
  family: "ipv4"
19546
- } : typeof prepared["Ipv6CidrBlock"] === "string" ? {
19619
+ } : inputs.ipv4PoolId !== void 0 ? { ipamPoolId: inputs.ipv4PoolId } : typeof prepared["Ipv6CidrBlock"] === "string" ? {
19547
19620
  cidr: prepared["Ipv6CidrBlock"],
19548
19621
  family: "ipv6"
19549
- } : void 0;
19622
+ } : inputs.ipv6PoolId !== void 0 ? { ipamPoolId: inputs.ipv6PoolId } : void 0;
19550
19623
  let leftBehindId;
19551
19624
  try {
19552
19625
  const createClient = await this.getCreateClient();
@@ -19562,6 +19635,11 @@ async function createSubnet(logicalId, resourceType, properties, context) {
19562
19635
  Ipv6CidrBlock: prepared["Ipv6CidrBlock"],
19563
19636
  Ipv6Native: ipv6Native,
19564
19637
  AvailabilityZone: properties["AvailabilityZone"] ?? void 0,
19638
+ ...inputs.availabilityZoneId !== void 0 && { AvailabilityZoneId: inputs.availabilityZoneId },
19639
+ ...inputs.ipv4PoolId !== void 0 && { Ipv4IpamPoolId: inputs.ipv4PoolId },
19640
+ ...inputs.ipv4NetmaskLength !== void 0 && { Ipv4NetmaskLength: inputs.ipv4NetmaskLength },
19641
+ ...inputs.ipv6PoolId !== void 0 && { Ipv6IpamPoolId: inputs.ipv6PoolId },
19642
+ ...inputs.ipv6NetmaskLength !== void 0 && { Ipv6NetmaskLength: inputs.ipv6NetmaskLength },
19565
19643
  ...TagSpecifications && { TagSpecifications }
19566
19644
  }))));
19567
19645
  } catch (error) {
@@ -19576,8 +19654,15 @@ async function createSubnet(logicalId, resourceType, properties, context) {
19576
19654
  const availabilityZone = response.Subnet.AvailabilityZone;
19577
19655
  try {
19578
19656
  if (!tagsApplied) await this.applyTags(subnetId, desiredTags, logicalId, maskerOrIdentity(context?.maskSecrets));
19579
- if (prepared["Ipv6CidrBlock"] !== void 0) {
19580
- const associationId = response.Subnet?.Ipv6CidrBlockAssociationSet?.[0]?.AssociationId;
19657
+ if (prepared["Ipv6CidrBlock"] !== void 0 || inputs.ipv6PoolId !== void 0) {
19658
+ let associationId = response.Subnet?.Ipv6CidrBlockAssociationSet?.[0]?.AssociationId;
19659
+ for (let attempt = 1; !associationId && inputs.ipv6PoolId !== void 0 && attempt <= SUBNET_POOL_ASSOCIATION_READS; attempt++) {
19660
+ if (attempt > 1) await this.sleep(2e3);
19661
+ associationId = (await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [subnetId] })).catch((error) => {
19662
+ if (isNamedError(error, SUBNET_NOT_FOUND_NAMES)) return void 0;
19663
+ throw error;
19664
+ }))?.Subnets?.[0]?.Ipv6CidrBlockAssociationSet?.[0]?.AssociationId;
19665
+ }
19581
19666
  if (!associationId) throw new ProvisioningError(`CreateSubnet returned no IPv6 association ID for ${logicalId}`, resourceType, logicalId, subnetId);
19582
19667
  await this.waitForSubnetIpv6Association(logicalId, subnetId, resourceType, associationId, "associated");
19583
19668
  }
@@ -19617,15 +19702,21 @@ async function createSubnet(logicalId, resourceType, properties, context) {
19617
19702
  return {
19618
19703
  physicalId: subnetId,
19619
19704
  ...prepared !== properties && { effectiveProperties: prepared },
19620
- attributes: {
19705
+ attributes: definedAttributes({
19621
19706
  SubnetId: subnetId,
19622
- AvailabilityZone: availabilityZone
19623
- }
19707
+ AvailabilityZone: availabilityZone,
19708
+ AvailabilityZoneId: response.Subnet?.AvailabilityZoneId,
19709
+ CidrBlock: response.Subnet?.CidrBlock ?? (cidrBlock || void 0),
19710
+ VpcId: response.Subnet?.VpcId ?? vpcId
19711
+ })
19624
19712
  };
19625
19713
  } catch (error) {
19626
19714
  const cause = error instanceof Error ? error : void 0;
19627
19715
  const thrown = this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to create Subnet ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
19628
- if (leftBehindId !== void 0) markCreatedBeforeFailure(thrown, logicalId, resourceType, leftBehindId);
19716
+ if (leftBehindId !== void 0) {
19717
+ markCreatedBeforeFailure(thrown, logicalId, resourceType, leftBehindId);
19718
+ if (orphanCidr !== void 0 && "ipamPoolId" in orphanCidr) markNonRetryable(thrown);
19719
+ }
19629
19720
  throw thrown;
19630
19721
  }
19631
19722
  }
@@ -19634,14 +19725,10 @@ async function updateSubnet(logicalId, physicalId, resourceType, properties, pre
19634
19725
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
19635
19726
  let prepared = await this.prepareSubnetProperties(logicalId, resourceType, properties, context, physicalId, previousProperties);
19636
19727
  try {
19637
- for (const createOnly of [
19638
- "VpcId",
19639
- "CidrBlock",
19640
- "AvailabilityZone"
19641
- ]) {
19728
+ for (const createOnly of SUBNET_CREATE_ONLY_SENT) {
19642
19729
  const next = properties[createOnly];
19643
19730
  const prev = previousProperties[createOnly];
19644
- if (next !== void 0 && prev !== void 0 && next !== prev) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, `destroy + redeploy the Subnet (and the resources that depend on it). ${createOnly} is immutable in AWS`);
19731
+ if (next !== void 0 && prev !== void 0 && !sameCreateOnlySent(createOnly, next, prev)) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, `destroy + redeploy the Subnet (and the resources that depend on it). ${createOnly} is immutable in AWS`);
19645
19732
  }
19646
19733
  const nextNative = coerceCfnBoolean(prepared["Ipv6Native"]);
19647
19734
  const prevNative = coerceCfnBoolean(previousProperties["Ipv6Native"]);
@@ -19877,12 +19964,13 @@ async function waitForSubnetAttribute(subnetId, expected, attribute = "MapPublic
19877
19964
  }
19878
19965
  this.logger.debug(`${attribute} update not yet visible on ${subnetId} after ${maxAttempts} reads — the observed-state capture may record the stale value`);
19879
19966
  }
19880
- async function deleteSubnet(logicalId, physicalId, resourceType, context) {
19967
+ async function deleteSubnet(logicalId, physicalId, resourceType, context, properties) {
19881
19968
  this.logger.debug(`Deleting Subnet ${logicalId}: ${physicalId}`);
19882
19969
  const maxAttempts = 10;
19883
19970
  for (let attempt = 1; attempt <= maxAttempts; attempt++) try {
19884
19971
  await this.ec2Client.send(new DeleteSubnetCommand({ SubnetId: physicalId }));
19885
19972
  this.logger.debug(`Successfully deleted Subnet ${logicalId}`);
19973
+ await this.waitForIpamAllocationRelease([properties?.["Ipv4IpamPoolId"], properties?.["Ipv6IpamPoolId"]], physicalId, "subnet", "AWS can take about 19 minutes", resourceType, context);
19886
19974
  return;
19887
19975
  } catch (error) {
19888
19976
  if (this.isNotFoundError(error) && (context?.failedCreateOrphan !== true || isNamedError(error, SUBNET_NOT_FOUND_NAMES))) {
@@ -19930,16 +20018,51 @@ async function cleanupSubnetLambdaEnis(subnetId) {
19930
20018
  }
19931
20019
  }));
19932
20020
  }
20021
+ const DESCRIBED_SUBNET_ATTRIBUTES = /* @__PURE__ */ new Set([
20022
+ "Ipv6CidrBlocks",
20023
+ "AvailabilityZone",
20024
+ "AvailabilityZoneId",
20025
+ "CidrBlock",
20026
+ "VpcId",
20027
+ "OutpostArn",
20028
+ "BlockPublicAccessStates"
20029
+ ]);
19933
20030
  async function getSubnetAttribute(physicalId, attributeName) {
19934
20031
  if (attributeName === "SubnetId") return physicalId;
20032
+ if (attributeName === "NetworkAclAssociationId") {
20033
+ if (!/^subnet-[0-9a-f]+$/.test(physicalId)) return void 0;
20034
+ return present((await this.ec2Client.send(new DescribeNetworkAclsCommand({ Filters: [{
20035
+ Name: "association.subnet-id",
20036
+ Values: [physicalId]
20037
+ }] }))).NetworkAcls?.flatMap((acl) => acl.Associations ?? []).find((a) => a.SubnetId === physicalId)?.NetworkAclAssociationId);
20038
+ }
20039
+ const dotted = attributeName.startsWith("BlockPublicAccessStates.");
20040
+ if (!dotted && !DESCRIBED_SUBNET_ATTRIBUTES.has(attributeName)) return void 0;
20041
+ let subnet;
19935
20042
  try {
19936
- const subnet = (await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [physicalId] }))).Subnets?.[0];
19937
- if (!subnet) return void 0;
19938
- if (attributeName === "AvailabilityZone") return subnet.AvailabilityZone;
19939
- return;
19940
- } catch {
19941
- return;
20043
+ subnet = (await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [physicalId] }))).Subnets?.[0];
20044
+ } catch (error) {
20045
+ if (isNamedError(error, SUBNET_NOT_FOUND_NAMES)) return void 0;
20046
+ throw error;
20047
+ }
20048
+ if (!subnet) return void 0;
20049
+ if (dotted) {
20050
+ let value = subnet.BlockPublicAccessStates;
20051
+ for (const part of attributeName.split(".").slice(1)) value = value !== null && typeof value === "object" && Object.hasOwn(value, part) ? value[part] : void 0;
20052
+ return present(value);
20053
+ }
20054
+ if (attributeName === "Ipv6CidrBlocks") {
20055
+ const associations = subnet.Ipv6CidrBlockAssociationSet ?? [];
20056
+ const blocks = associations.filter((a) => a.Ipv6CidrBlockState?.State === "associated" && a.Ipv6CidrBlock).map((a) => a.Ipv6CidrBlock);
20057
+ if (blocks.length > 0) return blocks;
20058
+ if (associations.some((a) => a.Ipv6CidrBlockState?.State === "associating")) throw new Error(SUBNET_IPV6_STILL_ASSOCIATING);
20059
+ return [];
19942
20060
  }
20061
+ return present(subnet[attributeName]);
20062
+ }
20063
+ const SUBNET_IPV6_STILL_ASSOCIATING = "the subnet's IPv6 CIDR block is still associating; run cdkd orphan again once it is associated";
20064
+ function present(value) {
20065
+ return value === void 0 || value === null || value === "" ? void 0 : value;
19943
20066
  }
19944
20067
  const subnetAttributesMethods = {
19945
20068
  updateSubnetIpv6CidrBlock,
@@ -21748,7 +21871,11 @@ function instanceStopMembers(plan) {
21748
21871
  return [
21749
21872
  plan.instanceType !== void 0 ? "InstanceType" : "",
21750
21873
  plan.userData !== void 0 ? "UserData" : "",
21751
- plan.privateDnsNameOptions?.PrivateDnsHostnameType !== void 0 ? "PrivateDnsNameOptions.HostnameType" : ""
21874
+ plan.privateDnsNameOptions?.PrivateDnsHostnameType !== void 0 ? "PrivateDnsNameOptions.HostnameType" : "",
21875
+ plan.placement?.Affinity !== void 0 ? "Affinity" : "",
21876
+ plan.placement?.HostId !== void 0 ? "HostId" : "",
21877
+ plan.kernelId !== void 0 ? "KernelId" : "",
21878
+ plan.ramdiskId !== void 0 ? "RamdiskId" : ""
21752
21879
  ].filter(Boolean);
21753
21880
  }
21754
21881
  function isRecordedStandIn$1(value) {
@@ -21796,8 +21923,39 @@ const INSTANCE_CREATE_ONLY_SENT = [
21796
21923
  "Ipv6AddressCount",
21797
21924
  "Ipv6Addresses",
21798
21925
  "LaunchTemplate",
21799
- "LicenseSpecifications"
21926
+ "LicenseSpecifications",
21927
+ "EnclaveOptions",
21928
+ "HostResourceGroupArn"
21800
21929
  ];
21930
+ const INSTANCE_STOPPED_MEMBERS = [
21931
+ "Affinity",
21932
+ "HostId",
21933
+ "KernelId",
21934
+ "RamdiskId"
21935
+ ];
21936
+ function instanceIdMemberRefusal(properties, key, resourceType) {
21937
+ return configStringRefusal(properties, key, "", resourceType) ?? (properties[key] === "" ? `${resourceType}.${key} must not be empty` : void 0);
21938
+ }
21939
+ function sameInstanceCreateOnlySent(key, a, b) {
21940
+ if (key !== "EnclaveOptions") return sameCreateOnlySent(key, a, b);
21941
+ const fold = (v) => {
21942
+ if (v === null || typeof v !== "object" || Array.isArray(v)) return v;
21943
+ const block = v;
21944
+ return {
21945
+ ...block,
21946
+ Enabled: coerceCfnBoolean(block["Enabled"]) ?? block["Enabled"]
21947
+ };
21948
+ };
21949
+ return sameCreateOnlySent(key, fold(a), fold(b));
21950
+ }
21951
+ function enclaveOptionsRequest(value) {
21952
+ if (value === void 0 || value === null) return void 0;
21953
+ const enabled = coerceCfnBoolean(value["Enabled"]);
21954
+ return enabled === void 0 ? {} : { Enabled: enabled };
21955
+ }
21956
+ function enclaveOptionsRefusal(value, resourceType) {
21957
+ return configBooleanRefusal(value, "Enabled", `${resourceType} EnclaveOptions`);
21958
+ }
21801
21959
  function instanceLicenseSpecificationsRefusal(value, resourceType) {
21802
21960
  if (value === void 0 || value === null) return void 0;
21803
21961
  if (!Array.isArray(value)) return `${resourceType}.LicenseSpecifications must be a list of { LicenseConfigurationArn } entries (got ${typeof value === "object" ? "an object" : `a ${typeof value}`})`;
@@ -22285,7 +22443,7 @@ function planInstanceMemberUpdates(logicalId, physicalId, resourceType, properti
22285
22443
  else throw refusedBeforeApplying(new ProvisioningError(safeMsg`${logicalId} (${resourceType}): InstanceType was removed from the template, and CloudFormation fails that update for an existing instance. Keep it declared (set it to the instance's current type to leave it unchanged). The instance was not updated.`, resourceType, logicalId, physicalId));
22286
22444
  } else if (!standInSkips("InstanceType")) plan.instanceType = requireConfigString(properties["InstanceType"], "", "AWS::EC2::Instance InstanceType");
22287
22445
  }
22288
- const createOnlyChanged = INSTANCE_CREATE_ONLY_SENT.filter((key) => changed(key, (a, b) => sameCreateOnlySent(key, a, b)));
22446
+ const createOnlyChanged = INSTANCE_CREATE_ONLY_SENT.filter((key) => changed(key, (a, b) => sameInstanceCreateOnlySent(key, a, b)));
22289
22447
  if (createOnlyChanged.length > 0) throw refusedBeforeApplying(new ResourceUpdateNotSupportedError(resourceType, logicalId, `replace the instance (cdkd deploy --replace). ${createOnlyChanged.join(", ")} can be set only when the instance is launched, and CloudFormation creates a new instance for this change`));
22290
22448
  if (changed("Tenancy", (a, b) => a === b) && !standInSkips("Tenancy")) {
22291
22449
  const before = previousProperties["Tenancy"];
@@ -22302,6 +22460,7 @@ function planInstanceMemberUpdates(logicalId, physicalId, resourceType, properti
22302
22460
  } else if (context?.replayingState === true) this.logger.warn(safeMsg`${logicalId} (${resourceType}): the rollback would change Tenancy (${before === void 0 ? "unset" : before} -> ${after === void 0 ? "unset" : after}), which needs a new instance; the instance keeps its current tenancy.`);
22303
22461
  else throw refusedBeforeApplying(new ResourceUpdateNotSupportedError(resourceType, logicalId, "replace the instance (cdkd deploy --replace). CloudFormation creates a new instance for a Tenancy change to or from default"));
22304
22462
  }
22463
+ this.planInstanceStoppedMembers(logicalId, physicalId, resourceType, properties, context, plan, changed, standInSkips);
22305
22464
  if (changed("InstanceInitiatedShutdownBehavior", (a, b) => a === b)) {
22306
22465
  if (properties["InstanceInitiatedShutdownBehavior"] === void 0) {
22307
22466
  if (context?.replayingState === true) this.logger.warn(safeMsg`${logicalId} (${resourceType}): the state being restored does not declare InstanceInitiatedShutdownBehavior; the rollback leaves it at its current AWS value.`);
@@ -22373,6 +22532,39 @@ function planInstanceMemberUpdates(logicalId, physicalId, resourceType, properti
22373
22532
  this.planInstanceSsmAssociations(logicalId, physicalId, resourceType, properties, previousProperties, plan, changed, standInSkips);
22374
22533
  return plan;
22375
22534
  }
22535
+ function planInstanceStoppedMembers(logicalId, physicalId, resourceType, properties, context, plan, changed, standInSkips) {
22536
+ for (const key of INSTANCE_STOPPED_MEMBERS) {
22537
+ if (!changed(key, (a, b) => a === b)) continue;
22538
+ const after = properties[key];
22539
+ if (after === void 0) {
22540
+ if (context?.replayingState === true) {
22541
+ this.logger.warn(safeMsg`${logicalId} (${resourceType}): the state being restored does not declare ${key}; the rollback leaves it at its current AWS value.`);
22542
+ continue;
22543
+ }
22544
+ throw refusedBeforeApplying(new ProvisioningError(safeMsg`${logicalId} (${resourceType}): ${key} was removed from the template. EC2 has no call that clears it on an existing instance, and CloudFormation does not document what a removal does, so cdkd does not guess a value. Keep it declared (its current value leaves the instance unchanged), or replace the instance with cdkd deploy --replace. The instance was not updated.`, resourceType, logicalId, physicalId));
22545
+ }
22546
+ if (standInSkips(key)) continue;
22547
+ const refusal = instanceIdMemberRefusal(properties, key, resourceType);
22548
+ if (refusal !== void 0) {
22549
+ if (context?.replayingState === true) {
22550
+ this.logger.warn(safeMsg`${logicalId} (${resourceType}): ${refusal}; the rollback leaves ${key} at its current AWS value.`);
22551
+ continue;
22552
+ }
22553
+ throw refusedBeforeApplying(new ProvisioningError(`${refusal}. The instance ${logicalId} was not updated.`, resourceType, logicalId, physicalId));
22554
+ }
22555
+ const value = requireConfigString(after, "", `${resourceType} ${key}`);
22556
+ if (key === "Affinity") plan.placement = {
22557
+ ...plan.placement,
22558
+ Affinity: value
22559
+ };
22560
+ else if (key === "HostId") plan.placement = {
22561
+ ...plan.placement,
22562
+ HostId: value
22563
+ };
22564
+ else if (key === "KernelId") plan.kernelId = value;
22565
+ else plan.ramdiskId = value;
22566
+ }
22567
+ }
22376
22568
  function planInstanceSsmAssociations(logicalId, physicalId, resourceType, properties, previousProperties, plan, changed, standInSkips) {
22377
22569
  const refusal = instanceSsmAssociationsRefusal(properties["SsmAssociations"], resourceType) ?? ssmAssociationsAwsRefusal(properties, resourceType);
22378
22570
  if (refusal !== void 0) throw refusedBeforeApplying(new ProvisioningError(`${refusal}. The instance ${logicalId} was not updated.`, resourceType, logicalId, physicalId));
@@ -22416,7 +22608,8 @@ const instanceUpdateMethods = {
22416
22608
  updateInstanceSecurityProps,
22417
22609
  planInstanceMemberUpdates,
22418
22610
  planInstanceVolumes,
22419
- planInstanceSsmAssociations
22611
+ planInstanceSsmAssociations,
22612
+ planInstanceStoppedMembers
22420
22613
  };
22421
22614
 
22422
22615
  // src/provisioning/providers/ec2/instance-apply.ts
@@ -22466,6 +22659,15 @@ async function prepareInstanceMemberUpdates(logicalId, physicalId, resourceType,
22466
22659
  if (Object.keys(rest).length > 0) plan.privateDnsNameOptions = rest;
22467
22660
  else delete plan.privateDnsNameOptions;
22468
22661
  }
22662
+ const placement = plan.placement;
22663
+ if (placement !== void 0) {
22664
+ const liveAffinity = instance?.Placement?.Affinity ?? "default";
22665
+ if (placement.Affinity !== void 0 && liveAffinity === placement.Affinity) delete placement.Affinity;
22666
+ if (placement.HostId !== void 0 && instance?.Placement?.HostId === placement.HostId) delete placement.HostId;
22667
+ if (placement.Affinity === void 0 && placement.HostId === void 0) delete plan.placement;
22668
+ }
22669
+ if (plan.kernelId !== void 0 && instance?.KernelId === plan.kernelId) delete plan.kernelId;
22670
+ if (plan.ramdiskId !== void 0 && instance?.RamdiskId === plan.ramdiskId) delete plan.ramdiskId;
22469
22671
  const stopMembers = instanceStopMembers(plan);
22470
22672
  const needsStop = stopMembers.length > 0;
22471
22673
  if (tenancy !== void 0) {
@@ -22588,6 +22790,27 @@ async function applyInstanceMemberUpdates(logicalId, physicalId, resourceType, p
22588
22790
  }));
22589
22791
  applied.push("the new PrivateDnsNameOptions");
22590
22792
  }
22793
+ if (plan.placement !== void 0) {
22794
+ await this.ec2Client.send(new ModifyInstancePlacementCommand({
22795
+ InstanceId: physicalId,
22796
+ ...plan.placement
22797
+ }));
22798
+ applied.push(`the new ${Object.keys(plan.placement).join(" and ")}`);
22799
+ }
22800
+ if (plan.kernelId !== void 0) {
22801
+ await this.ec2Client.send(new ModifyInstanceAttributeCommand({
22802
+ InstanceId: physicalId,
22803
+ Kernel: { Value: plan.kernelId }
22804
+ }));
22805
+ applied.push("the new KernelId");
22806
+ }
22807
+ if (plan.ramdiskId !== void 0) {
22808
+ await this.ec2Client.send(new ModifyInstanceAttributeCommand({
22809
+ InstanceId: physicalId,
22810
+ Ramdisk: { Value: plan.ramdiskId }
22811
+ }));
22812
+ applied.push("the new RamdiskId");
22813
+ }
22591
22814
  if (!startAfter) return;
22592
22815
  phase = "start";
22593
22816
  await this.ec2Client.send(new StartInstancesCommand({ InstanceIds: [physicalId] }));
@@ -22963,6 +23186,12 @@ function buildPlacement(properties) {
22963
23186
  if (typeof tenancy === "string" && tenancy !== "") out.Tenancy = tenancy;
22964
23187
  const group = properties["PlacementGroupName"];
22965
23188
  if (typeof group === "string" && group !== "") out.GroupName = group;
23189
+ const affinity = properties["Affinity"];
23190
+ if (typeof affinity === "string" && affinity !== "") out.Affinity = affinity;
23191
+ const hostId = properties["HostId"];
23192
+ if (typeof hostId === "string" && hostId !== "") out.HostId = hostId;
23193
+ const hostGroup = properties["HostResourceGroupArn"];
23194
+ if (typeof hostGroup === "string" && hostGroup !== "") out.HostResourceGroupArn = hostGroup;
22966
23195
  return Object.keys(out).length > 0 ? out : void 0;
22967
23196
  }
22968
23197
  function buildNetworkInterfaces(properties) {
@@ -23024,7 +23253,7 @@ function readCpuCredits(spec) {
23024
23253
  function buildLaunchOnlyInstanceOptions(properties, resourceType, logicalId) {
23025
23254
  const cpu = properties["CpuOptions"];
23026
23255
  const hibernation = properties["HibernationOptions"];
23027
- const refusal = configIntegerRefusal(cpu, "CoreCount", `${resourceType} CpuOptions`, 1) ?? configIntegerRefusal(cpu, "ThreadsPerCore", `${resourceType} CpuOptions`, 1) ?? configBooleanRefusal(hibernation, "Configured", `${resourceType} HibernationOptions`) ?? configStringRefusal(properties, "InstanceInitiatedShutdownBehavior", "", resourceType) ?? configStringRefusal(properties, "Tenancy", "", resourceType) ?? configStringRefusal(properties, "PlacementGroupName", "", resourceType) ?? configStringRefusal(properties, "PrivateIpAddress", "", resourceType) ?? configBooleanRefusal(properties, "SourceDestCheck", resourceType) ?? configBooleanRefusal(properties, "PropagateTagsToVolumeOnCreation", resourceType) ?? configStringRefusal(properties, "AdditionalInfo", "", resourceType) ?? configIntegerRefusal(properties, "Ipv6AddressCount", resourceType, 0) ?? instanceIpv6AddressesRefusal(properties["Ipv6Addresses"], resourceType) ?? privateDnsNameOptionsRefusal(properties["PrivateDnsNameOptions"], resourceType) ?? instanceLaunchTemplateRefusal(properties["LaunchTemplate"], resourceType) ?? instanceVolumesRefusal(properties["Volumes"], resourceType) ?? instanceLicenseSpecificationsRefusal(properties["LicenseSpecifications"], resourceType) ?? instanceSsmAssociationsRefusal(properties["SsmAssociations"], resourceType) ?? ssmAssociationsAwsRefusal(properties, resourceType);
23256
+ const refusal = configIntegerRefusal(cpu, "CoreCount", `${resourceType} CpuOptions`, 1) ?? configIntegerRefusal(cpu, "ThreadsPerCore", `${resourceType} CpuOptions`, 1) ?? configBooleanRefusal(hibernation, "Configured", `${resourceType} HibernationOptions`) ?? configStringRefusal(properties, "InstanceInitiatedShutdownBehavior", "", resourceType) ?? configStringRefusal(properties, "Tenancy", "", resourceType) ?? configStringRefusal(properties, "PlacementGroupName", "", resourceType) ?? configStringRefusal(properties, "PrivateIpAddress", "", resourceType) ?? configBooleanRefusal(properties, "SourceDestCheck", resourceType) ?? configBooleanRefusal(properties, "PropagateTagsToVolumeOnCreation", resourceType) ?? configStringRefusal(properties, "AdditionalInfo", "", resourceType) ?? configIntegerRefusal(properties, "Ipv6AddressCount", resourceType, 0) ?? instanceIpv6AddressesRefusal(properties["Ipv6Addresses"], resourceType) ?? privateDnsNameOptionsRefusal(properties["PrivateDnsNameOptions"], resourceType) ?? instanceLaunchTemplateRefusal(properties["LaunchTemplate"], resourceType) ?? instanceVolumesRefusal(properties["Volumes"], resourceType) ?? instanceLicenseSpecificationsRefusal(properties["LicenseSpecifications"], resourceType) ?? instanceSsmAssociationsRefusal(properties["SsmAssociations"], resourceType) ?? ssmAssociationsAwsRefusal(properties, resourceType) ?? instanceIdMemberRefusal(properties, "Affinity", resourceType) ?? instanceIdMemberRefusal(properties, "HostId", resourceType) ?? instanceIdMemberRefusal(properties, "HostResourceGroupArn", resourceType) ?? instanceIdMemberRefusal(properties, "KernelId", resourceType) ?? instanceIdMemberRefusal(properties, "RamdiskId", resourceType) ?? enclaveOptionsRefusal(properties["EnclaveOptions"], resourceType);
23028
23257
  if (refusal !== void 0) throw markNonRetryable(new ProvisioningError(`${refusal}. The instance ${logicalId} was not launched.`, resourceType, logicalId));
23029
23258
  const out = {};
23030
23259
  if (cpu !== void 0 && cpu !== null) {
@@ -23056,6 +23285,12 @@ function buildLaunchOnlyInstanceOptions(properties, resourceType, logicalId) {
23056
23285
  if (launchTemplate !== void 0) out.LaunchTemplate = launchTemplate;
23057
23286
  const licenses = licenseSpecificationsRequest(properties["LicenseSpecifications"]);
23058
23287
  if (licenses !== void 0) out.LicenseSpecifications = licenses;
23288
+ const kernelId = properties["KernelId"];
23289
+ if (typeof kernelId === "string" && kernelId !== "") out.KernelId = kernelId;
23290
+ const ramdiskId = properties["RamdiskId"];
23291
+ if (typeof ramdiskId === "string" && ramdiskId !== "") out.RamdiskId = ramdiskId;
23292
+ const enclave = enclaveOptionsRequest(properties["EnclaveOptions"]);
23293
+ if (enclave !== void 0) out.EnclaveOptions = enclave;
23059
23294
  return out;
23060
23295
  }
23061
23296
  const instanceBuildMethods = {
@@ -23466,7 +23701,7 @@ async function applyTags(resourceId, tags, logicalId, mask, wrapSend = (call) =>
23466
23701
  this.logger.warn(`${tagHead}${this.warnFailureText(tagHead, error, mask)}`);
23467
23702
  }
23468
23703
  }
23469
- async function applyTagDiff$15(resourceId, resourceType, logicalId, oldTagsRaw, newTagsRaw, mask) {
23704
+ async function applyTagDiff$16(resourceId, resourceType, logicalId, oldTagsRaw, newTagsRaw, mask) {
23470
23705
  const plan = planTagDiff(oldTagsRaw, newTagsRaw);
23471
23706
  const tagWarning = tagPlanWarning(plan, resourceType, logicalId);
23472
23707
  if (tagWarning !== void 0) this.logger.warn(tagWarning);
@@ -23574,7 +23809,7 @@ function isNotFoundError$3(error) {
23574
23809
  const tagsErrorsMethods = {
23575
23810
  sendTaggedCreate,
23576
23811
  applyTags,
23577
- applyTagDiff: applyTagDiff$15,
23812
+ applyTagDiff: applyTagDiff$16,
23578
23813
  withDependencyViolationRetry,
23579
23814
  wrapCaughtError: wrapCaughtError$15,
23580
23815
  warnFailureText: warnFailureText$1,
@@ -23604,7 +23839,7 @@ async function unsettledInTransition$4(physicalId, _logicalId, resourceType, nam
23604
23839
  }
23605
23840
  }
23606
23841
  async function readUnsettled$5(physicalId, logicalId, resourceType, names, recordedProperties) {
23607
- if (resourceType === "AWS::EC2::Subnet") return this.readSubnetCurrentState(physicalId, names);
23842
+ if (resourceType === "AWS::EC2::Subnet") return this.readSubnetCurrentState(physicalId, names, recordedProperties);
23608
23843
  return this.readCurrentState(physicalId, logicalId, resourceType, recordedProperties);
23609
23844
  }
23610
23845
  async function canonicalizeDriftPair$3(resourceType, baseline, aws) {
@@ -23637,7 +23872,7 @@ function canonicalizeUnsettledProperties$1(resourceType, properties) {
23637
23872
  [key]: canonical
23638
23873
  };
23639
23874
  }
23640
- async function readCurrentState$28(physicalId, logicalId, resourceType, properties, context) {
23875
+ async function readCurrentState$29(physicalId, logicalId, resourceType, properties, context) {
23641
23876
  const attempts = context?.afterOwnWrite === true ? 5 : 1;
23642
23877
  for (let attempt = 1;; attempt++) {
23643
23878
  const read = await this.readCurrentStateOnce(physicalId, logicalId, resourceType, properties, context);
@@ -23649,7 +23884,7 @@ async function readCurrentStateOnce(physicalId, logicalId, resourceType, propert
23649
23884
  try {
23650
23885
  switch (resourceType) {
23651
23886
  case "AWS::EC2::VPC": return await this.readVpcCurrentState(physicalId, properties);
23652
- case "AWS::EC2::Subnet": return await this.readSubnetCurrentState(physicalId);
23887
+ case "AWS::EC2::Subnet": return await this.readSubnetCurrentState(physicalId, void 0, properties);
23653
23888
  case "AWS::EC2::InternetGateway": return await this.readInternetGatewayCurrentState(physicalId);
23654
23889
  case "AWS::EC2::NatGateway": return await this.readNatGatewayCurrentState(physicalId, properties);
23655
23890
  case "AWS::EC2::RouteTable": return await this.readRouteTableCurrentState(physicalId);
@@ -23688,6 +23923,7 @@ function getDriftUnknownPaths$9(resourceType, properties) {
23688
23923
  const control = properties?.["VpcEncryptionControl"];
23689
23924
  return ["Ipv4IpamPoolId", ...control !== null && typeof control === "object" && control["Mode"] === "monitor" ? VPC_ENCRYPTION_CONTROL_EXCLUSIONS.map((key) => `VpcEncryptionControl.${key}`) : []];
23690
23925
  }
23926
+ case "AWS::EC2::Subnet": return ["Ipv4IpamPoolId", "Ipv6IpamPoolId"];
23691
23927
  case "AWS::EC2::Route":
23692
23928
  case "AWS::EC2::VPCGatewayAttachment":
23693
23929
  case "AWS::EC2::SubnetRouteTableAssociation":
@@ -23711,6 +23947,7 @@ function canonicalizeDesiredProperties$2(resourceType, properties) {
23711
23947
  [key]: value
23712
23948
  };
23713
23949
  }
23950
+ out = foldNetmaskSpellings(out, ["Ipv4NetmaskLength", "Ipv6NetmaskLength"]);
23714
23951
  const dnsKey = "PrivateDnsNameOptionsOnLaunch";
23715
23952
  const dns = properties[dnsKey];
23716
23953
  if (subnetPrivateDnsOptionsRefusal(dns) === void 0 && dns !== null && typeof dns === "object") {
@@ -23729,6 +23966,7 @@ function canonicalizeDesiredProperties$2(resourceType, properties) {
23729
23966
  }
23730
23967
  return out;
23731
23968
  }
23969
+ if (resourceType === "AWS::EC2::VPC") return foldNetmaskSpellings(properties, ["Ipv4NetmaskLength"]);
23732
23970
  if (resourceType === "AWS::EC2::SecurityGroupIngress") {
23733
23971
  const { narrowed } = narrowIngressIpProtocol(properties, () => {});
23734
23972
  return canonicalizeSgRuleProtocol(narrowed);
@@ -23738,13 +23976,24 @@ function canonicalizeDesiredProperties$2(resourceType, properties) {
23738
23976
  const { declared, narrowed } = narrowRouteDestinations(properties);
23739
23977
  return declared.length > 1 ? narrowed : properties;
23740
23978
  }
23979
+ function foldNetmaskSpellings(properties, keys) {
23980
+ let out = properties;
23981
+ for (const key of keys) {
23982
+ const value = coerceCfnInteger(properties[key]);
23983
+ if (value !== void 0 && value !== properties[key]) out = {
23984
+ ...out,
23985
+ [key]: value
23986
+ };
23987
+ }
23988
+ return out;
23989
+ }
23741
23990
  const driftMethods = {
23742
23991
  subnetIpv6InTransition,
23743
23992
  unsettledInTransition: unsettledInTransition$4,
23744
23993
  readUnsettled: readUnsettled$5,
23745
23994
  canonicalizeDriftPair: canonicalizeDriftPair$3,
23746
23995
  canonicalizeUnsettledProperties: canonicalizeUnsettledProperties$1,
23747
- readCurrentState: readCurrentState$28,
23996
+ readCurrentState: readCurrentState$29,
23748
23997
  readCurrentStateOnce,
23749
23998
  getDriftUnknownPaths: getDriftUnknownPaths$9,
23750
23999
  canonicalizeDesiredProperties: canonicalizeDesiredProperties$2
@@ -23792,7 +24041,7 @@ async function readVpcCurrentState(physicalId, properties) {
23792
24041
  }
23793
24042
  return result;
23794
24043
  }
23795
- async function readSubnetCurrentState(physicalId, unsettledNames) {
24044
+ async function readSubnetCurrentState(physicalId, unsettledNames, properties) {
23796
24045
  const subnet = (await this.ec2Client.send(new DescribeSubnetsCommand({ SubnetIds: [physicalId] }))).Subnets?.[0];
23797
24046
  if (!subnet) return RESOURCE_NOT_FOUND;
23798
24047
  if (unsettledNames?.has("Ipv6CidrBlock") && this.subnetIpv6InTransition(subnet)) throw new Error("Subnet IPv6 association is still in transition; retry after it has settled");
@@ -23801,10 +24050,15 @@ async function readSubnetCurrentState(physicalId, unsettledNames) {
23801
24050
  if (subnet.VpcId !== void 0) result["VpcId"] = subnet.VpcId;
23802
24051
  if (subnet.CidrBlock !== void 0) result["CidrBlock"] = subnet.CidrBlock;
23803
24052
  if (subnet.AvailabilityZone !== void 0) result["AvailabilityZone"] = subnet.AvailabilityZone;
24053
+ if (subnet.AvailabilityZoneId !== void 0) result["AvailabilityZoneId"] = subnet.AvailabilityZoneId;
23804
24054
  if (subnet.MapPublicIpOnLaunch !== void 0) result["MapPublicIpOnLaunch"] = subnet.MapPublicIpOnLaunch;
23805
24055
  if (subnet.EnableDns64 !== void 0) result["EnableDns64"] = subnet.EnableDns64;
23806
24056
  const ipv6 = subnet.Ipv6CidrBlockAssociationSet?.find((association) => association.Ipv6CidrBlockState?.State === "associated");
23807
24057
  if (ipv6?.Ipv6CidrBlock !== void 0) result["Ipv6CidrBlock"] = ipv6.Ipv6CidrBlock;
24058
+ const ipv4Netmask = cidrPrefixLength(subnet.CidrBlock);
24059
+ if (ipv4Netmask !== void 0 && properties?.["Ipv4NetmaskLength"] !== void 0) result["Ipv4NetmaskLength"] = ipv4Netmask;
24060
+ const ipv6Netmask = cidrPrefixLength(ipv6?.Ipv6CidrBlock);
24061
+ if (ipv6Netmask !== void 0 && properties?.["Ipv6NetmaskLength"] !== void 0) result["Ipv6NetmaskLength"] = ipv6Netmask;
23808
24062
  if (subnet.AssignIpv6AddressOnCreation !== void 0) result["AssignIpv6AddressOnCreation"] = subnet.AssignIpv6AddressOnCreation;
23809
24063
  if (subnet.Ipv6Native !== void 0) result["Ipv6Native"] = subnet.Ipv6Native;
23810
24064
  const dns = subnet.PrivateDnsNameOptionsOnLaunch;
@@ -24142,6 +24396,15 @@ async function readInstanceCurrentState(physicalId, properties) {
24142
24396
  }
24143
24397
  if (instance.Placement?.Tenancy !== void 0) result["Tenancy"] = instance.Placement.Tenancy;
24144
24398
  if (typeof instance.Placement?.GroupName === "string" && instance.Placement.GroupName !== "") result["PlacementGroupName"] = instance.Placement.GroupName;
24399
+ const placementReads = [
24400
+ ["Affinity", instance.Placement?.Affinity],
24401
+ ["HostId", instance.Placement?.HostId],
24402
+ ["HostResourceGroupArn", instance.Placement?.HostResourceGroupArn],
24403
+ ["KernelId", instance.KernelId],
24404
+ ["RamdiskId", instance.RamdiskId]
24405
+ ];
24406
+ for (const [key, value] of placementReads) if (typeof value === "string" && value !== "") result[key] = value;
24407
+ if (instance.EnclaveOptions?.Enabled !== void 0) result["EnclaveOptions"] = { Enabled: instance.EnclaveOptions.Enabled };
24145
24408
  if (instance.IamInstanceProfile?.Arn !== void 0) result["IamInstanceProfile"] = instance.IamInstanceProfile.Arn;
24146
24409
  else if (process.env["CDKD_NO_WAIT"] === "true" && instance.State?.Name === "pending") try {
24147
24410
  const live = (await this.ec2Client.send(new DescribeIamInstanceProfileAssociationsCommand({ Filters: [{
@@ -24244,7 +24507,10 @@ async function verifyExplicit(logicalId, resourceType, physicalId, properties) {
24244
24507
  physicalId,
24245
24508
  attributes: definedAttributes({
24246
24509
  SubnetId: physicalId,
24247
- AvailabilityZone: subnet.AvailabilityZone
24510
+ AvailabilityZone: subnet.AvailabilityZone,
24511
+ AvailabilityZoneId: subnet.AvailabilityZoneId,
24512
+ CidrBlock: subnet.CidrBlock,
24513
+ VpcId: subnet.VpcId
24248
24514
  })
24249
24515
  } : null;
24250
24516
  }
@@ -24489,7 +24755,12 @@ var EC2Provider = class {
24489
24755
  "Tags",
24490
24756
  "AssignIpv6AddressOnCreation",
24491
24757
  "Ipv6Native",
24492
- "PrivateDnsNameOptionsOnLaunch"
24758
+ "PrivateDnsNameOptionsOnLaunch",
24759
+ "AvailabilityZoneId",
24760
+ "Ipv4IpamPoolId",
24761
+ "Ipv4NetmaskLength",
24762
+ "Ipv6IpamPoolId",
24763
+ "Ipv6NetmaskLength"
24493
24764
  ])],
24494
24765
  ["AWS::EC2::InternetGateway", /* @__PURE__ */ new Set(["Tags"])],
24495
24766
  ["AWS::EC2::EIP", /* @__PURE__ */ new Set([
@@ -24590,7 +24861,13 @@ var EC2Provider = class {
24590
24861
  "LaunchTemplate",
24591
24862
  "Volumes",
24592
24863
  "LicenseSpecifications",
24593
- "SsmAssociations"
24864
+ "SsmAssociations",
24865
+ "Affinity",
24866
+ "EnclaveOptions",
24867
+ "HostId",
24868
+ "HostResourceGroupArn",
24869
+ "KernelId",
24870
+ "RamdiskId"
24594
24871
  ])],
24595
24872
  ["AWS::EC2::NetworkAcl", /* @__PURE__ */ new Set(["VpcId", "Tags"])],
24596
24873
  ["AWS::EC2::NetworkAclEntry", /* @__PURE__ */ new Set([
@@ -24659,7 +24936,7 @@ var EC2Provider = class {
24659
24936
  async delete(logicalId, physicalId, resourceType, properties, context) {
24660
24937
  switch (resourceType) {
24661
24938
  case "AWS::EC2::VPC": return this.deleteVpc(logicalId, physicalId, resourceType, context, properties);
24662
- case "AWS::EC2::Subnet": return this.deleteSubnet(logicalId, physicalId, resourceType, context);
24939
+ case "AWS::EC2::Subnet": return this.deleteSubnet(logicalId, physicalId, resourceType, context, properties);
24663
24940
  case "AWS::EC2::InternetGateway": return this.deleteInternetGateway(logicalId, physicalId, resourceType, context);
24664
24941
  case "AWS::EC2::EIP": return this.deleteEip(logicalId, physicalId, resourceType, context);
24665
24942
  case "AWS::EC2::VPCGatewayAttachment": return this.deleteVpcGatewayAttachment(logicalId, physicalId, resourceType, properties, context);
@@ -25107,7 +25384,7 @@ async function create$29(logicalId, resourceType, properties, context) {
25107
25384
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
25108
25385
  }
25109
25386
  }
25110
- async function update$29(logicalId, physicalId, resourceType, properties, previousProperties, context) {
25387
+ async function update$30(logicalId, physicalId, resourceType, properties, previousProperties, context) {
25111
25388
  const log = createMaskedLogSinks(this.logger, context?.maskSecrets);
25112
25389
  switch (resourceType) {
25113
25390
  case "AWS::ApiGateway::Account":
@@ -25156,7 +25433,7 @@ async function buildStageArn(restApiId, stageName) {
25156
25433
  return;
25157
25434
  }
25158
25435
  }
25159
- async function applyTagDiff$14(resourceArn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, displayArn) {
25436
+ async function applyTagDiff$15(resourceArn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, displayArn) {
25160
25437
  const plan = planTagDiff(oldTagsRaw, newTagsRaw);
25161
25438
  const tagWarning = tagPlanWarning(plan, resourceType, logicalId);
25162
25439
  if (tagWarning !== void 0) log.warn(tagWarning);
@@ -26133,7 +26410,7 @@ function getDriftUnorderedPaths$6(resourceType) {
26133
26410
  if (resourceType === "AWS::ApiGateway::Method") return ["AuthorizationScopes"];
26134
26411
  return [];
26135
26412
  }
26136
- async function readCurrentState$27(physicalId, _logicalId, resourceType, properties) {
26413
+ async function readCurrentState$28(physicalId, _logicalId, resourceType, properties) {
26137
26414
  switch (resourceType) {
26138
26415
  case "AWS::ApiGateway::Account": return this.readCurrentStateAccount();
26139
26416
  case "AWS::ApiGateway::Method": return this.readCurrentStateMethod(physicalId);
@@ -26285,7 +26562,7 @@ async function readCurrentStateMethod(physicalId) {
26285
26562
  throw err;
26286
26563
  }
26287
26564
  }
26288
- async function importImpl$29(input) {
26565
+ async function importImpl$30(input) {
26289
26566
  if (input.knownPhysicalId) {
26290
26567
  if (input.resourceType === "AWS::ApiGateway::Resource" && input.knownPhysicalId.includes("|")) {
26291
26568
  this.logger.warn(`AWS::ApiGateway::Resource ${input.logicalId}: '${input.knownPhysicalId}' looks like a composite, but cdkd stores a BARE resourceId for this type (the parent RestApiId comes from the template). Adopting it would send the whole string to the API as a resource id, and the delete path would then report success on the NotFound. Pass just the resourceId.`);
@@ -26381,7 +26658,7 @@ var ApiGatewayProvider = class {
26381
26658
  return create$29.call(this, logicalId, resourceType, properties, context);
26382
26659
  }
26383
26660
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
26384
- return update$29.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
26661
+ return update$30.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
26385
26662
  }
26386
26663
  delete(logicalId, physicalId, resourceType, properties, context) {
26387
26664
  return deleteImpl$29.call(this, logicalId, physicalId, resourceType, properties, context);
@@ -26468,7 +26745,7 @@ var ApiGatewayProvider = class {
26468
26745
  return buildStageArn.call(this, restApiId, stageName);
26469
26746
  }
26470
26747
  applyTagDiff(resourceArn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, displayArn) {
26471
- return applyTagDiff$14.call(this, resourceArn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, displayArn);
26748
+ return applyTagDiff$15.call(this, resourceArn, resourceType, logicalId, oldTagsRaw, newTagsRaw, log, displayArn);
26472
26749
  }
26473
26750
  sleep(ms) {
26474
26751
  return sleep$2.call(this, ms);
@@ -26480,7 +26757,7 @@ var ApiGatewayProvider = class {
26480
26757
  return getDriftUnorderedPaths$6.call(this, resourceType);
26481
26758
  }
26482
26759
  readCurrentState(physicalId, _logicalId, resourceType, properties) {
26483
- return readCurrentState$27.call(this, physicalId, _logicalId, resourceType, properties);
26760
+ return readCurrentState$28.call(this, physicalId, _logicalId, resourceType, properties);
26484
26761
  }
26485
26762
  readCurrentStateAuthorizer(physicalId, properties) {
26486
26763
  return readCurrentStateAuthorizer.call(this, physicalId, properties);
@@ -26501,7 +26778,7 @@ var ApiGatewayProvider = class {
26501
26778
  return readCurrentStateMethod.call(this, physicalId);
26502
26779
  }
26503
26780
  import(input) {
26504
- return importImpl$29.call(this, input);
26781
+ return importImpl$30.call(this, input);
26505
26782
  }
26506
26783
  };
26507
26784
 
@@ -26567,7 +26844,7 @@ async function create$28(logicalId, resourceType, properties, context) {
26567
26844
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
26568
26845
  }
26569
26846
  }
26570
- async function update$28(logicalId, physicalId, resourceType, properties, previousProperties, context) {
26847
+ async function update$29(logicalId, physicalId, resourceType, properties, previousProperties, context) {
26571
26848
  const log = resourceType === "AWS::ApiGatewayV2::Stage" ? stageSinks(this.logger, context, [[properties["StageName"], physicalId], [previousProperties["StageName"], physicalId]]) : createMaskedLogSinks(this.logger, context?.maskSecrets);
26572
26849
  switch (resourceType) {
26573
26850
  case "AWS::ApiGatewayV2::Api": return this.updateApi(logicalId, physicalId, resourceType, properties, previousProperties, log);
@@ -26641,7 +26918,7 @@ async function canonicalizeDriftPair$2(resourceType, baseline, aws, properties =
26641
26918
  aws
26642
26919
  };
26643
26920
  }
26644
- async function readCurrentState$26(physicalId, _logicalId, resourceType, properties) {
26921
+ async function readCurrentState$27(physicalId, _logicalId, resourceType, properties) {
26645
26922
  switch (resourceType) {
26646
26923
  case "AWS::ApiGatewayV2::Api": return this.readApi(physicalId);
26647
26924
  case "AWS::ApiGatewayV2::Stage": return this.readStage(physicalId, properties);
@@ -26651,7 +26928,7 @@ async function readCurrentState$26(physicalId, _logicalId, resourceType, propert
26651
26928
  default: return;
26652
26929
  }
26653
26930
  }
26654
- async function importImpl$28(input) {
26931
+ async function importImpl$29(input) {
26655
26932
  if (input.resourceType !== "AWS::ApiGatewayV2::Api") {
26656
26933
  if (input.knownPhysicalId) return {
26657
26934
  physicalId: input.knownPhysicalId,
@@ -27779,7 +28056,7 @@ function planTags(properties, previousProperties, resourceType, logicalId, physi
27779
28056
  changed: plan.set.size > 0 || remove.length > 0
27780
28057
  };
27781
28058
  }
27782
- async function applyTagDiff$13(path, change) {
28059
+ async function applyTagDiff$14(path, change) {
27783
28060
  if (!change.changed) return;
27784
28061
  const region = await this.getClient().config.region();
27785
28062
  const { partition } = derivePartitionAndUrlSuffix(region);
@@ -27996,7 +28273,7 @@ var ApiGatewayV2Provider = class {
27996
28273
  return create$28.call(this, logicalId, resourceType, properties, context);
27997
28274
  }
27998
28275
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
27999
- return update$28.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
28276
+ return update$29.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
28000
28277
  }
28001
28278
  delete(logicalId, physicalId, resourceType, properties, context) {
28002
28279
  return deleteImpl$28.call(this, logicalId, physicalId, resourceType, properties, context);
@@ -28056,7 +28333,7 @@ var ApiGatewayV2Provider = class {
28056
28333
  return canonicalizeDriftPair$2.call(this, resourceType, baseline, aws, properties);
28057
28334
  }
28058
28335
  readCurrentState(physicalId, _logicalId, resourceType, properties) {
28059
- return readCurrentState$26.call(this, physicalId, _logicalId, resourceType, properties);
28336
+ return readCurrentState$27.call(this, physicalId, _logicalId, resourceType, properties);
28060
28337
  }
28061
28338
  readApi(physicalId) {
28062
28339
  return readApi.call(this, physicalId);
@@ -28074,7 +28351,7 @@ var ApiGatewayV2Provider = class {
28074
28351
  return readAuthorizer.call(this, physicalId, properties);
28075
28352
  }
28076
28353
  import(input) {
28077
- return importImpl$28.call(this, input);
28354
+ return importImpl$29.call(this, input);
28078
28355
  }
28079
28356
  updateApi(logicalId, physicalId, resourceType, properties, previousProperties, log) {
28080
28357
  return updateApi.call(this, logicalId, physicalId, resourceType, properties, previousProperties, log);
@@ -28131,7 +28408,7 @@ var ApiGatewayV2Provider = class {
28131
28408
  return planTags.call(this, properties, previousProperties, resourceType, logicalId, physicalId, log);
28132
28409
  }
28133
28410
  applyTagDiff(path, change) {
28134
- return applyTagDiff$13.call(this, path, change);
28411
+ return applyTagDiff$14.call(this, path, change);
28135
28412
  }
28136
28413
  deepEqual(a, b) {
28137
28414
  return deepEqual$1.call(this, a, b);
@@ -28522,7 +28799,7 @@ function orphanSearchHint(properties, maskSecrets) {
28522
28799
  if (comment !== "") parts.push(`comment ${JSON.stringify(comment)}`);
28523
28800
  return parts.length > 0 ? parts.join(" and ") : "its creation time (the orphan is the newest distribution in this account)";
28524
28801
  }
28525
- async function update$27(logicalId, physicalId, resourceType, properties, previousProperties, context) {
28802
+ async function update$28(logicalId, physicalId, resourceType, properties, previousProperties, context) {
28526
28803
  this.logger.debug(`Updating CloudFront Distribution ${logicalId}: ${physicalId}`);
28527
28804
  assertRegionMatch(context?.expectedRegion ? await this.cloudFrontClient.config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update", "global");
28528
28805
  refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
@@ -28736,7 +29013,7 @@ async function waitForDistributionStable(distributionId, expectedEnabled) {
28736
29013
  }
28737
29014
 
28738
29015
  // src/provisioning/providers/cloudfront-distribution/read-state.ts
28739
- async function readCurrentState$25(physicalId, _logicalId, resourceType, _properties) {
29016
+ async function readCurrentState$26(physicalId, _logicalId, resourceType, _properties) {
28740
29017
  if (resourceType !== "AWS::CloudFront::Distribution") return void 0;
28741
29018
  let config;
28742
29019
  try {
@@ -28774,7 +29051,7 @@ async function getAttribute$10(physicalId, _resourceType, attributeName) {
28774
29051
  if (attributeName === "DomainName") return (await this.cloudFrontClient.send(new GetDistributionCommand({ Id: physicalId }))).Distribution?.DomainName;
28775
29052
  throw new Error(`Unsupported attribute: ${attributeName} for AWS::CloudFront::Distribution`);
28776
29053
  }
28777
- async function importImpl$27(input) {
29054
+ async function importImpl$28(input) {
28778
29055
  if (input.knownPhysicalId) try {
28779
29056
  await this.cloudFrontClient.send(new GetDistributionCommand({ Id: input.knownPhysicalId }));
28780
29057
  return {
@@ -29117,7 +29394,7 @@ function computeTagDiff(previousTags, newTags, resourceType, logicalId) {
29117
29394
  upserts
29118
29395
  };
29119
29396
  }
29120
- async function applyTagDiff$12(arn, previousTags, newTags, physicalId, logicalId, resourceType, mask) {
29397
+ async function applyTagDiff$13(arn, previousTags, newTags, physicalId, logicalId, resourceType, mask) {
29121
29398
  const { removed, upserts } = this.computeTagDiff(previousTags, newTags, resourceType, logicalId);
29122
29399
  if (removed.length === 0 && upserts.length === 0) return;
29123
29400
  if (!arn) throw new ProvisioningError(`CloudFront Distribution ${physicalId}: GetDistribution returned no ARN; cannot apply tag diff (removed=${removed.length}, upserts=${upserts.length}). Refusing to silently drop the tag update — retry on next deploy or check SDK version.`, resourceType, logicalId, physicalId);
@@ -29161,13 +29438,13 @@ var CloudFrontDistributionProvider = class {
29161
29438
  return orphanSearchHint.call(this, properties, maskSecrets);
29162
29439
  }
29163
29440
  update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
29164
- return update$27.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
29441
+ return update$28.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
29165
29442
  }
29166
29443
  delete(logicalId, physicalId, resourceType, _properties, context) {
29167
29444
  return deleteImpl$27.call(this, logicalId, physicalId, resourceType, _properties, context);
29168
29445
  }
29169
29446
  readCurrentState(physicalId, _logicalId, resourceType, _properties) {
29170
- return readCurrentState$25.call(this, physicalId, _logicalId, resourceType, _properties);
29447
+ return readCurrentState$26.call(this, physicalId, _logicalId, resourceType, _properties);
29171
29448
  }
29172
29449
  getDriftUnknownPaths(resourceType) {
29173
29450
  return getDriftUnknownPaths$7.call(this, resourceType);
@@ -29227,10 +29504,10 @@ var CloudFrontDistributionProvider = class {
29227
29504
  return computeTagDiff.call(this, previousTags, newTags, resourceType, logicalId);
29228
29505
  }
29229
29506
  applyTagDiff(arn, previousTags, newTags, physicalId, logicalId, resourceType, mask) {
29230
- return applyTagDiff$12.call(this, arn, previousTags, newTags, physicalId, logicalId, resourceType, mask);
29507
+ return applyTagDiff$13.call(this, arn, previousTags, newTags, physicalId, logicalId, resourceType, mask);
29231
29508
  }
29232
29509
  import(input) {
29233
- return importImpl$27.call(this, input);
29510
+ return importImpl$28.call(this, input);
29234
29511
  }
29235
29512
  };
29236
29513
 
@@ -29270,7 +29547,7 @@ function isUserTagKey(key) {
29270
29547
  }
29271
29548
 
29272
29549
  // src/provisioning/providers/agentcore-runtime/read-state.ts
29273
- async function readCurrentState$24(physicalId, _logicalId, _resourceType) {
29550
+ async function readCurrentState$25(physicalId, _logicalId, _resourceType) {
29274
29551
  let resp;
29275
29552
  try {
29276
29553
  resp = await this.client.send(new GetAgentRuntimeCommand({ agentRuntimeId: physicalId }));
@@ -29305,7 +29582,7 @@ async function readCurrentState$24(physicalId, _logicalId, _resourceType) {
29305
29582
  }
29306
29583
  return result;
29307
29584
  }
29308
- async function importImpl$26(input) {
29585
+ async function importImpl$27(input) {
29309
29586
  if (!input.knownPhysicalId) return null;
29310
29587
  const physicalId = input.knownPhysicalId;
29311
29588
  try {
@@ -29559,10 +29836,10 @@ var AgentCoreRuntimeProvider = class {
29559
29836
  }
29560
29837
  }
29561
29838
  readCurrentState(physicalId, logicalId, resourceType) {
29562
- return readCurrentState$24.call(this, physicalId, logicalId, resourceType);
29839
+ return readCurrentState$25.call(this, physicalId, logicalId, resourceType);
29563
29840
  }
29564
29841
  import(input) {
29565
- return importImpl$26.call(this, input);
29842
+ return importImpl$27.call(this, input);
29566
29843
  }
29567
29844
  };
29568
29845
 
@@ -29903,10 +30180,192 @@ var AgentCoreEvaluatorProvider = class {
29903
30180
  }
29904
30181
  };
29905
30182
 
29906
- // src/provisioning/providers/stepfunctions-provider.ts
30183
+ // src/provisioning/providers/stepfunctions/shared.ts
29907
30184
  function stateMachineRevisionId(described) {
29908
30185
  return described.revisionId ?? "INITIAL";
29909
30186
  }
30187
+ function mapEncryptionConfiguration(value) {
30188
+ if (value === null || value === void 0) return void 0;
30189
+ if (typeof value !== "object") return void 0;
30190
+ const cfg = value;
30191
+ if (cfg["Type"] === void 0) return void 0;
30192
+ return {
30193
+ type: cfg["Type"],
30194
+ kmsKeyId: cfg["KmsKeyId"],
30195
+ kmsDataKeyReusePeriodSeconds: cfg["KmsDataKeyReusePeriodSeconds"]
30196
+ };
30197
+ }
30198
+ function mapLoggingConfiguration(value) {
30199
+ if (value === null || value === void 0) return void 0;
30200
+ if (typeof value !== "object") return void 0;
30201
+ const cfg = value;
30202
+ if (cfg["Level"] === void 0) return void 0;
30203
+ const result = { level: cfg["Level"] };
30204
+ if (cfg["IncludeExecutionData"] !== void 0) result.includeExecutionData = cfg["IncludeExecutionData"];
30205
+ if (Array.isArray(cfg["Destinations"])) result.destinations = cfg["Destinations"].map((d) => {
30206
+ const cwLogs = d["CloudWatchLogsLogGroup"];
30207
+ if (cwLogs?.["LogGroupArn"] !== void 0) return { cloudWatchLogsLogGroup: { logGroupArn: cwLogs["LogGroupArn"] } };
30208
+ return {};
30209
+ });
30210
+ return result;
30211
+ }
30212
+ function mapTracingConfiguration(value) {
30213
+ if (value === null || value === void 0) return void 0;
30214
+ if (typeof value !== "object") return void 0;
30215
+ const cfg = value;
30216
+ if (cfg["Enabled"] === void 0) return void 0;
30217
+ return { enabled: cfg["Enabled"] };
30218
+ }
30219
+ function disabledEncryptionConfigurationOnRemoval(previous, next) {
30220
+ if (!wasMeaningfullyConfigured(previous, "Type")) return void 0;
30221
+ if (mapEncryptionConfiguration(next) !== void 0) return void 0;
30222
+ return { type: "AWS_OWNED_KEY" };
30223
+ }
30224
+ function disabledLoggingConfigurationOnRemoval(previous, next) {
30225
+ if (!wasMeaningfullyConfigured(previous, "Level")) return void 0;
30226
+ if (mapLoggingConfiguration(next) !== void 0) return void 0;
30227
+ return {
30228
+ level: "OFF",
30229
+ includeExecutionData: false,
30230
+ destinations: []
30231
+ };
30232
+ }
30233
+ function disabledTracingConfigurationOnRemoval(previous, next) {
30234
+ if (previous === null || typeof previous !== "object") return void 0;
30235
+ if (previous["Enabled"] !== true) return void 0;
30236
+ if (mapTracingConfiguration(next) !== void 0) return void 0;
30237
+ return { enabled: false };
30238
+ }
30239
+ function wasMeaningfullyConfigured(value, discriminatorKey) {
30240
+ if (value === null || typeof value !== "object") return false;
30241
+ return value[discriminatorKey] !== void 0;
30242
+ }
30243
+
30244
+ // src/provisioning/providers/stepfunctions/update.ts
30245
+ async function update$27(logicalId, physicalId, resourceType, properties, previousProperties, context) {
30246
+ this.logger.debug(`Updating Step Functions state machine ${logicalId}: ${physicalId}`);
30247
+ assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
30248
+ refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
30249
+ try {
30250
+ const definitionString = await this.buildDefinitionString(properties);
30251
+ const encryptionConfiguration = mapEncryptionConfiguration(properties["EncryptionConfiguration"]) ?? disabledEncryptionConfigurationOnRemoval(previousProperties["EncryptionConfiguration"], properties["EncryptionConfiguration"]);
30252
+ const loggingConfiguration = mapLoggingConfiguration(properties["LoggingConfiguration"]) ?? disabledLoggingConfigurationOnRemoval(previousProperties["LoggingConfiguration"], properties["LoggingConfiguration"]);
30253
+ const tracingConfiguration = mapTracingConfiguration(properties["TracingConfiguration"]) ?? disabledTracingConfigurationOnRemoval(previousProperties["TracingConfiguration"], properties["TracingConfiguration"]);
30254
+ await this.getClient().send(new UpdateStateMachineCommand({
30255
+ stateMachineArn: physicalId,
30256
+ definition: definitionString,
30257
+ roleArn: properties["RoleArn"],
30258
+ loggingConfiguration,
30259
+ tracingConfiguration,
30260
+ encryptionConfiguration
30261
+ }));
30262
+ this.logger.debug(`Updated Step Functions state machine ${physicalId}`);
30263
+ await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
30264
+ const describeResponse = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: physicalId }));
30265
+ return {
30266
+ physicalId,
30267
+ wasReplaced: false,
30268
+ attributes: {
30269
+ Arn: physicalId,
30270
+ Name: describeResponse.name,
30271
+ StateMachineRevisionId: stateMachineRevisionId(describeResponse)
30272
+ }
30273
+ };
30274
+ } catch (error) {
30275
+ const cause = error instanceof Error ? error : void 0;
30276
+ throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to update Step Functions state machine ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
30277
+ }
30278
+ }
30279
+ async function applyTagDiff$12(stateMachineArn, resourceType, logicalId, oldTagsRaw, newTagsRaw) {
30280
+ const plan = planTagDiff(oldTagsRaw, newTagsRaw);
30281
+ const tagWarning = tagPlanWarning(plan, resourceType, logicalId);
30282
+ if (tagWarning !== void 0) this.logger.warn(tagWarning);
30283
+ const tagsToAdd = [...plan.set].map(([k, v]) => ({
30284
+ key: k,
30285
+ value: v
30286
+ }));
30287
+ const tagsToRemove = plan.remove;
30288
+ if (tagsToRemove.length > 0) {
30289
+ await this.getClient().send(new UntagResourceCommand$15({
30290
+ resourceArn: stateMachineArn,
30291
+ tagKeys: tagsToRemove
30292
+ }));
30293
+ this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from SFN state machine ${stateMachineArn}`);
30294
+ }
30295
+ if (tagsToAdd.length > 0) {
30296
+ await this.getClient().send(new TagResourceCommand$15({
30297
+ resourceArn: stateMachineArn,
30298
+ tags: tagsToAdd
30299
+ }));
30300
+ this.logger.debug(`Added/updated ${tagsToAdd.length} tag(s) on SFN state machine ${stateMachineArn}`);
30301
+ }
30302
+ }
30303
+
30304
+ // src/provisioning/providers/stepfunctions/read-state.ts
30305
+ async function readCurrentState$24(physicalId, _logicalId, _resourceType) {
30306
+ let resp;
30307
+ try {
30308
+ resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: physicalId }));
30309
+ } catch (err) {
30310
+ if (err instanceof StateMachineDoesNotExist) return RESOURCE_NOT_FOUND;
30311
+ throw err;
30312
+ }
30313
+ const result = {};
30314
+ if (resp.name !== void 0) result["StateMachineName"] = resp.name;
30315
+ if (resp.roleArn !== void 0) result["RoleArn"] = resp.roleArn;
30316
+ if (resp.type !== void 0) result["StateMachineType"] = resp.type;
30317
+ if (resp.definition !== void 0) try {
30318
+ result["Definition"] = JSON.parse(resp.definition);
30319
+ } catch {
30320
+ result["Definition"] = resp.definition;
30321
+ }
30322
+ {
30323
+ const lc = {};
30324
+ if (resp.loggingConfiguration?.level !== void 0) lc["Level"] = resp.loggingConfiguration.level;
30325
+ if (resp.loggingConfiguration?.includeExecutionData !== void 0) lc["IncludeExecutionData"] = resp.loggingConfiguration.includeExecutionData;
30326
+ if (resp.loggingConfiguration?.destinations) lc["Destinations"] = resp.loggingConfiguration.destinations.map((d) => {
30327
+ const inner = {};
30328
+ if (d.cloudWatchLogsLogGroup?.logGroupArn) inner["CloudWatchLogsLogGroup"] = { LogGroupArn: d.cloudWatchLogsLogGroup.logGroupArn };
30329
+ return inner;
30330
+ });
30331
+ result["LoggingConfiguration"] = lc;
30332
+ }
30333
+ result["TracingConfiguration"] = { Enabled: resp.tracingConfiguration?.enabled ?? false };
30334
+ {
30335
+ const ec = {};
30336
+ if (resp.encryptionConfiguration?.type !== void 0) ec["Type"] = resp.encryptionConfiguration.type;
30337
+ if (resp.encryptionConfiguration?.kmsKeyId !== void 0) ec["KmsKeyId"] = resp.encryptionConfiguration.kmsKeyId;
30338
+ if (resp.encryptionConfiguration?.kmsDataKeyReusePeriodSeconds !== void 0) ec["KmsDataKeyReusePeriodSeconds"] = resp.encryptionConfiguration.kmsDataKeyReusePeriodSeconds;
30339
+ result["EncryptionConfiguration"] = ec;
30340
+ }
30341
+ try {
30342
+ const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$12({ resourceArn: physicalId }));
30343
+ result["Tags"] = normalizeAwsTagsToCfn(tagsResp.tags);
30344
+ } catch (err) {
30345
+ if (!(err instanceof StateMachineDoesNotExist)) throw err;
30346
+ }
30347
+ return result;
30348
+ }
30349
+ async function importImpl$26(input) {
30350
+ if (input.knownPhysicalId) try {
30351
+ const resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: input.knownPhysicalId }));
30352
+ if (resp.status === "DELETING") return null;
30353
+ return {
30354
+ physicalId: input.knownPhysicalId,
30355
+ attributes: definedAttributes({
30356
+ Arn: input.knownPhysicalId,
30357
+ Name: resp.name,
30358
+ StateMachineRevisionId: stateMachineRevisionId(resp)
30359
+ })
30360
+ };
30361
+ } catch (err) {
30362
+ if (err instanceof StateMachineDoesNotExist) return null;
30363
+ throw err;
30364
+ }
30365
+ return null;
30366
+ }
30367
+
30368
+ // src/provisioning/providers/stepfunctions-provider.ts
29910
30369
  var StepFunctionsProvider = class {
29911
30370
  sfnClient;
29912
30371
  s3Client;
@@ -29989,39 +30448,8 @@ var StepFunctionsProvider = class {
29989
30448
  throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to create Step Functions state machine ${logicalId}: ${text}`, resourceType, logicalId, stateMachineName, cause));
29990
30449
  }
29991
30450
  }
29992
- async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
29993
- this.logger.debug(`Updating Step Functions state machine ${logicalId}: ${physicalId}`);
29994
- assertRegionMatch(context?.expectedRegion ? await this.getClient().config.region() : void 0, context?.expectedRegion, resourceType, logicalId, physicalId, "pre-update");
29995
- refuseMalformedDesiredTags(properties["Tags"], resourceType, logicalId, physicalId);
29996
- try {
29997
- const definitionString = await this.buildDefinitionString(properties);
29998
- const encryptionConfiguration = mapEncryptionConfiguration(properties["EncryptionConfiguration"]) ?? disabledEncryptionConfigurationOnRemoval(previousProperties["EncryptionConfiguration"], properties["EncryptionConfiguration"]);
29999
- const loggingConfiguration = mapLoggingConfiguration(properties["LoggingConfiguration"]) ?? disabledLoggingConfigurationOnRemoval(previousProperties["LoggingConfiguration"], properties["LoggingConfiguration"]);
30000
- const tracingConfiguration = mapTracingConfiguration(properties["TracingConfiguration"]) ?? disabledTracingConfigurationOnRemoval(previousProperties["TracingConfiguration"], properties["TracingConfiguration"]);
30001
- await this.getClient().send(new UpdateStateMachineCommand({
30002
- stateMachineArn: physicalId,
30003
- definition: definitionString,
30004
- roleArn: properties["RoleArn"],
30005
- loggingConfiguration,
30006
- tracingConfiguration,
30007
- encryptionConfiguration
30008
- }));
30009
- this.logger.debug(`Updated Step Functions state machine ${physicalId}`);
30010
- await this.applyTagDiff(physicalId, resourceType, logicalId, previousProperties["Tags"], properties["Tags"]);
30011
- const describeResponse = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: physicalId }));
30012
- return {
30013
- physicalId,
30014
- wasReplaced: false,
30015
- attributes: {
30016
- Arn: physicalId,
30017
- Name: describeResponse.name,
30018
- StateMachineRevisionId: stateMachineRevisionId(describeResponse)
30019
- }
30020
- };
30021
- } catch (error) {
30022
- const cause = error instanceof Error ? error : void 0;
30023
- throw this.wrapCaughtError(maskerOrIdentity(context?.maskSecrets), error, (text) => new ProvisioningError(`Failed to update Step Functions state machine ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
30024
- }
30451
+ update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
30452
+ return update$27.call(this, logicalId, physicalId, resourceType, properties, previousProperties, context);
30025
30453
  }
30026
30454
  wrapCaughtError(mask, error, build) {
30027
30455
  const failure = describeAwsFailure(error);
@@ -30111,49 +30539,8 @@ var StepFunctionsProvider = class {
30111
30539
  walk(body, "Definition", void 0);
30112
30540
  return [...new Set(aliases)];
30113
30541
  }
30114
- async readCurrentState(physicalId, _logicalId, _resourceType) {
30115
- let resp;
30116
- try {
30117
- resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: physicalId }));
30118
- } catch (err) {
30119
- if (err instanceof StateMachineDoesNotExist) return RESOURCE_NOT_FOUND;
30120
- throw err;
30121
- }
30122
- const result = {};
30123
- if (resp.name !== void 0) result["StateMachineName"] = resp.name;
30124
- if (resp.roleArn !== void 0) result["RoleArn"] = resp.roleArn;
30125
- if (resp.type !== void 0) result["StateMachineType"] = resp.type;
30126
- if (resp.definition !== void 0) try {
30127
- result["Definition"] = JSON.parse(resp.definition);
30128
- } catch {
30129
- result["Definition"] = resp.definition;
30130
- }
30131
- {
30132
- const lc = {};
30133
- if (resp.loggingConfiguration?.level !== void 0) lc["Level"] = resp.loggingConfiguration.level;
30134
- if (resp.loggingConfiguration?.includeExecutionData !== void 0) lc["IncludeExecutionData"] = resp.loggingConfiguration.includeExecutionData;
30135
- if (resp.loggingConfiguration?.destinations) lc["Destinations"] = resp.loggingConfiguration.destinations.map((d) => {
30136
- const inner = {};
30137
- if (d.cloudWatchLogsLogGroup?.logGroupArn) inner["CloudWatchLogsLogGroup"] = { LogGroupArn: d.cloudWatchLogsLogGroup.logGroupArn };
30138
- return inner;
30139
- });
30140
- result["LoggingConfiguration"] = lc;
30141
- }
30142
- result["TracingConfiguration"] = { Enabled: resp.tracingConfiguration?.enabled ?? false };
30143
- {
30144
- const ec = {};
30145
- if (resp.encryptionConfiguration?.type !== void 0) ec["Type"] = resp.encryptionConfiguration.type;
30146
- if (resp.encryptionConfiguration?.kmsKeyId !== void 0) ec["KmsKeyId"] = resp.encryptionConfiguration.kmsKeyId;
30147
- if (resp.encryptionConfiguration?.kmsDataKeyReusePeriodSeconds !== void 0) ec["KmsDataKeyReusePeriodSeconds"] = resp.encryptionConfiguration.kmsDataKeyReusePeriodSeconds;
30148
- result["EncryptionConfiguration"] = ec;
30149
- }
30150
- try {
30151
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$12({ resourceArn: physicalId }));
30152
- result["Tags"] = normalizeAwsTagsToCfn(tagsResp.tags);
30153
- } catch (err) {
30154
- if (!(err instanceof StateMachineDoesNotExist)) throw err;
30155
- }
30156
- return result;
30542
+ readCurrentState(physicalId, _logicalId, _resourceType) {
30543
+ return readCurrentState$24.call(this, physicalId, _logicalId, _resourceType);
30157
30544
  }
30158
30545
  generatedCreateName(_resourceType, logicalId, properties) {
30159
30546
  if (properties["StateMachineName"]) return void 0;
@@ -30163,47 +30550,11 @@ var StepFunctionsProvider = class {
30163
30550
  const resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: physicalId }));
30164
30551
  return resp.creationDate instanceof Date ? resp.creationDate.getTime() : void 0;
30165
30552
  }
30166
- async import(input) {
30167
- if (input.knownPhysicalId) try {
30168
- const resp = await this.getClient().send(new DescribeStateMachineCommand({ stateMachineArn: input.knownPhysicalId }));
30169
- if (resp.status === "DELETING") return null;
30170
- return {
30171
- physicalId: input.knownPhysicalId,
30172
- attributes: definedAttributes({
30173
- Arn: input.knownPhysicalId,
30174
- Name: resp.name,
30175
- StateMachineRevisionId: stateMachineRevisionId(resp)
30176
- })
30177
- };
30178
- } catch (err) {
30179
- if (err instanceof StateMachineDoesNotExist) return null;
30180
- throw err;
30181
- }
30182
- return null;
30553
+ import(input) {
30554
+ return importImpl$26.call(this, input);
30183
30555
  }
30184
- async applyTagDiff(stateMachineArn, resourceType, logicalId, oldTagsRaw, newTagsRaw) {
30185
- const plan = planTagDiff(oldTagsRaw, newTagsRaw);
30186
- const tagWarning = tagPlanWarning(plan, resourceType, logicalId);
30187
- if (tagWarning !== void 0) this.logger.warn(tagWarning);
30188
- const tagsToAdd = [...plan.set].map(([k, v]) => ({
30189
- key: k,
30190
- value: v
30191
- }));
30192
- const tagsToRemove = plan.remove;
30193
- if (tagsToRemove.length > 0) {
30194
- await this.getClient().send(new UntagResourceCommand$15({
30195
- resourceArn: stateMachineArn,
30196
- tagKeys: tagsToRemove
30197
- }));
30198
- this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from SFN state machine ${stateMachineArn}`);
30199
- }
30200
- if (tagsToAdd.length > 0) {
30201
- await this.getClient().send(new TagResourceCommand$15({
30202
- resourceArn: stateMachineArn,
30203
- tags: tagsToAdd
30204
- }));
30205
- this.logger.debug(`Added/updated ${tagsToAdd.length} tag(s) on SFN state machine ${stateMachineArn}`);
30206
- }
30556
+ applyTagDiff(stateMachineArn, resourceType, logicalId, oldTagsRaw, newTagsRaw) {
30557
+ return applyTagDiff$12.call(this, stateMachineArn, resourceType, logicalId, oldTagsRaw, newTagsRaw);
30207
30558
  }
30208
30559
  async buildDefinitionString(properties) {
30209
30560
  const inline = inlineDefinitionBody(properties);
@@ -30255,62 +30606,6 @@ function maskSentinelLeaves(value) {
30255
30606
  }
30256
30607
  return value;
30257
30608
  }
30258
- function mapEncryptionConfiguration(value) {
30259
- if (value === null || value === void 0) return void 0;
30260
- if (typeof value !== "object") return void 0;
30261
- const cfg = value;
30262
- if (cfg["Type"] === void 0) return void 0;
30263
- return {
30264
- type: cfg["Type"],
30265
- kmsKeyId: cfg["KmsKeyId"],
30266
- kmsDataKeyReusePeriodSeconds: cfg["KmsDataKeyReusePeriodSeconds"]
30267
- };
30268
- }
30269
- function mapLoggingConfiguration(value) {
30270
- if (value === null || value === void 0) return void 0;
30271
- if (typeof value !== "object") return void 0;
30272
- const cfg = value;
30273
- if (cfg["Level"] === void 0) return void 0;
30274
- const result = { level: cfg["Level"] };
30275
- if (cfg["IncludeExecutionData"] !== void 0) result.includeExecutionData = cfg["IncludeExecutionData"];
30276
- if (Array.isArray(cfg["Destinations"])) result.destinations = cfg["Destinations"].map((d) => {
30277
- const cwLogs = d["CloudWatchLogsLogGroup"];
30278
- if (cwLogs?.["LogGroupArn"] !== void 0) return { cloudWatchLogsLogGroup: { logGroupArn: cwLogs["LogGroupArn"] } };
30279
- return {};
30280
- });
30281
- return result;
30282
- }
30283
- function mapTracingConfiguration(value) {
30284
- if (value === null || value === void 0) return void 0;
30285
- if (typeof value !== "object") return void 0;
30286
- const cfg = value;
30287
- if (cfg["Enabled"] === void 0) return void 0;
30288
- return { enabled: cfg["Enabled"] };
30289
- }
30290
- function disabledEncryptionConfigurationOnRemoval(previous, next) {
30291
- if (!wasMeaningfullyConfigured(previous, "Type")) return void 0;
30292
- if (mapEncryptionConfiguration(next) !== void 0) return void 0;
30293
- return { type: "AWS_OWNED_KEY" };
30294
- }
30295
- function disabledLoggingConfigurationOnRemoval(previous, next) {
30296
- if (!wasMeaningfullyConfigured(previous, "Level")) return void 0;
30297
- if (mapLoggingConfiguration(next) !== void 0) return void 0;
30298
- return {
30299
- level: "OFF",
30300
- includeExecutionData: false,
30301
- destinations: []
30302
- };
30303
- }
30304
- function disabledTracingConfigurationOnRemoval(previous, next) {
30305
- if (previous === null || typeof previous !== "object") return void 0;
30306
- if (previous["Enabled"] !== true) return void 0;
30307
- if (mapTracingConfiguration(next) !== void 0) return void 0;
30308
- return { enabled: false };
30309
- }
30310
- function wasMeaningfullyConfigured(value, discriminatorKey) {
30311
- if (value === null || typeof value !== "object") return false;
30312
- return value[discriminatorKey] !== void 0;
30313
- }
30314
30609
 
30315
30610
  // src/provisioning/providers/ecs/shared.ts
30316
30611
  const registerTaskDefinitionLatch = new AmbiguousCreateLatch("ecs:RegisterTaskDefinition");
@@ -61685,4 +61980,4 @@ var ACMCertificateProvider = class {
61685
61980
  };
61686
61981
 
61687
61982
  export { ACMCertificateProvider, ASGProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, AgentCoreRuntimeProvider, ApiGatewayProvider, ApiGatewayV2Provider, AppSyncProvider, BudgetsBudgetProvider, CloudFrontDistributionProvider, CloudFrontOACProvider, CloudFrontOAIProvider, CloudTrailProvider, CloudWatchAlarmProvider, CloudWatchAnomalyDetectorProvider, CodeBuildProvider, CodeCommitRepositoryProvider, CognitoUserPoolProvider, DLMLifecyclePolicyProvider, DocDBProvider, DocDBSubnetGroupProvider, DynamoDBGlobalTableProvider, DynamoDBTableProvider, EC2Provider, ECRProvider, ECSProvider, EFSProvider, ELBv2Provider, EMRClusterProvider, EMRInstanceFleetConfigProvider, EMRInstanceGroupConfigProvider, ElastiCacheProvider, 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, 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 };
61688
- //# sourceMappingURL=provider-classes-CQGXOpn5.js.map
61983
+ //# sourceMappingURL=provider-classes-BBtEm3us.js.map