@go-to-k/cdkd 0.294.8 → 0.294.10

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 (26) hide show
  1. package/dist/{asg-provider-CsajFK4_.js → asg-provider-BFlmarbF.js} +2 -2
  2. package/dist/{asg-provider-CsajFK4_.js.map → asg-provider-BFlmarbF.js.map} +1 -1
  3. package/dist/cli.js +35 -4
  4. package/dist/cli.js.map +1 -1
  5. package/dist/{deploy-engine-C5kAhscq.js → deploy-engine-RCOtmm4V.js} +1214 -702
  6. package/dist/deploy-engine-RCOtmm4V.js.map +1 -0
  7. package/dist/iam-policy-targets-CMSQGQnm.js.map +1 -1
  8. package/dist/{iam-role-provider-CPn7nqoS.js → iam-role-provider-2w-Hr9_h.js} +2 -2
  9. package/dist/{iam-role-provider-CPn7nqoS.js.map → iam-role-provider-2w-Hr9_h.js.map} +1 -1
  10. package/dist/index.d.ts +6 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +2 -2
  13. package/dist/{neptune-provider-DlFQdgwe.js → neptune-provider-CHnIs1hG.js} +2 -2
  14. package/dist/{neptune-provider-DlFQdgwe.js.map → neptune-provider-CHnIs1hG.js.map} +1 -1
  15. package/dist/{program-CVOLJJ2z.js → program-Eed63bId.js} +255 -17
  16. package/dist/program-Eed63bId.js.map +1 -0
  17. package/dist/{provider-classes-DlVxBF89.js → provider-classes-R7yvwymx.js} +287 -67
  18. package/dist/provider-classes-R7yvwymx.js.map +1 -0
  19. package/dist/{rds-provider-a-vZsR9L.js → rds-provider-DqHELwjV.js} +2 -2
  20. package/dist/{rds-provider-a-vZsR9L.js.map → rds-provider-DqHELwjV.js.map} +1 -1
  21. package/dist/{version-DGxZ-zFN.js → version-BNo3JdVW.js} +2 -2
  22. package/dist/{version-DGxZ-zFN.js.map → version-BNo3JdVW.js.map} +1 -1
  23. package/package.json +2 -2
  24. package/dist/deploy-engine-C5kAhscq.js.map +0 -1
  25. package/dist/program-CVOLJJ2z.js.map +0 -1
  26. package/dist/provider-classes-DlVxBF89.js.map +0 -1
@@ -1,18 +1,20 @@
1
1
  import { a as runWithStackAwsClients, i as resetAwsClients, o as setAwsClients, t as AwsClients } from "./aws-clients-CnmtbrxD.js";
2
2
  import { A as displaySafe, C as SAFE_MSG_ALTERED_CHAR, D as cutMarker, E as UNRENDERABLE, F as safeMsg, I as stringifyJsonPayload, L as truncateCodePoints, M as isPasteableIdent, O as displayAwsMessage, P as plainIdentOr, T as STACK_REF_MAX_CODE_POINTS, b as withSkipPrefix, c as getLiveRenderer, d as PATTERN_B_RESOURCE_TYPES, h as generateResourceName, i as reserveStdoutForPayload, j as displayStackName, k as displayIdent, l as PATTERN_B_NAME_OPTIONS, m as explicitNamePropertyFor, n as getLogger, o as runStackBuffered, p as derivesPatternBName, r as isStdoutReservedForPayload, u as PATTERN_B_NAME_PROPERTIES, w as SECRET_REF_MAX_CODE_POINTS, x as withStackName } from "./logger-B46YMG0h.js";
3
3
  import { At as clientDefaultsFor, Bn as isMarkedNonRetryable, Bt as IntrinsicResolutionRefusalError, Dt as withPasteableAwsProfile, Et as setPasteableAwsProfile, F as runDeleteAttempt, Fn as retryClassificationText, G as beginCommandInterruptScope, Gt as MalformedProducerRecordRefusalError, Hn as markNonRetryable, Ht as LocalStartServiceError, In as describeAwsFailure, It as CrossAccountSecretRefusalError, J as isInterruptedWaitError, Jt as ProvisioningError, K as endCommandInterruptScope, Kt as NestedStackChildDirectDestroyError, Mt as AccountIdUnavailableError, Nn as isRetryableTransientError, Ot as ambientClientDefaults, Pn as isTransientServerError, Pt as CdkdError, Qt as StackTerminationProtectionError, Rn as safeStringify, Rt as DeployCancelledError, St as injectiveKey, Tt as producerRecordKey, V as isAwsCliLiteral, Vn as isThrottlingError, Vt as LocalInvokeBuildError$1, Xt as ResourceUpdateNotSupportedError, Yt as ResourceTimeoutError, Zt as StackHasActiveImportsError, _ as VALUE_NOT_SHOWN, _n as shellQuote, _t as formatLockOperation, an as TIMEOUT_FLAG_RESOURCE_TYPE, bn as setPasteableVerbFlags, bt as CUSTOM_RESOURCE_RESPONSE_PREFIX, dn as isInertUnquoted, en as SynthesisError, fn as pasteableCommand, ft as UNREPRODUCIBLE_LOCK_CLAUSE, g as assertRegionMatch, gn as shellBoundedDisplay, gt as formatLockExpiry, h as RESOURCE_NOT_FOUND, hn as quotedOrDescribed, ht as forceQuitRecoveryClause, in as withErrorHandling, it as resourceTypeShown, jt as credentialFingerprint, kt as ambientCredentialConfig, ln as commandHole, mn as plainOrDescribed, mt as buildLockContentionMessage, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nt as logicalIdShown, pt as buildForceUnlockCommand, q as interruptWatchListenerCount, qt as PartialFailureError, rn as normalizeAwsError, s as readRecordedPrincipals, sn as SHELL_ACTIVE_WHY, t as IAM_PRINCIPAL_NAME, vn as withheldTargetClause, vt as formatLockOwner, w as remedyLogicalId, wt as producerCoordinateKey, xt as DEFAULT_STATE_PREFIX, yn as setPasteableRunFlags, zt as DynamicReferenceRegionAmbiguousError } from "./iam-policy-targets-CMSQGQnm.js";
4
- import { n as awsClientDefaults, u as formatAuthority } from "./aws-client-defaults-D0q0z4dG.js";
5
- import { $ as nestedChildStackName, $a as shouldRetainResource, $n as isUnboundTemplateParameter, $o as ssmResolvedValueType, $r as refuseMalformedOutputsForDestroy, Aa as carriesSecretMask, Ai as MULTI_REGION_RECREATE_BLOCKED_TYPES, An as DiffCalculator, Ao as partitionSensitiveEnv, Ar as malformedLocalResourcesWarning, At as extractDeploymentEventError, B as gray, Ba as isLockInfoExpired, Bn as isIamRoleArn, Bo as Synthesizer, Br as malformedResourcePropertiesWarning, Bt as collectDeclaredOutputNames, Ca as scrubResourceRecord, Ci as findActionableSilentDrops, Co as describeDockerFailure, Cr as isReadableOrphanRecord, Cs as resolveAssemblyPath, Ct as isFinalSnapshotError, Da as isUncertifiedBaselineMaskPosition, Di as hasNoCloudControlHandlers, Do as getDockerCmd, Dr as malformedExportSourceWarning, Dt as updatePartialReason, Ea as dynamicReferenceTokens, Ei as NO_CC_HANDLERS_REASON, Eo as formatDockerLoginError, Er as malformedExportNamesWarning, Et as updatePartialMessage, Fa as STATE_SOURCED_READBACK_RULES, Fn as regionLessSecretName, Fo as warnFinchArgvExposure, Fr as malformedOrphansWarning, Ft as secretBearingStateKeyWarning, G as namesAnyDeclaredParameter, Ga as hasReadableExportSet, Gn as envCredentialsAreAssumedRole, Go as resolveAutoAssetStorage, Gr as refuseDivergentRecordRegionForDestroy, Gt as DEFAULT_RESOURCE_WARN_AFTER_MS, H as red, Ha as rebuildClientForBucketRegion, Hn as AWS_CREDENTIAL_ENV_KEYS, Ho as getDefaultStateBucketName, Hr as malformedScrubResourceEntriesRefusalMessage, Ht as isExportAliasCollision, I as formatResourceLine, Ia as TEMPLATE_SOURCED_RULES, In as applyRoleArnIfSet, Io as escapeRegExp, Ir as malformedOutputsRefusalMessage, It as secretSafeKeyDisplay, J as makeSiblingClaimReader, Ja as importableOutputKeys, Jo as resolveStateBucketWithDefault, Jr as refuseMalformedOrphanRecordsForDestroy, K as reachableDivergentParameters, Ka as hasReasonlessBaselineRefusal, Ko as resolveCaptureObservedState, Kt as maskingRetryLogger, L as createReadOnlyAttributeHealerFactory, La as WHOLE_DYNAMIC_REFERENCE_PATTERN, Ln as assertFlagRoleArn, Lo as stripControlChars, Lr as malformedOutputsWarning, Lt as exportNameSecretExposure, Ma as recordMaskOnlyValuesIn, Mi as isStatefulRecreateTargetSync, Mn as IntrinsicFunctionResolver, Mo as redactedDockerCause, Mr as malformedOrphanRecordsWarning, Mt as displayTextOrWithheld, Na as STATE_SOURCED_BASELINE_RULES, Ni as renderStatefulReason, Nn as classifyReplaySecretRegion, No as runDockerForeground, Nr as malformedOrphanRowsKeptWarning, Nt as exportAliasCollisionScrubWarning, Oa as pathCrossesDottedKey, Oi as findReplacedReadersOfRecreateTargets, Oo as isDockerClientEnvKey, Or as malformedLocalOutputsWarning, Ot as DeploymentEventsReader, Pa as STATE_SOURCED_CROSS_GENERATION_RULES, Pn as producerRegionsFromState, Po as runDockerStreaming, Pr as malformedOrphansRefusalMessage, Pt as secretBearing, Qa as orphansCarriedFrom, Qi as withRetry, Qn as coerceParameterTypedValue, Qo as warnDeprecatedNoPrefixCliFlag, Qr as refuseMalformedOutputs, R as bold, Ra as isSingleDynamicReferenceToken, Rn as assertSendableRoleArn, Ro as AssetManifestLoader, Rr as malformedRenderedContainersWarning, Rt as isWholeDynamicReferenceValue, Sa as redactSecretsForState, Si as unreadableResourceEntries, Sn as isWaitAbandonedError, So as describeDockerExecFailure, Sr as hasReadableResources, Ss as renderAssemblyPathEscape, St as effectiveDeletionPolicy, Ta as DYNAMIC_REFERENCE_TOKEN_SCAN, To as finchSecretArgvRefusal, Tr as malformedDriftResourcePropertiesWarning, Ts as resolveBucketRegion, Tt as unsupportedFinalSnapshotError, U as yellow, Ua as describeRegionValueKind, Un as applyCallerIdentityCredentials, Uo as getLegacyStateBucketName, Ur as malformedStateRefusalMessage, Ut as bindingSkippedOutputs, V as green, Va as S3StateBackend, Vn as sendableAssumeRoleCommand, Vo as synthesisStatusMessage, Vr as malformedResourcesWarning, Vt as collectPublishedOutputNames, W as computeParameterTaint, Wa as exportNamesCarriedFrom, Wn as callerEnvCredentials, Wo as resolveApp, Wr as previewableOrphanRecords, Wt as DEFAULT_RESOURCE_TIMEOUT_MS, X as NESTED_PENDING_PARENT_REASON, Xa as isReadableBag, Xi as templateResourceTypes, Xo as resolveUseCdkBootstrapAssets, Xr as refuseMalformedOrphansForDestroy, Y as planOrphanAdoption, Ya as importableOutputs, Yi as prefetchCreateOnlyPropertyPaths, Yo as resolveStateBucketWithDefaultAndSource, Yr as refuseMalformedOrphans, Yt as ledgerForStack, Z as dropSettledNestedJournals, Za as orphansAfterRollback, Zi as describeTypeWithThrottleRetry, Zo as stateBucketExistenceConfirmed, Zr as refuseMalformedOrphansForOrphan, Zt as withCreateTokenLedger, _ as PROTECTION_PROPERTY_BY_TYPE, _a as createSecretMasker, _i as repairMalformedResourceEntriesForReadOnly, _o as validateContainerRepoName, _r as UNREADABLE_RESOURCES_MAP_ROW, _s as nullPrototypeRecord, _t as ATOMIC_FINAL_SNAPSHOT_TYPES, a as conditionInputsFrom, aa as liveMatchesUnresolvedTokenFrame, ai as refuseMalformedResourceEntriesForImportSave, ao as createAssetRedirectResolver, ar as isNamelessDynamicReferenceError, as as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, at as replayFailedOperations, b as readProtection, ba as maskSecretsInText, bi as unpreviewableOrphanRecords, bn as deleteSkipReason, bo as resolveDockerContextDirectory, br as hasReadableOrphans, bs as describeFileReadFailure, bt as ccRoutedFinalSnapshotError, c as isSecretBearingReferenceString, ca as carryLogOnlyValues, ci as refuseMalformedResourcePropertiesForExport, cn as CC_BROKEN_REASON, co as AssetModeResolver, cr as cfnRefValueFromPhysicalId, cs as PARTITION_TABLE, ct as destroyStackRecordsView, d as makeCanonicalizePropertiesFn, da as literalSplitDelimitersOf, di as refuseMalformedResourcesForDestroy, dn as wouldReturnToSdkProvider, do as ensureAssetStorage, ds as AssemblyReader, dt as planFailedOps, ei as refuseMalformedResourceAttributesForOrphan, eo as AssetPublisher, er as parameterTypeMayLoseSecretIdentity, es as CFN_TEMPLATE_BODY_LIMIT, fa as logOnlyValueCount, fi as refuseMalformedResourcesForExport, fn as isCustomResourceType$1, fo as getBootstrapMarkerKey, fr as withSharedDrainBudget, fs as StageLoadError, ft as planRollback, g as recordedProtectionNote, ga as shareLogOnlyValues, gi as repairMalformedOutputsForReadOnly, gn as ccProtectionRegistryTypes, go as validateAssetBucketName, gr as UNREADABLE_ORPHANS_CONTAINER_ROW, gs as hasPlainPrototype, gt as inheritProducerRegions, h as recordedProtectionEvidence, ha as recordLogOnlyValue, hi as repairMalformedOrphansForReadOnly, hn as slowCcOperationTimeoutMs, ho as readBootstrapMarkerBody, hr as STATE_RESOURCES_MALFORMED, hs as hasOwnKey, i as conditionFingerprint, ia as TemplateParser, ii as refuseMalformedResourceEntriesForImport, io as buildAssetRedirectMap, ir as carriesFetchableDynamicReference, is as uploadCfnTemplate, it as withNestedStackContext, ja as recordMaskOnlyValue, ji as isStatefulRecreateTargetForReplace, jn as INTRINSIC_KEYS, jo as redactDockerArgvValues, jr as malformedOrphanRecordsRefusalMessage, jt as WITHHELD_NAME_DISPLAY, ka as identityKeyFor, ki as shownType, ko as isMalformedEnvKey, kr as malformedLocalResourceEntriesWarning, kt as DeploymentEventsStore, l as keptWholeReasonText, la as createUnionSecretMasker, li as refuseMalformedResourcePropertiesForOrphan, ln as ProviderRegistry, lo as BOOTSTRAP_MARKER_PREFIX, lr as isStalePlaceholderArnAttribute, ls as canonicalizeRegion, m as withResourceDeadline, ma as recordLogOnlyParameterValue, mi as repairMalformedOrphanRecordsForReadOnly, mn as CloudControlProvider, mo as parseBootstrapMarker, mr as STATE_REGION_DIVERGED, ms as defineOwnKey, mt as findNestedStackTypeChanges, n as IMPLICIT_DELETE_DEPENDENCIES, ni as refuseMalformedResourceEntriesForDeploy, no as stringifyValue, nr as isImpossibleEmptyStoredAttribute, ns as MIGRATE_TMP_PREFIX, nt as withNestedRevertRun, o as parentSuppliedValues, oa as inheritNestedStackParameterAssociations, oi as refuseMalformedResourceEntriesForOrphan, oo as loadPublishableAssetManifest, or as keepsSecretReferenceToken, os as decodeListingKey, ot as replayRollback, pa as printingCorpusOf, pi as refuseMalformedState, po as isCrossRegionRedirect, pr as JSON_LISTING_HOLE_VALUE, ps as processStackMessages, pt as resolveReplacementOldType, q as resourcesNamingDeclaredParameter, qa as hasUnverifiableParameterRefusal, qo as resolveSkipPrefix, qr as refuseMalformedOrphanRecords, qt as RollbackInlinePolicyWriters, r as computeImplicitDeleteEdges, ra as DagBuilder, ri as refuseMalformedResourceEntriesForDestroy, ro as WorkGraph, rr as carriesDynamicReference, rs as findLargeInlineResources, s as readRecordedConditionVerdicts, sa as recordNestedStackParameterExpressions, si as refuseMalformedResourcePropertiesForDrift, so as rewriteTemplateAssetReferences, sr as AWS_NO_VALUE, ss as expectedOwnerParam, t as DeployEngine, ti as refuseMalformedResourceEntries, to as isSensitiveAttributeName, tr as getAccountInfo, ts as CFN_TEMPLATE_URL_LIMIT, tt as revertedNestedRowIds, u as mergeNoChangeOutputs, ua as hasMaskableValues, ui as refuseMalformedResourcesForDeploy, un as ccBrokenReason, uo as assertAssetBucketRegion, ur as refStateLookupFromResource, us as derivePartitionAndUrlSuffix, ut as withStackRecords, v as isProtectionValueActive, va as errorCauseChain, vi as repairMalformedResourcePropertiesForReadOnly, vn as UNSPECIFIED_SKIP_REASON, vo as buildDenyExternalAccessPolicy, vr as deployRefusesOrphanRowsReason, vs as ownValue, vt as PRE_DELETE_SNAPSHOT_TYPES, wo as dockerSpawnEnvWithSensitive, wr as isReadableResourceEntry, wt as refusesFinalSnapshot, xa as markSameGenerationBag, xi as unreadableOrphanRecords, xo as describeDockerCapturedOutput, xr as hasReadableOutputs, xs as displayAssemblyPath, xt as createPreDeleteFinalSnapshot, y as perType, ya as maskSecretsInError, yi as repairMalformedResourcesForReadOnly, yn as deleteIndeterminateGuards, yo as buildDockerImage, yr as displayLogicalId, ys as absoluteAssemblyPathEscape, yt as buildFinalSnapshotIdentifier, z as cyan, za as LockManager, zn as explicitRoleArnOrThrow, zo as getDockerImageBySourceHash, zr as malformedResourceEntriesWarning, zt as noEchoParameterValueSeed } from "./deploy-engine-C5kAhscq.js";
6
- import { t as getCdkdVersion } from "./version-DGxZ-zFN.js";
4
+ import { n as awsClientDefaults, r as getAssumedRoleCredentials, u as formatAuthority } from "./aws-client-defaults-D0q0z4dG.js";
5
+ import { $ as nestedChildStackName, $a as hasReadableExportSet, $o as resolveAutoAssetStorage, $r as refuseMalformedOrphanRecordsForDestroy, Ai as unwrittenCreateOnlyReplacement, Ao as describeDockerExecFailure, Ar as malformedDriftResourcePropertiesWarning, As as renderAssemblyPathEscape, B as gray, Ba as STATE_SOURCED_BASELINE_RULES, Bn as regionLessSecretName, Bo as redactedDockerCause, Br as malformedOrphansWarning, Bt as secretBearingStateKeyWarning, Ca as createSecretMasker, Ci as repairMalformedResourcePropertiesForReadOnly, Cn as UNSPECIFIED_SKIP_REASON, Co as readBootstrapMarkerBody, Cr as deployRefusesOrphanRowsReason, Cs as hasOwnKey, Ct as effectiveDeletionPolicy, Da as markSameGenerationBag, Di as unreadableResourceEntries, Dn as isWaitAbandonedError, Do as buildDockerImage, Dr as hasReadableResources, Ds as absoluteAssemblyPathEscape, Ea as maskSecretsInText, Ei as unreadableOrphanRecords, Eo as buildDenyExternalAccessPolicy, Er as hasReadableOutputs, Es as ownValue, Et as unsupportedFinalSnapshotError, Fa as identityKeyFor, Fi as shownType, Fn as DiffCalculator, Fo as getDockerCmd, Fr as malformedLocalResourcesWarning, Ft as extractDeploymentEventError, G as namesAnyDeclaredParameter, Ga as isSingleDynamicReferenceToken, Gn as isIamRoleArn, Go as stripControlChars, Gr as malformedResourcePropertiesWarning, Gt as collectDeclaredOutputNames, H as red, Ha as STATE_SOURCED_READBACK_RULES, Hn as assertFlagRoleArn, Ho as runDockerStreaming, Hr as malformedOutputsWarning, Ht as exportNameSecretExposure, I as formatResourceLine, Ia as carriesSecretMask, Ii as MULTI_REGION_RECREATE_BLOCKED_TYPES, In as INTRINSIC_KEYS, Io as isDockerClientEnvKey, Ir as malformedOrphanRecordsRefusalMessage, It as WITHHELD_NAME_DISPLAY, J as makeSiblingClaimReader, Ja as S3StateBackend, Jn as applyCallerIdentityCredentials, Jo as Synthesizer, Jr as malformedStateRefusalMessage, Jt as bindingSkippedOutputs, K as reachableDivergentParameters, Ka as LockManager, Kn as sendableAssumeRoleCommand, Ko as AssetManifestLoader, Kr as malformedResourcesWarning, Kt as collectPublishedOutputNames, L as createReadOnlyAttributeHealerFactory, La as recordMaskOnlyValue, Li as isStatefulRecreateTargetForReplace, Ln as IntrinsicFunctionResolver, Lo as isMalformedEnvKey, Lr as malformedOrphanRecordsWarning, Lt as displayTextOrWithheld, Ma as dynamicReferenceTokens, Mi as NO_CC_HANDLERS_REASON, Mo as dockerSpawnEnvWithSensitive, Mr as malformedExportSourceWarning, Mt as updatePartialReason, Na as isUncertifiedBaselineMaskPosition, Ni as hasNoCloudControlHandlers, No as finchSecretArgvRefusal, Nr as malformedLocalOutputsWarning, Ns as resolveBucketRegion, Nt as DeploymentEventsReader, Oa as redactSecretsForState, Oi as findActionableSilentDrops, Oo as resolveDockerContextDirectory, Or as isReadableOrphanRecord, Os as describeFileReadFailure, Pa as pathCrossesDottedKey, Pi as findReplacedReadersOfRecreateTargets, Po as formatDockerLoginError, Pr as malformedLocalResourceEntriesWarning, Pt as DeploymentEventsStore, Qa as exportNamesCarriedFrom, Qo as resolveApp, Qr as refuseMalformedOrphanRecords, Qt as RollbackInlinePolicyWriters, R as bold, Ra as recordMaskOnlyValuesIn, Ri as isStatefulRecreateTargetSync, Rn as classifyReplaySecretRegion, Ro as partitionSensitiveEnv, Rr as malformedOrphanRowsKeptWarning, Rt as exportAliasCollisionScrubWarning, Sa as shareLogOnlyValues, Si as repairMalformedResourceEntriesForReadOnly, So as parseBootstrapMarker, Sr as UNREADABLE_RESOURCES_MAP_ROW, Ss as defineOwnKey, St as createPreDeleteFinalSnapshot, Ta as maskSecretsInError, Ti as unpreviewableOrphanRecords, Tn as deleteSkipReason, To as validateContainerRepoName, Tr as hasReadableOrphans, Ts as nullPrototypeRecord, Tt as refusesFinalSnapshot, U as yellow, Ua as TEMPLATE_SOURCED_RULES, Un as assertSendableRoleArn, Uo as warnFinchArgvExposure, Ur as malformedRenderedContainersWarning, Ut as isWholeDynamicReferenceValue, V as green, Va as STATE_SOURCED_CROSS_GENERATION_RULES, Vn as applyRoleArnIfSet, Vo as runDockerForeground, Vr as malformedOutputsRefusalMessage, Vt as secretSafeKeyDisplay, W as computeParameterTaint, Wa as WHOLE_DYNAMIC_REFERENCE_PATTERN, Wn as explicitRoleArnOrThrow, Wo as escapeRegExp, Wr as malformedResourceEntriesWarning, Wt as noEchoParameterValueSeed, X as NESTED_PENDING_PARENT_REASON, Xa as acceptedCreateOnlyDropsOf, Xn as envCredentialsAreAssumedRole, Xo as getDefaultStateBucketName, Xr as refuseDivergentRecordRegionForDestroy, Xt as DEFAULT_RESOURCE_WARN_AFTER_MS, Y as planOrphanAdoption, Ya as rebuildClientForBucketRegion, Yn as callerEnvCredentials, Yo as synthesisStatusMessage, Yr as previewableOrphanRecords, Yt as DEFAULT_RESOURCE_TIMEOUT_MS, Z as dropSettledNestedJournals, Za as describeRegionValueKind, Zo as getLegacyStateBucketName, Zt as maskingRetryLogger, _ as perType, _a as literalSplitDelimitersOf, _i as refuseMalformedResourcesForExport, _n as isCustomResourceType$1, _o as BOOTSTRAP_MARKER_PREFIX, _r as withSharedDrainBudget, _s as canonicalizeRegion, _t as inheritProducerRegions, a as conditionInputsFrom, ai as refuseMalformedResourceAttributesForOrphan, ao as orphansAfterRollback, ar as parameterTypeMayLoseSecretIdentity, as as stateBucketExistenceConfirmed, at as replayFailedOperations, ba as recordLogOnlyParameterValue, bi as repairMalformedOrphansForReadOnly, bn as slowCcOperationTimeoutMs, bo as getBootstrapMarkerKey, br as STATE_RESOURCES_MALFORMED, bs as StageLoadError, bt as buildFinalSnapshotIdentifier, c as isSecretBearingReferenceString, ci as refuseMalformedResourceEntriesForDestroy, co as AssetPublisher, cr as carriesDynamicReference, cs as CFN_TEMPLATE_BODY_LIMIT, ct as destroyStackRecordsView, d as makeCanonicalizePropertiesFn, da as liveMatchesUnresolvedTokenFrame, di as refuseMalformedResourceEntriesForOrphan, do as WorkGraph, dr as keepsSecretReferenceToken, ds as findLargeInlineResources, dt as recordAfterRollbackUpdate, ei as refuseMalformedOrphans, en as ledgerForStack, eo as hasReasonlessBaselineRefusal, es as resolveCaptureObservedState, f as withResourceDeadline, fa as inheritNestedStackParameterAssociations, fi as refuseMalformedResourcePropertiesForDrift, fo as buildAssetRedirectMap, fr as AWS_NO_VALUE, fs as uploadCfnTemplate, ft as planFailedOps, g as isProtectionValueActive, ga as hasMaskableValues, gi as refuseMalformedResourcesForDestroy, gn as wouldReturnToSdkProvider, go as AssetModeResolver, gs as PARTITION_TABLE, h as PROTECTION_PROPERTY_BY_TYPE, ha as createUnionSecretMasker, hi as refuseMalformedResourcesForDeploy, hn as ccBrokenReason, ho as rewriteTemplateAssetReferences, hr as refStateLookupFromResource, hs as expectedOwnerParam, ht as findNestedStackTypeChanges, i as conditionFingerprint, ia as withRetry, ii as refuseMalformedOutputsForDestroy, io as isReadableBag, ir as isUnboundTemplateParameter, is as resolveUseCdkBootstrapAssets, it as withNestedStackContext, ja as DYNAMIC_REFERENCE_TOKEN_SCAN, jo as describeDockerFailure, jr as malformedExportNamesWarning, js as resolveAssemblyPath, jt as updatePartialMessage, ka as scrubResourceRecord, ko as describeDockerCapturedOutput, kr as isReadableResourceEntry, ks as displayAssemblyPath, l as keptWholeReasonText, la as DagBuilder, li as refuseMalformedResourceEntriesForImport, lo as isSensitiveAttributeName, lr as carriesFetchableDynamicReference, ls as CFN_TEMPLATE_URL_LIMIT, m as recordedProtectionNote, ma as carryLogOnlyValues, mi as refuseMalformedResourcePropertiesForOrphan, mn as ProviderRegistry, mo as loadPublishableAssetManifest, mr as isStalePlaceholderArnAttribute, ms as decodeListingKey, mt as resolveReplacementOldType, n as IMPLICIT_DELETE_DEPENDENCIES, na as templateResourceTypes, ni as refuseMalformedOrphansForOrphan, nn as withCreateTokenLedger, no as importableOutputKeys, ns as resolveStateBucketWithDefault, nt as withNestedRevertRun, o as parentSuppliedValues, oi as refuseMalformedResourceEntries, oo as orphansCarriedFrom, or as getAccountInfo, os as warnDeprecatedNoPrefixCliFlag, ot as replayRollback, p as recordedProtectionEvidence, pa as recordNestedStackParameterExpressions, pi as refuseMalformedResourcePropertiesForExport, pn as CC_BROKEN_REASON, po as createAssetRedirectResolver, pr as cfnRefValueFromPhysicalId, ps as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, pt as planRollback, q as resourcesNamingDeclaredParameter, qa as isLockInfoExpired, qn as AWS_CREDENTIAL_ENV_KEYS, qo as getDockerImageBySourceHash, qr as malformedScrubResourceEntriesRefusalMessage, qt as isExportAliasCollision, r as computeImplicitDeleteEdges, ra as describeTypeWithThrottleRetry, ri as refuseMalformedOutputs, ro as importableOutputs, rr as coerceParameterTypedValue, rs as resolveStateBucketWithDefaultAndSource, s as readRecordedConditionVerdicts, si as refuseMalformedResourceEntriesForDeploy, so as shouldRetainResource, sr as isImpossibleEmptyStoredAttribute, ss as ssmResolvedValueType, t as DeployEngine, ta as prefetchCreateOnlyPropertyPaths, ti as refuseMalformedOrphansForDestroy, to as hasUnverifiableParameterRefusal, ts as resolveSkipPrefix, tt as revertedNestedRowIds, u as mergeNoChangeOutputs, ua as TemplateParser, ui as refuseMalformedResourceEntriesForImportSave, uo as stringifyValue, ur as isNamelessDynamicReferenceError, us as MIGRATE_TMP_PREFIX, ut as withStackRecords, v as readProtection, va as logOnlyValueCount, vi as refuseMalformedState, vo as assertAssetBucketRegion, vr as JSON_LISTING_HOLE_VALUE, vs as derivePartitionAndUrlSuffix, vt as ATOMIC_FINAL_SNAPSHOT_TYPES, wa as errorCauseChain, wi as repairMalformedResourcesForReadOnly, wn as deleteIndeterminateGuards, wo as validateAssetBucketName, wr as displayLogicalId, ws as hasPlainPrototype, wt as isFinalSnapshotError, xa as recordLogOnlyValue, xi as repairMalformedOutputsForReadOnly, xn as ccProtectionRegistryTypes, xo as isCrossRegionRedirect, xr as UNREADABLE_ORPHANS_CONTAINER_ROW, xs as processStackMessages, xt as ccRoutedFinalSnapshotError, ya as printingCorpusOf, yi as repairMalformedOrphanRecordsForReadOnly, yn as CloudControlProvider, yo as ensureAssetStorage, yr as STATE_REGION_DIVERGED, ys as AssemblyReader, yt as PRE_DELETE_SNAPSHOT_TYPES, z as cyan, za as recordNoEchoAttributeValues, zi as renderStatefulReason, zn as producerRegionsFromState, zo as redactDockerArgvValues, zr as malformedOrphansRefusalMessage, zt as secretBearing } from "./deploy-engine-RCOtmm4V.js";
6
+ import { t as getCdkdVersion } from "./version-BNo3JdVW.js";
7
7
  import { randomBytes, randomUUID } from "node:crypto";
8
8
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
9
9
  import { GetRoleCommand, GetUserCommand } from "@aws-sdk/client-iam";
10
+ import { LambdaClient } from "@aws-sdk/client-lambda";
10
11
  import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
11
12
  import { DescribeSecurityGroupRulesCommand } from "@aws-sdk/client-ec2";
12
13
  import { CloudFormationClient, CreateChangeSetCommand, DeleteChangeSetCommand, DeleteStackCommand, DescribeChangeSetCommand, DescribeStackEventsCommand, DescribeStackResourcesCommand, DescribeStacksCommand, ExecuteChangeSetCommand, GetTemplateCommand, UpdateStackCommand, waitUntilChangeSetCreateComplete, waitUntilStackDeleteComplete, waitUntilStackImportComplete, waitUntilStackUpdateComplete } from "@aws-sdk/client-cloudformation";
13
14
  import { GetSecretValueCommand, SecretsManagerClient } from "@aws-sdk/client-secrets-manager";
14
15
  import { GetParameterCommand, SSMClient } from "@aws-sdk/client-ssm";
15
- import { DescribeLogStreamsCommand, ResourceNotFoundException as ResourceNotFoundException$1 } from "@aws-sdk/client-cloudwatch-logs";
16
+ import { DescribeLogStreamsCommand, ResourceNotFoundException as ResourceNotFoundException$2 } from "@aws-sdk/client-cloudwatch-logs";
17
+ import { BedrockAgentCoreControlClient } from "@aws-sdk/client-bedrock-agentcore-control";
16
18
  import * as fs from "node:fs";
17
19
  import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
18
20
  import * as path from "node:path";
@@ -26,7 +28,7 @@ import { Command, InvalidArgumentError, Option } from "commander";
26
28
  import * as readline$1 from "node:readline/promises";
27
29
  import readline from "node:readline/promises";
28
30
  import { Document, Pair, Scalar, YAMLMap, YAMLSeq, isScalar, parse, stringify, visit } from "yaml";
29
- import { createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
31
+ import { CfnLocalStateProvider, createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, isCfnFlagPresent as isCfnFlagPresent$1, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
30
32
  import { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_MCP_PROTOCOL, ConnectionRegistry, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, LocalInvokeBuildError, MCP_CONTAINER_PORT, MCP_PATH, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addStartServiceSpecificOptions, albStrategy, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildJwksUrlFromIssuer, buildMessageEvent, buildMgmtEndpointEnvUrl, buildStageMap, classifySourceChange, createAuthorizerCache, createFileWatcher, createFileWatcher as createFileWatcher$1, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, discoverRoutes, discoverWebSocketApis, downloadAndExtractS3Bundle, filterRoutesByApiIdentifier, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseSelectionExpressionPath, pickAgentCoreCandidateStack, pickAgentCoreCandidateStack as pickAgentCoreCandidateStack$1, probeHostGatewaySupport, readMtlsMaterialsFromDisk, resolveAgentCoreTarget, resolveEnvVars, resolveHostGatewayExtraHosts, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, tryResolveImageFnJoin, verifyJwtViaDiscovery, waitForAgentCorePing } from "cdk-local/internal";
31
33
  import { createServer } from "node:net";
32
34
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
@@ -1673,7 +1675,7 @@ async function probeStatefulRecreateTargetsAsync(targets, clients, logger = getL
1673
1675
  });
1674
1676
  }
1675
1677
  } catch (e) {
1676
- if (e instanceof ResourceNotFoundException$1) {
1678
+ if (e instanceof ResourceNotFoundException$2) {
1677
1679
  let regionVerified = true;
1678
1680
  if (clients.expectedRegionDiverged) {
1679
1681
  regionVerified = false;
@@ -2501,7 +2503,7 @@ function collectCrossStackRefs(node, onRef) {
2501
2503
  //#region src/provisioning/register-providers.ts
2502
2504
  let providerClasses;
2503
2505
  function loadProviderClasses() {
2504
- providerClasses ??= import("./provider-classes-DlVxBF89.js");
2506
+ providerClasses ??= import("./provider-classes-R7yvwymx.js");
2505
2507
  return providerClasses;
2506
2508
  }
2507
2509
  function registerAllProviders(registry, classes) {
@@ -4188,6 +4190,26 @@ function deployRefusesPropertiesReason(logicalIds) {
4188
4190
  function nestedStackTypeChangeReason(tc) {
4189
4191
  return `${displayIdent(tc.logicalId)}: Type changes from ${displayIdent(tc.currentType)} to ${displayIdent(tc.desiredType)}. cdkd does not replace a resource into or out of ${NESTED_STACK_RESOURCE_TYPE} (issue #2668); give the new resource a different logical id, or remove it in one deploy and add its replacement in the next.`;
4190
4192
  }
4193
+ function findUnwrittenCreateOnlyRefusals(changes, stateResources) {
4194
+ const reasons = [];
4195
+ for (const [logicalId, change] of changes) {
4196
+ if (change.changeType !== "UPDATE") continue;
4197
+ if (!Object.hasOwn(stateResources, logicalId)) continue;
4198
+ const record = stateResources[logicalId];
4199
+ if (record === void 0 || record.provisionedBy === "cc-api") continue;
4200
+ if (record.resourceType !== change.resourceType) continue;
4201
+ const propertyChanges = change.propertyChanges ?? [];
4202
+ const desired = { ...change.desiredProperties ?? {} };
4203
+ for (const pc of propertyChanges) desired[pc.path] = pc.newValue;
4204
+ const keys = unwrittenCreateOnlyReplacement(change.resourceType, record.properties ?? {}, desired, /* @__PURE__ */ new Set(), acceptedCreateOnlyDropsOf(record), propertyChanges.filter((pc) => pc.requiresReplacement).map((pc) => pc.path));
4205
+ if (keys.length === 0) continue;
4206
+ const routeDriving = findActionableSilentDrops(change.resourceType, desired, /* @__PURE__ */ new Set(), record.properties ?? {}).map(({ property }) => property);
4207
+ const keep = [.../* @__PURE__ */ new Set([...keys, ...routeDriving])].sort((a, b) => a.localeCompare(b)).map((property) => displayIdent(`${change.resourceType}:${property}`)).join(",");
4208
+ const one = keys.length === 1;
4209
+ reasons.push(`${displayIdent(logicalId)} (${displayIdent(change.resourceType)}): this previews a replacement that would apply create-only ${keys.map((k) => displayIdent(k)).join(", ")}, which the state record holds although the SDK provider never wrote ${one ? "it" : "them"}, so AWS does not. A deploy without --prefer-sdk-route refuses it (CREATE_ONLY_DROP_NEEDS_REPLACEMENT) unless --recreate-via-cc-api or --replace opts in; a deploy passing --prefer-sdk-route ${keep} changes nothing.`);
4210
+ }
4211
+ return reasons;
4212
+ }
4191
4213
  const DEPLOY_REFUSES_OUTPUTS_REASON = "The 'outputs' bag cannot be read. This preview repaired it to empty; 'cdkd deploy' refuses the record instead, so the deploy this previews will not start.";
4192
4214
  const DEPLOY_REFUSES_RESOURCES_BAG_REASON = "The 'resources' map cannot be read. This preview read it as empty; 'cdkd deploy' refuses the record instead, so the deploy this previews will not start.";
4193
4215
  function deployRefusesResourceEntriesReason(logicalIds) {
@@ -4616,6 +4638,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
4616
4638
  stateResources: stateForDiff.resources
4617
4639
  });
4618
4640
  if (nestedStackTypeChanges.length > 0) blocking = [...blocking, ...nestedStackTypeChanges.map(nestedStackTypeChangeReason)];
4641
+ for (const reason of findUnwrittenCreateOnlyRefusals(changes, stateForDiff.resources)) logger.warn(printing.mask(reason));
4619
4642
  const changedLogicalIds = new Set([...changes.values()].filter((c) => c.changeType !== "NO_CHANGE").map((c) => c.logicalId));
4620
4643
  const bindingSkipped = bindingSkippedOutputs(outputsDigestSource, currentState.skippedOutputs, changedLogicalIds);
4621
4644
  const resolved = await resolveTemplateOutputs(effectiveTemplate, resolveFn, conditions, currentState.outputs, bindingSkipped, {
@@ -5161,7 +5184,7 @@ function renderChangeLines(changes, logFn, ccApiRoutes, adoptedOrphans) {
5161
5184
  logFn(` [~] ${logicalId} (${change.resourceType})${annotateAdoption(logicalId)}${annotateRouting(logicalId)}`);
5162
5185
  if (change.propertyChanges && change.propertyChanges.length > 0) for (const propChange of change.propertyChanges) {
5163
5186
  const requiresReplace = propChange.requiresReplacement && (propChange.inPlacePropagated === true || propChange.replacementPropagated === true) ? " [may require replacement]" : propChange.requiresReplacement ? " [requires replacement]" : "";
5164
- const propagated = propChange.replacementPropagated ? " [replacement propagated]" : propChange.inPlacePropagated ? " [attribute propagated]" : "";
5187
+ const propagated = propChange.replacementPropagated ? " [replacement propagated]" : propChange.inPlacePropagated ? " [attribute propagated]" : propChange.maskedExpressionChanged === true ? " [template expression changed]" : "";
5165
5188
  const indent = " ";
5166
5189
  const [oldFiltered, newFiltered] = stripUnchangedValuePair(propChange.oldValue, propChange.newValue);
5167
5190
  const oldStr = renderDiffValue(propChange.oldValue, oldFiltered, indent, false);
@@ -7970,7 +7993,7 @@ function canonicalizeIpProtocols(baseline, aws, resourceType) {
7970
7993
  //#region src/analyzer/drift-cc-api-deny-list.ts
7971
7994
  const CC_API_FALLBACK_DENY_LIST = {
7972
7995
  "AWS::ApiGateway::RestApi": "Body / BodyS3Location are write-only inputs not returned by CC API GetResource; cdkd state preserves them",
7973
- "AWS::CloudFormation::Stack": "CC API returns runtime stack state (outputs/status), not the template parameters cdkd state stores",
7996
+ "AWS::CloudFormation::Stack": "cdkd deploys nested stacks itself: no CloudFormation stack exists, and the physicalId is a cdkd-local placeholder ARN",
7974
7997
  "AWS::EC2::LaunchTemplate": "CC API returns version-bumped LaunchTemplateData with synthetic LatestVersionNumber that diverges from the CFn input shape"
7975
7998
  };
7976
7999
 
@@ -8900,7 +8923,13 @@ function buildReadCurrentStateContext(state, excludedLogicalId) {
8900
8923
  attributes: res.attributes ?? {}
8901
8924
  };
8902
8925
  }
8903
- return { siblings };
8926
+ const own = (state.resources ?? {})[excludedLogicalId];
8927
+ const ownAttributesValue = isReadableResourceEntry(own) ? own.attributes : void 0;
8928
+ const ownAttributes = typeof ownAttributesValue === "object" && ownAttributesValue !== null && !Array.isArray(ownAttributesValue) ? ownAttributesValue : void 0;
8929
+ return {
8930
+ siblings,
8931
+ ...ownAttributes && { attributes: ownAttributes }
8932
+ };
8904
8933
  }
8905
8934
  function canonicalizeDerivedPatternBName(resourceType, baseline, aws) {
8906
8935
  if (!hasOwnKey(PATTERN_B_NAME_PROPERTIES, resourceType)) return baseline;
@@ -9410,6 +9439,20 @@ function deepEqualUnordered(a, b) {
9410
9439
  if (ak.length !== Object.keys(bo).length) return false;
9411
9440
  return ak.every((k) => Object.prototype.hasOwnProperty.call(bo, k) && deepEqualUnordered(ao[k], bo[k]));
9412
9441
  }
9442
+ function keepRecordedAttributesOverMask(redacted, plaintext, recorded, noEchoDeclared) {
9443
+ if (recorded === void 0 || noEchoDeclared === true) return redacted;
9444
+ const out = { ...redacted };
9445
+ for (const key of Object.keys(redacted)) {
9446
+ if (noEchoDeclared?.has(key)) continue;
9447
+ if (!hasOwnKey(recorded, key) || !carriesSecretMask(redacted[key])) continue;
9448
+ if (carriesSecretMask(recorded[key])) continue;
9449
+ if (sameRecordedJson(plaintext[key], recorded[key])) defineOwnKey(out, key, recorded[key]);
9450
+ }
9451
+ return out;
9452
+ }
9453
+ function sameRecordedJson(candidate, recorded) {
9454
+ return deepEqualUnordered(candidate === void 0 ? void 0 : JSON.parse(JSON.stringify(candidate)), recorded);
9455
+ }
9413
9456
  async function runRevert(reports, regionScope, stateBackend, stateConfig, awsClients, options) {
9414
9457
  const logger = getLogger();
9415
9458
  const out = humanTextSink(options.json);
@@ -9455,6 +9498,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
9455
9498
  recovery: lockRecovery
9456
9499
  }));
9457
9500
  const narrowedByLogicalId = /* @__PURE__ */ new Map();
9501
+ const reRecordedByLogicalId = /* @__PURE__ */ new Map();
9458
9502
  try {
9459
9503
  const revertSecretResolvers = new DriftSecretResolvers(report.region);
9460
9504
  const revertProducerRegions = report.producerRegions;
@@ -9551,6 +9595,19 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
9551
9595
  } catch (captureErr) {
9552
9596
  logger.warn(` ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): reverted, but the provider's reported effective properties could not be read — ${maskSecretsInText(captureErr instanceof Error ? captureErr.message : String(captureErr), secrets)}`);
9553
9597
  }
9598
+ try {
9599
+ if (updateResult !== void 0) {
9600
+ const noEchoDeclared = recordNoEchoAttributeValues(updateResult, secrets, newProperties);
9601
+ const next = recordAfterRollbackUpdate(stateResource, updateResult);
9602
+ const attributes = next.attributes === void 0 ? void 0 : keepRecordedAttributesOverMask(redactSecretsForState(next.attributes, secrets), next.attributes, stateResource.attributes, noEchoDeclared);
9603
+ if (next.physicalId !== stateResource.physicalId || !sameRecordedJson(attributes, stateResource.attributes)) reRecordedByLogicalId.set(outcome.logicalId, {
9604
+ physicalId: next.physicalId,
9605
+ attributes
9606
+ });
9607
+ }
9608
+ } catch (recordErr) {
9609
+ logger.warn(safeMsg` ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): reverted, but the attributes the provider returned could not be recorded — ${maskSecretsInText(recordErr instanceof Error ? recordErr.message : String(recordErr), secrets)}`);
9610
+ }
9554
9611
  } catch (err) {
9555
9612
  if (err instanceof ResourceUpdateNotSupportedError) {
9556
9613
  totalUnsupported++;
@@ -9562,7 +9619,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
9562
9619
  logger.error(` ✗ ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): AWS update failed — ${msg}`);
9563
9620
  }
9564
9621
  }), concurrency);
9565
- if (narrowedByLogicalId.size > 0) {
9622
+ if (narrowedByLogicalId.size > 0 || reRecordedByLogicalId.size > 0) {
9566
9623
  const resources = { ...report.state.resources };
9567
9624
  let recordedCount = 0;
9568
9625
  for (const [logicalId, delta] of narrowedByLogicalId) {
@@ -9593,7 +9650,23 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
9593
9650
  properties: newBaseline
9594
9651
  };
9595
9652
  }
9596
- if (recordedCount === 0) return;
9653
+ let reRecordedCount = 0;
9654
+ for (const [logicalId, identity] of reRecordedByLogicalId) {
9655
+ const existing = resources[logicalId];
9656
+ if (!existing) continue;
9657
+ reRecordedCount++;
9658
+ const { attributes: _replaced, ...rest } = existing;
9659
+ resources[logicalId] = {
9660
+ ...rest,
9661
+ physicalId: identity.physicalId,
9662
+ ...identity.attributes !== void 0 && { attributes: identity.attributes }
9663
+ };
9664
+ }
9665
+ if (recordedCount === 0 && reRecordedCount === 0) return;
9666
+ const recordedParts = [];
9667
+ if (recordedCount > 0) recordedParts.push(`the value the provider actually applied on ${recordedCount} resource(s)`);
9668
+ if (reRecordedCount > 0) recordedParts.push(`the identity the revert returned on ${reRecordedCount} resource(s)`);
9669
+ const recordedWhat = recordedParts.join(" and ");
9597
9670
  const { skippedOutputs: _droppedByRevert, ...carriedState } = report.state;
9598
9671
  const newState = {
9599
9672
  ...carriedState,
@@ -9604,10 +9677,11 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
9604
9677
  if (report.migrationPending) saveOptions.migrateLegacy = true;
9605
9678
  try {
9606
9679
  await stateBackend.saveState(report.stackName, report.region, newState, saveOptions);
9607
- logger.info(`✓ State updated for ${report.stackName} (${report.region}): recorded the value the provider actually applied on ${recordedCount} resource(s).`);
9680
+ logger.info(`✓ State updated for ${report.stackName} (${report.region}): recorded ${recordedWhat}.`);
9608
9681
  } catch (err) {
9609
9682
  const revertAgain = revertCommandLine(report.stackName, report.region);
9610
- logger.warn(`Reverted ${report.stackName} (${report.region}), but could not record the value the provider actually applied: ${err instanceof Error ? err.message : String(err)}. The next 'cdkd drift' will report the same difference — ` + (revertAgain === void 0 ? `re-run 'cdkd drift --revert' for this stack once the state write can succeed.` : `re-run the command below once the state write can succeed.\nRevert with: ${revertAgain}`));
9683
+ const unrecorded = [...recordedCount > 0 ? ["the value the provider actually applied"] : [], ...reRecordedCount > 0 ? ["the identity the revert returned"] : []].join(" and ");
9684
+ logger.warn(`Reverted ${report.stackName} (${report.region}), but could not record ${unrecorded}: ${err instanceof Error ? err.message : String(err)}.` + (reRecordedCount > 0 ? " The state record still holds the physical id and attributes from before the revert, which a later 'Fn::GetAtt' and 'cdkd export' read. Re-running the revert does not repair it, since the revert landed; a later deploy that updates this resource records the identity its update returns." : "") + (recordedCount > 0 ? ` The next 'cdkd drift' will report the same difference — ` + (revertAgain === void 0 ? `re-run 'cdkd drift --revert' for this stack once the state write can succeed.` : `re-run the command below once the state write can succeed.\nRevert with: ${revertAgain}`) : ""));
9611
9685
  }
9612
9686
  }
9613
9687
  } finally {
@@ -19134,7 +19208,163 @@ const fromStateFactory = (options) => {
19134
19208
  };
19135
19209
  const cdkdExtraStateProviders = { fromState: fromStateFactory };
19136
19210
  function createLocalStateProvider$1(options, cdkdStackName, synthRegion) {
19137
- return createLocalStateProvider(options, cdkdStackName, synthRegion, cdkdExtraStateProviders);
19211
+ const provider = createLocalStateProvider(options, cdkdStackName, synthRegion, cdkdExtraStateProviders);
19212
+ if (provider instanceof CfnLocalStateProvider) bindCallerIdentityClients(provider, options.profile);
19213
+ else if (isCfnFlagPresent(options) && cannotLeaveUnbound(options.profile)) throw new Error(cfnProviderRefusal(["a --from-cfn-stack provider that is not CfnLocalStateProvider"]));
19214
+ return provider;
19215
+ }
19216
+ function cannotLeaveUnbound(profile) {
19217
+ if (getAssumedRoleCredentials() === void 0) return false;
19218
+ return !(profile || process.env["AWS_PROFILE"]);
19219
+ }
19220
+ function cfnProviderRefusal(drift) {
19221
+ return `--from-cfn-stack cannot run under --role-arn with this cdk-local version: it has ${drift.join(", ")}, so cdkd cannot make it read the stack with your own credentials instead of the role's. Pass --profile <name> (your own profile), or use the cdk-local version this cdkd release ships with (go-to-k/cdkd#3240).`;
19222
+ }
19223
+ const CFN_PROVIDER_CLIENT_GETTERS = [
19224
+ "getClient",
19225
+ "getLambdaClient",
19226
+ "getSsmClient",
19227
+ "getAgentCoreControlClient"
19228
+ ];
19229
+ const CFN_PROVIDER_CLIENT_SLOTS = [
19230
+ "client",
19231
+ "lambdaClient",
19232
+ "ssmClient",
19233
+ "agentCoreControlClient"
19234
+ ];
19235
+ const CFN_PROVIDER_PROTOTYPE_MEMBERS = [
19236
+ "constructor",
19237
+ ...CFN_PROVIDER_CLIENT_GETTERS,
19238
+ "resolveTemplateSsmParameters",
19239
+ "resolveDeployedFunctionEnv",
19240
+ "resolveLambdaExecutionRoleArn",
19241
+ "resolveAgentCoreRuntimeRoleArn",
19242
+ "load",
19243
+ "getLastLoadError",
19244
+ "buildCrossStackResolver",
19245
+ "dispose"
19246
+ ];
19247
+ function cfnProviderShapeDrift(provider) {
19248
+ const proto = Object.getPrototypeOf(provider);
19249
+ const allowed = CFN_PROVIDER_PROTOTYPE_MEMBERS;
19250
+ const slots = CFN_PROVIDER_CLIENT_SLOTS;
19251
+ const drift = [];
19252
+ for (const name of CFN_PROVIDER_CLIENT_GETTERS) if (typeof proto?.[name] !== "function") drift.push(`no ${name}()`);
19253
+ for (let p = proto; p !== null && p !== Object.prototype; p = Object.getPrototypeOf(p)) for (const name of Object.getOwnPropertyNames(p)) if (!allowed.includes(name)) drift.push(`an unknown ${name}()`);
19254
+ for (const slot of CFN_PROVIDER_CLIENT_SLOTS) if (!Object.hasOwn(provider, slot)) drift.push(`no ${slot} slot`);
19255
+ if (typeof provider.region !== "string" || !Object.hasOwn(provider, "region")) drift.push("no region field");
19256
+ for (const name of Object.getOwnPropertyNames(provider)) if (/Client$/.test(name) && !slots.includes(name)) drift.push(`an unknown ${name} slot`);
19257
+ return drift;
19258
+ }
19259
+ function bindCallerIdentityClients(provider, profile) {
19260
+ const drift = cfnProviderShapeDrift(provider);
19261
+ if (drift.length > 0) {
19262
+ if (!cannotLeaveUnbound(profile)) return;
19263
+ throw new Error(cfnProviderRefusal(drift));
19264
+ }
19265
+ const slots = provider;
19266
+ const live = () => {
19267
+ if (slots.disposed) throw new Error("CfnLocalStateProvider used after dispose()");
19268
+ };
19269
+ const config = () => ({
19270
+ region: slots.region,
19271
+ ...profile && { profile }
19272
+ });
19273
+ slots.getClient = () => {
19274
+ live();
19275
+ return slots.client ??= new CloudFormationClient({
19276
+ ...awsClientDefaults({
19277
+ profile,
19278
+ ignoreAssumedRole: true
19279
+ }),
19280
+ ...config()
19281
+ });
19282
+ };
19283
+ slots.getLambdaClient = () => {
19284
+ live();
19285
+ return slots.lambdaClient ??= new LambdaClient({
19286
+ ...awsClientDefaults({
19287
+ profile,
19288
+ ignoreAssumedRole: true
19289
+ }),
19290
+ ...config()
19291
+ });
19292
+ };
19293
+ slots.getSsmClient = () => {
19294
+ live();
19295
+ return slots.ssmClient ??= new SSMClient({
19296
+ ...awsClientDefaults({
19297
+ profile,
19298
+ ignoreAssumedRole: true
19299
+ }),
19300
+ ...config()
19301
+ });
19302
+ };
19303
+ slots.getAgentCoreControlClient = () => {
19304
+ live();
19305
+ return slots.agentCoreControlClient ??= new BedrockAgentCoreControlClient({
19306
+ ...awsClientDefaults({
19307
+ profile,
19308
+ ignoreAssumedRole: true
19309
+ }),
19310
+ ...config()
19311
+ });
19312
+ };
19313
+ }
19314
+ function engineCredentialTripleChannel(containers) {
19315
+ return {
19316
+ what: `the role's AWS credentials are copied into ${containers}, so that code runs as the role`,
19317
+ flagOnly: true
19318
+ };
19319
+ }
19320
+ const ENGINE_ECS_SECRETS_CHANNEL = {
19321
+ what: "ECS task secrets are fetched with the role and injected as plaintext into the container's environment",
19322
+ flagOnly: false
19323
+ };
19324
+ const ENGINE_ASSUME_ROLE_CHANNEL = {
19325
+ what: "the role --assume-role / --assume-task-role assumes for the container is assumed BY the --role-arn role, so the container can receive a role you could not assume yourself",
19326
+ flagOnly: false
19327
+ };
19328
+ function engineFromCfnStackChannel(alsoReads) {
19329
+ return {
19330
+ what: "--from-cfn-stack reads the deployed stack, including SecureString parameters decrypted into the container's environment" + (alsoReads ? `, and ${alsoReads}` : ""),
19331
+ flagOnly: false
19332
+ };
19333
+ }
19334
+ const ENGINE_ACCOUNT_ID_CHANNEL = {
19335
+ what: "${AWS::AccountId} resolves to the role's account in the container's environment, secret references and image URIs",
19336
+ flagOnly: false
19337
+ };
19338
+ function warnEngineRoleExposure(cmd, commandName, channels, fromCfnStackChannel = engineFromCfnStackChannel()) {
19339
+ cmd.hook("preAction", (_thisCommand, actionCommand) => {
19340
+ const options = actionCommand.optsWithGlobals();
19341
+ const message = engineRoleExposureWarning(commandName, channels, fromCfnStackChannel, {
19342
+ roleArn: options.roleArn || process.env["CDKD_ROLE_ARN"],
19343
+ profileFlag: options.profile,
19344
+ envProfile: process.env["AWS_PROFILE"],
19345
+ fromCfnStack: isCfnFlagPresent(options),
19346
+ assumesForWorkload: isAssumeRequested(options.assumeRole) || isAssumeRequested(options.assumeTaskRole)
19347
+ });
19348
+ if (message !== void 0) getLogger().warn(message);
19349
+ });
19350
+ return cmd;
19351
+ }
19352
+ function isAssumeRequested(value) {
19353
+ if (typeof value === "string") return value !== "";
19354
+ if (value !== null && typeof value === "object") return Object.keys(value).length > 0;
19355
+ return value === true;
19356
+ }
19357
+ function engineRoleExposureWarning(commandName, channels, fromCfnStackChannel, input) {
19358
+ if (!input.roleArn || !isIamRoleArn(input.roleArn) || input.profileFlag) return void 0;
19359
+ const all = [
19360
+ ...channels,
19361
+ ...input.assumesForWorkload ? [ENGINE_ASSUME_ROLE_CHANNEL] : [],
19362
+ ...input.fromCfnStack ? [fromCfnStackChannel] : []
19363
+ ];
19364
+ const envProfileSet = !!input.envProfile;
19365
+ const open = envProfileSet ? all.filter((c) => c.flagOnly) : all;
19366
+ if (open.length === 0) return void 0;
19367
+ return `cdkd local ${commandName}: --role-arn ${envProfileSet ? "is set, and the exported AWS_PROFILE does not cover what follows (only the --profile flag does)" : "is set and no profile is selected"}, so the local emulation engine resolves these AS THE ROLE and hands them to your local code: ${open.map((c) => c.what).join("; ")}. Pass --profile <name> with your own profile to keep them on your identity, or do not pass a role whose permissions you would not give the code in the container. Tracked as go-to-k/cdkd#3240 (upstream go-to-k/cdk-local#783).`;
19138
19368
  }
19139
19369
 
19140
19370
  //#endregion
@@ -21599,7 +21829,7 @@ async function localStartApiCommand(target, options) {
21599
21829
  const direct = buildCorsConfigByApiId(stack.template);
21600
21830
  for (const [k, v] of direct) corsConfigByApiId.set(k, v);
21601
21831
  }
21602
- const stateByStack = options.fromState || isCfnFlagPresent(options) ? await loadStateForRoutedStacks(targetStacks, routes, routesWithAuth, options) : /* @__PURE__ */ new Map();
21832
+ const stateByStack = options.fromState || isCfnFlagPresent$1(options) ? await loadStateForRoutedStacks(targetStacks, routes, routesWithAuth, options) : /* @__PURE__ */ new Map();
21603
21833
  const profileCredentials = options.profile ? await resolveProfileCredentials(options.profile) : void 0;
21604
21834
  if (options.profile && profileCredentials && !profileCredsFile) profileCredsFile = await writeProfileCredentialsFile(options.profile, profileCredentials, {
21605
21835
  onDirCreated: (hostPath) => {
@@ -23913,6 +24143,7 @@ function createLocalStartServiceCommand() {
23913
24143
  await runEcsServiceEmulator(targets, options, serviceStrategy(), cdkdExtraStateProviders);
23914
24144
  }));
23915
24145
  addStartServiceSpecificOptions(cmd);
24146
+ warnEngineRoleExposure(cmd, "start-service", [ENGINE_ECS_SECRETS_CHANNEL, ENGINE_ACCOUNT_ID_CHANNEL]);
23916
24147
  return adoptDeprecatedRegionFlag(addCommonEcsServiceOptions(cmd));
23917
24148
  }
23918
24149
 
@@ -25094,6 +25325,7 @@ function createLocalStartAgentCoreCommand$1() {
25094
25325
  cmd.addOption(new Option("--state-bucket <bucket>", "S3 bucket for --from-state. Falls back to CDKD_STATE_BUCKET env or cdk.json context.cdkd.stateBucket."));
25095
25326
  cmd.addOption(new Option("--state-prefix <prefix>", "S3 key prefix for --from-state state files.").default("cdkd"));
25096
25327
  cmd.addOption(new Option("--no-assume-role", "Explicitly opt out of assuming the deployed execution role: forward your ambient AWS credentials (or the --profile overlay) unchanged, and suppress the \"re-run with --assume-role\" hint that omitting the flag prints when deployed state is loaded."));
25328
+ warnEngineRoleExposure(cmd, "start-agentcore", [engineCredentialTripleChannel("the agent container"), ENGINE_ACCOUNT_ID_CHANNEL]);
25097
25329
  return adoptDeprecatedRegionFlag(cmd);
25098
25330
  }
25099
25331
 
@@ -25136,6 +25368,11 @@ function createLocalStartAlbCommand() {
25136
25368
  await runEcsServiceEmulator(targets, options, buildAlbEmulatorStrategy(options), cdkdExtraStateProviders);
25137
25369
  }));
25138
25370
  addAlbSpecificOptions(cmd);
25371
+ warnEngineRoleExposure(cmd, "start-alb", [
25372
+ engineCredentialTripleChannel("the ALB's Lambda target-group containers"),
25373
+ ENGINE_ECS_SECRETS_CHANNEL,
25374
+ ENGINE_ACCOUNT_ID_CHANNEL
25375
+ ]);
25139
25376
  return adoptDeprecatedRegionFlag(addCommonEcsServiceOptions(cmd));
25140
25377
  }
25141
25378
 
@@ -25151,6 +25388,7 @@ function createLocalStartCloudFrontCommand$1() {
25151
25388
  cmd.addOption(new Option("--state-prefix <prefix>", "[not supported on start-cloudfront] S3 key prefix for --from-state state files. Refused at startup with --from-state.").default("cdkd"));
25152
25389
  cmd.addOption(new Option("--no-assume-role", "Explicitly opt out of assuming the deployed execution role: forward your ambient AWS credentials (or the --profile overlay) unchanged, and suppress the \"re-run with --assume-role\" hint that omitting the flag prints when deployed state is loaded."));
25153
25390
  refuseUnwiredCdkdStateFlags(cmd);
25391
+ warnEngineRoleExposure(cmd, "start-cloudfront", [engineCredentialTripleChannel("the Function URL and Lambda@Edge containers")], engineFromCfnStackChannel("a deployed S3 origin's objects and KeyValueStore entries"));
25154
25392
  return adoptDeprecatedRegionFlag(cmd);
25155
25393
  }
25156
25394
  function refuseUnwiredCdkdStateFlags(cmd) {
@@ -25855,4 +26093,4 @@ function collectVerbFlags(program) {
25855
26093
 
25856
26094
  //#endregion
25857
26095
  export { canonicalizeIpProtocolValue as a, buildProgram, isAbsoluteAssetPath as c, resolveSecretDerivedPrincipals as i, listNestedTemplateRows as l, runDestroyForStack as n, resolvedResourceTimeoutMs as o, isResolvableSecretPrincipalList as r, findNestedTemplateTreeDefect as s, canonicalizeIpv4Cidr as t, renderNestedTemplateTreeDefect as u };
25858
- //# sourceMappingURL=program-CVOLJJ2z.js.map
26096
+ //# sourceMappingURL=program-Eed63bId.js.map