@go-to-k/cdkd 0.294.8 → 0.294.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-CsajFK4_.js → asg-provider-3uLGAhIx.js} +2 -2
- package/dist/{asg-provider-CsajFK4_.js.map → asg-provider-3uLGAhIx.js.map} +1 -1
- package/dist/cli.js +35 -4
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-C5kAhscq.js → deploy-engine-BTOCDCWf.js} +654 -508
- package/dist/deploy-engine-BTOCDCWf.js.map +1 -0
- package/dist/iam-policy-targets-CMSQGQnm.js.map +1 -1
- package/dist/{iam-role-provider-CPn7nqoS.js → iam-role-provider-CBT2LPe1.js} +2 -2
- package/dist/{iam-role-provider-CPn7nqoS.js.map → iam-role-provider-CBT2LPe1.js.map} +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-DlFQdgwe.js → neptune-provider-BQ-CGoYJ.js} +2 -2
- package/dist/{neptune-provider-DlFQdgwe.js.map → neptune-provider-BQ-CGoYJ.js.map} +1 -1
- package/dist/{program-CVOLJJ2z.js → program-DMJnrQOG.js} +254 -16
- package/dist/program-DMJnrQOG.js.map +1 -0
- package/dist/{provider-classes-DlVxBF89.js → provider-classes-DCbt28RB.js} +114 -14
- package/dist/provider-classes-DCbt28RB.js.map +1 -0
- package/dist/{rds-provider-a-vZsR9L.js → rds-provider-J6zl27x3.js} +2 -2
- package/dist/{rds-provider-a-vZsR9L.js.map → rds-provider-J6zl27x3.js.map} +1 -1
- package/dist/{version-DGxZ-zFN.js → version-QrNvZCe0.js} +2 -2
- package/dist/{version-DGxZ-zFN.js.map → version-QrNvZCe0.js.map} +1 -1
- package/package.json +2 -2
- package/dist/deploy-engine-C5kAhscq.js.map +0 -1
- package/dist/program-CVOLJJ2z.js.map +0 -1
- 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-
|
|
4
|
+
import { n as awsClientDefaults, r as getAssumedRoleCredentials, u as formatAuthority } from "./aws-client-defaults-D0q0z4dG.js";
|
|
5
|
+
import { $ as nestedChildStackName, $a as importableOutputs, $i as describeTypeWithThrottleRetry, $n as coerceParameterTypedValue, $o as resolveStateBucketWithDefaultAndSource, $r as refuseMalformedOutputs, Aa as pathCrossesDottedKey, Ai as findReplacedReadersOfRecreateTargets, Ao as formatDockerLoginError, Ar as malformedLocalResourceEntriesWarning, At as DeploymentEventsStore, B as gray, Ba as WHOLE_DYNAMIC_REFERENCE_PATTERN, Bn as explicitRoleArnOrThrow, Bo as escapeRegExp, Br as malformedResourceEntriesWarning, Bt as noEchoParameterValueSeed, Ca as markSameGenerationBag, Ci as unreadableResourceEntries, Cn as isWaitAbandonedError, Co as buildDockerImage, Cr as hasReadableResources, Cs as absoluteAssemblyPathEscape, Ct as effectiveDeletionPolicy, Da as DYNAMIC_REFERENCE_TOKEN_SCAN, Do as describeDockerFailure, Dr as malformedExportNamesWarning, Ds as resolveAssemblyPath, Dt as updatePartialMessage, Ei as unwrittenCreateOnlyReplacement, Eo as describeDockerExecFailure, Er as malformedDriftResourcePropertiesWarning, Es as renderAssemblyPathEscape, Et as unsupportedFinalSnapshotError, Fa as recordNoEchoAttributeValues, Fi as renderStatefulReason, Fn as producerRegionsFromState, Fo as redactDockerArgvValues, Fr as malformedOrphansRefusalMessage, Ft as secretBearing, G as namesAnyDeclaredParameter, Ga as rebuildClientForBucketRegion, Gn as callerEnvCredentials, Go as synthesisStatusMessage, Gr as previewableOrphanRecords, Gt as DEFAULT_RESOURCE_TIMEOUT_MS, H as red, Ha as LockManager, Hn as sendableAssumeRoleCommand, Ho as AssetManifestLoader, Hr as malformedResourcesWarning, Ht as collectPublishedOutputNames, I as formatResourceLine, Ia as STATE_SOURCED_BASELINE_RULES, In as regionLessSecretName, Io as redactedDockerCause, Ir as malformedOrphansWarning, It as secretBearingStateKeyWarning, J as makeSiblingClaimReader, Ja as exportNamesCarriedFrom, Jo as resolveApp, Jr as refuseMalformedOrphanRecords, Jt as RollbackInlinePolicyWriters, K as reachableDivergentParameters, Ka as acceptedCreateOnlyDropsOf, Kn as envCredentialsAreAssumedRole, Ko as getDefaultStateBucketName, Kr as refuseDivergentRecordRegionForDestroy, Kt as DEFAULT_RESOURCE_WARN_AFTER_MS, L as createReadOnlyAttributeHealerFactory, La as STATE_SOURCED_CROSS_GENERATION_RULES, Ln as applyRoleArnIfSet, Lo as runDockerForeground, Lr as malformedOutputsRefusalMessage, Lt as secretSafeKeyDisplay, Ma as carriesSecretMask, Mi as MULTI_REGION_RECREATE_BLOCKED_TYPES, Mn as INTRINSIC_KEYS, Mo as isDockerClientEnvKey, Mr as malformedOrphanRecordsRefusalMessage, Mt as WITHHELD_NAME_DISPLAY, Na as recordMaskOnlyValue, Ni as isStatefulRecreateTargetForReplace, Nn as IntrinsicFunctionResolver, No as isMalformedEnvKey, Nr as malformedOrphanRecordsWarning, Nt as displayTextOrWithheld, Oa as dynamicReferenceTokens, Oi as NO_CC_HANDLERS_REASON, Oo as dockerSpawnEnvWithSensitive, Or as malformedExportSourceWarning, Ot as updatePartialReason, Pa as recordMaskOnlyValuesIn, Pi as isStatefulRecreateTargetSync, Pn as classifyReplaySecretRegion, Po as partitionSensitiveEnv, Pr as malformedOrphanRowsKeptWarning, Pt as exportAliasCollisionScrubWarning, Qa as importableOutputKeys, Qi as templateResourceTypes, Qo as resolveStateBucketWithDefault, Qr as refuseMalformedOrphansForOrphan, Qt as withCreateTokenLedger, R as bold, Ra as STATE_SOURCED_READBACK_RULES, Rn as assertFlagRoleArn, Ro as runDockerStreaming, Rr as malformedOutputsWarning, Rt as exportNameSecretExposure, Sa as maskSecretsInText, Si as unreadableOrphanRecords, So as buildDenyExternalAccessPolicy, Sr as hasReadableOutputs, Ss as ownValue, St as createPreDeleteFinalSnapshot, Ta as scrubResourceRecord, To as describeDockerCapturedOutput, Tr as isReadableResourceEntry, Ts as displayAssemblyPath, Tt as refusesFinalSnapshot, U as yellow, Ua as isLockInfoExpired, Un as AWS_CREDENTIAL_ENV_KEYS, Uo as getDockerImageBySourceHash, Ur as malformedScrubResourceEntriesRefusalMessage, Ut as isExportAliasCollision, V as green, Va as isSingleDynamicReferenceToken, Vn as isIamRoleArn, Vo as stripControlChars, Vr as malformedResourcePropertiesWarning, Vt as collectDeclaredOutputNames, W as computeParameterTaint, Wa as S3StateBackend, Wn as applyCallerIdentityCredentials, Wo as Synthesizer, Wr as malformedStateRefusalMessage, Wt as bindingSkippedOutputs, X as NESTED_PENDING_PARENT_REASON, Xa as hasReasonlessBaselineRefusal, Xo as resolveCaptureObservedState, Xr as refuseMalformedOrphans, Xt as ledgerForStack, Y as planOrphanAdoption, Ya as hasReadableExportSet, Yo as resolveAutoAssetStorage, Yr as refuseMalformedOrphanRecordsForDestroy, Z as dropSettledNestedJournals, Za as hasUnverifiableParameterRefusal, Zi as prefetchCreateOnlyPropertyPaths, Zo as resolveSkipPrefix, Zr as refuseMalformedOrphansForDestroy, _ as perType, _a as recordLogOnlyValue, _i as repairMalformedOutputsForReadOnly, _n as ccProtectionRegistryTypes, _o as isCrossRegionRedirect, _r as UNREADABLE_ORPHANS_CONTAINER_ROW, _s as processStackMessages, _t as inheritProducerRegions, a as conditionInputsFrom, aa as DagBuilder, ai as refuseMalformedResourceEntriesForImport, ao as isSensitiveAttributeName, ar as carriesFetchableDynamicReference, as as CFN_TEMPLATE_URL_LIMIT, at as replayFailedOperations, ba as errorCauseChain, bi as repairMalformedResourcesForReadOnly, bn as deleteIndeterminateGuards, bo as validateAssetBucketName, br as displayLogicalId, bs as hasPlainPrototype, bt as buildFinalSnapshotIdentifier, c as isSecretBearingReferenceString, ca as inheritNestedStackParameterAssociations, ci as refuseMalformedResourcePropertiesForDrift, co as buildAssetRedirectMap, cr as AWS_NO_VALUE, cs as uploadCfnTemplate, ct as destroyStackRecordsView, d as makeCanonicalizePropertiesFn, da as createUnionSecretMasker, di as refuseMalformedResourcesForDeploy, dn as ccBrokenReason, do as rewriteTemplateAssetReferences, dr as refStateLookupFromResource, ds as expectedOwnerParam, dt as recordAfterRollbackUpdate, ea as withRetry, ei as refuseMalformedOutputsForDestroy, eo as isReadableBag, er as isUnboundTemplateParameter, es as resolveUseCdkBootstrapAssets, f as withResourceDeadline, fa as hasMaskableValues, fi as refuseMalformedResourcesForDestroy, fn as wouldReturnToSdkProvider, fo as AssetModeResolver, fs as PARTITION_TABLE, ft as planFailedOps, g as isProtectionValueActive, ga as recordLogOnlyParameterValue, gi as repairMalformedOrphansForReadOnly, gn as slowCcOperationTimeoutMs, go as getBootstrapMarkerKey, gr as STATE_RESOURCES_MALFORMED, gs as StageLoadError, h as PROTECTION_PROPERTY_BY_TYPE, ha as printingCorpusOf, hi as repairMalformedOrphanRecordsForReadOnly, hn as CloudControlProvider, ho as ensureAssetStorage, hr as STATE_REGION_DIVERGED, hs as AssemblyReader, ht as findNestedStackTypeChanges, i as conditionFingerprint, ii as refuseMalformedResourceEntriesForDestroy, io as AssetPublisher, ir as carriesDynamicReference, is as CFN_TEMPLATE_BODY_LIMIT, it as withNestedStackContext, ja as identityKeyFor, ji as shownType, jn as DiffCalculator, jo as getDockerCmd, jr as malformedLocalResourcesWarning, jt as extractDeploymentEventError, ka as isUncertifiedBaselineMaskPosition, ki as hasNoCloudControlHandlers, ko as finchSecretArgvRefusal, kr as malformedLocalOutputsWarning, ks as resolveBucketRegion, kt as DeploymentEventsReader, l as keptWholeReasonText, la as recordNestedStackParameterExpressions, li as refuseMalformedResourcePropertiesForExport, ln as CC_BROKEN_REASON, lo as createAssetRedirectResolver, lr as cfnRefValueFromPhysicalId, ls as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, m as recordedProtectionNote, ma as logOnlyValueCount, mi as refuseMalformedState, mo as assertAssetBucketRegion, mr as JSON_LISTING_HOLE_VALUE, ms as derivePartitionAndUrlSuffix, mt as resolveReplacementOldType, n as IMPLICIT_DELETE_DEPENDENCIES, ni as refuseMalformedResourceEntries, no as orphansCarriedFrom, nr as getAccountInfo, ns as warnDeprecatedNoPrefixCliFlag, nt as withNestedRevertRun, o as parentSuppliedValues, oa as TemplateParser, oi as refuseMalformedResourceEntriesForImportSave, oo as stringifyValue, or as isNamelessDynamicReferenceError, os as MIGRATE_TMP_PREFIX, ot as replayRollback, p as recordedProtectionEvidence, pa as literalSplitDelimitersOf, pi as refuseMalformedResourcesForExport, pn as isCustomResourceType$1, po as BOOTSTRAP_MARKER_PREFIX, pr as withSharedDrainBudget, ps as canonicalizeRegion, pt as planRollback, q as resourcesNamingDeclaredParameter, qa as describeRegionValueKind, qo as getLegacyStateBucketName, qt as maskingRetryLogger, r as computeImplicitDeleteEdges, ri as refuseMalformedResourceEntriesForDeploy, ro as shouldRetainResource, rr as isImpossibleEmptyStoredAttribute, rs as ssmResolvedValueType, s as readRecordedConditionVerdicts, sa as liveMatchesUnresolvedTokenFrame, si as refuseMalformedResourceEntriesForOrphan, so as WorkGraph, sr as keepsSecretReferenceToken, ss as findLargeInlineResources, t as DeployEngine, ti as refuseMalformedResourceAttributesForOrphan, to as orphansAfterRollback, tr as parameterTypeMayLoseSecretIdentity, ts as stateBucketExistenceConfirmed, tt as revertedNestedRowIds, u as mergeNoChangeOutputs, ua as carryLogOnlyValues, ui as refuseMalformedResourcePropertiesForOrphan, un as ProviderRegistry, uo as loadPublishableAssetManifest, ur as isStalePlaceholderArnAttribute, us as decodeListingKey, ut as withStackRecords, v as readProtection, va as shareLogOnlyValues, vi as repairMalformedResourceEntriesForReadOnly, vo as parseBootstrapMarker, vr as UNREADABLE_RESOURCES_MAP_ROW, vs as defineOwnKey, vt as ATOMIC_FINAL_SNAPSHOT_TYPES, wa as redactSecretsForState, wi as findActionableSilentDrops, wo as resolveDockerContextDirectory, wr as isReadableOrphanRecord, ws as describeFileReadFailure, wt as isFinalSnapshotError, xa as maskSecretsInError, xi as unpreviewableOrphanRecords, xn as deleteSkipReason, xo as validateContainerRepoName, xr as hasReadableOrphans, xs as nullPrototypeRecord, xt as ccRoutedFinalSnapshotError, ya as createSecretMasker, yi as repairMalformedResourcePropertiesForReadOnly, yn as UNSPECIFIED_SKIP_REASON, yo as readBootstrapMarkerBody, yr as deployRefusesOrphanRowsReason, ys as hasOwnKey, yt as PRE_DELETE_SNAPSHOT_TYPES, z as cyan, za as TEMPLATE_SOURCED_RULES, zn as assertSendableRoleArn, zo as warnFinchArgvExposure, zr as malformedRenderedContainersWarning, zt as isWholeDynamicReferenceValue } from "./deploy-engine-BTOCDCWf.js";
|
|
6
|
+
import { t as getCdkdVersion } from "./version-QrNvZCe0.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$
|
|
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$
|
|
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-
|
|
2506
|
+
providerClasses ??= import("./provider-classes-DCbt28RB.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, {
|
|
@@ -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": "
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
26096
|
+
//# sourceMappingURL=program-DMJnrQOG.js.map
|