@cdkd/cli 0.367.1 → 0.368.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/{ambient-client-defaults-XQF39qQj.js → ambient-client-defaults-DDfUN9ef.js} +3 -3
  2. package/dist/{ambient-client-defaults-XQF39qQj.js.map → ambient-client-defaults-DDfUN9ef.js.map} +1 -1
  3. package/dist/{asg-provider-y1fMA5wH.js → asg-provider-CUMYVyvT.js} +6 -6
  4. package/dist/{asg-provider-y1fMA5wH.js.map → asg-provider-CUMYVyvT.js.map} +1 -1
  5. package/dist/cli.js +5 -4
  6. package/dist/cli.js.map +1 -1
  7. package/dist/{custom-resource-runtime-C-mY6sq6.js → custom-resource-runtime-CWPySt31.js} +6 -6
  8. package/dist/{custom-resource-runtime-C-mY6sq6.js.map → custom-resource-runtime-CWPySt31.js.map} +1 -1
  9. package/dist/{db-associated-roles-2nu3r_PQ.js → db-associated-roles-B5Th-kl3.js} +2 -2
  10. package/dist/{db-associated-roles-2nu3r_PQ.js.map → db-associated-roles-B5Th-kl3.js.map} +1 -1
  11. package/dist/{delete-started-BdXPDSx0.js → delete-started-DqOOdnUC.js} +9 -6
  12. package/dist/delete-started-DqOOdnUC.js.map +1 -0
  13. package/dist/{deploy-engine-DksIRiiT.js → deploy-engine-yAKbnp7z.js} +454 -59
  14. package/dist/deploy-engine-yAKbnp7z.js.map +1 -0
  15. package/dist/{ec2-termination-protection-DOVV8kr6.js → ec2-termination-protection-CZCRRUVl.js} +11 -6
  16. package/dist/ec2-termination-protection-CZCRRUVl.js.map +1 -0
  17. package/dist/{ecr-uri-TWqh2xnl.js → ecr-uri-zOozEmKR.js} +2 -2
  18. package/dist/{ecr-uri-TWqh2xnl.js.map → ecr-uri-zOozEmKR.js.map} +1 -1
  19. package/dist/{expected-bucket-owner-D5QfvmhW.js → expected-bucket-owner-JbnM6n0a.js} +2 -2
  20. package/dist/{expected-bucket-owner-D5QfvmhW.js.map → expected-bucket-owner-JbnM6n0a.js.map} +1 -1
  21. package/dist/{iam-role-provider-CD5kIcoP.js → iam-role-provider-p_hUgEho.js} +9 -9
  22. package/dist/{iam-role-provider-CD5kIcoP.js.map → iam-role-provider-p_hUgEho.js.map} +1 -1
  23. package/dist/{image-plan-DCV_kAg_.js → image-plan-DY6zCoEm.js} +14 -11
  24. package/dist/image-plan-DY6zCoEm.js.map +1 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +5 -5
  27. package/dist/{logger-KcU9IK83.js → logger-jgRUiSfe.js} +2 -2
  28. package/dist/{logger-KcU9IK83.js.map → logger-jgRUiSfe.js.map} +1 -1
  29. package/dist/{neptune-provider-Cxp67na9.js → neptune-provider-D9GH3vDR.js} +7 -7
  30. package/dist/{neptune-provider-Cxp67na9.js.map → neptune-provider-D9GH3vDR.js.map} +1 -1
  31. package/dist/{program-D4wssD37.js → program-DBiYxFDA.js} +258 -44
  32. package/dist/program-DBiYxFDA.js.map +1 -0
  33. package/dist/{provider-classes-B7kV4F_k.js → provider-classes-CXmZ11Vu.js} +607 -141
  34. package/dist/provider-classes-CXmZ11Vu.js.map +1 -0
  35. package/dist/{rds-provider-BQ7VeAPO.js → rds-provider-yq20dDM3.js} +10 -10
  36. package/dist/{rds-provider-BQ7VeAPO.js.map → rds-provider-yq20dDM3.js.map} +1 -1
  37. package/dist/{read-replica-O1JLfZeG.js → read-replica-BsDsLq5R.js} +3 -3
  38. package/dist/{read-replica-O1JLfZeG.js.map → read-replica-BsDsLq5R.js.map} +1 -1
  39. package/dist/{replacement-rules-oI6WUksx.js → replacement-rules-CEpQXkfN.js} +65 -4
  40. package/dist/replacement-rules-CEpQXkfN.js.map +1 -0
  41. package/dist/{resource-deadline-B7OMwesr.js → resource-deadline-BMqm6ibe.js} +5 -5
  42. package/dist/{resource-deadline-B7OMwesr.js.map → resource-deadline-BMqm6ibe.js.map} +1 -1
  43. package/dist/{restore-source-guard-B86BS38p.js → restore-source-guard-FtubmKcr.js} +4 -4
  44. package/dist/{restore-source-guard-B86BS38p.js.map → restore-source-guard-FtubmKcr.js.map} +1 -1
  45. package/dist/{run-cli-4VaXla8O.js → run-cli-Ca6VtEgK.js} +2 -2
  46. package/dist/{run-cli-4VaXla8O.js.map → run-cli-Ca6VtEgK.js.map} +1 -1
  47. package/dist/{settle-own-write-members-DMLYghh3.js → settle-own-write-members-j5nZLuDh.js} +12 -12
  48. package/dist/{settle-own-write-members-DMLYghh3.js.map → settle-own-write-members-j5nZLuDh.js.map} +1 -1
  49. package/dist/{version-ge-gIa5n.js → version-DOsbn-VR.js} +2 -2
  50. package/dist/{version-ge-gIa5n.js.map → version-DOsbn-VR.js.map} +1 -1
  51. package/package.json +3 -2
  52. package/dist/delete-started-BdXPDSx0.js.map +0 -1
  53. package/dist/deploy-engine-DksIRiiT.js.map +0 -1
  54. package/dist/ec2-termination-protection-DOVV8kr6.js.map +0 -1
  55. package/dist/image-plan-DCV_kAg_.js.map +0 -1
  56. package/dist/program-D4wssD37.js.map +0 -1
  57. package/dist/provider-classes-B7kV4F_k.js.map +0 -1
  58. package/dist/replacement-rules-oI6WUksx.js.map +0 -1
@@ -1,19 +1,19 @@
1
- import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-ge-gIa5n.js";
2
- import { $ as renderStacksNoLongerSelected, $t as deployOptions, A as followContainerLogs, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as STATE_FILE_SUFFIX, Ct as resolveContainerRegion, Dn as listAllStateKeys, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as listAllLockKeys, Et as taskRoleAssumedInRealAws, F as removeContainer, Ft as legacyStateBucketFallbackRegion, G as nestedOwnerOfLogicalId, Gt as withOtherIndexRemoval, H as resolveRuntimeImage, Ht as resolveEffectiveRegion, It as namedCliRegion, J as renderAllLeftOutStageStacks, Jt as annotationMessageOptions, K as partitionTopLevel, Kt as strandedProfileCredentialsNotice, L as runDetached, Lt as rawCliRegion, M as killAndDrainContainerLogs, Mt as adoptRegionFlag, N as pickFreePort, Nt as exportInferredRegionForSdk, O as ensureDockerAvailable, On as parseStateKey, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as contextOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as LOCK_FILE_SUFFIX, St as realAwsException, T as DockerRunnerError, Tn as describeStateKey, Tt as stateRoleRecordIsEmulatorSide, U as describeStack, Ut as stackRegionResolver, V as resolveRuntimeFileExtension, Vt as regionShown, W as matchStacks, Wt as stateWithRegion, X as renderAmbiguousTargetStack, Xt as applyWaitFlagEnv, Y as renderAllNoTopLevelStacks, Yt as appOptions, Z as renderNoStackMatch, Zt as commonOptions, _ as probeHostGatewaySupport, _n as parseDuration, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noLocalCustomResourcesOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as cliArgParser, bt as prepareLocalLoopbackForwarder, cn as regionOption, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stateOptions, dt as activateLocalAwsAndRoleArn, en as destroyOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as useCdkBootstrapAssetsOption, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as allowUnsupportedTypesOption, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as parseAssumeRoleToken, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as noCfnFallbackOption, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as skipFinalSnapshotOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as normalizeStartApiAssumeRole, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as exclusivelyOption, nt as stackMatchesPattern, o as resolveLambdaTarget, on as parseContextOptions, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as effectiveAssumeRoleArn, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as guardStackRegionOptions, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseStackRegion, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as diffUpdatePolicyOptions, tt as selectTargetStack, u as assetPathDirs, un as stackOptions, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as resourceTimeoutOptions, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as STATE_KEY_MAX_CODE_POINTS, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as parsePositiveIntegerOption, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as validateResourceTimeouts, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-DCV_kAg_.js";
3
- import { A as assertRegionMatch, At as readRecordedPrincipals, Cn as producerCoordinateKey, Ct as IAM_PRINCIPAL_NAME, Gt as maskDeep, Lt as logicalIdShown, N as VALUE_NOT_SHOWN, O as DriftReadRefusedError, U as isMarkedNotGone, V as remedyLogicalId, _n as WAIT_CONDITION_SIGNAL_PREFIX, _t as renderDisableCommand, bn as withPasteableAwsProfile, bt as interruptWatchListenerCount, cn as buildLockContentionMessage, dn as formatLockOperation, fn as formatLockOwner, gn as DEFAULT_STATE_PREFIX, hn as CUSTOM_RESOURCE_RESPONSE_PREFIX, i as withResourceDeadline, k as RESOURCE_NOT_FOUND, ln as forceQuitRecoveryClause, mt as isAwsCliLiteral, on as UNREPRODUCIBLE_LOCK_CLAUSE, sn as buildForceUnlockCommand, st as runDeleteAttempt, un as formatLockExpiry, vn as setPasteableAwsCaBundle, vt as beginCommandInterruptScope, wn as producerRecordKey, wt as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, xn as injectiveKey, xt as isInterruptedWaitError, yn as setPasteableAwsProfile, yt as endCommandInterruptScope, zt as resourceTypeShown } from "./resource-deadline-B7OMwesr.js";
1
+ import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-DOsbn-VR.js";
2
+ import { $ as renderStacksNoLongerSelected, $t as contextOptions, A as followContainerLogs, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as LOCK_FILE_SUFFIX, Ct as resolveContainerRegion, Dn as listAllLockKeys, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as describeStateKey, Et as taskRoleAssumedInRealAws, F as removeContainer, Ft as legacyStateBucketFallbackRegion, G as nestedOwnerOfLogicalId, Gt as withOtherIndexRemoval, H as resolveRuntimeImage, Ht as resolveEffectiveRegion, It as namedCliRegion, J as renderAllLeftOutStageStacks, Jt as annotationMessageOptions, K as partitionTopLevel, Kt as strandedProfileCredentialsNotice, L as runDetached, Lt as rawCliRegion, M as killAndDrainContainerLogs, Mt as adoptRegionFlag, N as pickFreePort, Nt as exportInferredRegionForSdk, O as ensureDockerAvailable, On as listAllStateKeys, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as commonOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as parsePositiveIntegerOption, St as realAwsException, T as DockerRunnerError, Tn as STATE_KEY_MAX_CODE_POINTS, Tt as stateRoleRecordIsEmulatorSide, U as describeStack, Ut as stackRegionResolver, V as resolveRuntimeFileExtension, Vt as regionShown, W as matchStacks, Wt as stateWithRegion, X as renderAmbiguousTargetStack, Xt as applyWaitFlagEnv, Y as renderAllNoTopLevelStacks, Yt as appOptions, Z as renderNoStackMatch, Zt as collectRepeated, _ as probeHostGatewaySupport, _n as allowUnsupportedTypesOption, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noCfnFallbackOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as validateResourceTimeouts, bt as prepareLocalLoopbackForwarder, cn as parseStackRegion, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stackOptions, dt as activateLocalAwsAndRoleArn, en as deployOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as stateOptions, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as parseAssumeRoleToken, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as normalizeStartApiAssumeRole, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as guardStackRegionOptions, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kn as parseStateKey, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as regionOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as effectiveAssumeRoleArn, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as diffUpdatePolicyOptions, nt as stackMatchesPattern, o as resolveLambdaTarget, on as noLocalCustomResourcesOption, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as useCdkBootstrapAssetsOption, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as exclusivelyOption, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseContextOptions, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as destroyOptions, tt as selectTargetStack, u as assetPathDirs, un as skipFinalSnapshotOption, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as parseDuration, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as STATE_FILE_SUFFIX, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as cliArgParser, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as resourceTimeoutOptions, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-DY6zCoEm.js";
3
+ import { A as assertRegionMatch, Bt as resourceTypeShown, H as remedyLogicalId, Kt as maskDeep, N as VALUE_NOT_SHOWN, O as DriftReadRefusedError, Rt as logicalIdShown, Sn as injectiveKey, St as isInterruptedWaitError, Tn as producerRecordKey, Tt as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, W as isMarkedNotGone, _n as DEFAULT_STATE_PREFIX, bn as setPasteableAwsProfile, bt as endCommandInterruptScope, cn as buildForceUnlockCommand, ct as runDeleteAttempt, dn as formatLockExpiry, fn as formatLockOperation, gn as CUSTOM_RESOURCE_RESPONSE_PREFIX, ht as isAwsCliLiteral, i as withResourceDeadline, jt as readRecordedPrincipals, k as RESOURCE_NOT_FOUND, ln as buildLockContentionMessage, pn as formatLockOwner, sn as UNREPRODUCIBLE_LOCK_CLAUSE, un as forceQuitRecoveryClause, vn as WAIT_CONDITION_SIGNAL_PREFIX, vt as renderDisableCommand, wn as producerCoordinateKey, wt as IAM_PRINCIPAL_NAME, xn as withPasteableAwsProfile, xt as interruptWatchListenerCount, yn as setPasteableAwsCaBundle, yt as beginCommandInterruptScope } from "./resource-deadline-BMqm6ibe.js";
4
4
  import { a as runWithStackAwsClients, i as resetAwsClients, l as s3ClientDefaults, o as setAwsClients, s as resolveS3ClientDefaults, t as AwsClients, u as setS3ClientDefaultsDebugLog } from "./aws-clients-DOkPjjAW.js";
5
- import { $ as withStackScope, A as configStringRefusal, B as generateResourceName, E as coerceCfnBoolean, F as requireConfigString, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, f as isAwsAuthoredFailure, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-KcU9IK83.js";
6
- import { A as stripControlChars, B as retryClassificationText, F as isAmbiguousOutcomeError, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, V as THROTTLING_ERROR_NAMES, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, ct as SynthesisError, et as CdkdError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, n as ambientCredentialConfig, o as formatError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, rt as LocalInvokeBuildError$1, s as handleError, st as StateError, t as ambientClientDefaults, tt as DeployCancelledError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isTransientServerError } from "./ambient-client-defaults-XQF39qQj.js";
5
+ import { $ as withStackScope, A as configStringRefusal, B as generateResourceName, E as coerceCfnBoolean, F as requireConfigString, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, f as isAwsAuthoredFailure, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-jgRUiSfe.js";
6
+ import { A as stripControlChars, B as retryClassificationText, F as isAmbiguousOutcomeError, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, V as THROTTLING_ERROR_NAMES, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, ct as SynthesisError, et as CdkdError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, n as ambientCredentialConfig, o as formatError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, rt as LocalInvokeBuildError$1, s as handleError, st as StateError, t as ambientClientDefaults, tt as DeployCancelledError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isTransientServerError } from "./ambient-client-defaults-DDfUN9ef.js";
7
7
  import { a as getAssumedRoleCredentials, c as setAssumedRoleCredentials, h as formatAuthority, l as setAwsEndpointOverrideSource, m as runInStackAwsScope, n as awsClientDefaults, r as awsEndpointOverrideActive, s as runWithRealAws } from "./aws-client-defaults-DAebi99J.js";
8
- import { $ as MIGRATE_TMP_PREFIX, A as formatDockerLoginError, B as resolveApp, C as redactDockerArgvValues, D as warnFinchArgvExposure, E as partitionSensitiveEnv, F as Synthesizer, G as resolveStateBucketWithDefaultAndSource, H as resolveCaptureObservedState, I as synthesisStatusMessage, J as resolveUseCdkBootstrapAssets, K as resolveStateBucketWithSource, L as getDefaultStateBucketName, M as runDockerForeground, N as runDockerStreaming, O as isDockerClientEnvKey, P as abortInFlightMultipartUploads, Q as CFN_TEMPLATE_URL_LIMIT, R as getLegacyStateBucketName, S as redactedDockerCause, T as finchSecretArgvRefusal, U as resolveSkipPrefix, V as resolveAutoAssetStorage, W as resolveStateBucketWithDefault, X as warnDeprecatedNoPrefixCliFlag, Y as stateBucketExistenceConfirmed, Z as CFN_TEMPLATE_BODY_LIMIT, _ as resolveDockerContextDirectory, at as bindLegacyStackAssetParameters, b as describeDockerFailure, ct as predictedAutoCreatedAssetMode, d as DagBuilder, dt as processStackMessages, et as findLargeInlineResources, f as LockManager, ft as setChildProcessAwsEnv, g as buildDockerImage, h as WorkGraph, i as mergeDeclaredEntries, it as StageLoadError, j as getDockerCmd, k as isMalformedEnvKey, l as DiffCalculator, lt as prepareLegacyStackAssets, m as AssetPublisher, n as declaredStringList, nt as refuseFailedLookups, ot as createLegacyAssetParameterBinder, p as isLockInfoExpired, q as resolveUpdatePolicy, r as inlinePoliciesAreDeclared, rt as AssemblyReader, s as stringListIsDeclared, st as legacyPlanAssetCount, t as declaredInlinePolicies, tt as uploadCfnTemplate, u as LEGACY_HANDLE_HEAL_REASON, ut as CdkToolkitBucketMissingError, w as dockerSpawnEnvWithSensitive, x as redactedCause, y as describeDockerExecFailure, z as loadCdkJson } from "./settle-own-write-members-DMLYghh3.js";
9
- import { $a as secretNamePrintingBags, $c as secretSegmentsOfState, $d as hasPlainPrototype, $i as computeParameterTaint, $l as malformedExportNamesWarning, $n as deleteJournaledOrphans, $o as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, $r as canonicalizeIpProtocolValue, $u as crossPrefixDeniedWarning, A as diffSecurity, Ac as withSharedDrainBudget, Ad as rewriteTemplateAssetReferences, Ai as recordUnderIdIsNotOwn, Al as refuseMalformedResourceEntries, An as removeSignalReceiverNamed, Ar as isPairableType, As as isAlwaysLiveAttribute, Ba as yellow, Bd as buildDenyExternalAccessPolicy, Bi as segmentCleanupOptions, Bn as NESTED_PENDING_PARENT_REASON, Br as recordedRuleIdOf, Bs as explicitRoleArnOrThrow, C as slashedSsmNameHealNote, Ca as isSupersededResourceRecord, Cc as withoutVersionAttestation, Cd as createLazyAssetModeContext, Ci as planRollback, Cl as unreadableOrphanRecords, Cn as refactorMarkerMovesOf, Co as destroyStackRecordsView, Cr as movedToHint, Cs as deleteSkipReason, Cu as displayLogicalId, D as deferredServiceTokenWarning, Da as supersededHolderOf, Dc as isNamelessDynamicReferenceError, Dd as loadPublishableAssetManifest, Di as isReplacementOrphan, Dl as malformedResourceEntriesWarning, Dn as updateRefactorMarker, Do as withStackRecords, Dr as changedReferencePath, Du as findHandledUnwrittenCreateOnly, E as inRunStackKey, Ea as supersededHeldByOtherTypeWarning, Ec as carriesFetchableDynamicReference, Ei as isJournaledOrphan, El as malformedLocalResourcesWarning, En as sameMove, Er as changedReferenceInDiff, Es as isWaitAbandonedError, Eu as findActionableSdkUnwired, F as perType, Fa as bold, Fi as readsRegeneratingSecret, Fl as refuseMalformedResourceEntriesForOrphan, Fn as readsOnlyNoEchoParameters, Fo as lambdaPermissionMatchesDeclared, Fr as proposeRenames, Fs as producerLookupOver, Fu as PROPERTY_COVERAGE_BY_TYPE, Ga as withAttemptedItemsMasked, Gc as renderStatefulReason, Gd as readBootstrapMarkerBody, Gi as nameGenerationHighWaterOf, Gl as repairMalformedResourcePropertiesForReadOnly, Gn as nestedChildStackName$1, Go as ProviderRegistry, Gs as applyCallerIdentityCredentials, Ha as noEchoComparisonForTemplate, Hc as MULTI_REGION_RECREATE_BLOCKED_TYPES, Hd as isCrossRegionRedirect, Hi as removeProtectionTypes, Hl as refuseMalformedResourcePropertiesForDrift, Hn as displacedPhysicalIdShown, Hr as sgSiblingDecidedById, Hs as parseIamRoleArn, Hu as TemplateParser, I as readProtection, Ia as cyan, Il as repairMalformedResourceEntriesForReadOnly, Io as memberReadFailure, Ir as referencedLogicalIds, Is as refuseUnreadableCdkCrossAccountRefs, J as streamPolicyMatchesDeclared, Ja as journaledOrphanPrintingBag, Jd as BOOTSTRAP_MARKER_PREFIX, Ji as retiredNameGenerationsAfter, Jl as malformedOrphansRefusalMessage, Jn as revertedNestedRowIds, Jo as wouldReturnToSdkProvider, Jr as recordedSgRuleId, Js as classifyRecordedSecretRegion, Ju as hasUnverifiableParameterRefusal, Ka as createReadOnlyAttributeHealerFactory, Kd as validateAssetBucketName, Ki as nameScopeOf, Kl as UNREADABLE_ORPHANS_CONTAINER_ROW, Kn as recordDisplacedSkips, Ko as ccBrokenReason, Ks as callerEnvCredentials, Ku as readOnlyStateVersionOf, La as gray, Li as isRedactedRecordedValue, Ll as unreadableResourceEntries, Ln as formatResourceLine, Lo as policyDocumentMatchesDeclared, Lr as siblingOwnedRevertDesired, Ls as applyRoleArnIfSet, Lu as providerReplacementOldDeleted, M as recordedProtectionNote, Ma as resolveReplacementOldType, Mc as INTRINSIC_KEYS, Md as getDockerImageBySourceHash, Mi as IMPLICIT_DELETE_DEPENDENCIES, Ml as refuseMalformedResourceEntriesForDestroy, Mo as declaredMemberDocument, Mr as mappingPairs, Ms as stackIdTailOf, N as PROTECTION_PROPERTY_BY_TYPE, Na as withPreviousPolicies, Ni as computeImplicitDeleteEdges, Nl as refuseMalformedResourceEntriesForImport, Nn as childStackTags, No as declaredPolicyDocument, Nr as parseMappingFile, Nt as tagsMatchDeclared, Nu as NO_CC_HANDLERS_REASON, O as findServiceTokenRefusals, Oa as supersededResourcesOf, Oc as carriesDynamicReference, Oi as planFailedOps, Ol as malformedScrubResourceEntriesRefusalMessage, On as deleteSignalReceiver, Or as changedReferenceReason, Os as IntrinsicFunctionResolver, P as isProtectionValueActive, Pa as findNestedStackTypeChanges, Pi as attemptUsesCompletedCreate, Pl as refuseMalformedResourceEntriesForImportSave, Pn as macWriteOnlyKeys, Po as efsPolicyMatchesDeclared, Pr as propertiesChangedReason, Ps as resolveDynamicReferences, Pu as hasNoCloudControlHandlers, Qa as secretNamePrintingBag, Qc as secretPhysicalIdSegment, Qd as hasOwnKey, Qi as inheritProducerRegions, Ql as repairMalformedOrphansForReadOnly, Qn as withNestedStackContext, Qo as isSignalKey, Qr as canonicalizeIpv4Cidr, Qs as isUnexposedRecordedIdentity, Qu as applyCrossPrefixScan, Ra as green, Rd as AssetModeResolver, Rl as malformedDriftResourcePropertiesWarning, Rn as pendingRequestCount, Ro as reReadUntilSettled, Rr as stripSiblingOwnedParentMembers, Rs as assertFlagRoleArn, S as slashedSsmNameHealAdoptedNote, Sa as holdsSupersededResources, Sd as createAssetRedirectResolver, Sl as unpreviewableOrphanRecords, Sn as readRefactorMarkerOnce, Sr as hintSidesOf, Ss as deleteLeftInPlace, Su as UNREADABLE_RESOURCES_MAP_ROW, T as scanActiveConsumers, Ta as supersededDependentsFirst, Tc as isImpossibleEmptyStoredAttribute, Ti as demoteSupersededOrphans, Tl as malformedLocalResourceEntriesWarning, Tn as refuseRefactorMarker, To as revertStackRecordsView, Tr as withMovedTo, Ts as getReadOnlyPropertyPaths, Tu as hasReadableResources, U as readStreamPolicy, Ua as noEchoExactEchoLeavesOf, Uc as isStatefulRecreateTargetForReplace, Ud as getBootstrapMarkerKey, Ui as orphanNeedsIdentity, Ul as refuseMalformedResourcePropertiesForExport, Un as dropSettledNestedJournals, Us as sendableAssumeRoleCommand, Uu as S3StateBackend, Va as noEchoAttributeNamesOf, Vc as shownType, Vd as assertAssetBucketRegion, Vi as removeProtectionTypeList, Vl as refuseMalformedResourcePropertiesForDestroy, Vn as displacedOpClause, Vo as verbatimEchoDriftKeys, Vr as sgRuleOwnershipIdentity, Vs as isIamRoleArn, Wa as noEchoParameterNamesOf, Wc as isStatefulRecreateTargetSync, Wd as parseBootstrapMarker, Wi as nameGenerationCarriedFrom, Wl as refuseMalformedResourcePropertiesForOrphan, Wo as CC_BROKEN_REASON, Wr as siblingRecordedSgRuleIds, Ws as AWS_CREDENTIAL_ENV_KEYS, Wu as splitImportedOps, Xa as namingSecretsWithRecordedNoEcho, Xc as displayPhysicalId, Xi as withNameGenerationReached, Xl as refuseMalformedOrphans, Xn as collectNestedChildUnaddressed, Xo as classifyHandleUrl, Xr as sgProtocolKey, Xs as producerRegionsFromState, Xu as CrossPrefixReadError, Ya as maskEventTextWithBoundBags, Yi as retiredNameGenerationsLeaving, Yl as malformedOrphansWarning, Yn as withNestedRevertRun, Yo as WaitConditionSignalStore, Yr as sgCidrKey, Ys as classifyReplaySecretRegion, Yu as rebuildClientForBucketRegion, Za as orphanRecordsPrintingBag, Zd as defineOwnKey, Zl as refuseMalformedOrphansForDestroy, Zn as getCurrentNestedStackContext, Zs as regionLessSecretName, Zu as CrossPrefixScanCache, _ as hasPendingMovesOut, _a as bindingSkippedOutputs, _i as replacementCreateRoutesToCloudControl, _l as previewableOrphanRecords, _r as noEchoValueMacsOf, _s as CloudControlProvider, _u as repairMalformedResourcesForReadOnly, a as mergeNoChangeOutputs, aa as exportAliasCollisionScrubWarning, ac as isUnboundTemplateParameter, ad as isSensitiveAttributeName, af as displayAssemblyPath, ai as earlyDeletedOld, al as maskedPropertyFingerprintsOf, ao as extractDeploymentEventError, ar as sameJournaledOrphans, as as isCustomResourceType$1, au as refuseMalformedOutputs, b as refusePendingMovesOut, ba as maskingRetryLogger, bc as recordedReferenceRegions, bl as refuseMalformedOrphansForOrphan, bn as recordRetainedForReadoption, br as formatDestructiveChange, bs as UNSPECIFIED_SKIP_REASON, bu as withheldAccountClause, c as nestedSsmNameRowNote, ca as secretSafeKeyDisplay, cc as cfnRefValueFromPhysicalId, cd as findNestedTemplateTreeDefect, cf as resolveAssemblyPath, ci as settleUnsettledPrevious, cl as maskedInputProof, co as ccRoutedFinalSnapshotError, cr as planOrphanAdoption, cs as NO_LOCAL_CUSTOM_RESOURCES_FLAG, cu as STATE_REGION_DIVERGED, d as makeCanonicalizePropertiesFn, da as exportNameSecretExposure, dc as lacksRecordedRefArn, dd as renderNestedTemplateTreeDefect, di as equalModuloMarkedMask, dl as maskedPropertyFingerprint, do as isFinalSnapshotError, dr as crossStackReadsForPartialSave, ds as customResourcesRunWithoutApp, du as malformedResourcesWarning, ea as namesAnyDeclaredParameter, ed as isAccessDenied, ef as nullPrototypeRecord, ei as replayFailedOperations, el as withSecretPhysicalIdsMaskedInState, er as dropFailedCommands, es as applyCustomResourceResponseExpiration, eu as malformedExportSourceWarning, f as conditionFingerprint, fa as isWholeDynamicReferenceValue, fc as lacksRecordedTableArn, fd as templateIdentity, fi as equalModuloMask, fl as deployRefusesOrphanRowsReason, fo as refusesFinalSnapshot, fr as NOECHO_MAC_KEY_ALIAS, fs as localCustomResourceCommand, fu as malformedStateRefusalMessage, g as childTemplateLoader, ga as isExportAliasCollision, gc as keepHeldTokenProvenance, gd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, gi as findUpdatePolicyReplacementRefusals, gl as malformedOrphanRowsKeptWarning, gr as noEchoMacVerdict, gu as refuseMalformedState, h as readRecordedConditionVerdicts, ha as collectPublishedOutputNames, hd as ssmResolvedValueType, hi as updatePartialReason, hl as malformedOrphanRecordsWarning, ho as buildFinalSnapshotIdentifier, hr as noEchoMacParametersOf, hs as withCustomResourceStack, hu as refuseMalformedResourcesForExport, i as keptWholeReasonText, ia as displayTextOrWithheld, ic as coerceParameterTypedValue, id as isSecretValuedAttribute, if as describeFileReadFailure, ii as earlyDeleteWhen, io as storedSecretNameNeedles, ir as loadJournaledOrphans, is as readsNoEchoDeleteValues, j as recordedProtectionEvidence, ja as snapshotSegmentSurvivors, jd as AssetManifestLoader, ji as replacementNeverSwapped, jl as refuseMalformedResourceEntriesForDeploy, jn as settleStackTagChildRuns, jr as looselyEqual, js as poisonRenderedSpellingsCollidingIn, k as serviceTokenBlockingReason, ka as withoutSuperseded, kc as keepsSecretReferenceToken, ki as recheckFailedPlan, kl as refuseMalformedResourceAttributesForOrphan, kn as isReceiver, ko as LAMBDA_PERMISSION_STATEMENT_KEYS, kr as differingRemedy, ks as isSelectOutOfBounds, kt as declaredTagsReadback, ku as unwrittenCreateOnlyReplacement, l as crossStackOutputProvenanceSource, la as carriedExportAliasExposure, lc as isStalePlaceholderArnAttribute, ld as isAbsoluteAssetPath, li as withUnprovenUnsettled, lo as ccRoutedInstanceTakesNoSnapshot, lr as DeploymentEventsReader, lu as refuseDivergentRecordRegionForDestroy, m as parentSuppliedValues, ma as collectDeclaredOutputNames, mi as updatePartialMessage, ml as malformedOrphanRecordsRefusalMessage, mo as createPreDeleteFinalSnapshot, mr as noEchoMacBinding, ms as setLocalCustomResourceRuntimeEnabled, mu as refuseMalformedResourcesForDestroy, n as applyStackTagsToTemplate, na as resourcesNamingDeclaredParameter, nd as stackInstanceIdOf, ni as DELETED_RESOURCE_REMEDY, nl as getTopLevelKeysHoldingUnreadableCreateOnly, no as stackSecretNamesMasker, nr as isHandledOrphan, nu as malformedOutputsRefusalMessage, o as checkNestedSsmNames, oa as secretBearing, oc as parameterTypeMayLoseSecretIdentity, oi as buildReadCurrentStateContext, oo as ATOMIC_FINAL_SNAPSHOT_TYPES, or as makeForeignHolderScan, ou as refuseMalformedOutputsForDestroy, p as conditionInputsFrom, pa as noEchoParameterValueSeed, pi as undeclaredEmptyObservedKeys, pl as isReadableOrphanRecord, po as unsupportedFinalSnapshotError, pr as createNoEchoValueMacs, pu as refuseMalformedResourcesForDeploy, qa as completedReplayEntries, qd as validateContainerRepoName, qi as retiredAfterRollback, ql as hasReadableOrphans, qo as isCustomResource, qr as cfnIngressPortValue, qs as envCredentialsAreAssumedRole, qu as hasReasonlessBaselineRefusal, r as isSecretBearingReferenceString, ra as WITHHELD_NAME_DISPLAY, rd as withStackInstanceIdWithheld, ri as PLANNED_EARLY_DELETE_CONSEQUENCE, rl as tryGetTopLevelWriteOnlyProperties, ro as stateSecretNameNeedles, rr as journaledOrphanLines, rs as TemplateNoEchoReresolver, ru as malformedOutputsWarning, s as nestedSsmNameDeferredNote, sa as secretBearingStateKeyWarning, sc as AWS_NO_VALUE, sf as renderAssemblyPathEscape, si as recordAfterRollbackUpdate, sl as parameterInputsFor, so as PRE_DELETE_SNAPSHOT_TYPES, sr as makeSiblingClaimReader, ss as withPrintingSecrets, su as repairMalformedOutputsForReadOnly, t as DeployEngine, ta as reachableDivergentParameters, td as isNotImplemented, tf as ownValue, ti as replayRollback, tl as getSettledWriteOnlyPropertyPaths, to as secretNamedRecordNeedles, tr as dropFailedHint, ts as customResourceResponseExpirationWarning, tu as malformedLocalOutputsWarning, u as inheritedProvenanceForChildDiff, ua as exportNameNoEchoParameters, uc as refStateLookupFromResource, ud as listNestedTemplateRows, uf as resolveBucketRegion, ui as calculateResourceDrift, ul as declaresNoEcho, uo as effectiveDeletionPolicy, ur as DeploymentEventsStore, us as customResourcesFailedWithoutApp, uu as malformedRenderedContainersWarning, v as pendingMovesOutOf, va as DEFAULT_RESOURCE_TIMEOUT_MS, vc as recordedOutputReferenceRegions, vd as decodeListingKey, vl as refuseMalformedOrphanRecords, vr as constructPathOf$1, vu as JSON_LISTING_HOLE_VALUE, w as slashedSsmNameHealPendingNote, wa as supersededAfterRollback, wc as getAccountInfo, wi as seedsDeleteFirstGuard, wl as isReadableResourceEntry, wn as refactorMarkerRefusalMessage, wr as rollbackOrphanIds, wu as hasReadableOutputs, x as healSlashedSsmParameterNames, xa as deleteSupersededEntry, xd as buildAssetRedirectMap, xi as withCreateTokenLedger, xl as repairMalformedOrphanRecordsForReadOnly, xn as readRefactorMarker, xr as findRefactorHints, xs as deleteIndeterminateGuards, xu as STATE_RESOURCES_MALFORMED, y as pendingMovesRefusalMessage, ya as DEFAULT_RESOURCE_WARN_AFTER_MS, yi as ledgerForStack, yl as refuseMalformedOrphanRecordsForDestroy, yn as keptForRetainedRecord, yr as findDestructiveChanges, ys as RollbackInlinePolicyWriters, yu as accountArgs, za as red, zc as findReplacedReadersOfRecreateTargets, zd as ensureAssetStorage, zl as malformedResourcePropertiesWarning, zn as resolvePendingCloudControlRequests, zr as undeclaredGrantSiblingMembers, zs as assertSendableRoleArn } from "./deploy-engine-DksIRiiT.js";
8
+ import { $ as MIGRATE_TMP_PREFIX, A as formatDockerLoginError, B as resolveApp, C as redactDockerArgvValues, D as warnFinchArgvExposure, E as partitionSensitiveEnv, F as Synthesizer, G as resolveStateBucketWithDefaultAndSource, H as resolveCaptureObservedState, I as synthesisStatusMessage, J as resolveUseCdkBootstrapAssets, K as resolveStateBucketWithSource, L as getDefaultStateBucketName, M as runDockerForeground, N as runDockerStreaming, O as isDockerClientEnvKey, P as abortInFlightMultipartUploads, Q as CFN_TEMPLATE_URL_LIMIT, R as getLegacyStateBucketName, S as redactedDockerCause, T as finchSecretArgvRefusal, U as resolveSkipPrefix, V as resolveAutoAssetStorage, W as resolveStateBucketWithDefault, X as warnDeprecatedNoPrefixCliFlag, Y as stateBucketExistenceConfirmed, Z as CFN_TEMPLATE_BODY_LIMIT, _ as resolveDockerContextDirectory, at as bindLegacyStackAssetParameters, b as describeDockerFailure, ct as predictedAutoCreatedAssetMode, d as DagBuilder, dt as processStackMessages, et as findLargeInlineResources, f as LockManager, ft as setChildProcessAwsEnv, g as buildDockerImage, h as WorkGraph, i as mergeDeclaredEntries, it as StageLoadError, j as getDockerCmd, k as isMalformedEnvKey, l as DiffCalculator, lt as prepareLegacyStackAssets, m as AssetPublisher, n as declaredStringList, nt as refuseFailedLookups, ot as createLegacyAssetParameterBinder, p as isLockInfoExpired, q as resolveUpdatePolicy, r as inlinePoliciesAreDeclared, rt as AssemblyReader, s as stringListIsDeclared, st as legacyPlanAssetCount, t as declaredInlinePolicies, tt as uploadCfnTemplate, u as LEGACY_HANDLE_HEAL_REASON, ut as CdkToolkitBucketMissingError, w as dockerSpawnEnvWithSensitive, x as redactedCause, y as describeDockerExecFailure, z as loadCdkJson } from "./settle-own-write-members-j5nZLuDh.js";
9
+ import { $a as orphanRecordsPrintingBag, $c as displayPhysicalId, $l as refuseMalformedOrphans, $n as getCurrentNestedStackContext, $s as producerRegionsFromState, $u as CrossPrefixReadError, A as diffSecurity, Aa as supersededResourcesOf, Ac as isNamelessDynamicReferenceError, Ad as loadPublishableAssetManifest, Ai as planFailedOps, Al as malformedResourceEntriesWarning, An as removeSignalReceiverNamed, Ar as changedReferenceReason, As as IntrinsicFunctionResolver, Au as findHandledUnwrittenCreateOnly, Ba as green, Bl as unreadableResourceEntries, Bn as pendingRequestCount, Bo as reReadUntilSettled, Br as stripSiblingOwnedParentMembers, Bs as applyRoleArnIfSet, Bu as providerReplacementOldDeleted, C as slashedSsmNameHealNote, Ca as deleteSupersededEntry, Cc as recordedReferenceRegions, Ci as withCreateTokenLedger, Cl as refuseMalformedOrphansForOrphan, Cn as refactorMarkerMovesOf, Cr as findRefactorHints, Cs as deleteIndeterminateGuards, Cu as withheldAccountClause, D as deferredServiceTokenWarning, Da as supersededDependentsFirst, Dc as getAccountInfo, Di as demoteSupersededOrphans, Dl as isReadableResourceEntry, Dn as updateRefactorMarker, Do as revertStackRecordsView, Dr as withMovedTo, Ds as getReadOnlyPropertyPaths, Du as hasReadableOutputs, E as inRunStackKey, Ea as supersededAfterRollback, Ec as withoutVersionAttestation, Ed as createLazyAssetModeContext, Ei as seedsDeleteFirstGuard, El as unreadableOrphanRecords, En as sameMove, Er as rollbackOrphanIds, Eu as displayLogicalId, F as perType, Fa as withPreviousPolicies, Fc as INTRINSIC_KEYS, Fd as getDockerImageBySourceHash, Fi as computeImplicitDeleteEdges, Fl as refuseMalformedResourceEntriesForDestroy, Fn as macWriteOnlyKeys, Fo as declaredPolicyDocument, Fr as parseMappingFile, Ga as noEchoExactEchoLeavesOf, Gc as MULTI_REGION_RECREATE_BLOCKED_TYPES, Gd as isCrossRegionRedirect, Gi as orphanNeedsIdentity, Gl as refuseMalformedResourcePropertiesForDrift, Gn as dropSettledNestedJournals, Gs as parseIamRoleArn, Gu as TemplateParser, Ha as yellow, Hc as findReplacedReadersOfRecreateTargets, Hd as ensureAssetStorage, Hi as segmentCleanupOptions, Hl as malformedResourcePropertiesWarning, Hn as NESTED_PENDING_PARENT_REASON, Hr as recordedRuleIdOf, Hs as assertSendableRoleArn, I as readProtection, Ia as findNestedStackTypeChanges, Ii as attemptUsesCompletedCreate, Il as refuseMalformedResourceEntriesForImport, In as readsOnlyNoEchoParameters, Io as efsPolicyMatchesDeclared, Ir as propertiesChangedReason, Iu as NO_CC_HANDLERS_REASON, J as streamPolicyMatchesDeclared, Ja as createReadOnlyAttributeHealerFactory, Jc as renderStatefulReason, Jd as readBootstrapMarkerBody, Ji as nameScopeOf, Jl as repairMalformedResourcePropertiesForReadOnly, Jn as recordDisplacedSkips, Jo as ccBrokenReason, Js as applyCallerIdentityCredentials, Ka as noEchoParameterNamesOf, Kc as isStatefulRecreateTargetForReplace, Kd as getBootstrapMarkerKey, Ki as nameGenerationCarriedFrom, Kl as refuseMalformedResourcePropertiesForExport, Ko as CC_BROKEN_REASON, Kr as siblingRecordedSgRuleIds, Ks as sendableAssumeRoleCommand, Ku as S3StateBackend, La as bold, Li as readsRegeneratingSecret, Ll as refuseMalformedResourceEntriesForImportSave, Lo as lambdaPermissionMatchesDeclared, Lr as proposeRenames, Ls as resolveDynamicReferences, Lu as hasNoCloudControlHandlers, M as recordedProtectionNote, Mc as keepsSecretReferenceToken, Mi as recordUnderIdIsNotOwn, Ml as refuseMalformedResourceAttributesForOrphan, Mr as isPairableType, Ms as isAlwaysLiveAttribute, Mu as unwrittenCreateOnlyReplacement, N as PROTECTION_PROPERTY_BY_TYPE, Na as snapshotSegmentSurvivors, Nc as withSharedDrainBudget, Nd as rewriteTemplateAssetReferences, Ni as replacementNeverSwapped, Nl as refuseMalformedResourceEntries, Nn as childStackTags, Nr as looselyEqual, Ns as poisonRenderedSpellingsCollidingIn, Nt as tagsMatchDeclared, O as findServiceTokenRefusals, Oa as supersededHeldByOtherTypeWarning, Oc as isImpossibleEmptyStoredAttribute, Oi as isJournaledOrphan, Ol as malformedLocalResourceEntriesWarning, On as deleteSignalReceiver, Or as changedReferenceInDiff, Os as isWaitAbandonedError, Ou as hasReadableResources, P as isProtectionValueActive, Pa as resolveReplacementOldType, Pd as AssetManifestLoader, Pi as IMPLICIT_DELETE_DEPENDENCIES, Pl as refuseMalformedResourceEntriesForDeploy, Pn as literalRowTags, Po as declaredMemberDocument, Pr as mappingPairs, Ps as stackIdTailOf, Qa as namingSecretsWithRecordedNoEcho, Qi as withNameGenerationReached, Ql as malformedOrphansWarning, Qn as collectNestedChildUnaddressed, Qo as classifyHandleUrl, Qr as sgProtocolKey, Qs as classifyReplaySecretRegion, Qu as rebuildClientForBucketRegion, Ra as cyan, Rl as refuseMalformedResourceEntriesForOrphan, Rn as formatResourceLine, Ro as memberReadFailure, Rr as referencedLogicalIds, Rs as producerLookupOver, Ru as PROPERTY_COVERAGE_BY_TYPE, S as slashedSsmNameHealAdoptedNote, Sa as maskingRetryLogger, Sl as refuseMalformedOrphanRecordsForDestroy, Sn as readRefactorMarkerOnce, Sr as formatDestructiveChange, Ss as UNSPECIFIED_SKIP_REASON, Su as accountArgs, T as scanActiveConsumers, Ta as isSupersededResourceRecord, Td as createAssetRedirectResolver, Ti as planRollback, Tl as unpreviewableOrphanRecords, Tn as refuseRefactorMarker, To as destroyStackRecordsView, Tr as movedToHint, Ts as deleteSkipReason, Tu as UNREADABLE_RESOURCES_MAP_ROW, U as readStreamPolicy, Ua as noEchoAttributeNamesOf, Ud as buildDenyExternalAccessPolicy, Ui as removeProtectionTypeList, Un as displacedOpClause, Uo as verbatimEchoDriftKeys, Ur as sgRuleOwnershipIdentity, Us as explicitRoleArnOrThrow, Va as red, Vd as AssetModeResolver, Vl as malformedDriftResourcePropertiesWarning, Vn as resolvePendingCloudControlRequests, Vr as undeclaredGrantSiblingMembers, Vs as assertFlagRoleArn, Wa as noEchoComparisonForTemplate, Wc as shownType, Wd as assertAssetBucketRegion, Wi as removeProtectionTypes, Wl as refuseMalformedResourcePropertiesForDestroy, Wn as displacedPhysicalIdShown, Wr as sgSiblingDecidedById, Ws as isIamRoleArn, Xa as journaledOrphanPrintingBag, Xd as validateContainerRepoName, Xi as retiredNameGenerationsAfter, Xl as hasReadableOrphans, Xn as revertedNestedRowIds, Xo as wouldReturnToSdkProvider, Xr as recordedSgRuleId, Xs as envCredentialsAreAssumedRole, Xu as hasReasonlessBaselineRefusal, Ya as completedReplayEntries, Yd as validateAssetBucketName, Yi as retiredAfterRollback, Yl as UNREADABLE_ORPHANS_CONTAINER_ROW, Yo as isCustomResource, Yr as cfnIngressPortValue, Ys as callerEnvCredentials, Yu as readOnlyStateVersionOf, Za as maskEventTextWithBoundBags, Zd as BOOTSTRAP_MARKER_PREFIX, Zi as retiredNameGenerationsLeaving, Zl as malformedOrphansRefusalMessage, Zn as withNestedRevertRun, Zo as WaitConditionSignalStore, Zr as sgCidrKey, Zs as classifyRecordedSecretRegion, Zu as hasUnverifiableParameterRefusal, _ as hasPendingMovesOut, _a as collectPublishedOutputNames, _i as updatePartialReason, _l as malformedOrphanRecordsRefusalMessage, _o as buildFinalSnapshotIdentifier, _r as noEchoMacParametersOf, _s as withCustomResourceStack, _u as refuseMalformedResourcesForDestroy, a as mergeNoChangeOutputs, aa as WITHHELD_NAME_DISPLAY, ad as stackInstanceIdOf, ai as PLANNED_EARLY_DELETE_CONSEQUENCE, al as getTopLevelKeysHoldingUnreadableCreateOnly, ao as stateSecretNameNeedles, ar as journaledOrphanLines, as as TemplateNoEchoReresolver, au as malformedOutputsRefusalMessage, b as refusePendingMovesOut, ba as DEFAULT_RESOURCE_TIMEOUT_MS, bl as previewableOrphanRecords, bn as recordRetainedForReadoption, br as constructPathOf$1, bu as repairMalformedResourcesForReadOnly, c as nestedSsmNameRowNote, ca as secretBearing, cc as isUnboundTemplateParameter, cd as isSensitiveAttributeName, cf as displayAssemblyPath, ci as buildReadCurrentStateContext, cl as maskedPropertyFingerprintsOf, co as ATOMIC_FINAL_SNAPSHOT_TYPES, cr as makeForeignHolderScan, cu as refuseMalformedOutputs, d as makeCanonicalizePropertiesFn, da as carriedExportAliasExposure, dc as cfnRefValueFromPhysicalId, dd as findNestedTemplateTreeDefect, df as resolveAssemblyPath, di as withUnprovenUnsettled, dl as maskedInputProof, do as ccRoutedInstanceTakesNoSnapshot, dr as DeploymentEventsReader, du as STATE_REGION_DIVERGED, ea as inheritProducerRegions, ec as regionLessSecretName, ed as CrossPrefixScanCache, ef as defineOwnKey, ei as canonicalizeIpv4Cidr, eo as secretNamePrintingBag, er as withNestedStackContext, es as isSignalKey, eu as refuseMalformedOrphansForDestroy, f as conditionFingerprint, fa as exportNameNoEchoParameters, fc as isStalePlaceholderArnAttribute, fd as isAbsoluteAssetPath, fi as calculateResourceDrift, fo as effectiveDeletionPolicy, fr as DeploymentEventsStore, fs as customResourcesFailedWithoutApp, fu as refuseDivergentRecordRegionForDestroy, g as childTemplateLoader, ga as collectDeclaredOutputNames, gi as updatePartialMessage, gl as isReadableOrphanRecord, go as createPreDeleteFinalSnapshot, gr as noEchoMacBinding, gs as setLocalCustomResourceRuntimeEnabled, gu as refuseMalformedResourcesForDeploy, h as readRecordedConditionVerdicts, ha as noEchoParameterValueSeed, hc as lacksRecordedTableArn, hd as templateIdentity, hi as undeclaredEmptyObservedKeys, hl as deployRefusesOrphanRowsReason, ho as unsupportedFinalSnapshotError, hr as createNoEchoValueMacs, hu as malformedStateRefusalMessage, i as keptWholeReasonText, ia as resourcesNamingDeclaredParameter, id as isNotImplemented, if as ownValue, ii as DELETED_RESOURCE_REMEDY, il as getSettledWriteOnlyPropertyPaths, io as stackSecretNamesMasker, ir as isHandledOrphan, iu as malformedLocalOutputsWarning, j as recordedProtectionEvidence, ja as withoutSuperseded, jc as carriesDynamicReference, ji as recheckFailedPlan, jl as malformedScrubResourceEntriesRefusalMessage, jn as settleStackTagChildRuns, jo as LAMBDA_PERMISSION_STATEMENT_KEYS, jr as differingRemedy, js as isSelectOutOfBounds, k as serviceTokenBlockingReason, ka as supersededHolderOf, kc as carriesFetchableDynamicReference, ki as isReplacementOrphan, kl as malformedLocalResourcesWarning, kn as isReceiver, ko as withStackRecords, kr as changedReferencePath, kt as declaredTagsReadback, ku as findActionableSdkUnwired, l as crossStackOutputProvenanceSource, la as secretBearingStateKeyWarning, lc as parameterTypeMayLoseSecretIdentity, li as recordAfterRollbackUpdate, lo as PRE_DELETE_SNAPSHOT_TYPES, lr as makeSiblingClaimReader, ls as withPrintingSecrets, lu as refuseMalformedOutputsForDestroy, m as parentSuppliedValues, ma as isWholeDynamicReferenceValue, mc as lacksRecordedRefArn, md as renderNestedTemplateTreeDefect, mi as equalModuloMask, ml as maskedPropertyFingerprint, mo as refusesFinalSnapshot, mr as NOECHO_MAC_KEY_ALIAS, ms as localCustomResourceCommand, mu as malformedResourcesWarning, n as applyStackTagsToTemplate, na as namesAnyDeclaredParameter, nd as crossPrefixDeniedWarning, nf as hasPlainPrototype, ni as replayFailedOperations, nl as secretSegmentsOfState, nr as dropFailedCommands, ns as applyCustomResourceResponseExpiration, nu as malformedExportNamesWarning, o as checkNestedSsmNames, oa as displayTextOrWithheld, od as withStackInstanceIdWithheld, oi as earlyDeleteWhen, ol as tryGetTopLevelWriteOnlyProperties, oo as storedSecretNameNeedles, or as loadJournaledOrphans, os as readsNoEchoDeleteValues, ou as malformedOutputsWarning, p as conditionInputsFrom, pa as exportNameSecretExposure, pc as refStateLookupFromResource, pd as listNestedTemplateRows, pf as resolveBucketRegion, pi as equalModuloMarkedMask, pl as declaresNoEcho, po as isFinalSnapshotError, pr as crossStackReadsForPartialSave, ps as customResourcesRunWithoutApp, pu as malformedRenderedContainersWarning, qa as withAttemptedItemsMasked, qc as isStatefulRecreateTargetSync, qd as parseBootstrapMarker, qi as nameGenerationHighWaterOf, ql as refuseMalformedResourcePropertiesForOrphan, qn as nestedChildStackName$1, qo as ProviderRegistry, qs as AWS_CREDENTIAL_ENV_KEYS, qu as splitImportedOps, r as isSecretBearingReferenceString, ra as reachableDivergentParameters, rd as isAccessDenied, rf as nullPrototypeRecord, ri as replayRollback, rl as withSecretPhysicalIdsMaskedInState, ro as secretNamedRecordNeedles, rr as dropFailedHint, rs as customResourceResponseExpirationWarning, ru as malformedExportSourceWarning, s as nestedSsmNameDeferredNote, sa as exportAliasCollisionScrubWarning, sc as coerceParameterTypedValue, sd as isSecretValuedAttribute, sf as describeFileReadFailure, si as earlyDeletedOld, so as extractDeploymentEventError, sr as sameJournaledOrphans, ss as isCustomResourceType$1, t as DeployEngine, ta as computeParameterTaint, tc as isUnexposedRecordedIdentity, td as applyCrossPrefixScan, tf as hasOwnKey, ti as canonicalizeIpProtocolValue, tl as secretPhysicalIdSegment, to as secretNamePrintingBags, tr as deleteJournaledOrphans, ts as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, tu as repairMalformedOrphansForReadOnly, u as inheritedProvenanceForChildDiff, ua as secretSafeKeyDisplay, uc as AWS_NO_VALUE, uf as renderAssemblyPathEscape, ui as settleUnsettledPrevious, ul as parameterInputsFor, uo as ccRoutedFinalSnapshotError, ur as planOrphanAdoption, us as NO_LOCAL_CUSTOM_RESOURCES_FLAG, uu as repairMalformedOutputsForReadOnly, v as pendingMovesOutOf, va as isExportAliasCollision, vd as ssmResolvedValueType, vi as findUpdatePolicyReplacementRefusals, vl as malformedOrphanRecordsWarning, vr as noEchoMacVerdict, vu as refuseMalformedResourcesForExport, w as slashedSsmNameHealPendingNote, wa as holdsSupersededResources, wd as buildAssetRedirectMap, wl as repairMalformedOrphanRecordsForReadOnly, wn as refactorMarkerRefusalMessage, wr as hintSidesOf, ws as deleteLeftInPlace, wu as STATE_RESOURCES_MALFORMED, x as healSlashedSsmParameterNames, xa as DEFAULT_RESOURCE_WARN_AFTER_MS, xc as recordedOutputReferenceRegions, xd as decodeListingKey, xi as ledgerForStack, xl as refuseMalformedOrphanRecords, xn as readRefactorMarker, xr as findDestructiveChanges, xs as RollbackInlinePolicyWriters, xu as JSON_LISTING_HOLE_VALUE, y as pendingMovesRefusalMessage, ya as bindingSkippedOutputs, yc as keepHeldTokenProvenance, yd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, yi as replacementCreateRoutesToCloudControl, yl as malformedOrphanRowsKeptWarning, yn as keptForRetainedRecord, yr as noEchoValueMacsOf, ys as CloudControlProvider, yu as refuseMalformedState, za as gray, zi as isRedactedRecordedValue, zl as repairMalformedResourceEntriesForReadOnly, zn as startForceQuitFlushes, zo as policyDocumentMatchesDeclared, zr as siblingOwnedRevertDesired, zs as refuseUnreadableCdkCrossAccountRefs } from "./deploy-engine-yAKbnp7z.js";
10
10
  import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix, t as PARTITION_TABLE } from "./aws-partition-DA0r2sr-.js";
11
- import { B as PhaseClock, C as prefetchCreateOnlyPropertyPaths, E as describeTypeWithThrottleRetry, G as timePhase, M as withRetry, W as renderPhaseTimings, Y as parseFailureDebugDetail, Z as utf8ByteLength, l as setResolvedResourceTimeouts, q as describeJsonParseFailure, w as templateResourceTypes, x as getCreateOnlyPropertyPaths } from "./ec2-termination-protection-DOVV8kr6.js";
12
- import { t as expectedOwnerParam } from "./expected-bucket-owner-D5QfvmhW.js";
13
- import { Bt as describeRegionValueKind, Gt as isReadableBag, Ht as hasReadableExportSet, Jt as shouldRetainResource, Kt as orphansAfterRollback, Tt as differingIdentityWarning, Ut as importableOutputKeys, Vt as exportNamesCarriedFrom, Wt as importableOutputs, Xt as stackInstanceIdCarriedFrom, kt as slowCcOperationTimeoutMs, qt as orphansCarriedFrom, zt as acceptedCreateOnlyDropsOf } from "./delete-started-BdXPDSx0.js";
14
- import { An as recordMaskOnlyValuesIn, At as withPhysicalNameCopies, D as recordedNoEchoValuesOf, En as provenPublicValue, Ft as isUncertifiedBaselineMaskPosition, In as WHOLE_DYNAMIC_REFERENCE_PATTERN, It as keepTemplateLiteralLeaves, Mn as recordNoEchoParameterFreshValue, Nn as recordProvenPublicExpression, Nt as DYNAMIC_REFERENCE_TOKEN_SCAN, Pn as wholeStringLeavesOf, Pt as dynamicReferenceTokens, Rn as isSingleDynamicReferenceToken, Rt as spelledKeysOf, T as readsNoEchoSource, Vt as identityKeyFor, W as redactForState, Xt as inheritNestedStackParameterAssociations, _t as maskSecretsInError, at as literalSplitDelimitersOf, b as noEchoOutputsComparison, cn as physicalNameCopiesOf, ct as printingCorpusOf, dn as recordNestedStackParameterExpressions, dt as recordLogOnlyValue, et as carryLogOnlyValues, f as isMarkedCoordinate, ft as shareLogOnlyValues, g as maskedLeafCoordinatesOf, h as maskWholeValue, hn as carriesSecretMask, ht as errorCauseChain, it as hasMaskableValues, j as liveMatchesUnresolvedTokenFrame, jn as recordNoEchoAttributeValues, k as valueAtCoordinate, kn as recordMaskOnlyValue, kt as scrubResourceRecord, lt as recordLogOnlyParameterValue, m as maskReadbackAtCoordinates, mn as splitGetAttStringForm, mt as createSecretMasker, nt as createUnionSecretMasker, ot as logOnlyValueCount, p as maskAtCoordinates, pt as unionOfSecretBags, u as canonicalCoordinates, un as recordPhysicalNameCopy, v as noEchoCoordinatesOf, vt as maskSecretsInText, y as noEchoLeavesOf, zt as pathCrossesDottedKey } from "./replacement-rules-oI6WUksx.js";
15
- import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-B86BS38p.js";
16
- import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-TWqh2xnl.js";
11
+ import { B as PhaseClock, C as prefetchCreateOnlyPropertyPaths, E as describeTypeWithThrottleRetry, G as timePhase, M as withRetry, W as renderPhaseTimings, Y as parseFailureDebugDetail, Z as utf8ByteLength, l as setResolvedResourceTimeouts, q as describeJsonParseFailure, w as templateResourceTypes, x as getCreateOnlyPropertyPaths } from "./ec2-termination-protection-CZCRRUVl.js";
12
+ import { t as expectedOwnerParam } from "./expected-bucket-owner-JbnM6n0a.js";
13
+ import { Bt as describeRegionValueKind, Gt as isReadableBag, Ht as hasReadableExportSet, Jt as shouldRetainResource, Kt as orphansAfterRollback, Tt as differingIdentityWarning, Ut as importableOutputKeys, Vt as exportNamesCarriedFrom, Wt as importableOutputs, Xt as stackInstanceIdCarriedFrom, kt as slowCcOperationTimeoutMs, qt as orphansCarriedFrom, zt as acceptedCreateOnlyDropsOf } from "./delete-started-DqOOdnUC.js";
14
+ import { At as withPhysicalNameCopies, Bn as isSingleDynamicReferenceToken, Bt as pathCrossesDottedKey, D as recordedNoEchoValuesOf, Fn as recordProvenPublicExpression, Ft as dynamicReferenceTokens, Ht as identityKeyFor, In as wholeStringLeavesOf, It as isUncertifiedBaselineMaskPosition, Lt as keepTemplateLiteralLeaves, Mn as recordMaskOnlyValuesIn, Nn as recordNoEchoAttributeValues, Nt as DYNAMIC_REFERENCE_TOKEN_SCAN, On as provenPublicValue, Pn as recordNoEchoParameterFreshValue, Rn as WHOLE_DYNAMIC_REFERENCE_PATTERN, T as readsNoEchoSource, W as redactForState, Zt as inheritNestedStackParameterAssociations, _n as carriesSecretMask, _t as maskSecretsInError, at as literalSplitDelimitersOf, b as noEchoOutputsComparison, ct as printingCorpusOf, dn as recordPhysicalNameCopy, dt as recordLogOnlyValue, et as carryLogOnlyValues, f as isMarkedCoordinate, fn as recordNestedStackParameterExpressions, ft as shareLogOnlyValues, g as maskedLeafCoordinatesOf, gn as splitGetAttStringForm, h as maskWholeValue, ht as errorCauseChain, it as hasMaskableValues, j as liveMatchesUnresolvedTokenFrame, jn as recordMaskOnlyValue, k as valueAtCoordinate, kt as scrubResourceRecord, ln as physicalNameCopiesOf, lt as recordLogOnlyParameterValue, m as maskReadbackAtCoordinates, mt as createSecretMasker, nt as createUnionSecretMasker, ot as logOnlyValueCount, p as maskAtCoordinates, pt as unionOfSecretBags, u as canonicalCoordinates, v as noEchoCoordinatesOf, vt as maskSecretsInText, y as noEchoLeavesOf, zt as spelledKeysOf } from "./replacement-rules-CEpQXkfN.js";
15
+ import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-FtubmKcr.js";
16
+ import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-zOozEmKR.js";
17
17
  import { t as cdkdCacheHome } from "./cache-home-BVYKj3de.js";
18
18
  import { randomBytes, randomUUID } from "node:crypto";
19
19
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -1281,6 +1281,52 @@ function writeStackOutputsFile(path, outputs, options) {
1281
1281
  }
1282
1282
  }
1283
1283
 
1284
+ // src/cli/options/stack-tags.ts
1285
+ const stackTagsOption = new Option("-t, --tags <key=value>", "Tags to add to the stack (KEY=VALUE, can be specified multiple times), overriding the stack tags from the cloud assembly (StackProps.tags) for every selected stack. Deprecated in the AWS CDK CLI: set StackProps.tags instead. Also read from \"tags\" in cdk.json.").argParser(collectRepeated);
1286
+ function invalid(message) {
1287
+ return new CdkdError(message, "INVALID_TAGS");
1288
+ }
1289
+ function checkPair(key, value, source) {
1290
+ if (key === "" || value === "") throw invalid(`${source}: a tag needs a non-empty key and value (CloudFormation refuses an empty one), got ${displayIdent(`${key}=${value}`)}`);
1291
+ }
1292
+ function parseTagsArgs(args, warn) {
1293
+ if (args === void 0 || args.length === 0) return void 0;
1294
+ const tags = nullPrototypeRecord();
1295
+ if (args.every((arg) => arg === "")) return tags;
1296
+ let count = 0;
1297
+ for (const arg of args) {
1298
+ if (arg === "") continue;
1299
+ const eq = arg.indexOf("=");
1300
+ if (eq < 0) {
1301
+ warn(`Tags argument is not an assignment (key=value): ${displayIdent(arg)}`);
1302
+ continue;
1303
+ }
1304
+ const key = arg.slice(0, eq);
1305
+ const value = arg.slice(eq + 1);
1306
+ checkPair(key, value, "--tags");
1307
+ defineOwnKey(tags, key, value);
1308
+ count++;
1309
+ }
1310
+ return count > 0 ? tags : void 0;
1311
+ }
1312
+ function cdkJsonTags(configured) {
1313
+ if (configured === void 0) return void 0;
1314
+ if (!Array.isArray(configured)) throw invalid(`cdk.json "tags" must be a list of {"Key": ..., "Value": ...}, got: ${displayIdent(JSON.stringify(configured))}`);
1315
+ const tags = nullPrototypeRecord();
1316
+ for (const entry of configured) {
1317
+ const key = entry?.Key;
1318
+ const value = entry?.Value;
1319
+ if (typeof key !== "string" || typeof value !== "string") throw invalid(`cdk.json "tags" entries must be {"Key": string, "Value": string}, got: ${displayIdent(JSON.stringify(entry))}`);
1320
+ checkPair(key, value, "cdk.json \"tags\"");
1321
+ defineOwnKey(tags, key, value);
1322
+ }
1323
+ return configured.length > 0 ? tags : void 0;
1324
+ }
1325
+ function resolveStackTagsOverride(cliArgs, warn, cdkJson = loadCdkJson()) {
1326
+ const tags = parseTagsArgs(cliArgs, warn) ?? cdkJsonTags(cdkJson?.tags);
1327
+ return tags !== void 0 && Object.keys(tags).length > 0 ? tags : void 0;
1328
+ }
1329
+
1284
1330
  // src/utils/interrupt-signals.ts
1285
1331
  const postCleanupListeners = /* @__PURE__ */ new WeakSet();
1286
1332
  function prependPostCleanupSigintListener(listener) {
@@ -1543,11 +1589,11 @@ function collectCrossStackRefs(node, onRef, unconditional) {
1543
1589
  // src/provisioning/register-providers.ts
1544
1590
  let providerClasses;
1545
1591
  function loadProviderClasses() {
1546
- providerClasses ??= import("./provider-classes-B7kV4F_k.js");
1592
+ providerClasses ??= import("./provider-classes-CXmZ11Vu.js");
1547
1593
  return providerClasses;
1548
1594
  }
1549
1595
  function registerAllProviders(registry, classes) {
1550
- const { IAMRoleProvider, IAMPolicyProvider, IAMManagedPolicyProvider, IAMInstanceProfileProvider, IAMAccessKeyProvider, IAMUserGroupProvider, S3BucketProvider, S3BucketPolicyProvider, SQSQueueProvider, SQSQueuePolicyProvider, SNSTopicProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, LambdaFunctionProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaEventSourceMappingProvider, LambdaLayerVersionProvider, LambdaEventInvokeConfigProvider, LambdaMicrovmImageProvider, LambdaWebFunctionRevisionProvider, LambdaWebFunctionEndpointProvider, LambdaNetworkConnectorProvider, DynamoDBTableProvider, DynamoDBGlobalTableProvider, LogsLogGroupProvider, LogsDeliverySourceProvider, LogsDeliveryDestinationProvider, LogsDeliveryProvider, CloudWatchAlarmProvider, LightsailAlarmProvider, CloudWatchAnomalyDetectorProvider, SecretsManagerSecretProvider, SSMParameterProvider, EventBridgeRuleProvider, EventBridgeBusProvider, EventBridgeArchiveProvider, EC2Provider, ApiGatewayProvider, ApiGatewayV2Provider, CloudFrontOAIProvider, CloudFrontOACProvider, CloudFrontDistributionProvider, AgentCoreRuntimeProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, StepFunctionsProvider, ECSProvider, ELBv2Provider, RDSProvider, RDSDBProxyProvider, RDSDBProxyEndpointProvider, RDSDBProxyTargetGroupProvider, DocDBProvider, DocDBSubnetGroupProvider, AppConfigEnvironmentProvider, NeptuneProvider, Route53Provider, WAFv2WebACLProvider, CognitoUserPoolProvider, ElastiCacheProvider, ServiceDiscoveryProvider, AppSyncProvider, GlueProvider, GlueWorkflowProvider, GlueSecurityConfigurationProvider, GlueJobProvider, GlueCrawlerProvider, GlueConnectionProvider, GlueTriggerProvider, KMSProvider, BudgetsBudgetProvider, KinesisStreamProvider, KinesisStreamConsumerProvider, SchedulerScheduleProvider, PipesPipeProvider, EFSProvider, FSxFileSystemProvider, EMRClusterProvider, EMRInstanceGroupConfigProvider, EMRInstanceFleetConfigProvider, FirehoseProvider, CloudTrailProvider, CodeBuildProvider, CodeCommitRepositoryProvider, DLMLifecyclePolicyProvider, S3VectorsProvider, S3DirectoryBucketProvider, S3TablesProvider, ECRProvider, ASGProvider, NestedStackProvider, WaitConditionHandleProvider, WaitConditionProvider, ACMCertificateProvider } = classes;
1596
+ const { IAMRoleProvider, IAMPolicyProvider, IAMManagedPolicyProvider, IAMInstanceProfileProvider, IAMAccessKeyProvider, IAMUserGroupProvider, S3BucketProvider, S3BucketPolicyProvider, SQSQueueProvider, SQSQueuePolicyProvider, SNSTopicProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, LambdaFunctionProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaEventSourceMappingProvider, LambdaLayerVersionProvider, LambdaEventInvokeConfigProvider, LambdaMicrovmImageProvider, LambdaWebFunctionRevisionProvider, LambdaWebFunctionEndpointProvider, LambdaNetworkConnectorProvider, DynamoDBTableProvider, DynamoDBGlobalTableProvider, LogsLogGroupProvider, LogsDeliverySourceProvider, LogsDeliveryDestinationProvider, LogsDeliveryProvider, CloudWatchAlarmProvider, LightsailAlarmProvider, CloudWatchAnomalyDetectorProvider, SecretsManagerSecretProvider, SSMParameterProvider, EventBridgeRuleProvider, EventBridgeBusProvider, EventBridgeArchiveProvider, ConnectInstanceProvider, EC2Provider, ApiGatewayProvider, ApiGatewayV2Provider, CloudFrontOAIProvider, CloudFrontOACProvider, CloudFrontDistributionProvider, AgentCoreRuntimeProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, StepFunctionsProvider, ECSProvider, ELBv2Provider, RDSProvider, RDSDBProxyProvider, RDSDBProxyEndpointProvider, RDSDBProxyTargetGroupProvider, DocDBProvider, DocDBSubnetGroupProvider, AppConfigEnvironmentProvider, NeptuneProvider, Route53Provider, WAFv2WebACLProvider, CognitoUserPoolProvider, ElastiCacheProvider, ServiceDiscoveryProvider, AppSyncProvider, GlueProvider, GlueWorkflowProvider, GlueSecurityConfigurationProvider, GlueJobProvider, GlueCrawlerProvider, GlueConnectionProvider, GlueTriggerProvider, KMSProvider, BudgetsBudgetProvider, KinesisStreamProvider, KinesisStreamConsumerProvider, SchedulerScheduleProvider, PipesPipeProvider, EFSProvider, FSxFileSystemProvider, EMRClusterProvider, EMRInstanceGroupConfigProvider, EMRInstanceFleetConfigProvider, FirehoseProvider, CloudTrailProvider, CodeBuildProvider, CodeCommitRepositoryProvider, DLMLifecyclePolicyProvider, S3VectorsProvider, S3DirectoryBucketProvider, S3TablesProvider, ECRProvider, ASGProvider, NestedStackProvider, WaitConditionHandleProvider, WaitConditionProvider, ACMCertificateProvider } = classes;
1551
1597
  registry.register("AWS::IAM::Role", new IAMRoleProvider());
1552
1598
  registry.register("AWS::IAM::Policy", new IAMPolicyProvider());
1553
1599
  registry.register("AWS::IAM::ManagedPolicy", new IAMManagedPolicyProvider());
@@ -1589,6 +1635,7 @@ function registerAllProviders(registry, classes) {
1589
1635
  registry.register("AWS::Events::Rule", new EventBridgeRuleProvider());
1590
1636
  registry.register("AWS::Events::EventBus", new EventBridgeBusProvider());
1591
1637
  registry.register("AWS::Events::Archive", new EventBridgeArchiveProvider());
1638
+ registry.register("AWS::Connect::Instance", new ConnectInstanceProvider());
1592
1639
  const ec2Provider = new EC2Provider();
1593
1640
  registry.register("AWS::EC2::VPC", ec2Provider);
1594
1641
  registry.register("AWS::EC2::Subnet", ec2Provider);
@@ -3088,7 +3135,13 @@ async function confirmAutoAssetStorageCreate(args) {
3088
3135
  return promptYesNo(`Region '${assetRegion}' has no cdkd asset storage yet. Create it now (S3 bucket cdkd-assets-${accountId}-${assetRegion} + container-asset ECR repo, out of 'cdk gc' reach)?`);
3089
3136
  }
3090
3137
  const FORCE_QUIT_ABORT_BUDGET_MS = 5e3;
3091
- function exitAfterAbortingUploads(exit, write, abort = abortInFlightMultipartUploads, budgetMs = FORCE_QUIT_ABORT_BUDGET_MS) {
3138
+ function forceQuitRollbackLine(stackName) {
3139
+ return `What the deploy changed so far was recorded; revert it with: ${pasteableCommand("cdkd rollback", [{
3140
+ value: stackName,
3141
+ hole: "stack"
3142
+ }]).command}\n`;
3143
+ }
3144
+ function exitAfterAbortingUploads(exit, write, abort = abortInFlightMultipartUploads, budgetMs = FORCE_QUIT_ABORT_BUDGET_MS, flush = startForceQuitFlushes, code = 130) {
3092
3145
  let started;
3093
3146
  try {
3094
3147
  started = abort();
@@ -3098,42 +3151,66 @@ function exitAfterAbortingUploads(exit, write, abort = abortInFlightMultipartUpl
3098
3151
  done: Promise.resolve()
3099
3152
  };
3100
3153
  }
3154
+ let flushing;
3155
+ try {
3156
+ flushing = flush();
3157
+ } catch {
3158
+ flushing = {
3159
+ pending: 0,
3160
+ done: Promise.resolve([])
3161
+ };
3162
+ }
3101
3163
  const { destinations } = started;
3102
3164
  let exited = false;
3103
- const finish = (confirmed) => {
3165
+ const finish = (recorded) => {
3104
3166
  if (exited) return;
3105
3167
  exited = true;
3168
+ const confirmed = recorded !== void 0;
3106
3169
  if (destinations.length > 0) {
3107
3170
  const list = destinations.map((d) => displaySafe(d)).join(", ");
3108
3171
  write(confirmed ? `Interrupted: aborted the in-flight asset upload(s) ${list}.\n` : `Interrupted: exiting before the abort of the in-flight asset upload(s) ${list} was confirmed; the asset bucket's lifecycle rule removes what is left.\n`);
3109
3172
  }
3110
- exit(130);
3173
+ if (recorded === void 0 && flushing.pending > 0) write(`Force-quit: exiting before the rollback journal was written; ${proseQuoted(cdkdRemedy("cdkd rollback"))} may not be able to revert what this deploy changed.\n`);
3174
+ for (const stackName of recorded ?? []) write(forceQuitRollbackLine(stackName));
3175
+ exit(code);
3111
3176
  };
3112
- const timer = setTimeout(() => finish(false), budgetMs);
3113
- return started.done.catch(() => void 0).then(() => {
3177
+ const timer = setTimeout(() => finish(void 0), budgetMs);
3178
+ return Promise.all([started.done.catch(() => void 0), flushing.done.catch(() => [])]).then(([, recorded]) => {
3114
3179
  clearTimeout(timer);
3115
- finish(true);
3180
+ finish(recorded);
3116
3181
  });
3117
3182
  }
3183
+ const SIGHUP_EXIT_CODE = 129;
3118
3184
  function createDeploySigintHandler(options) {
3119
3185
  const write = options.write ?? ((text) => void process.stderr.write(text));
3120
3186
  const exit = options.exit ?? ((code) => process.exit(code));
3121
3187
  let signals = 0;
3122
- return () => {
3188
+ let forceQuitting;
3189
+ const forceQuit = (code) => {
3190
+ forceQuitting = code;
3191
+ write(`
3192
+ Force-quit: stack locks may not be released. If the next run reports a lock, run this for EACH stack it names, in the region-qualified form — see the message that run prints.\nRelease with: ${forceQuitReleaseCommand()}\n`);
3193
+ exitAfterAbortingUploads(exit, write, options.abort, options.budgetMs, options.flush, code);
3194
+ };
3195
+ const handler = () => {
3123
3196
  signals++;
3197
+ if (forceQuitting === 129) return;
3198
+ if (forceQuitting !== void 0) {
3199
+ exit(130);
3200
+ return;
3201
+ }
3124
3202
  if (signals === 1) {
3125
3203
  write("\nInterrupted — waiting for in-progress operations to complete...\n");
3126
3204
  options.onFirst();
3127
3205
  return;
3128
3206
  }
3129
- if (signals > 2) {
3130
- exit(130);
3131
- return;
3132
- }
3133
- write(`
3134
- Force-quit: stack locks may not be released. If the next run reports a lock, run this for EACH stack it names, in the region-qualified form — see the message that run prints.\nRelease with: ${forceQuitReleaseCommand()}\n`);
3135
- exitAfterAbortingUploads(exit, write, options.abort, options.budgetMs);
3207
+ forceQuit(130);
3136
3208
  };
3209
+ return Object.assign(handler, { hangup: () => {
3210
+ if (forceQuitting !== void 0) return;
3211
+ options.onFirst();
3212
+ forceQuit(129);
3213
+ } });
3137
3214
  }
3138
3215
 
3139
3216
  // src/cli/commands/deploy/stack-deploy.ts
@@ -3248,6 +3325,7 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
3248
3325
  }
3249
3326
  const assetRedirect = stackRedirects.get(stackInfo);
3250
3327
  const updatePolicy = resolveUpdatePolicy(options.updatePolicy);
3328
+ const stackTags = ctx.stackTagsOverride ?? stackInfo.tags;
3251
3329
  const deployEngineOptions = {
3252
3330
  concurrency: options.concurrency,
3253
3331
  dryRun: options.dryRun,
@@ -3284,7 +3362,7 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
3284
3362
  approveDeployment
3285
3363
  },
3286
3364
  ...stackInfo.terminationProtection === true && { terminationProtection: true },
3287
- ...stackInfo.tags !== void 0 && { stackTags: stackInfo.tags },
3365
+ ...stackTags !== void 0 && { stackTags },
3288
3366
  inRunStacks: ctx.inRunStacks
3289
3367
  };
3290
3368
  const stackDeployEngine = new DeployEngine(stackStateBackend, stackLockManager, dagBuilder, diffCalculator, stackProviderRegistry, deployEngineOptions, stackRegion, exportIndexStore);
@@ -3414,6 +3492,7 @@ async function deployCommand(stacks, options) {
3414
3492
  const approveDeployment = requireApproval !== "never" && !options.dryRun ? createApprovalPrompter({ yes: options.yes ?? false }) : void 0;
3415
3493
  const resolvedOutputsFile = resolveOutputsFile(options.outputsFile);
3416
3494
  const outputsFile = options.dryRun ? void 0 : resolvedOutputsFile;
3495
+ const stackTagsOverride = resolveStackTagsOverride(options.tags, (line) => logger.warn(line));
3417
3496
  const rawNamedRegion = rawCliRegion(options.region);
3418
3497
  foldRegionOption(options);
3419
3498
  await applyRoleArnIfSet({
@@ -3455,6 +3534,7 @@ async function deployCommand(stacks, options) {
3455
3534
  deployInterrupted = true;
3456
3535
  } });
3457
3536
  process.on("SIGINT", topLevelSigintHandler);
3537
+ process.on("SIGHUP", topLevelSigintHandler.hangup);
3458
3538
  const unforwardSigterm = forwardSigtermToSigint();
3459
3539
  let preflightBackendForCleanup;
3460
3540
  try {
@@ -3657,6 +3737,7 @@ async function deployCommand(stacks, options) {
3657
3737
  exportIndexStore,
3658
3738
  accountId,
3659
3739
  outputsFile,
3740
+ stackTagsOverride,
3660
3741
  stackOutputs,
3661
3742
  addUnaddressed: (stackUnaddressed, crossPrefixKept) => {
3662
3743
  totalUnaddressed += stackUnaddressed;
@@ -3697,6 +3778,7 @@ async function deployCommand(stacks, options) {
3697
3778
  runClock.lap("assets + stacks, summary");
3698
3779
  unforwardSigterm();
3699
3780
  process.removeListener("SIGINT", topLevelSigintHandler);
3781
+ process.removeListener("SIGHUP", topLevelSigintHandler.hangup);
3700
3782
  awsClients.destroy();
3701
3783
  preflightBackendForCleanup?.destroyClient();
3702
3784
  for (const line of renderPhaseTimings()) logger.info(line);
@@ -3716,6 +3798,7 @@ function createDeployCommand() {
3716
3798
  noLocalCustomResourcesOption,
3717
3799
  requireApprovalOption,
3718
3800
  outputsFileOption,
3801
+ stackTagsOption,
3719
3802
  ...contextOptions,
3720
3803
  ...annotationMessageOptions
3721
3804
  ].forEach((opt) => cmd.addOption(opt));
@@ -6711,6 +6794,7 @@ async function diffCommand(stacks, options) {
6711
6794
  if (securityOnly && options.json === true) throw new CdkdError("--security-only cannot be used with --json: it prints the security tables only", "INCOMPATIBLE_OPTIONS");
6712
6795
  const providerClasses = await loadProviderClasses();
6713
6796
  const logger = getLogger();
6797
+ const stackTagsOverride = resolveStackTagsOverride(options.tags, (line) => logger.warn(line));
6714
6798
  if (options.json) logger.setLevel("warn");
6715
6799
  else if (options.verbose) logger.setLevel("debug");
6716
6800
  foldRegionOption(options);
@@ -6879,12 +6963,13 @@ async function diffCommand(stacks, options) {
6879
6963
  const rewritten = rewriteTemplateAssetReferences(stackInfo.template, assetRedirect);
6880
6964
  logger.debug(`Rewrote ${rewritten} asset reference(s) to cdkd asset storage in template of stack ${stackInfo.stackName}`);
6881
6965
  }
6966
+ const stackTags = stackTagsOverride ?? stackInfo.tags;
6882
6967
  trees.push(await buildDiffTree({
6883
6968
  stackName: stackInfo.stackName,
6884
6969
  displayName: shownName,
6885
6970
  region: stackRegion,
6886
6971
  template: stackInfo.template,
6887
- ...stackInfo.tags !== void 0 && { stackTags: stackInfo.tags },
6972
+ ...stackTags !== void 0 && { stackTags },
6888
6973
  nestedTemplates: stackInfo.nestedTemplates ?? nullPrototypeRecord(),
6889
6974
  recursive,
6890
6975
  stateBackend,
@@ -6989,6 +7074,7 @@ function createDiffCommand() {
6989
7074
  ...stackOptions,
6990
7075
  ...contextOptions
6991
7076
  ].forEach((opt) => cmd.addOption(opt));
7077
+ cmd.addOption(stackTagsOption);
6992
7078
  cmd.addOption(regionOption);
6993
7079
  return cmd;
6994
7080
  }
@@ -19908,15 +19994,24 @@ async function collectImportFailureSummary(cfnClient, stackName) {
19908
19994
  if (failures.length === 0) return "";
19909
19995
  return failures.map((f) => ` - ${rowIdent(f.logicalId)} (${rowIdent(f.type)}): ${displayAwsMessage(f.reason)}`).join("\n");
19910
19996
  }
19911
- async function flipStackToUpdateComplete(cfnClient, cfnStackName, parameters) {
19997
+ async function flipStackToUpdateComplete(cfnClient, cfnStackName, parameters, stackTags = {}) {
19998
+ await updateStackTagsOnly(cfnClient, cfnStackName, parameters, [...cfnTagList(stackTags), {
19999
+ Key: "cdkd:nested-export-flip",
20000
+ Value: `${(/* @__PURE__ */ new Date()).toISOString()}-${randomUUID().slice(0, 8)}`
20001
+ }]);
20002
+ }
20003
+ function cfnTagList(tags) {
20004
+ return Object.entries(tags).map(([Key, Value]) => ({
20005
+ Key,
20006
+ Value
20007
+ }));
20008
+ }
20009
+ async function updateStackTagsOnly(cfnClient, cfnStackName, parameters, tags) {
19912
20010
  await cfnClient.send(new UpdateStackCommand({
19913
20011
  StackName: cfnStackName,
19914
20012
  UsePreviousTemplate: true,
19915
20013
  ...parameters.length > 0 && { Parameters: parameters },
19916
- Tags: [{
19917
- Key: "cdkd:nested-export-flip",
19918
- Value: `${(/* @__PURE__ */ new Date()).toISOString()}-${randomUUID().slice(0, 8)}`
19919
- }],
20014
+ Tags: tags,
19920
20015
  Capabilities: [
19921
20016
  "CAPABILITY_IAM",
19922
20017
  "CAPABILITY_NAMED_IAM",
@@ -19930,6 +20025,16 @@ async function flipStackToUpdateComplete(cfnClient, cfnStackName, parameters) {
19930
20025
  maxDelay: 10
19931
20026
  }, { StackName: cfnStackName });
19932
20027
  }
20028
+ async function applyExportedStackTags(cfnClient, cfnStackName, parameters, stackTags) {
20029
+ if (stackTags === void 0 || Object.keys(stackTags).length === 0) return;
20030
+ const logger = getLogger();
20031
+ logger.info(safeMsg`Setting the stack tags of CloudFormation stack ${quotedOrNotShown(cfnStackName)}...`);
20032
+ try {
20033
+ await updateStackTagsOnly(cfnClient, cfnStackName, parameters, cfnTagList(stackTags));
20034
+ } catch (err) {
20035
+ logger.warn(safeMsg`The stack tags of CloudFormation stack ${quotedOrNotShown(cfnStackName)} were not set: ` + safeMsg`${displayAwsMessage(describeAwsFailure(err).detail)}. The export itself completed; ` + `the next 'cdk deploy' of the stack sets them.`);
20036
+ }
20037
+ }
19933
20038
  async function fetchCfnStackTemplate(cfnClient, cfnStackName) {
19934
20039
  const resp = await cfnClient.send(new GetTemplateCommand({
19935
20040
  StackName: cfnStackName,
@@ -20019,11 +20124,12 @@ async function removeExportedStackRecord(stateBackend, stackName, region, logger
20019
20124
  await releaseRegistryMarkerQuietly(stateBackend, stackName, region, logger);
20020
20125
  }
20021
20126
  async function runPerStackImportPhases(ctx) {
20022
- const { logger, args, deps, rootStackName, leafFirst, cfnStackNameOf, perStackPlans, paramsByCdkdName, sessionIntrinsicSkipped, cfnArnByCdkdName, uploadCleanups, importedStacks, nestedResumeTail } = ctx;
20127
+ const { logger, args, deps, rootStackName, leafFirst, cfnStackNameOf, perStackPlans, paramsByCdkdName, stackTagsByCdkdName, sessionIntrinsicSkipped, cfnArnByCdkdName, uploadCleanups, importedStacks, nestedResumeTail } = ctx;
20023
20128
  for (let i = 0; i < perStackPlans.length; i++) {
20024
20129
  const plan = perStackPlans[i];
20025
20130
  logger.info(`[${i + 1}/${perStackPlans.length}] Importing cdkd stack ${quotedOrNotShown(plan.cdkdName)} → CFn stack ${quotedOrNotShown(plan.cfnName)} (${plan.phase1Imports.length} leaf, ${plan.nestedStackRows.length} nested-child adoption)`);
20026
20131
  const stackParameters = paramsByCdkdName.get(plan.cdkdName) ?? [];
20132
+ const stackTags = stackTagsByCdkdName.get(plan.cdkdName) ?? {};
20027
20133
  const afterImport = async (what, stage, step) => {
20028
20134
  try {
20029
20135
  return await step();
@@ -20059,7 +20165,7 @@ async function runPerStackImportPhases(ctx) {
20059
20165
  logger.info(` ✓ Phase 1A: CFn stack ${quotedOrNotShown(plan.cfnName)} created via IMPORT (${plan.phase1Imports.length} leaf resource(s)).`);
20060
20166
  if (plan.cdkdName !== rootStackName) {
20061
20167
  logger.info(` Flipping ${quotedOrNotShown(plan.cfnName)} to UPDATE_COMPLETE so it can be adopted as a nested member by its parent's Phase 1B...`);
20062
- await afterImport("The no-op tag update moving its CloudFormation stack out of IMPORT_COMPLETE", "imported", () => flipStackToUpdateComplete(deps.cfnClient, plan.cfnName, stackParameters));
20168
+ await afterImport("The no-op tag update moving its CloudFormation stack out of IMPORT_COMPLETE", "imported", () => flipStackToUpdateComplete(deps.cfnClient, plan.cfnName, stackParameters, stackTags));
20063
20169
  }
20064
20170
  const rewrittenNestedRows = /* @__PURE__ */ new Map();
20065
20171
  if (plan.nestedStackRows.length > 0) {
@@ -20101,7 +20207,7 @@ async function runPerStackImportPhases(ctx) {
20101
20207
  logger.info(` ✓ Phase 1B: parent ${quotedOrNotShown(plan.cfnName)} adopted ${plan.nestedStackRows.length} nested child(ren) via UPDATE-IMPORT.`);
20102
20208
  if (plan.cdkdName !== rootStackName) {
20103
20209
  logger.info(` Flipping ${quotedOrNotShown(plan.cfnName)} back to UPDATE_COMPLETE so its own parent's Phase 1B can adopt it...`);
20104
- await afterImport("The no-op tag update moving its CloudFormation stack back out of IMPORT_COMPLETE after its nested-child adoption", "adopted", () => flipStackToUpdateComplete(deps.cfnClient, plan.cfnName, stackParameters));
20210
+ await afterImport("The no-op tag update moving its CloudFormation stack back out of IMPORT_COMPLETE after its nested-child adoption", "adopted", () => flipStackToUpdateComplete(deps.cfnClient, plan.cfnName, stackParameters, stackTags));
20105
20211
  }
20106
20212
  }
20107
20213
  if (plan.recreateBeforePhase2.length > 0) for (const entry of plan.recreateBeforePhase2) {
@@ -20131,6 +20237,7 @@ async function runPerStackImportPhases(ctx) {
20131
20237
  }
20132
20238
  logger.info(` ✓ Phase 2: stack ${quotedOrNotShown(plan.cfnName)} updated (${plan.phase2Creates.length} non-importable CREATE, ${plan.recreateBeforePhase2.length} re-CREATE).`);
20133
20239
  }
20240
+ if (plan.cdkdName === rootStackName) await applyExportedStackTags(deps.cfnClient, plan.cfnName, stackParameters, stackTags);
20134
20241
  }
20135
20242
  const stateDeletionFailures = [];
20136
20243
  for (const node of leafFirst) try {
@@ -20168,6 +20275,49 @@ async function runPerStackImportPhases(ctx) {
20168
20275
  };
20169
20276
  }
20170
20277
 
20278
+ // src/cli/commands/export/exported-stack-tags.ts
20279
+ function isRecord$1(value) {
20280
+ return value !== null && typeof value === "object" && !Array.isArray(value);
20281
+ }
20282
+ function rowTagsProperty(template, logicalId) {
20283
+ const resources = template["Resources"];
20284
+ if (!isRecord$1(resources) || !hasOwnKey(resources, logicalId)) return void 0;
20285
+ const row = resources[logicalId];
20286
+ const properties = isRecord$1(row) ? row["Properties"] : void 0;
20287
+ return isRecord$1(properties) ? properties["Tags"] : void 0;
20288
+ }
20289
+ function exportedStackTagsByStack(plans, rootStackName, rootStackTags, warn) {
20290
+ const planByName = new Map(plans.map((plan) => [plan.cdkdName, plan]));
20291
+ const tagsByName = /* @__PURE__ */ new Map();
20292
+ const visit = (cdkdName, tags) => {
20293
+ tagsByName.set(cdkdName, tags);
20294
+ const plan = planByName.get(cdkdName);
20295
+ if (plan === void 0) return;
20296
+ for (const row of plan.nestedStackRows) {
20297
+ let rowTags = literalRowTags(rowTagsProperty(plan.template, row.logicalId));
20298
+ if (rowTags !== void 0 && Object.values(rowTags).some((v) => v.includes("{{resolve:"))) rowTags = void 0;
20299
+ if (rowTags === void 0) {
20300
+ warn(`The Tags of nested stack row ${rowIdent(row.logicalId)} in ${quotedOrNotShown(cdkdName)} are not literal, so its exported CloudFormation stack gets only its parent's stack tags; the next 'cdk deploy' of the root stack applies the rest.`);
20301
+ rowTags = {};
20302
+ }
20303
+ visit(row.childStackName, childStackTags(tags, rowTags));
20304
+ }
20305
+ };
20306
+ visit(rootStackName, childStackTags(rootStackTags, {}));
20307
+ return tagsByName;
20308
+ }
20309
+ const CFN_MAX_STACK_TAGS = 50;
20310
+ function refuseFlipTagBudget(tagsByName, rootStackName) {
20311
+ const over = [];
20312
+ for (const [cdkdName, tags] of tagsByName) {
20313
+ if (cdkdName === rootStackName) continue;
20314
+ const count = Object.keys(tags).length;
20315
+ if (count + 1 > 50) over.push(`${quotedOrNotShown(cdkdName)} (${count} stack tags)`);
20316
+ }
20317
+ if (over.length === 0) return;
20318
+ throw new Error(`Refusing to export: CloudFormation allows ${50} stack tags, and each nested stack is moved out of IMPORT_COMPLETE by an update that adds one more ('cdkd:nested-export-flip'). These nested stacks have no room for it: ${over.join(", ")}. Their tags are the parent's stack tags plus the nested stack resource's own Tags; remove enough to leave each at 49 or fewer, deploy, and run the export again. Nothing was changed.`);
20319
+ }
20320
+
20171
20321
  // src/cli/commands/export/per-stack-loop.ts
20172
20322
  async function runPerStackImportLoop(args) {
20173
20323
  const logger = getLogger();
@@ -20244,6 +20394,8 @@ async function runPerStackImportLoop(args) {
20244
20394
  nestedStackRows: plan.nestedStackRows
20245
20395
  });
20246
20396
  }
20397
+ const stackTagsByCdkdName = exportedStackTagsByStack(perStackPlans, rootStackName, args.rootStackTags, (line) => logger.warn(line));
20398
+ refuseFlipTagBudget(stackTagsByCdkdName, rootStackName);
20247
20399
  const totalPhase2Creates = perStackPlans.reduce((acc, p) => acc + p.phase2Creates.length, 0);
20248
20400
  const totalRecreate = perStackPlans.reduce((acc, p) => acc + p.recreateBeforePhase2.length, 0);
20249
20401
  logger.info("");
@@ -20342,6 +20494,7 @@ async function runPerStackImportLoop(args) {
20342
20494
  cfnStackNameOf,
20343
20495
  perStackPlans,
20344
20496
  paramsByCdkdName,
20497
+ stackTagsByCdkdName,
20345
20498
  sessionIntrinsicSkipped,
20346
20499
  cfnArnByCdkdName,
20347
20500
  uploadCleanups,
@@ -20405,11 +20558,14 @@ async function exportCommand(stackArg, options) {
20405
20558
  const lockManager = new LockManager(awsClients.s3, stateConfig);
20406
20559
  let template;
20407
20560
  let legacyAssetStack;
20561
+ let stackTags;
20408
20562
  let resolvedStackName;
20409
20563
  let synthedRegion;
20410
20564
  let templateFormat = "json";
20411
20565
  let allSynthStacks = [];
20412
20566
  let rootNestedTemplatePaths = nullPrototypeRecord();
20567
+ const stackTagsOverride = resolveStackTagsOverride(options.tags, (line) => logger.warn(line));
20568
+ stackTags = stackTagsOverride;
20413
20569
  if (options.template) {
20414
20570
  if (!stackArg) throw new Error("--template requires a stack name as a positional argument to identify the cdkd state record.");
20415
20571
  const parsed = parseTemplateFile(options.template);
@@ -20445,6 +20601,7 @@ async function exportCommand(stackArg, options) {
20445
20601
  refuseFailedLookups([stackInfo], result.stacks, result.failedLookups);
20446
20602
  template = stackInfo.template;
20447
20603
  legacyAssetStack = stackInfo;
20604
+ stackTags = stackTagsOverride ?? stackInfo.tags;
20448
20605
  resolvedStackName = stackInfo.stackName;
20449
20606
  synthedRegion = stackInfo.region;
20450
20607
  rootNestedTemplatePaths = stackInfo.nestedTemplates ?? nullPrototypeRecord();
@@ -20541,6 +20698,7 @@ async function exportCommand(stackArg, options) {
20541
20698
  childMap: childOverrides
20542
20699
  },
20543
20700
  rootParameters: rootParametersForNested,
20701
+ rootStackTags: stackTags,
20544
20702
  deps: {
20545
20703
  cfnClient: awsClients.cloudFormation,
20546
20704
  ec2Client: awsClients.ec2,
@@ -20665,6 +20823,7 @@ async function exportCommand(stackArg, options) {
20665
20823
  2. Re-run the phase 2 UPDATE manually with the full synth template:
20666
20824
  ${phase2RetryCommand(cfnStackName)}\n 3. Once phase 2 succeeds, clean up cdkd's stale state record.${orphan.note}\n Run: ${orphan.command}`);
20667
20825
  }
20826
+ await applyExportedStackTags(awsClients.cloudFormation, cfnStackName, cfnParameters, stackTags);
20668
20827
  await removeExportedStackRecord(stateBackend, resolvedStackName, targetRegion, logger);
20669
20828
  if (typeof state.signalReceiverStackId === "string") await deleteSignalReceiver(awsClients.cloudFormation, state.signalReceiverStackId, logger);
20670
20829
  logger.info(`cdkd state for ${quotedOrNotShown(resolvedStackName)} (${quotedRegion(targetRegion)}) removed. Manage the stack with 'cdk deploy' or 'aws cloudformation' from here on.`);
@@ -20685,7 +20844,7 @@ async function exportCommand(stackArg, options) {
20685
20844
 
20686
20845
  // src/cli/commands/export.ts
20687
20846
  function createExportCommand() {
20688
- const cmd = new Command("export").description("Hand a cdkd-managed stack over to CloudFormation via CFn IMPORT (changeset). AWS resources are unchanged; cdkd state for the stack is deleted on success. Mirror of `cdkd import` (AWS → cdkd) in the reverse direction (cdkd → CFn). Accepts JSON and YAML templates (YAML via a CFn-aware codec that preserves !Ref / !GetAtt / !Sub shorthand). Aborts if any resource is not CFn-importable.").argument("[stack]", "Stack name to export (auto-detected for single-stack apps)").option("--cfn-stack-name <name>", "Name of the destination CloudFormation stack for the root stack. Defaults to the cdkd stack name (or the cdkd2cfnStackName mapping when the name contains '~'). For per-nested-child overrides, use --cfn-child-stack-name.").option("--cfn-child-stack-name <pair...>", "Per-nested-child CFn stack-name override. Repeatable. Format: '<cdkdName>=<cfnName>' (e.g. --cfn-child-stack-name 'MyApp~Database=my-app-db'). The cdkd stack name for a nested child is '<parent>~<childLogicalId>' (v6 state-key form). Without an override the CFn name is derived by replacing '~' with '-'. Only consulted when the exported stack tree contains nested children; ignored for flat stacks.").option("--template <path>", "Path to a pre-rendered CloudFormation template (JSON or YAML — format auto-detected). Skips synth.").option("--stack-region <region>", "Region of the cdkd state record to operate on. Required when the same stack name has state in multiple regions.", parseStackRegion).option("--dry-run", "Print the import plan without creating a changeset.", false).option("--accept-transient-context", "Allow CLI -c key=value overrides at export time even though they are not persisted to cdk.json / cdk.context.json (default: refuse). When set, the user is responsible for passing the same -c flags to every future cdk deploy.", false).option("--include-non-importable", "Run a 2-phase migration when the stack contains non-importable resources (Custom::*). Phase 1 imports the importable resources; phase 2 CFn-CREATEs the non-importable ones, which re-invokes each Custom Resource's onCreate handler. Make sure onCreate is idempotent before enabling.", false).option("--parameter <key=value...>", "CFn template Parameter override, repeatable. Required when the synthesized template has Parameters without Default values; otherwise overrides the template's default value. Format: --parameter Key=Value.").option("--strict-cross-stack", "Refuse to export when sibling cdkd stacks in the same CDK app reference the exporting stack via Fn::GetStackOutput. Without the flag, cdkd warns and proceeds — the consumers keep resolving via the CloudFormation fallback (weak reference) unless they deploy with --no-cfn-fallback.", false).option("--skip-import-support-preflight", "Skip the pre-flight that refuses resource types whose CloudFormation registry schema says CFn cannot IMPORT them (no read handler AND NON_PROVISIONABLE), AND cdkd's short list of types measured refused by CreateChangeSet despite their registry schema (AWS::AppSync::GraphQLApi), and let CreateChangeSet answer instead. Neither check is AWS's supported-for-import list, so this is the escape hatch for a type AWS has since made importable. Expect the changeset to be rejected if the check was right.", false).option("--no-recreate-import-unsupported", "Block instead of auto-handling resource types AWS does NOT support in IMPORT changesets (AWS::IAM::Policy). Default behavior: cdkd skips these from phase 1, deletes the AWS-side resource between phases, and lets CFn re-CREATE in phase 2 (brief unavailability window). With this flag, the export aborts with a clear error instead.").action(withErrorHandling(exportCommand));
20847
+ const cmd = new Command("export").description("Hand a cdkd-managed stack over to CloudFormation via CFn IMPORT (changeset). AWS resources are unchanged; cdkd state for the stack is deleted on success. Mirror of `cdkd import` (AWS → cdkd) in the reverse direction (cdkd → CFn). Accepts JSON and YAML templates (YAML via a CFn-aware codec that preserves !Ref / !GetAtt / !Sub shorthand). Aborts if any resource is not CFn-importable.").argument("[stack]", "Stack name to export (auto-detected for single-stack apps)").option("--cfn-stack-name <name>", "Name of the destination CloudFormation stack for the root stack. Defaults to the cdkd stack name (or the cdkd2cfnStackName mapping when the name contains '~'). For per-nested-child overrides, use --cfn-child-stack-name.").option("--cfn-child-stack-name <pair>", "Per-nested-child CFn stack-name override. Repeatable. Format: '<cdkdName>=<cfnName>' (e.g. --cfn-child-stack-name 'MyApp~Database=my-app-db'). The cdkd stack name for a nested child is '<parent>~<childLogicalId>' (v6 state-key form). Without an override the CFn name is derived by replacing '~' with '-'. Only consulted when the exported stack tree contains nested children; ignored for flat stacks.", collectRepeated).option("--template <path>", "Path to a pre-rendered CloudFormation template (JSON or YAML — format auto-detected). Skips synth.").option("--stack-region <region>", "Region of the cdkd state record to operate on. Required when the same stack name has state in multiple regions.", parseStackRegion).option("--dry-run", "Print the import plan without creating a changeset.", false).option("--accept-transient-context", "Allow CLI -c key=value overrides at export time even though they are not persisted to cdk.json / cdk.context.json (default: refuse). When set, the user is responsible for passing the same -c flags to every future cdk deploy.", false).option("--include-non-importable", "Run a 2-phase migration when the stack contains non-importable resources (Custom::*). Phase 1 imports the importable resources; phase 2 CFn-CREATEs the non-importable ones, which re-invokes each Custom Resource's onCreate handler. Make sure onCreate is idempotent before enabling.", false).option("--parameter <key=value>", "CFn template Parameter override, repeatable. Required when the synthesized template has Parameters without Default values; otherwise overrides the template's default value. Format: --parameter Key=Value.", collectRepeated).option("--strict-cross-stack", "Refuse to export when sibling cdkd stacks in the same CDK app reference the exporting stack via Fn::GetStackOutput. Without the flag, cdkd warns and proceeds — the consumers keep resolving via the CloudFormation fallback (weak reference) unless they deploy with --no-cfn-fallback.", false).option("--skip-import-support-preflight", "Skip the pre-flight that refuses resource types whose CloudFormation registry schema says CFn cannot IMPORT them (no read handler AND NON_PROVISIONABLE), AND cdkd's short list of types measured refused by CreateChangeSet despite their registry schema (AWS::AppSync::GraphQLApi), and let CreateChangeSet answer instead. Neither check is AWS's supported-for-import list, so this is the escape hatch for a type AWS has since made importable. Expect the changeset to be rejected if the check was right.", false).option("--no-recreate-import-unsupported", "Block instead of auto-handling resource types AWS does NOT support in IMPORT changesets (AWS::IAM::Policy). Default behavior: cdkd skips these from phase 1, deletes the AWS-side resource between phases, and lets CFn re-CREATE in phase 2 (brief unavailability window). With this flag, the export aborts with a clear error instead.").addOption(stackTagsOption).action(withErrorHandling(exportCommand));
20689
20848
  [
20690
20849
  ...commonOptions,
20691
20850
  ...appOptions,
@@ -27412,6 +27571,50 @@ async function readDeployedTemplate(cfnClient, stackName, consequence) {
27412
27571
  if (resources === null || typeof resources !== "object" || Array.isArray(resources)) throw refuse("the template CloudFormation last deployed has no Resources section.");
27413
27572
  return parsed;
27414
27573
  }
27574
+ async function readDeployedStackTags(cfnClient, stackName, consequence) {
27575
+ let tags;
27576
+ try {
27577
+ const stack = (await cfnClient.send(new DescribeStacksCommand({ StackName: stackName }))).Stacks?.[0];
27578
+ if (stack === void 0) throw new Error("the stack was not returned");
27579
+ tags = stack.Tags ?? [];
27580
+ } catch (err) {
27581
+ throw new Error(`--migrate-from-cloudformation: ` + safeMsg`reading the stack tags of the CloudFormation stack failed: ${cfnFailureText(err)}.` + ` ${consequence}`);
27582
+ }
27583
+ const read = {};
27584
+ for (const { Key: key, Value: value } of tags) {
27585
+ if (typeof key !== "string" || typeof value !== "string" || key.startsWith("aws:")) continue;
27586
+ defineOwnKey(read, key, value);
27587
+ }
27588
+ return read;
27589
+ }
27590
+ function nestedChildStackTags(parentStackTags, parentDeployedTemplate, rowLogicalId) {
27591
+ const tags = {};
27592
+ for (const [key, value] of Object.entries(parentStackTags)) defineOwnKey(tags, key, value);
27593
+ const resources = parentDeployedTemplate?.Resources;
27594
+ const rowTags = (resources !== void 0 && hasOwn(resources, rowLogicalId) ? resources[rowLogicalId] : void 0)?.Properties?.["Tags"];
27595
+ if (!Array.isArray(rowTags)) return tags;
27596
+ for (const entry of rowTags) {
27597
+ if (entry === null || typeof entry !== "object" || Array.isArray(entry)) continue;
27598
+ const { Key: key, Value: value } = entry;
27599
+ if (typeof key !== "string") continue;
27600
+ if (typeof value === "string" && !value.includes("{{resolve:")) defineOwnKey(tags, key, value);
27601
+ else delete tags[key];
27602
+ }
27603
+ return tags;
27604
+ }
27605
+ function migratedNestedStackTags(stackTags, deployedTemplate, rowLogicalIds) {
27606
+ const field = {};
27607
+ for (const logicalId of rowLogicalIds) {
27608
+ const tags = nestedChildStackTags(stackTags, deployedTemplate, logicalId);
27609
+ if (Object.keys(tags).length > 0) defineOwnKey(field, logicalId, tags);
27610
+ }
27611
+ return Object.keys(field).length > 0 ? field : void 0;
27612
+ }
27613
+ function withMigratedNestedStackTags(state, field) {
27614
+ if (field === void 0) delete state.nestedStackTags;
27615
+ else state.nestedStackTags = field;
27616
+ return state;
27617
+ }
27415
27618
  function newNames() {
27416
27619
  return {
27417
27620
  targets: /* @__PURE__ */ new Set(),
@@ -27866,7 +28069,8 @@ async function importNestedStackChildrenRecursive(args) {
27866
28069
  });
27867
28070
  const childDeployedTemplate = await readDeployedTemplate(args.cfnClient, childTreeNode.stackName, safeMsg`cdkd state for nested stack ${displaySafe(childStackName)} was not written ` + "(the parent's and earlier nested stacks' were), and the CloudFormation stack was not deleted; the re-run needs --force.");
27868
28071
  const childOverlay = overlayDeployedProperties(childStateTemplate, childDeployedTemplate, logger, displaySafe(childStackName));
27869
- const childRecordTemplate = childOverlay.template;
28072
+ const childStackTags = nestedChildStackTags(args.parentStackTags, args.parentDeployedTemplate, childLogicalId);
28073
+ const childRecordTemplate = await applyStackTagsToTemplate(childOverlay.template, childStackTags, (line) => logger.warn(line));
27870
28074
  const rows = [];
27871
28075
  for (const { logicalId, resource } of withDeployedDefinitions(childResources, childOverlay)) {
27872
28076
  if (resource.Type === "AWS::CloudFormation::Stack" && childTreeNode.nested.has(logicalId)) {
@@ -27907,6 +28111,7 @@ async function importNestedStackChildrenRecursive(args) {
27907
28111
  if (imports !== void 0) childStackState.imports = imports;
27908
28112
  if (outputReads !== void 0) childStackState.outputReads = outputReads;
27909
28113
  } else if (childStackInstanceId !== void 0) childStackState.stackInstanceId = childStackInstanceId;
28114
+ withMigratedNestedStackTags(childStackState, migratedNestedStackTags(childStackTags, childDeployedTemplate, childTreeNode.nested.keys()));
27910
28115
  const childDeployedParameters = namesAnyDeclaredParameter(childRecordTemplate) ? await readDeployedParameters(childTreeNode.stackName, args.cfnClient, logger, displaySafe(childStackName)) : void 0;
27911
28116
  const childUnsafeObservedBaselineLogicalIds = await withSharedDrainBudget(() => resolveImportedProperties(childStackState, childRecordTemplate, childRegion, stateBackend, logger, childDeployedParameters));
27912
28117
  await captureObservedForImportedResources(childStackState, providerRegistry, logger, childUnsafeObservedBaselineLogicalIds, rebuiltLogicalIdsFrom(rows, childRecordTemplate));
@@ -27919,6 +28124,8 @@ async function importNestedStackChildrenRecursive(args) {
27919
28124
  parentRegion: childRegion,
27920
28125
  parentNestedTemplates: indexGrandchildTemplatePaths(childStateTemplate, childTemplatePath),
27921
28126
  parentTree: childTreeNode,
28127
+ parentStackTags: childStackTags,
28128
+ parentDeployedTemplate: childDeployedTemplate,
27922
28129
  nestedPath: [...args.nestedPath, childLogicalId],
27923
28130
  replaced: args.replaced,
27924
28131
  stateBackend,
@@ -28032,7 +28239,7 @@ async function dispatchInRefOrder(resources, overrides, importRow) {
28032
28239
 
28033
28240
  // src/cli/commands/import/locked-import.ts
28034
28241
  async function runLockedImport(ctx) {
28035
- const { options, logger, stateBucket, lockRecovery, stateBackend, lockManager, stackInfo, targetRegion, regionClients, providerRegistry, assetRedirect, stateTemplate, overrides, userOverrideIds, autoModeCfnStackName, migrationCfnStackName, template, templateParser, resources, templateLogicalIds, accountIdForNestedSynth, selectiveMode, existingState, existingEtag, migrationPending, owner } = ctx;
28242
+ const { options, logger, stateBucket, lockRecovery, stateBackend, lockManager, stackInfo, targetRegion, regionClients, providerRegistry, assetRedirect, stateTemplate, stackTagsOverride, overrides, userOverrideIds, autoModeCfnStackName, migrationCfnStackName, template, templateParser, resources, templateLogicalIds, accountIdForNestedSynth, selectiveMode, existingState, existingEtag, migrationPending, owner } = ctx;
28036
28243
  let { migrationTree } = ctx;
28037
28244
  let recordTemplate = stateTemplate;
28038
28245
  let dispatchResources = resources;
@@ -28048,6 +28255,8 @@ async function runLockedImport(ctx) {
28048
28255
  recordTemplate = overlay.template;
28049
28256
  dispatchResources = withDeployedDefinitions(resources, overlay);
28050
28257
  }
28258
+ const recordStackTags = migrationCfnStackName !== void 0 ? await readDeployedStackTags(regionClients.cloudFormation, migrationCfnStackName, "cdkd state was not written and the CloudFormation stack was not changed.") : stackTagsOverride ?? stackInfo.tags;
28259
+ recordTemplate = await applyStackTagsToTemplate(recordTemplate, recordStackTags, (line) => logger.warn(line));
28051
28260
  const collectRows = () => dispatchInRefOrder(dispatchResources, overrides, async ({ logicalId, resource }, refValues) => {
28052
28261
  if (selectiveMode && !overrides.has(logicalId)) return {
28053
28262
  logicalId,
@@ -28079,6 +28288,7 @@ async function runLockedImport(ctx) {
28079
28288
  const assembleStackState = () => {
28080
28289
  const assembled = buildStackState(stackInfo.stackName, targetRegion, rows, templateParser, recordTemplate, existingState, selectiveMode);
28081
28290
  refuseMalformedResourceEntriesForImportSave(assembled, stackInfo.stackName, targetRegion, lockRecovery);
28291
+ if (migrationCfnStackName !== void 0 && migrationTree !== void 0) withMigratedNestedStackTags(assembled, migratedNestedStackTags(recordStackTags ?? {}, deployedTemplate, migrationTree.nested.keys()));
28082
28292
  return assembled;
28083
28293
  };
28084
28294
  let stackState = assembleStackState();
@@ -28175,6 +28385,8 @@ async function runLockedImport(ctx) {
28175
28385
  parentRegion: targetRegion,
28176
28386
  parentNestedTemplates: stackInfo.nestedTemplates ?? nullPrototypeRecord(),
28177
28387
  parentTree: migrationTree,
28388
+ parentStackTags: recordStackTags ?? {},
28389
+ parentDeployedTemplate: deployedTemplate,
28178
28390
  nestedPath: [],
28179
28391
  replaced: nestedReplaced,
28180
28392
  stateBackend,
@@ -28241,6 +28453,7 @@ async function importCommand(stackArg, options) {
28241
28453
  const lockManager = new LockManager(awsClients.s3, stateConfig);
28242
28454
  const appCmd = options.app || resolveApp();
28243
28455
  if (!appCmd) throw new Error("`cdkd state import` requires a CDK app: pass --app or set it in cdk.json. The template is read to find logical IDs, resource types, and dependencies.");
28456
+ const stackTagsOverride = resolveStackTagsOverride(options.tags, (line) => logger.warn(line));
28244
28457
  logger.info(synthesisStatusMessage(appCmd, "Synthesizing CDK app to read template..."));
28245
28458
  const synthesizer = new Synthesizer();
28246
28459
  const context = parseContextOptions(options.context);
@@ -28409,6 +28622,7 @@ async function importCommand(stackArg, options) {
28409
28622
  providerRegistry,
28410
28623
  assetRedirect,
28411
28624
  stateTemplate,
28625
+ stackTagsOverride,
28412
28626
  overrides,
28413
28627
  userOverrideIds,
28414
28628
  autoModeCfnStackName,
@@ -28438,7 +28652,7 @@ async function importCommand(stackArg, options) {
28438
28652
 
28439
28653
  // src/cli/commands/import.ts
28440
28654
  function createImportCommand() {
28441
- const cmd = new Command("import").description("Adopt already-deployed AWS resources into cdkd state. Reads the CDK app to find logical IDs, resource types, and dependencies. With no flags, imports every resource, resolving each physical id from the template's physical-name property and then from a same-named CloudFormation stack's DescribeStackResources. With --resource / --resource-mapping, only the listed resources are imported (CDK CLI parity); pass --auto to auto-resolve the rest.").argument("[stack]", "Stack to import. Optional when the synthesized app contains exactly one stack.").option("--resource <id=physical>", "Explicit physical-id override for one logical ID. Repeatable. When at least one --resource is given, only listed resources are imported (CDK CLI parity). Pass --auto to also auto-resolve everything else.", collectMultiple, []).option("--resource-mapping <file>", "Path to a JSON file of {logicalId: physicalId} overrides (CDK CLI `cdk import --resource-mapping` compatible). Implies selective mode unless --auto is set. Mutually exclusive with --resource-mapping-inline.").option("--resource-mapping-inline <json>", "Inline JSON object of {logicalId: physicalId} overrides (CDK CLI `cdk import --resource-mapping-inline` compatible). Same shape as --resource-mapping but supplied as a string — useful for non-TTY CI scripts that do not want a separate file. Implies selective mode unless --auto is set. Mutually exclusive with --resource-mapping.").option("--record-resource-mapping <file>", "After cdkd resolves every logical ID (via --resource / --resource-mapping / auto-resolution), write the resulting {logicalId: physicalId} map to <file> as JSON. Useful in auto / hybrid mode for capturing the auto-resolved mapping and feeding it back as --resource-mapping in non-interactive CI re-runs. Written before the confirmation prompt (so the user can review the file before saying \"yes\") and even when the user says \"no\". Mirrors `cdk import --record-resource-mapping`.").option("--auto", "Hybrid mode: when explicit overrides are supplied, ALSO auto-resolve every other resource in the template. Without this flag, --resource / --resource-mapping behave as a whitelist (CDK CLI parity).", false).option("--dry-run", "Show planned imports without writing state", false).option("--force", "Confirm a destructive write to existing state. Required for auto / whole-stack import when state already exists (rebuilds the entire resource map). Also required in selective mode if a listed override would overwrite a resource already in state. Not needed for a pure selective merge (adding new resources without touching unlisted entries).", false).option("--migrate-from-cloudformation [cfn-stack-name]", "Retire the named CloudFormation stack (deletes the CFn stack record; AWS resources are NOT deleted): inject DeletionPolicy=Retain and UpdateReplacePolicy=Retain on every resource via UpdateStack, write cdkd state from the physical IDs the stack holds after that update, then DeleteStack. cdkd takes over management. Pass without a value to use the cdkd stack name as the CFn stack name (the typical case for a CDK app that was previously deployed via `cdk deploy`); pass an explicit value when the CFn stack name differs.").addOption(useCdkBootstrapAssetsOption).action(withErrorHandling(importCommand));
28655
+ const cmd = new Command("import").description("Adopt already-deployed AWS resources into cdkd state. Reads the CDK app to find logical IDs, resource types, and dependencies. With no flags, imports every resource, resolving each physical id from the template's physical-name property and then from a same-named CloudFormation stack's DescribeStackResources. With --resource / --resource-mapping, only the listed resources are imported (CDK CLI parity); pass --auto to auto-resolve the rest.").argument("[stack]", "Stack to import. Optional when the synthesized app contains exactly one stack.").option("--resource <id=physical>", "Explicit physical-id override for one logical ID. Repeatable. When at least one --resource is given, only listed resources are imported (CDK CLI parity). Pass --auto to also auto-resolve everything else.", collectMultiple, []).option("--resource-mapping <file>", "Path to a JSON file of {logicalId: physicalId} overrides (CDK CLI `cdk import --resource-mapping` compatible). Implies selective mode unless --auto is set. Mutually exclusive with --resource-mapping-inline.").option("--resource-mapping-inline <json>", "Inline JSON object of {logicalId: physicalId} overrides (CDK CLI `cdk import --resource-mapping-inline` compatible). Same shape as --resource-mapping but supplied as a string — useful for non-TTY CI scripts that do not want a separate file. Implies selective mode unless --auto is set. Mutually exclusive with --resource-mapping.").option("--record-resource-mapping <file>", "After cdkd resolves every logical ID (via --resource / --resource-mapping / auto-resolution), write the resulting {logicalId: physicalId} map to <file> as JSON. Useful in auto / hybrid mode for capturing the auto-resolved mapping and feeding it back as --resource-mapping in non-interactive CI re-runs. Written before the confirmation prompt (so the user can review the file before saying \"yes\") and even when the user says \"no\". Mirrors `cdk import --record-resource-mapping`.").option("--auto", "Hybrid mode: when explicit overrides are supplied, ALSO auto-resolve every other resource in the template. Without this flag, --resource / --resource-mapping behave as a whitelist (CDK CLI parity).", false).option("--dry-run", "Show planned imports without writing state", false).option("--force", "Confirm a destructive write to existing state. Required for auto / whole-stack import when state already exists (rebuilds the entire resource map). Also required in selective mode if a listed override would overwrite a resource already in state. Not needed for a pure selective merge (adding new resources without touching unlisted entries).", false).option("--migrate-from-cloudformation [cfn-stack-name]", "Retire the named CloudFormation stack (deletes the CFn stack record; AWS resources are NOT deleted): inject DeletionPolicy=Retain and UpdateReplacePolicy=Retain on every resource via UpdateStack, write cdkd state from the physical IDs the stack holds after that update, then DeleteStack. cdkd takes over management. Pass without a value to use the cdkd stack name as the CFn stack name (the typical case for a CDK app that was previously deployed via `cdk deploy`); pass an explicit value when the CFn stack name differs.").addOption(useCdkBootstrapAssetsOption).addOption(stackTagsOption).action(withErrorHandling(importCommand));
28442
28656
  [
28443
28657
  ...commonOptions,
28444
28658
  ...appOptions,
@@ -37266,4 +37480,4 @@ function collectVerbFlags(program) {
37266
37480
  }
37267
37481
 
37268
37482
  export { effectiveInventoryItem as $, withRecordedCidrSpelling as A, LIFECYCLE_DEFAULT_STATUS as B, securityGroupReadbackDelays as C, stackIngressRuleHolder as D, singleSecurityGroupRuleId as E, clearLifecycleWritesOf as F, canonicalizeItemList as G, LIFECYCLE_RULE_PATH as H, lifecycleSettleTarget as I, lifecycleUsesFilterForm as J, effectiveLifecycleConfiguration as K, recordLifecycleWrite as L, sgRemovalRuleKey as M, sgRuleListMember as N, survivingRecordOfRuleId as O, LIFECYCLE_BASELINE_REREAD_DELAYS_MS as P, effectiveIntelligentTieringItem as Q, settleLifecycleRead as R, reconcileSgRules as S, sgRuleKey as T, LIFECYCLE_TAG_FILTERS_PATH as U, LIFECYCLE_FILTER_PATH as V, canonicalizeBlock as W, EVENTBRIDGE_CONFIG_PATH as X, parseCfnTimestamp as Y, effectiveAnalyticsItem as Z, ingressRuleIdentity as _, refuseRevertRevokingSiblingRules as a, declaresBucketObjectLock as at, isResendableSocketFailure as b, buildProgram, siblingIdOwnedSgRules as c, isPlainObject as ct, authorizeDefinitelyNotApplied as d, shownLifecycleRuleId as dt, effectiveNotificationConfiguration as et, canonicalizeSgInlineRuleProtocols as f, flattenIpPermissions as g, descriptionKey as h, resolveSecretDerivedPrincipals as i, configItemId as it, markCopiesAgreed as j, tagListsMatch as k, SG_READBACK_RETRY_DELAY_MS as l, manualBucketDeletionClause as lt, comparableIngressIdentity as m, holdsUnprovenSecretPrincipalToken as n, caughtErrorName as nt, sgRuleDiffKey as o, declaresNestedObjectLock as ot, canonicalizeSgRuleProtocol as p, lifecycleRuleScope as q, isResolvableSecretPrincipalList as r, coerceCfnNumber as rt, readSgIngressById as s, describeValue as st, runDestroyForStack as t, eventBridgeEnabledOf as tt, SG_RULE_PAGE_SIZE$1 as u, mergeLegacySingular as ut, isConnectTimeout as v, securityGroupRuleMatchesCfnIngress as w, narrowIngressIpProtocol as x, isDefaultEgressRule as y, takeLifecycleWrite as z };
37269
- //# sourceMappingURL=program-D4wssD37.js.map
37483
+ //# sourceMappingURL=program-DBiYxFDA.js.map